Skip to main content

Configuring SAML single sign-on for your enterprise

You can control and secure access to sua instância do GitHub Enterprise Server by configuring SAML single sign-on (SSO) through your identity provider (IdP).

Quem pode usar esse recurso?

Site administrators can configure SAML SSO for a GitHub Enterprise Server instance.

About SAML SSO

SAML SSO allows you to centrally control and secure access to sua instância do GitHub Enterprise Server from your SAML IdP. When an unauthenticated user visits sua instância do GitHub Enterprise Server in a browser, GitHub Enterprise Server will redirect the user to your SAML IdP to authenticate. After the user successfully authenticates with an account on the IdP, the IdP redirects the user back to sua instância do GitHub Enterprise Server. GitHub Enterprise Server validates the response from your IdP, then grants access to the user.

After a user successfully authenticates on your IdP, the user's SAML session for sua instância do GitHub Enterprise Server is active in the browser for 24 hours. After 24 hours, the user must authenticate again with your IdP.

Com o provisionamento JIT, se você remover um usuário do IdP, também deverá suspender manualmente a conta do usuário em sua instância do GitHub Enterprise Server. Caso contrário, o proprietário da conta poderá continuar fazendo autenticação usando tokens de acesso ou chaves SSH. Para obter mais informações, confira "Suspender e cancelar a suspensão de usuários".

Supported identity providers

GitHub Enterprise Server é compatível com o SAML SSO, com IdPs que implementam o padrão SAML 2.0. Para obter mais informações, confira o wiki do SAML no site do OASIS.

Oficialmente, o GitHub dá suporte aos IdPs a seguir e testa-os internamente.

  • Serviços de Federação do Active Directory (AD FS) da Microsoft
  • Microsoft Entra ID (anteriormente conhecida como Azure AD)
  • Okta
  • OneLogin
  • PingOne
  • Shibboleth

For more information about connecting Entra ID to your enterprise, see Tutorial: Microsoft Entra SSO integration with GitHub Enterprise Server in Microsoft Docs.

Username considerations with SAML

O GitHub Enterprise Server normaliza um valor do provedor de autenticação externo para determinar o nome de usuário de cada nova conta pessoal no sua instância do GitHub Enterprise Server. For more information, see "Considerações de nome de usuário para autenticação externa."

Configuring SAML SSO

You can enable or disable SAML authentication for sua instância do GitHub Enterprise Server, or you can edit an existing configuration. You can view and edit authentication settings for GitHub Enterprise Server in the Console de Gerenciamento. For more information, see "Administrar sua instância por meio da interface do usuário da Web."

Note: O GitHub recomenda fortemente que você verifique novas configurações para autenticação em um ambiente de preparo. Uma configuração incorreta pode resultar em tempo de inatividade no sua instância do GitHub Enterprise Server. Para obter mais informações, confira "Configurar uma instância de preparo".

  1. Em uma conta administrativa no GitHub Enterprise Server, no canto superior direito de qualquer página, clique em .

  2. Se você ainda não estiver na página "Administração do site", no canto superior esquerdo, clique em Administração do site.

  3. Na barra lateral " Administrador do site", clique em Console de Gerenciamento .

  4. Na barra lateral "Configurações", clique em Autenticação.

  5. Under "Authentication", select SAML.

  6. Opcionalmente, para permitir que pessoas sem uma conta em seu sistema de autenticação externa entrem com autenticação interna, selecione Permitir autenticação interna. Para obter mais informações, confira "Como permitir a autenticação interna para usuários de fora do seu provedor".

  7. Optionally, to enable unsolicited response SSO, select IdP initiated SSO. By default, GitHub Enterprise Server will reply to an unsolicited Identity Provider (IdP) initiated request with an AuthnRequest back to the IdP.

    Note: We recommend keeping this value unselected. You should enable this feature only in the rare instance that your SAML implementation does not support service provider initiated SSO, and when advised by Suporte do GitHub Enterprise.

  8. Optionally, if you do not want your SAML provider to determine administrator rights for users on sua instância do GitHub Enterprise Server, select Disable administrator demotion/promotion

  9. Optionally, to allow sua instância do GitHub Enterprise Server to receive encrypted assertions from your SAML IdP, select Require encrypted assertions.

    You must ensure that your IdP supports encrypted assertions and that the encryption and key transport methods in the management console match the values configured on your IdP. You must also provide sua instância do GitHub Enterprise Server's public certificate to your IdP. For more information, see "Habilitando declarações criptografadas."

  10. Under "Single sign-on URL," type the HTTP or HTTPS endpoint on your IdP for single sign-on requests. This value is provided by your IdP configuration. If the host is only available from your internal network, you may need to configure sua instância do GitHub Enterprise Server to use internal nameservers.

  11. Optionally, in the Issuer field, type your SAML issuer's name. This verifies the authenticity of messages sent to sua instância do GitHub Enterprise Server.

  12. Select the Signature Method and Digest Method dropdown menus, then click the hashing algorithm used by your SAML issuer to verify the integrity of the requests from sua instância do GitHub Enterprise Server.

  13. Select the Name Identifier Format dropdown menu, then click a format.

  14. Under "Verification certificate," click Choose File, then choose a certificate to validate SAML responses from the IdP.

  15. Under "User attributes", modify the SAML attribute names to match your IdP if needed, or accept the default names.

Further reading