Chapter 9. Configuring OIDC for Red Hat Quay


OpenID Connect (OIDC) allows users to authenticate to Red Hat Quay by using their existing credentials from an OIDC provider, such as Red Hat Single Sign-On, Google, GitHub, Microsoft, or others. Other benefits of OIDC include centralized user management, enhanced security, and single sign-on (SSO).

The following procedures show you how to configure Microsoft Entra ID on a standalone deployment of Red Hat Quay, and how to configure Red Hat Single Sign-On on an Operator-based deployment of Red Hat Quay. These procedures are interchangeable depending on your deployment type.

Note

By following these procedures, you can add any OIDC provider to Red Hat Quay, regardless of which identity provider you choose to use.

To configure Microsoft Entra ID OIDC on a standalone Red Hat Quay deployment, you can add an AZURE_LOGIN_CONFIG block to your config.yaml file and restart the registry.

By integrating Microsoft Entra ID authentication with Red Hat Quay, your organization can take advantage of the centralized user management and security features offered by Microsoft Entra ID. Some features include the ability to manage user access to Red Hat Quay repositories based on their Microsoft Entra ID roles and permissions, and the ability to enable multi-factor authentication and other security features provided by Microsoft Entra ID.

Azure Active Directory (Microsoft Entra ID) authentication for Red Hat Quay allows users to authenticate and access Red Hat Quay by using their Microsoft Entra ID credentials.

Note
  • By using the following procedure, you can add any OIDC provider to Red Hat Quay, regardless of which identity provider is being added.
  • If your system has a firewall in use, or a proxy enabled, you must allowlist all Azure API endpoints for each OAuth application that is created. Otherwise, the following error is returned: x509: certificate signed by unknown authority.

Procedure

  1. Use the following reference and update your config.yaml file with your desired OIDC provider’s credentials:

    AUTHENTICATION_TYPE: OIDC
    # ...
    AZURE_LOGIN_CONFIG:
        CLIENT_ID: <client_id>
        CLIENT_SECRET: <client_secret>
        OIDC_SERVER: https://login.microsoftonline.com/<tenant-id>/v2.0/
        SERVICE_NAME: Microsoft Entra ID
        OIDC_DISABLE_USER_ENDPOINT: true
        VERIFIED_EMAIL_CLAIM_NAME: <verified_email>
        USE_PKCE: True
        PKCE_METHOD: "S256"
        PUBLIC_CLIENT: True
    # ...

    where:

    AZURE_LOGIN_CONFIG
    Specifies the parent key that holds the OIDC configuration settings. In this example, the parent key used is AZURE_LOGIN_CONFIG. However, the string AZURE can be replaced with any arbitrary string based on your specific needs, for example ABC123. The following strings are not accepted: GOOGLE, GITHUB. These strings are reserved for their respective identity platforms and require a specific config.yaml entry contingent upon which platform you are using.
    CLIENT_ID
    Specifies the client ID of the application that is being registered with the identity provider.
    CLIENT_SECRET
    Specifies the client secret of the application that is being registered with the identity provider.
    OIDC_SERVER
    Specifies the OIDC discovery base URL. The URL must end with a trailing / because Red Hat Quay uses path joining for OIDC discovery. For new deployments, use the Entra ID v2.0 endpoint. To accept both v1.0 and v2.0 tokens during migration, configure multi-issuer OIDC.
    SERVICE_NAME
    Specifies the name of the service that is being authenticated.
    OIDC_DISABLE_USER_ENDPOINT
    Specifies whether to disable the /userinfo endpoint. Set to true for Microsoft Entra ID because Azure obtains user information from the token instead of calling the /userinfo endpoint.
    VERIFIED_EMAIL_CLAIM_NAME
    Specifies the name of the claim that is used to verify the email address of the user.
    USE_PKCE
    Specifies whether to enable Proof Key for Code Exchange (PKCE) for OIDC authentication. Defaults to false.
    PKCE_METHOD
    Specifies the code challenge method used to generate the code_challenge sent in the initial authorization request. Defaults to S256.
    PUBLIC_CLIENT
    Specifies whether to omit client_secret during the token request when the client is public. Defaults to false.
  2. Proper configuration of Microsoft Entra ID results in three redirects with the following format:

    • https://QUAY_HOSTNAME/oauth2/<name_of_service>/callback
    • https://QUAY_HOSTNAME/oauth2/<name_of_service>/callback/attach
    • https://QUAY_HOSTNAME/oauth2/<name_of_service>/callback/cli
  3. Restart your Red Hat Quay deployment.

