Skip to content

Commit 9deba62

Browse files
authored
Merge pull request #13025 from github/repo-sync
repo sync
2 parents dcb2cf6 + 2e8b385 commit 9deba62

54 files changed

Lines changed: 668 additions & 648 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/page.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import renderContent from './render-content/index.js'
1313
import processLearningTracks from './process-learning-tracks.js'
1414
import { productMap } from './all-products.js'
1515
import slash from 'slash'
16-
import statsd from './statsd.js'
1716
import readFileContents from './read-file-contents.js'
1817
import getLinkData from './get-link-data.js'
1918
import getDocumentType from './get-document-type.js'
@@ -114,9 +113,7 @@ class Page {
114113
this.showMiniToc = this.showMiniToc === false ? this.showMiniToc : true
115114
}
116115

117-
// Instrument the `_render` method, so externally we call #render
118-
// but it's wrapped in a timer that reports to Datadog
119-
this.render = statsd.asyncTimer(this._render.bind(this), 'page.render')
116+
this.render = this._render.bind(this)
120117

121118
return this
122119
}

middleware/render-page.js

Lines changed: 5 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ import { get } from 'lodash-es'
22
import patterns from '../lib/patterns.js'
33
import getMiniTocItems from '../lib/get-mini-toc-items.js'
44
import Page from '../lib/page.js'
5+
import statsd from '../lib/statsd.js'
56
import { isConnectionDropped } from './halt-on-dropped-connection.js'
67
import { nextApp, nextHandleRequest } from './next.js'
78

