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

Microsoft connector: add support for Federated Identity to avoid secrets #3874

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ItalyPaleAle
Copy link

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 identity
  • ManagedIdentity=00000000-0000-0000-0000-000000000000 -> Uses a user-assigned managed identity, where the value is the client ID of the MI
  • WorkloadIdentity -> uses Workload Identity

Note: it's very hard to write a CI test for this as it requires support on the infrastructure

Fixes dexidp#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](https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow#request-an-access-token-with-a-certificate-credential), which comes from managed identity (when the app is running on Azure) or [Workload Identity](https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation) (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 identity
- `ManagedIdentity=00000000-0000-0000-0000-000000000000` -> Uses a user-assigned managed identity, where the value is the client ID of the MI
- `WorkloadIdentity` -> uses Workload Identity

Signed-off-by: ItalyPaleAle <[email protected]>
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.

Microsoft connector - support for using signed assertions from managed identity instead of client secrets
1 participant