This documentation is for a release that is no longer maintained
See documentation for the latest supported version.第 3 章 启用 OpenID Connect 身份验证供应商
Red Hat Developer Hub 使用 OpenID Connect (OIDC)身份验证供应商与支持 OIDC 协议的第三方服务进行身份验证。
3.1. 在 Developer Hub 中使用 OIDC 身份验证供应商概述
您可以通过在 root auth 配置下更新 app-config.yaml
文件,在 Developer Hub 中配置 OIDC 身份验证供应商。例如:
auth: environment: production # Providing an auth.session.secret will enable session support in the auth-backend session: secret: ${SESSION_SECRET} providers: oidc: production: metadataUrl: ${AUTH_OIDC_METADATA_URL} clientId: ${AUTH_OIDC_CLIENT_ID} clientSecret: ${AUTH_OIDC_CLIENT_SECRET} prompt: ${AUTH_OIDC_PROMPT} # Recommended to use auto ## Uncomment for additional configuration options # callbackUrl: ${AUTH_OIDC_CALLBACK_URL} # tokenEndpointAuthMethod: ${AUTH_OIDC_TOKEN_ENDPOINT_METHOD} # tokenSignedResponseAlg: ${AUTH_OIDC_SIGNED_RESPONSE_ALG} # scope: ${AUTH_OIDC_SCOPE} ## Declarative resolvers to override the default resolver: `emailLocalPartMatchingUserEntityName` ## The authentication provider tries each sign-in resolver until it succeeds, and fails if none succeed. Uncomment the resolvers that you want to use. # signIn: # resolvers: # - resolver: preferredUsernameMatchingUserEntityName # - resolver: emailMatchingUserEntityProfileEmail # - resolver: emailLocalPartMatchingUserEntityName signInPage: oidc
auth:
environment: production
# Providing an auth.session.secret will enable session support in the auth-backend
session:
secret: ${SESSION_SECRET}
providers:
oidc:
production:
metadataUrl: ${AUTH_OIDC_METADATA_URL}
clientId: ${AUTH_OIDC_CLIENT_ID}
clientSecret: ${AUTH_OIDC_CLIENT_SECRET}
prompt: ${AUTH_OIDC_PROMPT} # Recommended to use auto
## Uncomment for additional configuration options
# callbackUrl: ${AUTH_OIDC_CALLBACK_URL}
# tokenEndpointAuthMethod: ${AUTH_OIDC_TOKEN_ENDPOINT_METHOD}
# tokenSignedResponseAlg: ${AUTH_OIDC_SIGNED_RESPONSE_ALG}
# scope: ${AUTH_OIDC_SCOPE}
## Declarative resolvers to override the default resolver: `emailLocalPartMatchingUserEntityName`
## The authentication provider tries each sign-in resolver until it succeeds, and fails if none succeed. Uncomment the resolvers that you want to use.
# signIn:
# resolvers:
# - resolver: preferredUsernameMatchingUserEntityName
# - resolver: emailMatchingUserEntityProfileEmail
# - resolver: emailLocalPartMatchingUserEntityName
signInPage: oidc