-
Notifications
You must be signed in to change notification settings - Fork 197
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,8 @@ param keyVaultName string | |
@allowed([ 'GlobalDocumentDB', 'MongoDB', 'Parse' ]) | ||
param kind string | ||
|
||
param disableLocalAuth bool = false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
||
resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2023-11-15' = { | ||
name: name | ||
kind: kind | ||
|
@@ -29,6 +31,7 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2023-11-15' = { | |
apiProperties: (kind == 'MongoDB') ? { serverVersion: '4.2' } : {} | ||
capabilities: [ { name: 'EnableServerless' } ] | ||
minimalTlsVersion: 'Tls12' | ||
disableLocalAuth: disableLocalAuth | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
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