4.3.2. 为红帽单点登录身份验证配置 OpenShift Master
登录 OpenShift 主控机 CLI。
前提条件
您必须具有编辑 /etc/origin/master/master-config.yaml 文件的权限。
流程
编辑 /etc/origin/master/master-config.yaml 文件并找到 identityProviders 部分。例如,如果 OpenShift 主控机配置了 HTPassword 身份提供程序,则 identityProviders 部分类似如下:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 添加 Red Hat Single Sign-On 作为二级身份提供程序,其内容类似于以下代码片段:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
clientSecret 的 Red Hat Single Sign-On Secret hash 位于 Red Hat Single Sign-On web 控制台中: Clients
openshift-demo Credentials 通过 Red Hat Single Sign-On 应用发出请求,可以找到 urls 的端点。例如:
<curl -k https://secure-sso-sso-app-demo.openshift32.example.com/auth/realms/OpenShift/.well-known/openid-configuration | python -m json.tool>
<curl -k https://secure-sso-sso-app-demo.openshift32.example.com/auth/realms/OpenShift/.well-known/openid-configuration | python -m json.tool>Copy to Clipboard Copied! Toggle word wrap Toggle overflow 响应包括 authorization_endpoint、token_endpoint 和 userinfo_endpoint。
- 这个示例工作流使用自生成的 CA 为演示目的提供端到端工作流。因此,ca 作为 < ca: xpaas.crt> 提供。此 CA 证书还必须复制到 /etc/origin/master 文件夹。如果使用从验证的证书颁发机构购买的证书,则不需要这样做。
-
clientSecret 的 Red Hat Single Sign-On Secret hash 位于 Red Hat Single Sign-On web 控制台中: Clients
保存配置并重启 OpenShift master:
systemctl restart atomic-openshift-master
$ systemctl restart atomic-openshift-masterCopy to Clipboard Copied! Toggle word wrap Toggle overflow