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

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

> GitHub Enterprise Serverのプライベートインスタンス用のSAML2 Webアプリアドオンを使用して、Auth0をIDプロバイダーとして構成する方法を説明します。

[GitHub Enterprise Server](https://help.github.com/en/enterprise/2.16/admin/user-management/using-saml)（使用しているプライベートのGitHubアプライアンス）にSAML2 Webアプリアドオンを使用すると、Auth0をIDプロバイダーとして構成することができます。Auth0をGitHub Enterprise Cloud（github.com）のIDプロバイダーとして構成したい場合には、「[Auth0をGitHub Enterprise CloudのIDプロバイダーとして構成する](/docs/ja-JP/ja-jp/authenticate/single-sign-on/outbound-single-sign-on/configure-auth0-saml-identity-provider/configure-saml2-web-app-addon-for-github-enterprise-cloud)」をお読みください。

<div id="configure-saml-sso-on-auth0">
  ## Auth0でSAML SSOを構成する
</div>

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 Callback URL（アプリケーションのCallback URL）］** を次に設定します：`https://github.com/orgs/{yourGitHubOrgName}/saml/consume`

   <Frame>
     <img src="https://mintcdn.com/generaltranslationinc/UCtxRPLKKGiAgiWv/docs/images/ja-jp/cdy7uua7fh8z/6dJgYkcOgMZ73HVTkAWt1x/0126f55506d82cfd73d0bcb7ebd6fa9f/2025-02-27_14-00-16.png?fit=max&auto=format&n=UCtxRPLKKGiAgiWv&q=85&s=f6e75cbd6c239e8d1c67c428e58775a0" alt="Dashboard アプリケーション アプリケーションアドオンタブ SAML2 Webアプリ 設定タブ" width="602" height="753" data-path="docs/images/ja-jp/cdy7uua7fh8z/6dJgYkcOgMZ73HVTkAWt1x/0126f55506d82cfd73d0bcb7ebd6fa9f/2025-02-27_14-00-16.png" />
   </Frame>

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

   ```json lines theme={null}
   {
         "audience": "{yourGitHubServerUrl}",
         "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"
         ]
       }
   ```

   `{yourGitHubOrgName}`をGitHubサブスクリプションに対応するGitHubの組織名で置き換えます。例：`https://github.yourname.com`

   1. 上にあるマッピングは、`user_id`を **［Name Identifier（名前識別子）］** としてGitHubに送信します。GitHubアプリケーションに1つ以上の接続を有効化する場合には、このオプションを使用して、確実に一意になるようにします（ユーザーがそれぞれ異なるIDを持つようになります）。
   2. 使用する接続が1つだけの場合には、`nickname`（ニックネーム）などの一意の識別子を分かりやすい **［Name Identifier（名前識別子）］** として使用しても構いませんが、そのプロパティが一意であることを必ず確認してください。

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

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

   <Frame>
     <img src="https://mintcdn.com/generaltranslationinc/JoMgZsgQxj2_Gov3/docs/images/ja-jp/cdy7uua7fh8z/3T90BDpyTXFUWDp1JkncBU/20060887bf494416b5831075fd4fce13/2025-01-28_10-16-30.png?fit=max&auto=format&n=JoMgZsgQxj2_Gov3&q=85&s=5b01d4e1512e44582fa0288a2f3e5a31" alt="Dashboard アプリケーション アプリケーションアドオンタブ SAML2 Webアプリ 使用状況タブ" width="400" height="440" data-path="docs/images/ja-jp/cdy7uua7fh8z/3T90BDpyTXFUWDp1JkncBU/20060887bf494416b5831075fd4fce13/2025-01-28_10-16-30.png" />
   </Frame>

<div id="configure-saml-sso-on-github">
  ## GitHubでSAML SSOを構成する
</div>

[Enterprise ServerでのSAML使用に関するGitHubドキュメント](https://help.github.com/en/enterprise/admin/user-management/using-saml#configuring-saml-settings)を参考にしながら、GitHub Enterprise Cloudで構成を完了させます。以下の情報が必要になります。

<table class="table">
  <thead>
    <tr>
      <th><b>フィールド</b></th>
      <th><b>エントリ</b></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><b>Sign On URL（サインオンURL）</b></td>
      <td>Auth0で作成した直後のGitHubアプリケーションの`client_id`は`https://{yourDomain}/samlp/{CLIENT_ID}` <br /> `{CLIENT_ID}`になります。</td>
    </tr>

    <tr>
      <td><b>Issuer（発行者）</b></td>
      <td>`urn:auth0:{yourTenant}`</td>
    </tr>

    <tr>
      <td><b>Verification Certificate（検証証明書）</b></td>
      <td>`https://{yourDomain}/pem`からダウンロードします。ダウンロードしたファイルをテキストエディターで開き、中身をコピーしてからGitHubのテキスト領域に貼り付けます。</td>
    </tr>

    <tr>
      <td><b>User Attributes（ユーザー属性）</b></td>
      <td>デフォルトのままにしておきます。SAML Webアプリアドオンで構成したマッピングでは、GitHubが指定するデフォルトの属性名が使用されます。</td>
    </tr>

    <tr>
      <td><b>Signature method（署名メソッド）</b></td>
      <td>`RSA256-SHA256`</td>
    </tr>

    <tr>
      <td><b>Digest method（ダイジェストメソッド）</b></td>
      <td>`SHA256`</td>
    </tr>
  </tbody>
</table>
