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

port: [#6560] Allow TokenCredential authentication in CosmosDbPartitionedStorage #4465

Closed
ceciliaavila opened this issue Apr 27, 2023 · 0 comments · Fixed by #4473
Closed
Assignees
Labels
bug Indicates an unexpected problem or an unintended behavior. parity The issue describes a gap in parity between two or more platforms.

Comments

@ceciliaavila
Copy link
Collaborator

The changes in [#6560] Allow TokenCredential authentication in CosmosDbPartitionedStorage may need to be ported to maintain parity with microsoft/botbuilder-dotnet.

Fixes #6560

Description

This PR adds the CosmosDB authentication method through TokenCredential in CosmosDbPartitionedStorage.

Specific Changes

  • Upgraded Microsoft.Azure.Cosmos package from 3.15.1 to 3.32.2 to get the CosmosClient constructor that uses TokenCredential.
  • Added TokenCredential property to CosmosDbPartitionedStorageOptions class.
  • Updated validation to throw if AuthKey and TokenCredential properties are null.
  • Added the alternative to create a CosmosClient using the TokenCredential if provided.

Testing

The following image shows the information saved in CosmosDB after creating the client using Azure credentials.
image

@ceciliaavila ceciliaavila added bug Indicates an unexpected problem or an unintended behavior. parity The issue describes a gap in parity between two or more platforms. labels Apr 27, 2023
@ceciliaavila ceciliaavila self-assigned this Apr 27, 2023
tracyboehrer pushed a commit that referenced this issue May 8, 2023
…PartitionedStorage (#4473)

* add tokenCredential authentication to cosmosDB

* fix ts issues with new version

* fix pipelines issues

* add EOF

---------

Co-authored-by: JhontSouth <jhonatan.sandoval@southworks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or an unintended behavior. parity The issue describes a gap in parity between two or more platforms.
Projects
None yet
1 participant