To accept Microsoft Entra ID v2.0 tokens and On-Behalf-Of API flows in Red Hat Quay, you can configure multi-issuer and multi-audience settings in your OIDC *_LOGIN_CONFIG block. This support enables Microsoft Entra ID v2.0 access tokens, dual v1.0 and v2.0 acceptance during migration, and On-Behalf-Of (OBO) API flows used by integrations such as Red Hat Developer Hub (RHDH).

Prerequisites

  • You have an Entra ID app registration for Red Hat Quay with a client secret and redirect URIs for your Red Hat Quay hostname.
  • You can edit the Red Hat Quay config.yaml file or Operator configBundleSecret resource.

Procedure

  1. In the Azure Portal, open your Red Hat Quay app registration and set requestedAccessTokenVersion to 2 in the app manifest. The field might appear as api.requestedAccessTokenVersion.

    For OBO flows, expose an API on the Red Hat Quay app registration, for example api://quay-api, and grant the upstream application permission to that scope.

  2. Update your *_LOGIN_CONFIG block with the v2.0 discovery endpoint and multi-issuer settings. For example:

    AUTHENTICATION_TYPE: OIDC
    # ...
    AZURE_LOGIN_CONFIG:
      CLIENT_ID: <quay_app_client_id>
      CLIENT_SECRET: <quay_app_client_secret>
      OIDC_SERVER: https://login.microsoftonline.com/<tenant-id>/v2.0/
      SERVICE_NAME: Microsoft Entra ID
      OIDC_DISABLE_USER_ENDPOINT: true
      OIDC_ISSUERS:
        - https://sts.windows.net/<tenant-id>/
        - https://login.microsoftonline.com/<tenant-id>/v2.0
      OIDC_AUDIENCES:
        - <quay_app_client_id>
        - api://quay-api
      OIDC_ALLOWED_CLIENTS:
        - <quay_app_client_id>
        - <upstream_app_client_id>
      USE_PKCE: true
      PKCE_METHOD: "S256"
      PUBLIC_CLIENT: true
    # ...
  3. Restart your Red Hat Quay deployment or reconcile the Operator so the updated configuration is applied.

    Note
    • Set OIDC_SERVER to the v2.0 endpoint. The v2.0 JWKS endpoint includes v1.0 signing keys, so one discovery URL supports both token versions.
    • If you set OIDC_ALLOWED_CLIENTS, include your Red Hat Quay application’s own CLIENT_ID. Direct user logins set azp to the application’s client ID. Omit OIDC_ALLOWED_CLIENTS if you do not need to restrict OBO clients.
    • Do not request Microsoft Graph scopes such as openid profile email when you need tokens with a custom audience. Use application-specific scopes such as api://quay-api/registry.access instead.

9.3. Migrating from Entra ID v1.0 to v2.0

To migrate from Microsoft Entra ID v1.0 to v2.0 without interrupting clients in Red Hat Quay, you can set the v2.0 discovery endpoint and temporarily list both issuers in OIDC_ISSUERS.

