You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-saml.md
+68-31Lines changed: 68 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ A mapping is created between the `NameID` and the {% data variables.product.prod
54
54
55
55
{% note %}
56
56
57
-
**Note**: If the `NameID` for a user does change on the IdP, the user will see an error message when they try to sign in to your {% data variables.product.prodname_ghe_server %} instance. {% ifversion ghes %}To restore the user's access, you'll need to update the user account's `NameID` mapping. For more information, see "[Updating a user's SAML `NameID`](#updating-a-users-saml-nameid)."{% else %} For more information, see "[Error: 'Another user already owns the account'](#error-another-user-already-owns-the-account)."{% endif %}
57
+
**Note**: If the `NameID` for a user does change on the IdP, the user will see an error message when they try to sign into {% data variables.product.product_location %}. To restore the user's access, you'll need to update the user account's `NameID` mapping. For more information, see "[Updating a user's SAML `NameID`](#updating-a-users-saml-nameid)."
58
58
59
59
{% endnote %}
60
60
@@ -96,6 +96,14 @@ To specify more than one value for an attribute, use multiple `<saml2:AttributeV
96
96
97
97
## Configuring SAML settings
98
98
99
+
You can enable or disable SAML authentication for {% data variables.product.product_location %}, or you can edit an existing configuration. You can view and edit authentication settings for {% data variables.product.product_name %} in the {% data variables.enterprise.management_console %}. For more information, see "[Accessing the management console](/admin/configuration/configuring-your-enterprise/accessing-the-management-console)."
100
+
101
+
{% note %}
102
+
103
+
**Note**: {% data reusables.enterprise.test-in-staging %}
104
+
105
+
{% endnote %}
106
+
99
107
{% data reusables.enterprise_site_admin_settings.access-settings %}
100
108
{% data reusables.enterprise_site_admin_settings.management-console %}
101
109
{% data reusables.enterprise_management_console.authentication %}
@@ -118,19 +126,11 @@ To specify more than one value for an attribute, use multiple `<saml2:AttributeV
118
126
1. Select **Disable administrator demotion/promotion** if you **do not** want your SAML provider to determine administrator rights for users on {% data variables.product.product_location %}.
119
127
120
128

121
-
1. Optionally, to allow {% data variables.product.product_location %} to send and receive encrypted assertions to and from your SAML IdP, select **Require encrypted assertions**. For more information, see "[Enabling encrypted assertions](#enabling-encrypted-assertions)."
129
+
{%- ifversion ghes > 3.3 %}
130
+
1. Optionally, to allow {% data variables.product.product_location %} 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 {% data variables.product.product_location %}'s public certificate to your IdP. For more information, see "[Enabling encrypted assertions](#enabling-encrypted-assertions)."
122
131
123
132

124
-
125
-
{% warning %}
126
-
127
-
**Warning**: Incorrectly configuring encrypted assertions can cause all authentication to {% data variables.product.product_location %} to fail.
128
-
129
-
- 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 {% data variables.product.product_location %}'s public certificate to your IdP. For more information, see "[Enabling encrypted assertions](#enabling-encrypted-assertions)."
130
-
131
-
- Before enabling encrypted assertions, {% data variables.product.company_short %} recommends testing encrypted assertions in a staging environment, and confirming that SAML authentication functions as you expect. For more information, see "[Setting up a staging instance](/admin/installation/setting-up-a-github-enterprise-server-instance/setting-up-a-staging-instance)."
132
-
133
-
{% endwarning %}
133
+
{%- endif %}
134
134
1. In the **Single sign-on URL** field, 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 {% data variables.product.product_location %} to use internal nameservers](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-dns-nameservers/).
135
135
136
136

@@ -153,37 +153,38 @@ To specify more than one value for an attribute, use multiple `<saml2:AttributeV
153
153
154
154
To enable encrypted assertions, your SAML IdP must also support encrypted assertions. You must provide {% data variables.product.product_location %}'s public certificate to your IdP, and configure encryption settings that match your IdP.
155
155
156
-
{% warning %}
157
-
158
-
**Warning**: Incorrectly configuring encrypted assertions can cause all authentication to {% data variables.product.product_location %} to fail. {% data variables.product.company_short %} strongly recommends testing your SAML configuration in a staging environment. For more information about staging instances, see "[Setting up a staging instance](/admin/installation/setting-up-a-github-enterprise-server-instance/setting-up-a-staging-instance)."
156
+
{% note %}
159
157
160
-
{% endwarning %}
158
+
**Note**: {% data reusables.enterprise.test-in-staging %}
161
159
162
-
1. Configure SAML for {% data variables.product.product_location %}. For more information, see "[Configuring SAML settings](#configuring-saml-settings)."
163
-
{% data reusables.enterprise_installation.ssh-into-instance %}
164
-
1. Run the following command to output {% data variables.product.product_location %}'s public certificate.
1. In the output, copy the text beginning with `-----BEGIN CERTIFICATE-----` and ending with `-----END CERTIFICATE-----`, and paste the output into a plaintext file.
168
-
1. Sign into your SAML IdP as an administrator.
169
-
1. In the application for {% data variables.product.product_location %}, enable encrypted assertions.
170
-
- Note the encryption method and key transport method.
171
-
- Provide the public certificate from step 3.
162
+
1. Optionally, enable SAML debugging. SAML debugging records verbose entries in {% data variables.product.product_name %}'s authentication log, and may help you troubleshoot failed authentication attempts. For more information, see "[Configuring SAML debugging](#configuring-saml-debugging)."
172
163
{% data reusables.enterprise_site_admin_settings.access-settings %}
173
164
{% data reusables.enterprise_site_admin_settings.management-console %}
174
165
{% data reusables.enterprise_management_console.authentication %}
175
166
1. Select **Require encrypted assertions**.
176
167
177
168

178
-
1. To the right of "Encryption Method", select the encryption method for your IdP from step 5.
169
+
1. To the right of "Encryption Certificate", click **Download** to save a copy of {% data variables.product.product_location %}'s public certificate on your local machine.
170
+
171
+

172
+
1. Sign into your SAML IdP as an administrator.
173
+
1. In the application for {% data variables.product.product_location %}, enable encrypted assertions.
174
+
- Note the encryption method and key transport method.
175
+
- Provide the public certificate you downloaded in step 7.
176
+
1. Return to the management console on {% data variables.product.product_location %}.
177
+
1. To the right of "Encryption Method", select the encryption method for your IdP from step 9.
179
178
180
179

181
-
1. To the right of "Key Transport Method", select the key transport method for your IdP from step 5.
180
+
1. To the right of "Key Transport Method", select the key transport method for your IdP from step 9.
182
181
183
182

184
183
1. Click **Save settings**.
185
184
{% data reusables.enterprise_site_admin_settings.wait-for-configuration-run %}
186
185
186
+
If you enabled SAML debugging to test authentication with encrypted assertions, disable SAML debugging when you're done testing. For more information, see "[Configuring SAML debugging](#configuring-saml-debugging)."
187
+
187
188
{% endif %}
188
189
189
190
## Updating a user's SAML `NameID`
@@ -245,11 +246,11 @@ When the user signs in again, {% data variables.product.prodname_ghe_server %} c
245
246
246
247
> Another user already owns the account. Please have your administrator check the authentication log.
247
248
248
-
The message typically indicates that the person's username or email address has changed on the IdP. {% ifversion ghes %}Ensure that the `NameID` mapping for the user account on {% data variables.product.prodname_ghe_server %} matches the user's `NameID` on your IdP. For more information, see "[Updating a user's SAML `NameID`](#updating-a-users-saml-nameid)."{% else %}For help updating the `NameID` mapping, contact {% data variables.contact.contact_ent_support %}.{% endif %}
249
+
The message typically indicates that the person's username or email address has changed on the IdP. Ensure that the `NameID` mapping for the user account on {% data variables.product.prodname_ghe_server %} matches the user's `NameID` on your IdP. For more information, see "[Updating a user's SAML `NameID`](#updating-a-users-saml-nameid)."
249
250
250
251
### Error: Recipient in SAML response was blank or not valid
251
252
252
-
If the `Recipient` does not match the ACS URL for your {% data variables.product.prodname_ghe_server %} instance, one of the following two error messages will appear in the authentication log when a user attempts to authenticate.
253
+
If the `Recipient` does not match the ACS URL for {% data variables.product.product_location %}, one of the following two error messages will appear in the authentication log when a user attempts to authenticate.
253
254
254
255
```
255
256
Recipient in the SAML response must not be blank.
@@ -259,7 +260,7 @@ Recipient in the SAML response must not be blank.
259
260
Recipient in the SAML response was not valid.
260
261
```
261
262
262
-
Ensure that you set the value for `Recipient` on your IdP to the full ACS URL for your {% data variables.product.prodname_ghe_server %} instance. For example, `https://ghe.corp.example.com/saml/consume`.
263
+
Ensure that you set the value for `Recipient` on your IdP to the full ACS URL for {% data variables.product.product_location %}. For example, `https://ghe.corp.example.com/saml/consume`.
263
264
264
265
### Error: "SAML Response is not signed or has been modified"
265
266
@@ -279,4 +280,40 @@ If the IdP's response has a missing or incorrect value for `Audience`, the follo
279
280
Audience is invalid. Audience attribute does not match https://<em>YOUR-INSTANCE-URL</em>
280
281
```
281
282
282
-
Ensure that you set the value for `Audience` on your IdP to the `EntityId` for your {% data variables.product.prodname_ghe_server %} instance, which is the full URL to your {% data variables.product.prodname_ghe_server %} instance. For example, `https://ghe.corp.example.com`.
283
+
Ensure that you set the value for `Audience` on your IdP to the `EntityId` for {% data variables.product.product_location %}, which is the full URL to {% data variables.product.product_location %}. For example, `https://ghe.corp.example.com`.
284
+
285
+
### Configuring SAML debugging
286
+
287
+
You can configure {% data variables.product.product_name %} to write verbose debug logs to _/var/log/github/auth.log_ for every SAML authentication attempt. You may be able to troubleshoot failed authentication attempts with this extra output.
288
+
289
+
{% warning %}
290
+
291
+
**Warnings**:
292
+
293
+
- Only enable SAML debugging temporarily, and disable debugging immediately after you finish troubleshooting. If you leave debugging enabled, the size of your log may increase much faster than usual, which can negatively impact the performance of {% data variables.product.product_name %}.
294
+
- Test new authentication settings for {% data variables.product.product_location %} in a staging environment before you apply the settings in your production environment. For more information, see "[Setting up a staging instance](/admin/installation/setting-up-a-github-enterprise-server-instance/setting-up-a-staging-instance)."
295
+
296
+
{% endwarning %}
297
+
298
+
{% data reusables.enterprise-accounts.access-enterprise %}
299
+
{% data reusables.enterprise-accounts.policies-tab %}
300
+
{% data reusables.enterprise-accounts.options-tab %}
301
+
1. Under "SAML debugging", select the drop-down and click **Enabled**.
302
+
303
+

304
+
305
+
1. Attempt to sign into {% data variables.product.product_location %} through your SAML IdP.
306
+
307
+
1. Review the debug output in _/var/log/github/auth.log_ on {% data variables.product.product_location %}.
308
+
309
+
1. When you're done troubleshooting, select the drop-down and click **Disabled**.
310
+
311
+

312
+
313
+
### Decoding responses in _auth.log_
314
+
315
+
Some output in _auth.log_ may be Base64-encoded. You can access the administrative shell and use the `base64` utility on {% data variables.product.product_location %} to decode these responses. For more information, see "[Accessing the administrative shell (SSH)](/admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh)."
0 commit comments