8-
const pageCache = new Map()
9-
109
export default async function renderPage(req, res, next) {
1110
if (req.path.startsWith('/storybook')) {
1211
return nextHandleRequest(req, res)
@@ -31,45 +30,6 @@ export default async function renderPage(req, res, next) {
3130
// Is the request for JSON debugging info?
3231
const isRequestingJsonForDebugging = 'json' in req.query && process.env.NODE_ENV !== 'production'
3332

34-
// ****** temporary caching measure for holiday spam prevention *********
35-
36-
const isApiPage =
37-
req.context.currentPathWithoutLanguage.includes('rest/reference') ||
38-
req.context.currentPathWithoutLanguage.includes('graphql/reference')
39-
40-
// Serve from the cache if possible
41-
const isCacheable =
42-
// Skip for CI
43-
!process.env.CI &&
44-
// Skip for tests
45-
process.env.NODE_ENV !== 'test' &&
46-
// Skip for HTTP methods other than GET
47-
req.method === 'GET' &&
48-
// Skip for JSON debugging info requests
49-
!isRequestingJsonForDebugging &&
50-
// Only API pages
51-
isApiPage
52-
53-
// don't cache query strings
54-
const originalUrl = req.originalUrl.split('?')[0]
55-
56-
if (isCacheable) {
57-
// Stop processing if the connection was already dropped
58-
if (isConnectionDropped(req, res)) return
59-
60-
const cachedHtml = pageCache.get(originalUrl)
61-
if (cachedHtml) {
62-
// Stop processing if the connection was already dropped
63-
if (isConnectionDropped(req, res)) return
64-
65-
console.log(`Serving from cached version of ${originalUrl}`)
66-
// statsd.increment('page.sent_from_cache')
67-
return res.send(cachedHtml)
68-
}
69-
}
70-
71-
// ****** [end] temporary caching measure for holiday spam prevention *********
72-
7333
// add page context
7434
const context = Object.assign({}, req.context, { page })
7535

@@ -88,7 +48,10 @@ export default async function renderPage(req, res, next) {
8848
if (isConnectionDropped(req, res)) return
8949

9050
// render page
91-
context.renderedPage = await page.render(context)
51+
const pageRenderTimed = statsd.asyncTimer(page.render, 'middleware.render_page', [
52+
`path:${req.pagePath || req.path}`,
53+
])
54+
context.renderedPage = await pageRenderTimed(context)
9255

9356
// Stop processing if the connection was already dropped
9457
if (isConnectionDropped(req, res)) return
@@ -145,12 +108,5 @@ export default async function renderPage(req, res, next) {
145108
// Hand rendering over to NextJS
146109
req.context.renderedPage = context.renderedPage
147110
req.context.miniTocItems = context.miniTocItems
148-
149-
// ****** temporary caching measure for holiday spam prevention *********
150-
if (isCacheable) {
151-
pageCache.set(originalUrl, req.context.renderedPage)
152-
}
153-
// ****** [end] temporary caching measure for holiday spam prevention *********
154-
155111
return nextHandleRequest(req, res)
156112
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: 認証のないサインアップの無効化
2+
title: Disabling unauthenticated sign-ups
33
redirect_from:
4-
- /enterprise/admin/articles/disabling-sign-ups/
4+
- /enterprise/admin/articles/disabling-sign-ups
55
- /enterprise/admin/user-management/disabling-unauthenticated-sign-ups
66
- /enterprise/admin/authentication/disabling-unauthenticated-sign-ups
77
- /admin/authentication/disabling-unauthenticated-sign-ups
8-
intro: ビルトイン認証を使っている場合、認証されていない人がアカウントを作成するのをブロックできます。
8+
intro: 'If you''re using built-in authentication, you can block unauthenticated people from being able to create an account.'
99
versions:
1010
ghes: '*'
1111
type: how_to
@@ -15,9 +15,9 @@ topics:
1515
- Enterprise
1616
shortTitle: Block account creation
1717
---
18-
1918
{% data reusables.enterprise_site_admin_settings.access-settings %}
2019
{% data reusables.enterprise_site_admin_settings.management-console %}
2120
{% data reusables.enterprise_management_console.privacy %}
22-
3. **Enable sign-up(サインアップの有効化)**の選択を外してください。 ![[Enable sign-up] チェックボックス](/assets/images/enterprise/management-console/enable-sign-up.png)
21+
3. Unselect **Enable sign-up**.
22+
![Enable sign-up checkbox](/assets/images/enterprise/management-console/enable-sign-up.png)
2323
{% data reusables.enterprise_management_console.save-settings %}

translations/ja-JP/content/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: GitHub Enterprise Server インスタンスでユーザを認証する
3-
intro: '{% data variables.product.prodname_ghe_server %} のビルトイン認証を使うか、CASLDAPSAML のいずれかを選択して既存のアカウントを統合し、{% data variables.product.product_location %} へのユーザアクセスを集中管理できます。'
2+
title: Authenticating users for your GitHub Enterprise Server instance
3+
intro: 'You can use {% data variables.product.prodname_ghe_server %}''s built-in authentication, or choose between CAS, LDAP, or SAML to integrate your existing accounts and centrally manage user access to {% data variables.product.product_location %}.'
44
redirect_from:
5-
- /enterprise/admin/categories/authentication/
6-
- /enterprise/admin/guides/installation/user-authentication/
7-
- /enterprise/admin/articles/inviting-users/
8-
- /enterprise/admin/guides/migrations/authenticating-users-for-your-github-enterprise-instance/
5+
- /enterprise/admin/categories/authentication
6+
- /enterprise/admin/guides/installation/user-authentication
7+
- /enterprise/admin/articles/inviting-users
8+
- /enterprise/admin/guides/migrations/authenticating-users-for-your-github-enterprise-instance
99
- /enterprise/admin/user-management/authenticating-users-for-your-github-enterprise-server-instance
1010
- /enterprise/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance
1111
versions:
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: CASの利用
2+
title: Using CAS
33
redirect_from:
4-
- /enterprise/admin/articles/configuring-cas-authentication/
5-
- /enterprise/admin/articles/about-cas-authentication/
4+
- /enterprise/admin/articles/configuring-cas-authentication
5+
- /enterprise/admin/articles/about-cas-authentication
66
- /enterprise/admin/user-management/using-cas
77
- /enterprise/admin/authentication/using-cas
88
- /admin/authentication/using-cas
9-
intro: 'CAS は、複数の Web アプリケーションのためのシングルサインオン (SSO) プロトコルです。 CASのユーザアカウントは、ユーザがサインインするまで{% ifversion ghes %}ユーザライセンス{% else %}シート{% endif %}を消費しません。'
9+
intro: 'CAS is a single sign-on (SSO) protocol for multiple web applications. A CAS user account does not take up a {% ifversion ghes %}user license{% else %}seat{% endif %} until the user signs in.'
1010
versions:
1111
ghes: '*'
1212
type: how_to
@@ -17,10 +17,9 @@ topics:
1717
- Identity
1818
- SSO
1919
---
20-
2120
{% data reusables.enterprise_user_management.built-in-authentication %}
2221

23-
## CASでのユーザ名についての考慮
22+
## Username considerations with CAS
2423

2524
{% data reusables.enterprise_management_console.username_normalization %}
2625

@@ -29,24 +28,25 @@ topics:
2928
{% data reusables.enterprise_user_management.two_factor_auth_header %}
3029
{% data reusables.enterprise_user_management.external_auth_disables_2fa %}
3130

32-
## CASの属性
31+
## CAS attributes
3332

34-
以下の属性が利用できます。
33+
The following attributes are available.
3534

36-
| 属性名 | 種類 | 説明 |
37-
| ------ | -- | -------------------------------------------------------- |
38-
| `ユーザ名` | 必須 | {% data variables.product.prodname_ghe_server %} のユーザ名 |
35+
| Attribute name | Type | Description |
36+
|--------------------------|----------|-------------|
37+
| `username` | Required | The {% data variables.product.prodname_ghe_server %} username. |
3938

40-
## CASの設定
39+
## Configuring CAS
4140
{% warning %}
4241

43-
**警告:**{% data variables.product.product_location %}でCASを設定するまでは、ユーザはCASのユーザ名とパスワードをAPIリクエストの認証やHTTP/HTTPS経由のGit操作に使えないことに注意してください。 その代わりに、ユーザは[アクセストークンを作成](/enterprise/{{ currentVersion }}/user/articles/creating-an-access-token-for-command-line-use)しなければなりません。
42+
**Warning:** Before configuring CAS on {% data variables.product.product_location %}, note that users will not be able to use their CAS usernames and passwords to authenticate API requests or Git operations over HTTP/HTTPS. Instead, they will need to [create an access token](/enterprise/{{ currentVersion }}/user/articles/creating-an-access-token-for-command-line-use).
4443

4544
{% endwarning %}
4645

4746
{% data reusables.enterprise_site_admin_settings.access-settings %}
4847
{% data reusables.enterprise_site_admin_settings.management-console %}
4948
{% data reusables.enterprise_management_console.authentication %}
50-
3. **CAS**を選択してください。 ![CAS の選択](/assets/images/enterprise/management-console/cas-select.png)
51-
4. {% data reusables.enterprise_user_management.built-in-authentication-option %} ![CAS ビルトイン認証の選択チェックボックス](/assets/images/enterprise/management-console/cas-built-in-authentication.png)
52-
5. **Server URL(サーバのURL)**フィールドにCASサーバの完全なURLを入力してください。 CAS サーバが {% data variables.product.prodname_ghe_server %} が検証できない証明書を使っているなら、`ghe-ssl-ca-certificate-install` を使えばその証明書を信頼済みの証明書としてインストールできます。
49+
3. Select **CAS**.
50+
![CAS select](/assets/images/enterprise/management-console/cas-select.png)
51+
4. {% data reusables.enterprise_user_management.built-in-authentication-option %} ![Select CAS built-in authentication checkbox](/assets/images/enterprise/management-console/cas-built-in-authentication.png)
52+
5. In the **Server URL** field, type the full URL of your CAS server. If your CAS server uses a certificate that can't be validated by {% data variables.product.prodname_ghe_server %}, you can use the `ghe-ssl-ca-certificate-install` command to install it as a trusted certificate.

translations/ja-JP/content/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance/using-ldap.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: Using LDAP
33
redirect_from:
4-
- /enterprise/admin/articles/configuring-ldap-authentication/
5-
- /enterprise/admin/articles/about-ldap-authentication/
6-
- /enterprise/admin/articles/viewing-ldap-users/
7-
- /enterprise/admin/hidden/enabling-ldap-sync/
8-
- /enterprise/admin/hidden/ldap-sync/
4+
- /enterprise/admin/articles/configuring-ldap-authentication
5+
- /enterprise/admin/articles/about-ldap-authentication
6+
- /enterprise/admin/articles/viewing-ldap-users
7+
- /enterprise/admin/hidden/enabling-ldap-sync
8+
- /enterprise/admin/hidden/ldap-sync
99
- /enterprise/admin/user-management/using-ldap
1010
- /enterprise/admin/authentication/using-ldap
1111
- /admin/authentication/using-ldap

translations/ja-JP/content/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance/using-saml.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Using SAML
33
redirect_from:
4-
- /enterprise/admin/articles/configuring-saml-authentication/
5-
- /enterprise/admin/articles/about-saml-authentication/
4+
- /enterprise/admin/articles/configuring-saml-authentication
5+
- /enterprise/admin/articles/about-saml-authentication
66
- /enterprise/admin/user-management/using-saml
77
- /enterprise/admin/authentication/using-saml
88
- /admin/authentication/using-saml

translations/ja-JP/content/admin/authentication/managing-your-enterprise-users-with-your-identity-provider/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ shortTitle: Manage users with your IdP
44
product: '{% data reusables.gated-features.emus %}'
55
intro: You can manage identity and access with your identity provider and provision accounts that can only contribute to your enterprise.
66
redirect_from:
7-
- /github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/
7+
- /github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider
88
versions:
99
ghec: '*'
1010
topics:
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: ホスト名の設定
3-
intro: アプライアンスには、ハードコードされたIPアドレスを使うのではなくホスト名を設定することをおすすめします。
2+
title: Configuring a hostname
3+
intro: We recommend setting a hostname for your appliance instead of using a hard-coded IP address.
44
redirect_from:
5-
- /enterprise/admin/guides/installation/configuring-hostnames/
5+
- /enterprise/admin/guides/installation/configuring-hostnames
66
- /enterprise/admin/installation/configuring-a-hostname
77
- /enterprise/admin/configuration/configuring-a-hostname
88
- /admin/configuration/configuring-a-hostname
@@ -14,19 +14,20 @@ topics:
1414
- Fundamentals
1515
- Infrastructure
1616
---
17+
If you configure a hostname instead of a hard-coded IP address, you will be able to change the physical hardware that {% data variables.product.product_location %} runs on without affecting users or client software.
1718

18-
ハードコードされたIPアドレスの代わりにホスト名を設定すれば、ユーザやクライアントソフトウェアに影響を与えることなく{% data variables.product.product_location %}を動作させる物理ハードウェアを変更できるようになります。
19-
20-
{% data variables.enterprise.management_console %} のホスト名の設定は、適切な完全修飾ドメイン名 (FQDN) に設定して、インターネット上または内部ネットワーク内で解決できるようにしてください。 たとえば、ホスト名の設定は `github.companyname.com` であるかもしれません。 また、選択したホスト名に対して Subdomain Isolation を有効にして、いくつかのクロスサイトスクリプティングスタイルの脆弱性を軽減することもおすすめします。 ホスト名の設定に関する詳しい情報については、[HTTP RFC の Section 2.1](https://tools.ietf.org/html/rfc1123#section-2) を参照してください。
19+
The hostname setting in the {% data variables.enterprise.management_console %} should be set to an appropriate fully qualified domain name (FQDN) which is resolvable on the internet or within your internal network. For example, your hostname setting could be `github.companyname.com.` We also recommend enabling subdomain isolation for the chosen hostname to mitigate several cross-site scripting style vulnerabilities. For more information on hostname settings, see [Section 2.1 of the HTTP RFC](https://tools.ietf.org/html/rfc1123#section-2).
2120

2221
{% data reusables.enterprise_installation.changing-hostname-not-supported %}
2322

2423
{% data reusables.enterprise_site_admin_settings.access-settings %}
2524
{% data reusables.enterprise_site_admin_settings.management-console %}
2625
{% data reusables.enterprise_management_console.hostname-menu-item %}
27-
4. {% data variables.product.product_location %} に設定するホスト名を入力します。 ![ホスト名を設定するためのフィールド](/assets/images/enterprise/management-console/hostname-field.png)
28-
5. 新しいホスト名のためのDNS及びSSLの設定をテストするには**Test domain settings(ドメイン設定のテスト)**をクリックしてください。 ![[Test domain settings] ボタン](/assets/images/enterprise/management-console/test-domain-settings.png)
26+
4. Type the hostname you'd like to set for {% data variables.product.product_location %}.
27+
![Field for setting a hostname](/assets/images/enterprise/management-console/hostname-field.png)
28+
5. To test the DNS and SSL settings for the new hostname, click **Test domain settings**.
29+
![Test domain settings button](/assets/images/enterprise/management-console/test-domain-settings.png)
2930
{% data reusables.enterprise_management_console.test-domain-settings-failure %}
3031
{% data reusables.enterprise_management_console.save-settings %}
3132

32-
ホスト名を設定したら、{% data variables.product.product_location %}のSubdomain Isolationを有効化することをお勧めします。 詳しい情報については"[Subdomain Isolationの有効化](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-subdomain-isolation/)"を参照してください。
33+
After you configure a hostname, we recommend that you enable subdomain isolation for {% data variables.product.product_location %}. For more information, see "[Enabling subdomain isolation](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-subdomain-isolation/)."

0 commit comments

Comments
 (0)