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

[#6560] Allow TokenCredential authentication in CosmosDbPartitionedStorage #6614

Merged

Conversation

ceciliaavila
Copy link
Collaborator

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 the Automation: Parity with js The PR needs to be ported to JS label Apr 4, 2023
@ceciliaavila ceciliaavila requested a review from a team as a code owner April 4, 2023 13:10
@BruceHaley
Copy link
Contributor

✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.Azure.dll

@tracyboehrer tracyboehrer merged commit 45ee363 into main Apr 21, 2023
@tracyboehrer tracyboehrer deleted the southworks/add/cosmosdbpartitionedstorage-tokencredential branch April 21, 2023 15:20
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 348550

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 11 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.01%) to 79.093%

Files with Coverage Reduction New Missed Lines %
/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/SetProperties.cs 5 68.75%
/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/SetProperty.cs 6 62.5%
Totals Coverage Status
Change from base Build 348552: 0.01%
Covered Lines: 25823
Relevant Lines: 32649

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automation: Parity with js The PR needs to be ported to JS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow TokenCredential authentication in CosmosDbPartitionedStorage
5 participants