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: [#4632] Support Federated Identity Credential #4765

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

sw-joelmut
Copy link
Collaborator

Fixes #4632

Ported from microsoft/botbuilder-dotnet#6838

Description

This PR ports the Federated Credentials from DotNet's repo. The implementation is similar except in the fetchExternalToken, since it requires the Audience value to be provided, by default it uses 'api://AzureADTokenExchange'.

Specific Changes

  • Retrieving the clientAssertion token functionality has being extracted from the ManagedIdentity FIC sample.
  • Added FederatedAppCredentials class, it gathers a token from a Managed identity resource, and provides the clientAssertion to MSAL.
  • Added FederatedServiceClientCredentialsFactory class, so it can be used from CloudAdapter config.

Bot usage example
image

Testing

As we FIC isn't available for third-party apps, we encountered the following error (same error when testing DotNet's implementation).
image

@coveralls
Copy link

coveralls commented Oct 8, 2024

Pull Request Test Coverage Report for Build 11235721258

Details

  • 12 of 33 (36.36%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 85.242%

Changes Missing Coverage Covered Lines Changed/Added Lines %
libraries/botframework-connector/src/auth/federatedAppCredentials.ts 5 15 33.33%
libraries/botframework-connector/src/auth/federatedServiceClientCredentialsFactory.ts 4 15 26.67%
Totals Coverage Status
Change from base Build 11164635173: -0.1%
Covered Lines: 20444
Relevant Lines: 22942

💛 - Coveralls

@tracyboehrer tracyboehrer merged commit 021429c into main Oct 8, 2024
13 checks passed
@tracyboehrer tracyboehrer deleted the southworks/add/fic branch October 8, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Federated Identity Credential
3 participants