Subdomain Isolationについて
Subdomain Isolationは、クロスサイトスクリプティングや関連するその他の脆弱性を緩和します。 詳しい情報については"Wikipediaのクロスサイトスクリプティング"を参照してください。 GitHub Enterprise Server インスタンスではSubdomain Isolationを有効化することを強くお勧めします。
Subdomain Isolation が有効な場合、GitHub Enterprise Server はいくつかのパスをサブドメインで置き換えます。
To use Docker with GitHub Packages, you must also enable subdomain isolation. 詳しい情報については、「GitHub Packages で使用するために Docker を設定する」を参照してください。
Note: GitHub Packages is currently in beta for GitHub Enterprise Server 2.22. To join the beta for your instance, use the sign-up form.
|
| Subdomain Isolationなしのパス | Subdomain Isolationされたパス |
|---|---|
http(s)://HOSTNAME/assets/ | http(s)://assets.HOSTNAME/ |
http(s)://HOSTNAME/avatars/ | http(s)://avatars.HOSTNAME/ |
http(s)://HOSTNAME/codeload/ | http(s)://codeload.HOSTNAME/ |
http(s)://HOSTNAME/gist/ | http(s)://gist.HOSTNAME/ |
http(s)://HOSTNAME/media/ | http(s)://media.HOSTNAME/ |
http(s)://HOSTNAME/pages/ | http(s)://pages.HOSTNAME/ |
http(s)://HOSTNAME/raw/ | http(s)://raw.HOSTNAME/ |
http(s)://HOSTNAME/render/ | http(s)://render.HOSTNAME/ |
http(s)://HOSTNAME/reply/ | http(s)://reply.HOSTNAME/ |
http(s)://HOSTNAME/uploads/ | http(s)://uploads.HOSTNAME/ |
| N/A、GitHub Packages を使用した Docker は、Subdomain Isolation を無効化すると機能しません。 | http(s)://uploads.HOSTNAME/ |
https://HOSTNAME/_registry/npm/ | https://npm.HOSTNAME/ |
https://HOSTNAME/_registry/rubygems/ | https://rubygems.HOSTNAME/ |
https://HOSTNAME/_registry/maven/ | https://maven.HOSTNAME/ |
https://HOSTNAME/_registry/nuget/ | https://nuget.HOSTNAME/ |
必要な環境
警告:Subdomain Isolationを無効化している場合は、アプライアンス上のGitHub Pagesも無効化することをおすすめします。 ユーザが提供するGitHub Pagesのコンテンツをその他のアプライアンスのデータから分離しておく方法はありません。 詳しい情報については「アプライアンス上でのGitHub Pagesの設定」を参照してください。
Subdomain Isolationを有効化する前に、新しいドメインに合わせてネットワークを設定しなければなりません。
- 有効なドメイン名を、IP アドレスではなくホスト名として指定します。 詳しい情報については、「ホスト名を設定する」を参照してください。
警告: 初期設定後はGitHub Enterprise Serverのホスト名を変更しないでください。 ホスト名を変更すると、インスタンスの停止に及ぶ予想外の動作が生じます。
- 上記のサブドメインに対して、ワイルドカードのドメインネームシステム (DNS) レコードまたは個々の DNS レコードをセットアップします。 各サブドメイン用に複数のレコードを作成せずに済むよう、サーバのIPアドレスを指す
*.HOSTNAMEのAレコードを作成することをおすすめします。 HOSTNAMEとワイルドカードのドメイン*.HOSTNAMEの両方に対するサブジェクト代替名 (SAN) が記載された、*.HOSTNAMEに対するワイルドカードの Transport Layer Security (TLS) 証明書を取得します。 たとえば、ホスト名がgithub.octoinc.comである場合は、Common Name の値が*.github.octoinc.comに設定され、SAN の値がgithub.octoinc.comと*.github.octoinc.comの両方に設定された証明書を取得します。- アプライアンスで TLS を有効にします。 詳しい情報については"TLSの設定"を参照してください
Subdomain Isolationの有効化
- 任意のページの右上で をクリックします。

- 左のサイドバーでManagement Consoleをクリックしてください。

- 左のサイドバーでHostname(ホスト名)をクリックしてください。

- Subdomain isolation (recommended)(Subdomain Isolation(推奨))を選択してください。

- 左のサイドバーの下でSave settings(設定の保存)をクリックしてください。
![Management Console での [Save settings] ボタン](/web/20201019170445im_/https://docs.github.com/assets/images/enterprise/management-console/save-settings.png)
- 設定が完了するのを待ってください。