Establishing Federated Trust between Keycloak and Azure AD for Pipeline Deployments with Multiple Users

Kaushik Ray 0 Reputation points
2025-02-08T15:21:35.11+00:00

Scenario:

I have a Jenkins pipeline where users authenticate with Keycloak. I want to leverage this authentication to allow users to deploy resources in Azure using a service principal.

  1. Keycloak Authentication: Users authenticate with Keycloak, and the pipeline obtains a valid access token.
  2. Azure AD Integration: I have configured an app registration in Azure AD and a federated secret with issuer, subject, and audience to establish trust with Keycloak. This works for a single or couple of users where I add their subjects in federated secrets.
  3. Service Principal Assumption: Upon successful authentication with Keycloak, the pipeline should assume the role of the service principal associated with the app registration.

Challenge:

  • Multiple Users: Since each Keycloak user has a unique subject in the access token, how can I configure the federated secret in Azure AD to accommodate all users within my team (100+ members)?
  • How to setup the App registration and federated secrets for all users(dynamic)
  • Is this the suggested use case to use federated identity for such cases ?
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,149 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.