> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Enterprise CloudをSAMLサービスプロバイダーとして構成する

> GitHub Enterprise Cloud（github.com）の組織用のSAML2 Webアプリアドオンを使用して、Auth0をIDプロバイダーとして構成する方法を説明します。

Auth0を[GitHub Enterprise Cloud](https://help.github.com/en/articles/about-authentication-with-saml-single-sign-on)（github.com）のIDプロバイダーとして構成することができます。<Tooltip data-tooltip-id="react-containers-DefinitionTooltip-1" href="/docs/ja-jp/glossary?term=security-assertion-markup-language" tip="Security Assertion Markup Language（SAML）: パスワードなしに二者間で認証情報を交換できる標準化プロトコル。" cta="用語集の表示">SAML</Tooltip> <Tooltip data-tooltip-id="react-containers-DefinitionTooltip-2" href="/docs/ja-jp/glossary?term=idp" tip="IDプロバイダー（IdP）: デジタルIDを保存および管理するサービス。" cta="用語集の表示">IdP</Tooltip>を使用して有効化するには、GitHubにエンタープライズレベルのサブスクリプションが必要です。

* GitHubでの<Tooltip data-tooltip-id="react-containers-DefinitionTooltip-0" href="/docs/ja-jp/glossary?term=single-sign-on" tip="シングルサインオン（SSO）: ユーザーが1つのアプリケーションにログインした後、そのユーザーを他のアプリケーションに自動的にログインさせるサービス。" cta="用語集の表示">SSO</Tooltip>については、[https://docs.github.com](https://docs.github.com)で「[SAMLのシングルサインオンでの認証について](https://help.github.com/en/articles/about-authentication-with-saml-single-sign-on)」をお読みください。
* Auth0をGitHub Enterprise Server（プライベートインスタンス）のIDプロバイダーとして構成する方法については、「[Auth0をGitHub Enterprise ServerのIDプロバイダーとして構成する](/docs/ja-jp/authenticate/single-sign-on/outbound-single-sign-on/configure-auth0-saml-identity-provider/configure-saml2-web-app-addon-for-github-enterprise-server)」をお読みください。

## Auth0でSAML SSOを構成する

1. [［Auth0 Dashboard］>［Applications（アプリケーション）］>［APIs（API）］](https://manage.auth0.com/#/applications)に移動して、新しいAPIを作成します。 **GitHub** など、分かりやすい名前を入力します。アプリケーションの種類は任意ですが、 **［Regular Web App（通常のWebアプリ）］** が推奨されます。

2. [［Addons（アドオン）］](https://manage.auth0.com/#/applications/\{yourClientId}/addons)タブに移動し、 **［SAML2 Web App（SAML2 Webアプリ）］** トグルを有効にします。

3. **［Settings（設定）］** タブで、 **［Application CallbackURL（アプリケーションのコールバックURL）］** を`https://github.com/orgs/{YOUR_GITHUB_ORG_NAME}/saml/consume`.

   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/auth0/docs/images/ja-jp/cdy7uua7fh8z/6dJgYkcOgMZ73HVTkAWt1x/0126f55506d82cfd73d0bcb7ebd6fa9f/2025-02-27_14-00-16.png" alt="Dashboard アプリケーション アプリケーションアドオンタブ SAML2 Webアプリ 設定タブ" />
   </Frame>

4. 以下のコードを **［Settings（設定）］** テキストボックスに貼り付けて、 **［Debug（デバッグ）］** をクリックします。

   ```json lines theme={null}
   {
         "audience": "https://github.com/orgs/{yourGitHubOrgName}",
         "mappings": {
       "user_id": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
       "email": "emails",
       "name": "full_name"
         },
         "passthroughClaimsWithNoMapping": false,
         "mapIdentities": false,
         "signatureAlgorithm": "rsa-sha256",
         "digestAlgorithm": "sha256",
         "nameIdentifierProbes": [
       "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
         ]
       }
   ```

   1. `{YOUR_GITHUB_ORG_NAME}`をサブスクリプションに対応するGitHubの組織名に置き換えます。マッピングが`user_id`を **［Name Identifier（名前識別子）］** としてGitHubに送信します。GitHubアプリケーションに1つ以上の接続を有効化する場合には、これによって確実に一意となる（ユーザーがそれぞれ異なるIDを持つようになる）ため、賢明な方法です。
   2. 使用する接続が1つだけの場合には、`nickname`（ニックネーム）などの一意の識別子を分かりやすい **［Name Identifier（名前識別子）］** として使用しても構いませんが、そのプロパティが一意であることを必ず確認してください。たとえば、`nickname`を **［Name Identifier（名前識別子）］** にしたい場合、上記の`mappings`セクションは以下のようになります。

5. タブの最後までスクロールし、 **［Enable（有効）］** をクリックします。

6. **［Usage（使用状況）］** タブで **［Identity Provider Metadata（IDプロバイダーのメタデータ）］** を見つけ、 **［Download（ダウンロード）］** をクリックしてメタデータファイルをダウンロードします。これは、Auth0をIDプロバイダーとして構成する際に必要になります。

   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/auth0/docs/images/ja-jp/cdy7uua7fh8z/3T90BDpyTXFUWDp1JkncBU/20060887bf494416b5831075fd4fce13/2025-01-28_10-16-30.png" alt="Dashboard アプリケーション アプリケーションアドオンタブ SAML2 Webアプリ 使用状況タブ" />
   </Frame>

## GitHubでSAML SSOを構成する

1. GitHubドキュメントの「[Organization 向けの SAML シングルサインオンを有効化してテストする](https://help.github.com/en/articles/enabling-and-testing-saml-single-sign-on-for-your-organization)」を参考にしながら、GitHub Enterprise Cloudで構成を完了させます。
2. 以下の情報が必要になります。

   | フィールド                         | エントリ                                                                                                        |
   | ----------------------------- | ----------------------------------------------------------------------------------------------------------- |
   | **Sign On（サインオン）URL**         | `https://{yourDomain}/samlp/{CLIENT_ID}`<br />`{CLIENT_ID}`は、Auth0で作成したばかりのGitHubアプリケーションの`client_id`になります。 |
   | **Issuer（発行者）**               | `urn:auth0:{yourTenant}`                                                                                    |
   | **Public Certificate（公開証明書）** | `https://{yourDomain}/pem`からダウンロードします。テキストエディターでダウンロードしたファイルを開き、コンテンツをコピーして、GitHubのテキストエリアに貼り付けます。          |
   | **Signature method（署名メソッド）**  | `RSA256-SHA256`                                                                                             |
   | **Digest method（ダイジェストメソッド）** | `SHA256`                                                                                                    |
3. GitHubドキュメントの推奨に従って、組織にSAML SSOを有効化する前に **［Test SAML configuration（SAML構成のテスト）］** をクリックし、入力した情報が正しいことを確認します。

組織にSAMLのシングルサインオン（SSO）をセットアップする場合には、 **［Require SAML SSO authentication* \*\*\* for all members of the organization（組織のすべてのメンバーに対してSAML SSO認証を要求する）］*\* チェックボックスを選択解除すると、組織のメンバーに影響を与えることなく、実装をテストすることができます。
