Microsoft connector: add support for Federated Identity to avoid secrets #3874
+96
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3852
Maintaining shared secrets in the application's configuration is not good, and should be avoided as possible. This includes the client secret used by the Microsoft connector to exchange authorization codes for access tokens using Entra ID (fka Azure AD).
It is possible to avoid using secrets by leveraging a signed assertion, which comes from managed identity (when the app is running on Azure) or Workload Identity (when the app is running on a supported platform, including K8s anywhere).
This is configured with a new configuration key
federatedIdentity
which can have 3 values (all case-insensitive):ManagedIdentity
-> Uses a system-assigned managed identityManagedIdentity=00000000-0000-0000-0000-000000000000
-> Uses a user-assigned managed identity, where the value is the client ID of the MIWorkloadIdentity
-> uses Workload IdentityNote: it's very hard to write a CI test for this as it requires support on the infrastructure