Skip to main content

Configuring OIDC for Enterprise Managed Users

You can automatically manage access to your enterprise account on GitHub by configuring OpenID Connect (OIDC) single sign-on (SSO) and enable support for your IdP's Conditional Access Policy (CAP).

若要使用标识提供者管理企业中的用户,企业必须启用 Enterprise Managed Users,它适用于 GitHub Enterprise Cloud。 有关详细信息,请参阅“关于 Enterprise Managed Users”。

注意:对 Enterprise Managed Users 的 OpenID Connect (OIDC) 和条件访问策略 (CAP) 支持仅适用于 Azure AD。

About OIDC for Enterprise Managed Users

With Enterprise Managed Users, your enterprise uses your identity provider (IdP) to authenticate all members. You can use OpenID Connect (OIDC) to manage authentication for your 具有托管用户的企业. Enabling OIDC SSO is a one-click setup process with certificates managed by GitHub and your IdP.

企业使用 OIDC SSO 时,GitHub 将自动使用 IdP 的条件访问策略 (CAP) IP 条件来验证用户与 GitHub 的交互,当成员更改 IP 地址时,每次使用 personal access token 或 SSH 密钥时都会验证。 For more information, see "About support for your IdP's Conditional Access Policy."

You can adjust the lifetime of a session, and how often a 托管用户帐户 needs to reauthenticate with your IdP, by changing the lifetime policy property of the ID tokens issued for GitHub from your IdP. The default lifetime is one hour. For more information, see "Configure token lifetime policies" in the Azure AD documentation.

Note: If you need assistance configuring the OIDC session lifetime, contact Microsoft Support.

如果目前使用 SAML SSO 进行身份验证,并且更希望使用 OIDC 并受益于 CAP 支持,则可以遵循迁移路径。 有关详细信息,请参阅“从 SAML 迁移到 OIDC”。

警告:如果使用 GitHub Enterprise Importer 从 你的 GitHub Enterprise Server 实例 迁移组织,请确保使用一个豁免于 Azure AD CAP 的服务帐户,否则迁移可能会被阻止。

Identity provider support

Support for OIDC is available for customers using Azure Active Directory (Azure AD).

Each Azure AD tenant can support only one OIDC integration with Enterprise Managed Users. If you want to connect Azure AD to more than one enterprise on GitHub, use SAML instead. For more information, see "为企业托管用户配置 SAML 单一登录."

OIDC does not support IdP-initiated authentication.

Configuring OIDC for Enterprise Managed Users

  1. Sign into as the setup user for your new enterprise with the username @SHORT-CODE_admin.

  2. 在 的右上角,单击你的个人资料照片,然后单击“你的企业”。

  3. 在企业列表中,单击您想要查看的企业。

  4. 在企业帐户边栏中,单击“设置”。

  5. 在“ 设置”下,单击“身份验证安全性” 。

  6. Under "OpenID Connect single sign-on", select Require OIDC single sign-on.

  7. To continue setup and be redirected to Azure AD, click Save.

  8. 在 GitHub Enterprise Cloud 将你重定向到 IdP 后,登录,然后按照说明授予同意并安装 GitHub Enterprise Managed User (OIDC) 应用程序。 在 Azure AD 通过 OIDC 请求 GitHub Enterprise Managed Users 的权限后,启用“代表组织同意”,然后单击“接受” 。

    警告:必须以具有全局管理员权限的用户身份登录到 Azure AD,才能同意安装 GitHub Enterprise Managed User (OIDC) 应用程序。

  9. 要确保身份提供程序将来不可用时仍可在 上访问企业,请单击“下载”、“打印”或“复制”以保存恢复代码************。 有关详细信息,请参阅“下载企业帐户的单一登录恢复代码”。

  10. Click Enable OIDC Authentication.

Enabling provisioning

After you enable OIDC SSO, enable provisioning. For more information, see "为 Enterprise Managed User 配置 SCIM 预配."