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 [#4449] CloudAdapter always builds Connector with MicrosoftAppCredentials (never CertificateAppCredentials) -- certificate auth flow broken #6628

Closed
ceciliaavila opened this issue May 5, 2023 · 0 comments · Fixed by #6631
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 fix: [#4449] CloudAdapter always builds Connector with MicrosoftAppCredentials (never CertificateAppCredentials) -- certificate auth flow broken may need to be ported to maintain parity with microsoft/botbuilder-dotnet.

Fixes #4449

Description

This PR adds support for the CloudAdapter's configuration process to authenticate using certificates is MultiTenant and SingleTenant apps.

Specific Changes

  • Added CertificateServiceClientCredentialsFactory class, to instantiate and configure the CertificateAppCredentials class, so the process knows how to authenticate with certificates.
  • Added ConfigurationServiceClientCredentialFactory unit tests, validating the different code paths when using certificates.
  • Added CertificateThumbprint and CertificatePrivateKey constants to the AuthenticationConstants, ConfigurationBotFrameworkAuthentication and ConfigurationServiceClientCredentialFactory classes.
  • Updated ConfigurationServiceClientCredentialFactory to detect when a certificate is provided, and execute the proper functionality to authenticate with certificates (instead of a password) in MultiTenant and SingleTenant apps.

Testing

The following images show the bot and unit tests working as expected.
image
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 May 5, 2023
@ceciliaavila ceciliaavila self-assigned this May 5, 2023
tracyboehrer pushed a commit that referenced this issue May 16, 2023
…oftAppCredentials (never CertificateAppCredentials) -- certificate auth flow broken (#6631)

* Add functionality to auth with a certificate

* Add unit tests

* Apply Visual Studio suggestion

Co-authored-by: Cecilia Avila <44245136+ceciliaavila@users.noreply.github.com>

* Fix indentation

---------

Co-authored-by: Cecilia Avila <44245136+ceciliaavila@users.noreply.github.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