You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[aztables] adding CosmosDB support for using TokenCredentials (Azure#23596)
Just a simple matter of using the proper scope when talking with CosmosDB, which apparently didn't support token auth when this library was first created.
Also includes some work to bring this up "to code", as it were:
* Tests now test against TokenCredentials for both Storage and CosmosDB (previously they only tested the constructor). Bicep file also now has an example of creating a custom role that contains the privileges needed since Cosmos has it's own RBAC.
* Readme and other text all updated to say "Entra ID" instead of AAD
FixesAzure#21760
Copy file name to clipboardExpand all lines: sdk/data/aztables/README.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,12 +59,15 @@ func main() {
59
59
For more information about table service URL's and how to configure custom domain names for Azure Storage check out the [official documentation][azure_portal_account_url]
60
60
61
61
#### Types of credentials
62
-
The clients support different forms of authentication. Cosmos accounts can use a Shared Key Credential, Connection String, or an Shared Access Signature Token for authentication. Storage account can use the same credentials as a Cosmos account and can use the credentials in [`azidentity`](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity) like `azidentity.NewDefaultAzureCredential()`.
63
62
64
-
The aztables package supports any of the types that implement the `azcore.TokenCredential` interface, authorization via a Connection String, or authorization with a Shared Access Signature Token.
63
+
Both services (Cosmos and Storage) support the the following forms of authentication:
64
+
- Microsoft Entra ID token, using one of the collection of types from the [`azidentity`](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity) module, like [azidentity.DefaultAzureCredential](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#readme-defaultazurecredential). Example [here](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/data/aztables#example-NewServiceClient).
65
+
- Shared Key Credential
66
+
- Connection String
67
+
- Shared Access Signature Token
65
68
66
-
##### Creating the client with an AAD credential
67
-
Use AAD authentication as the credential parameter to authenticate the client:
69
+
##### Creating the client with a Microsoft Entra ID credential
70
+
Use Microsoft Entra ID authentication as the credential parameter to authenticate the client:
0 commit comments