Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to disable local auth on cosmosdb accounts #4054

Closed
wants to merge 2 commits into from

Conversation

sinedied
Copy link
Member

@sinedied sinedied commented Jul 1, 2024

This PR allows to restrict CosmosDB account to use managed identity only.

@@ -9,6 +9,8 @@ param keyVaultName string
@allowed([ 'GlobalDocumentDB', 'MongoDB', 'Parse' ])
param kind string

param disableLocalAuth bool = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does cosmos/mongo now support MI? It didn't when we built this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's now supported (except for Mongo vCore currently, which isn't covered by this template anyways)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I think in order to support this we'd need to update the templates to use MI instead of connection strings. Do you have a link to the doc that says Cosmos now supports MI for Mongo? I can't seem to find it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Digging a bit in the docs, it seems cosmos/mongo supports RBAC but not disabling local auth, as seen in the limitations section here: https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb/how-to-setup-rbac#limitations

I've previously seen this docs https://learn.microsoft.com/en-us/azure/cosmos-db/role-based-access-control and assumed it was available for MongoDB (not vCore) too. I'll update the PR to only surface the parameter for NoSQL

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but I don't think we'll take this change in infra/core since we are moving to AVM.

@@ -9,6 +9,8 @@ param keyVaultName string
@allowed([ 'GlobalDocumentDB', 'MongoDB', 'Parse' ])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do all changes in AVM, not infra/core.

Here's the issue: #3327

Here's the PR: #3976

Copy link
Contributor

Hi @sinedied. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing "/reopen" if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the "no-recent-activity" label; otherwise, this is likely to be closed again with the next cleanup pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue-addressed no-recent-activity identity issues with no activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants