microsoft / botbuilder-dotnet

Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET.
https://github.com/Microsoft/botframework
MIT License
872 stars 479 forks source link

SNI auth not working in Cert based both authentication #6673

Closed MandeepShahi closed 1 year ago

MandeepShahi commented 1 year ago

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Version

4.20.0

Describe the bug

When using Cert based authentication, SNI auth flow is not working. I see in the code that x5c claim is not being passed in CertificateAppCredentials which results it not being passed (and used while calling AcquireTokenAsync) in MsalAppCredentials resulting in SNI auth breaking.

The sendX5c flag was being passed in the ADAL authenticator but got missed in MSAL one!

To Reproduce

Steps to reproduce the behavior:

  1. Deploy any sample bot service web app in Azure. The service should use an auto-renewed cert for authentication.
  2. Try sending notification request to the service. Auth flow would break with SNI auth issue