Procedure

  1. Set OIDC_SERVER to the v2.0 endpoint (https://login.microsoftonline.com/<tenant-id>/v2.0/).
  2. Add both issuer URLs to OIDC_ISSUERS:

      OIDC_ISSUERS:
        - https://sts.windows.net/<tenant-id>/
        - https://login.microsoftonline.com/<tenant-id>/v2.0
  3. Update upstream clients to v2.0 tokens.
  4. After all clients use v2.0, remove the v1.0 issuer from OIDC_ISSUERS.

9.4. Configuring On-Behalf-Of (OBO) flows

To allow an upstream service to call Red Hat Quay APIs on behalf of authenticated users, you can configure On-Behalf-Of (OBO) audiences and allowed clients in your Entra ID OIDC settings.

Procedure

  1. In the Azure Portal, expose an API on the Red Hat Quay app registration and add a scope, for example registry.access under api://quay-api.
  2. Create a second app registration for the upstream service and grant it permission to the Red Hat Quay API scope.
  3. Add the exposed API identifier to OIDC_AUDIENCES in your Red Hat Quay configuration, for example api://quay-api.
  4. Add the upstream application’s client ID to OIDC_ALLOWED_CLIENTS.

    OBO tokens have aud: api://quay-api and azp: <upstream_client_id>. Red Hat Quay validates both claims.

9.5. Troubleshooting Microsoft Entra ID OIDC

Use this reference to resolve common Microsoft Entra ID OIDC errors in Red Hat Quay, including issuer, audience, allowed client, and JWKS signature failures.

Error or symptomResolution

Issuer not configured

The token iss claim is not listed in OIDC_ISSUERS or OIDC_ISSUER. Verify issuer URLs, including trailing slashes.

Audience doesn’t match

The token aud claim is not in OIDC_AUDIENCES and does not equal CLIENT_ID. Add the expected audience or use application-specific scopes instead of Microsoft Graph scopes.

Client is not in the allowed clients list

The token azp claim is not in OIDC_ALLOWED_CLIENTS. Add the client ID or remove OIDC_ALLOWED_CLIENTS to allow all clients.

Signature verification failed

JWKS keys from OIDC_SERVER do not match the token signing key. For dual v1.0 and v2.0 support, set OIDC_SERVER to the v2.0 endpoint.

OIDC discovery fails

OIDC_SERVER must end with a trailing /.

You can configure Red Hat Single Sign-On (RH-SSO) as an OpenID Connect provider for Red Hat Quay on OpenShift Container Platform. Create an RH-SSO client, then add an RHSSO_LOGIN_CONFIG block to your Operator config bundle.

Based on the Keycloak project, Red Hat Single Sign-On (RH-SSO) is an open source identity and access management (IAM) solution provided by Red Hat. RH-SSO allows organizations to manage user identities, secure applications, and enforce access control policies across their systems and applications. It also provides a unified authentication and authorization framework, which allows users to log in one time and gain access to multiple applications and resources without needing to re-authenticate.

By configuring Red Hat Single Sign-On on Red Hat Quay, you can create a seamless authentication integration between Red Hat Quay and other application platforms like OpenShift Container Platform.

To prepare Red Hat Single Sign-On for Red Hat Quay on OpenShift Container Platform, you can create a confidential OIDC client in the RH-SSO Admin Console and copy the client secret.

Prerequisites

  • You have configured the Red Hat Single Sign-On Operator.
  • You have configured SSL/TLS for your Red Hat Quay on OpenShift Container Platform deployment and for Red Hat Single Sign-On.
  • You have generated a single Certificate Authority (CA) and uploaded it to your Red Hat Single Sign-On Operator and to your Red Hat Quay configuration.

Procedure

  1. Navigate to the Red Hat Single Sign-On Admin Console.

    1. On the OpenShift Container Platform Web Console, navigate to Network Route.
    2. Select the Red Hat Single Sign-On project from the drop-down list.
    3. Find the Red Hat Single Sign-On Admin Console in the Routes table.
  2. Select the Realm that you use to configure Red Hat Quay.
  3. Click Clients under the Configure section of the navigation panel, and then click Create to add a new OIDC client for Red Hat Quay.
  4. Enter the following information:

    • Client ID: quay-enterprise
    • Client Protocol: openid-connect
    • Root URL: https://<quay_endpoint>/
  5. Click Save. This results in a redirect to the Clients setting panel.
  6. Navigate to Access Type and select Confidential.
  7. Navigate to Valid Redirect URIs. You must provide three redirect URIs. The value should be the fully qualified domain name of the Red Hat Quay registry appended with /oauth2/redhatsso/callback. For example:

    • https://<quay_endpoint>/oauth2/redhatsso/callback
    • https://<quay_endpoint>/oauth2/redhatsso/callback/attach
    • https://<quay_endpoint>/oauth2/redhatsso/callback/cli
  8. Click Save and navigate to the new Credentials setting.
  9. Copy the value of the Secret.

To enable Red Hat Single Sign-On authentication for an Operator-based Red Hat Quay deployment, you can add an RHSSO_LOGIN_CONFIG block to your config bundle and restart the registry.

Prerequisites

  • You have configured the Red Hat Single Sign-On Operator.
  • You have configured SSL/TLS for your Red Hat Quay on OpenShift Container Platform deployment and for Red Hat Single Sign-On.
  • You have generated a single Certificate Authority (CA) and uploaded it to your Red Hat Single Sign-On Operator and to your Red Hat Quay configuration.

Procedure

  1. Edit your Red Hat Quay config.yaml file by navigating to Operators Installed Operators Red Hat Quay Quay Registry Config Bundle Secret. Then, click Actions Edit Secret. Alternatively, you can update the config.yaml file locally.
  2. Add the following information to your Red Hat Quay on OpenShift Container Platform config.yaml file:

    # ...
    RHSSO_LOGIN_CONFIG:
      CLIENT_ID: <client_id>
      CLIENT_SECRET: <client_secret>
      OIDC_SERVER: <oidc_server_url>
      SERVICE_NAME: <service_name>
      SERVICE_ICON: <service_icon>
      VERIFIED_EMAIL_CLAIM_NAME: <example_email_address>
      PREFERRED_USERNAME_CLAIM_NAME: <preferred_username>
      LOGIN_SCOPES: [ 'openid', 'roles' ]
      USE_PKCE: true
      PKCE_METHOD: "S256"
    # ...

    where:

    RHSSO_LOGIN_CONFIG
    Specifies the parent key that holds the OIDC configuration settings. In this example, the parent key used is RHSSO_LOGIN_CONFIG. The string can be replaced with any arbitrary string based on your specific needs, for example ABC123. However, the strings GOOGLE and GITHUB are not accepted. These strings are reserved for their respective identity platforms and require a specific config.yaml entry contingent upon which platform you are using.
    CLIENT_ID
    Specifies the client ID of the application that is being registered with the identity provider. For example, quay.
    CLIENT_SECRET
    Specifies the client secret.
    OIDC_SERVER
    Specifies the fully qualified domain name (FQDN) of the Red Hat Single Sign-On instance, appended with /auth/realms/ and the Realm name. You must include the forward slash at the end, for example, https://sso-redhat.example.com/auth/realms/<your_realm_name>/.
    SERVICE_NAME
    Specifies the name that is displayed on the Red Hat Quay login page, for example, Red Hat Single Sign-On.
    SERVICE_ICON
    Specifies the icon on the login screen. For example, /static/img/RedHat.svg.
    VERIFIED_EMAIL_CLAIM_NAME
    Specifies the name of the claim that is used to verify the email address of the user.
    PREFERRED_USERNAME_CLAIM_NAME
    Specifies the name of the claim that is used for the preferred username of the user.
    LOGIN_SCOPES
    Specifies the scopes to send to the OIDC provider when performing the login flow, for example, openid.
    USE_PKCE
    Specifies whether to enable Proof Key for Code Exchange (PKCE). Defaults to false.
    PKCE_METHOD
    Specifies the code challenge method used to generate the code_challenge sent in the initial authorization request. Defaults to S256.
  3. Restart your Red Hat Quay on OpenShift Container Platform deployment with Red Hat Single Sign-On enabled.

You can sync Red Hat Quay team membership with groups from an OpenID Connect (OIDC) identity provider. Enable team syncing in your config.yaml file, then configure directory sync for a team in the UI.

To enable team synchronization when your Red Hat Quay deployment uses an OIDC authenticator, you can set the team syncing fields in your config.yaml file and restart the registry.

Important

The following procedure does not use a specific OIDC provider. Instead, it provides a general outline of how best to approach team synchronization between an OIDC provider and Red Hat Quay. Any OIDC provider can be used to enable team synchronization, however, setup might vary depending on your provider.

Procedure

  1. Update your config.yaml file with the following information:

    AUTHENTICATION_TYPE: OIDC
    # ...
    OIDC_LOGIN_CONFIG:
      CLIENT_ID:
      CLIENT_SECRET:
      OIDC_SERVER:
      SERVICE_NAME:
      PREFERRED_GROUP_CLAIM_NAME:
      LOGIN_SCOPES: [ 'openid', '<example_scope>' ]
      OIDC_DISABLE_USER_ENDPOINT: false
    # ...
    FEATURE_TEAM_SYNCING: true
    FEATURE_NONSUPERUSER_TEAM_SYNCING_SETUP: true
    FEATURE_UI_V2: true
    # ...

    where:

    CLIENT_ID
    Specifies the registered OIDC client ID for this Red Hat Quay instance. This field is required.
    CLIENT_SECRET
    Specifies the registered OIDC client secret for this Red Hat Quay instance. This field is required.
    OIDC_SERVER
    Specifies the address of the OIDC server that is being used for authentication. This URL should be such that a GET request to <OIDC_SERVER>/.well-known/openid-configuration returns the provider’s configuration information. This field is required.
    SERVICE_NAME
    Specifies the name of the service that is being authenticated. This field is required.
    PREFERRED_GROUP_CLAIM_NAME
    Specifies the key name within the OIDC token payload that holds information about the user’s group memberships. This field allows the authentication system to extract group membership information from the OIDC token so that it can be used with Red Hat Quay. This field is required.
    LOGIN_SCOPES
    Specifies the scopes Red Hat Quay requests during login. Must include 'openid'. Each scope must also be listed in the identity provider’s scopes_supported from /.well-known/openid-configuration. This field is required.
    OIDC_DISABLE_USER_ENDPOINT
    Specifies whether to allow or disable the /userinfo endpoint. If using Azure Entra ID, set this field to true. Defaults to false.
    FEATURE_TEAM_SYNCING
    Specifies whether to allow team membership to be synced from a backing group in the authentication engine. This field is required.
    FEATURE_NONSUPERUSER_TEAM_SYNCING_SETUP
    Optional. If enabled, non-superusers can configure team synchronization.
  2. Restart your Red Hat Quay registry.

To sync a Red Hat Quay team with an OIDC group, you can create an organization and team in the UI, enable directory sync, and verify membership changes from the identity provider.

Prerequisites

  • You have enabled team synchronization for your OIDC-authenticated Red Hat Quay deployment.

Procedure

  1. Log in to your Red Hat Quay registry by using your OIDC provider.
  2. On the Red Hat Quay v2 UI dashboard, click Create Organization.
  3. Enter an organization name, for example, test-org.
  4. Click the name of the organization.
  5. In the navigation pane, click Teams and membership.
  6. Click Create new team and enter a name, for example, testteam.
  7. On the Create team pop-up:

    1. Optional. Add this team to a repository.
    2. Add a team member, for example, user1, by typing in the user’s account name.
    3. Add a robot account to this team. This page provides the option to create a robot account.
  8. Click Next.
  9. On the Review and Finish page, review the information that you have provided and click Review and Finish.
  10. To enable team synchronization for your Red Hat Quay OIDC deployment, click Enable Directory Sync on the Teams and membership page.
  11. You are prompted to enter the group Object ID if your OIDC authenticator is Azure Entra ID, or the group name if using a different provider.

    Warning

    After you enable team syncing, membership of users who are already part of the team is revoked. The OIDC group is the single source of truth. This action is not reversible. Team user membership from within Red Hat Quay is read-only.

  12. Click Enable Sync.
  13. You are returned to the Teams and membership page. Note that users of this team are removed and are re-added upon logging back in. At this stage, only the robot account is still part of the team.

    A banner at the top of the page confirms that the team is synced:

    This team is synchronized with a group in OIDC and its user membership is therefore read-only.

    By clicking the Directory Synchronization Config accordion, the OIDC group that your deployment syncs with appears.

  14. Log out of your Red Hat Quay registry.

Verification

  1. Log back in to your Red Hat Quay registry.
  2. Click Organizations test-org test-team Teams and memberships. user1 now appears as a team member for this team.
  3. Navigate to your OIDC provider’s administration console.
  4. Navigate to the Users page of your OIDC provider. The name of this page varies depending on your provider.
  5. Click the name of the user associated with Red Hat Quay, for example, user1.
  6. Remove the user from the group in the configured identity provider.
  7. Remove, or unassign, the access permissions from the user.
  8. Log in to your Red Hat Quay registry.
  9. Click Organizations test-org test-team Teams and memberships. user1 has been removed from this team.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top