-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
CosmosDB with RBAC doesn't work #32197
Labels
area-cosmos
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-enhancement
Milestone
Comments
Using CreateContainerIfNotExists from the SDK client might do the trick: It performs a Read and then if the Read returns 404, does a Create. If the Container already exists, it will not perform the Create. Reference: |
Removing from milestone to re-discuss the priority on this. |
Poaching |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
area-cosmos
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-enhancement
It seems that the Cosmos Provider won't work with RBAC, because it unconditionally calls CreateContainerStreamAsync(), and management plane operations aren't supported under RBAC in CosmosDB. See https://aka.ms/cosmos-native-rbac.
The issue is probably at
efcore/src/EFCore.Cosmos/Storage/Internal/CosmosClientWrapper.cs
Line 189 in 0740f1c
Should probably be doing should be using
CreateIfNotExists
or do a Read instead of a Create + Conflict.Include stack traces
Include verbose output
Include provider and version information
EF Core version: 8.0.0-rtm.23512.13
Database provider: Microsoft.EntityFrameworkCore.Cosmos
Target framework: .NET 8.0
Operating system: Windows
IDE: Visual Studio 2022 17.9 Preview 1 (Internal)
The text was updated successfully, but these errors were encountered: