Skip to content

Commit aa97628

Browse files
committed
Update Google Apps / G Suite tutorial a bit.
Might not be complete, needs check with current G Suite interfaces. But improves on the current situation.
1 parent f7d5f95 commit aa97628

5 files changed

Lines changed: 39 additions & 42 deletions

File tree

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SimpleSAMLphp Documentation
2525
* [Identity Provider QuickStart](simplesamlphp-idp)
2626
* [IdP hosted reference](simplesamlphp-reference-idp-hosted)
2727
* [SP remote reference](simplesamlphp-reference-sp-remote)
28-
* [Use case: Setting up an IdP for Google Apps](simplesamlphp-googleapps)
28+
* [Use case: Setting up an IdP for G Suite (Google Apps)](simplesamlphp-googleapps)
2929
* [Configuring HTTP-Artifact](./simplesamlphp-artifact-idp)
3030
* [Identity Provider Advanced Topics](simplesamlphp-idp-more)
3131
* [Holder-of-Key profile](simplesamlphp-hok-idp)

docs/simplesamlphp-googleapps.md

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Setting up a SimpleSAMLphp SAML 2.0 IdP to use with Google Apps for Education
1+
Setting up a SimpleSAMLphp SAML 2.0 IdP to use with Google Apps / G Suite for Education
22
============================================
33

44
<!--
@@ -16,7 +16,7 @@ SimpleSAMLphp news and documentation
1616

1717
This document is part of the SimpleSAMLphp documentation suite.
1818

19-
* [List of all SimpleSAMLphp documentation](http://simplesamlphp.org/docs)
19+
* [List of all SimpleSAMLphp documentation](https://simplesamlphp.org/docs)
2020
* [SimpleSAMLphp homepage](https://simplesamlphp.org)
2121

2222

@@ -37,10 +37,9 @@ Edit `config.php`, and enable the SAML 2.0 IdP:
3737
'enable.saml20-idp' => true,
3838
'enable.shib13-idp' => false,
3939

40-
## Setting up a SSL signing certificate
41-
42-
For test purposes, you can skip this section, and use the certificate included in the SimpleSAMLphp distribution. For a production system, you MUST generate a new certificate for your IdP.
40+
## Setting up a signing certificate
4341

42+
You must generate a certificate for your IdP.
4443
Here is an example of an openssl command to generate a new key and a self signed certificate to use for signing SAML messages:
4544

4645
openssl req -newkey rsa:2048 -new -x509 -days 3652 -nodes -out googleappsidp.crt -keyout googleappsidp.pem
@@ -65,8 +64,6 @@ Here is an example of typical user input when creating a certificate request:
6564
**Note**: SimpleSAMLphp will only work with RSA and not DSA certificates.
6665

6766

68-
69-
7067
Authentication source
7168
---------------------
7269

@@ -86,7 +83,7 @@ For more authentication modules, see [SimpleSAMLphp Identity Provider QuickStart
8683

8784
In this guide, we will use the `exampleauth:UserPass` authentication module. This module does not have any dependencies, and is therefore simple to set up.
8885

89-
After you have successfuly tested that everything is working with the simple `exampleauth:UserPass`, you are encouraged to setup SimpleSAMLphp IdP towards your user storage, such as an LDAP directory. (Use the links on the authentication sources above to read more about these setups. `ldap:LDAP` is the most common authentication source).
86+
After you have successfuly tested that everything is working with the simple `exampleauth:UserPass`, you are encouraged to setup SimpleSAMLphp IdP towards your user storage, such as an LDAP directory. (Use the links on the authentication sources above to read more about these setups. `ldap:LDAP` is the most common authentication source.)
9087

9188

9289
Configuring the authentication source
@@ -100,7 +97,7 @@ On unix, this can be done by running (from the SimpleSAMLphp installation direct
10097

10198
The next step is to create an authentication source with this module. An authentication source is an authentication module with a specific configuration. Each authentication source has a name, which is used to refer to this specific configuration in the IdP configuration. Configuration for authentication sources can be found in `config/authsources.php`.
10299

103-
In this example we will use the `example-userpass`, and hence that section is what matters and will be used.
100+
In this example we will use `example-userpass`, and hence that section is what matters and will be used.
104101

105102
<?php
106103
$config = array(
@@ -116,11 +113,7 @@ In this example we will use the `example-userpass`, and hence that section is wh
116113
);
117114
?>
118115

119-
This configuration creates two users - `student` and `employee`, with the passwords `studentpass` and `employeepass`. The username and password is stored in the array index `student:studentpass` for the `student`-user. The attributes (only `uid` in this example) will be returned by the IdP when the user logs on.
120-
121-
122-
123-
116+
This configuration creates two users - `student` and `employee`, with the passwords `studentpass` and `employeepass`. The username and password are stored in the array index `student:studentpass` for the `student`-user. The attributes (only `uid` in this example) will be returned by the IdP when the user logs on.
124117

125118

126119

@@ -133,7 +126,7 @@ If you want to setup a SAML 2.0 IdP for Google Apps, you need to configure two m
133126

134127
This is the configuration of the IdP itself. Here is some example config:
135128

136-
// The SAML entity ID is the index of this config. Dynamic:X will automatically generate an entity ID (Reccomended)
129+
// The SAML entity ID is the index of this config. Dynamic:X will automatically generate an entity ID (recommended)
137130
$metadata['__DYNAMIC:1__'] => array(
138131
139132
// The hostname of the server (VHOST) that this SAML entity will use.
@@ -146,17 +139,17 @@ This is the configuration of the IdP itself. Here is some example config:
146139
'auth' => 'example-userpass',
147140
)
148141

149-
**Note**: You can only have one entry in the file with host equal `__DEFAULT__`, therefore you should replace the existing entry with this one, instead of adding this entry as a new entry in the file.
142+
**Note**: You can only have one entry in the file with host equal to `__DEFAULT__`, therefore you should replace the existing entry with this one, instead of adding this entry as a new entry in the file.
150143

151144

152145
### Configuring SAML 2.0 SP Remote metadata
153146

154-
In the (`saml20-sp-remote.php`) file we will configure an entry for Google Apps for education. There is already an entry for Google Apps in the template, but we will change the domain name:
147+
In the `saml20-sp-remote.php` file we will configure an entry for G Suite (Google Apps) for Education. There is already an entry for G Suite in the template, but we will change the domain name:
155148

156149
/*
157-
* This example shows an example config that works with Google Apps for education.
150+
* This example shows an example config that works with G Suite (Google Apps) for education.
158151
* What is important is that you have an attribute in your IdP that maps to the local part of the email address
159-
* at Google Apps. E.g. if your google account is foo.com, and you have a user with email john@foo.com, then you
152+
* at G Suite. E.g. if your google account is foo.com, and you have a user with email john@foo.com, then you
160153
* must set the simplesaml.nameidattribute to be the name of an attribute that for this user has the value of 'john'.
161154
*/
162155
$metadata['google.com'] => array(
@@ -170,14 +163,14 @@ You must also map some attributes received from the authentication module into e
170163

171164
For an e-mail address `student@g.feide.no`, the `uid` should be set to `student`.
172165

173-
You should modify the `AssertionConsumerService` to include your Google Apps domain name instead of `g.feide.no`.
166+
You should modify the `AssertionConsumerService` to include your G Suite domain name instead of `g.feide.no`.
174167

175168
For an explanation of the parameters, see the
176169
[SimpleSAMLphp Identity Provider QuickStart](simplesamlphp-idp).
177170

178-
## Configure Google Apps for education
171+
## Configure G Suite for education
179172

180-
Start by logging in to our Google Apps for education account panel.
173+
Start by logging in to our G SUite for education account panel.
181174
Then select "Advanced tools":
182175

183176
**Figure&nbsp;1.&nbsp;We go to advanced tools**
@@ -196,44 +189,49 @@ Upload a certificate, such as the googleappsidp.crt created above:
196189
![Uploading certificate](resources/simplesamlphp-googleapps/googleapps-cert.png)
197190
Fill out the remaining fields:
198191

199-
The most important field is the Sign-in page URL. Set it to
200-
something similar to:
192+
The most important field is the Sign-in page URL. You can find the
193+
correct value in your IdP metadata. Browse to your simpleSAMLphp installation,
194+
go to the "Federation" tab, under "SAML 2.0 IdP Metadata" select "show metadata".
201195

202-
http://dev2.andreas.feide.no/simplesaml/saml2/idp/SSOService.php
196+
You will find in the metadata the XML tag `<md:SingleSignOnService>`
197+
which contains the right URL to input in the field, it will look something
198+
like this:
203199

204-
using the hostname of your IdP server.
200+
https://dev2.andreas.feide.no/simplesaml/saml2/idp/SSOService.php
205201

206-
You must also configure the IdP initiated Single LogOut endpoint of your server. The RelayState parameter of the endpoint is the URL where the user is redirected after successfull logout. Recommended value:
202+
You must also configure the IdP initiated Single LogOut endpoint of your server.
203+
You will find this in your metadata XML in the tag
204+
`<md:SingleLogoutService>`. It will look something like:
207205

208-
http://dev2.andreas.feide.no/simplesaml/saml2/idp/initSLO.php?RelayState=/simplesaml/logout.php
206+
http://dev2.andreas.feide.no/simplesaml/saml2/idp/SingleLogoutService.php
209207

210208
again, using the host name of your IdP server.
211209

212210
The Sign-out page or change password URL can be static pages on your server.
213211

214-
The network mask determines which IP addresses will be asked for SSO login. IP addresses not matching this mask will be presented with the normal Google Apps login page. I think you can leave this field empty to enable authentication for all URLs.
212+
The network mask determines which IP addresses will be asked for SSO login.
213+
IP addresses not matching this mask will be presented with the normal G Suite login page.
214+
It is normally best to leave this field empty to enable authentication for all URLs.
215215

216216
**Figure&nbsp;4.&nbsp;Fill out the remaining fields**
217217

218218
![Fill out the remaining fields](resources/simplesamlphp-googleapps/googleapps-ssoconfig.png)
219219

220-
### Add a user in Google Apps that is known to the IdP
220+
### Add a user in G Suite that is known to the IdP
221221

222-
Before we can test login, a new user must be defined in Google Apps. This user must have a mail field matching the email prefix mapped from the attribute as described above in the metadata section.
222+
Before we can test login, a new user must be defined in G Suite. This user must have a mail field matching the email prefix mapped from the attribute as described above in the metadata section.
223223

224-
## Test to login to Google Apps for education
224+
## Test to login to G Suite for education
225225

226226
Go to the URL of your mail account for this domain, the URL is similar to the following:
227227

228228
http://mail.google.com/a/yourgoogleappsdomain.com
229229

230-
replacing the last part with your own google apps domain name.
230+
replacing the last part with your own G Suite domain name.
231231

232232
## Security Considerations
233233

234-
Make sure that your IdP server runs HTTPS (SSL). The Apache documentation contains information for how to configure HTTPS.
235-
236-
Make sure you have replaced the default certificate delivered with the SimpleSAMLphp distribution with your own certificate.
234+
Make sure that your IdP server runs HTTPS (TLS). The Apache documentation contains information for how to configure HTTPS.
237235

238236
Support
239237
-------
@@ -244,4 +242,3 @@ If you need help to make this work, or want to discuss SimpleSAMLphp with other
244242
- [List of all available SimpleSAMLphp documentation](https://simplesamlphp.org/docs/)
245243
- [Join the SimpleSAMLphp user's mailing list](https://simplesamlphp.org/lists)
246244

247-

docs/simplesamlphp-install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ You have now successfully installed SimpleSAMLphp, and the next steps depends on
261261
* [Identity Provider QuickStart](simplesamlphp-idp)
262262
* [IdP hosted reference](simplesamlphp-reference-idp-hosted)
263263
* [SP remote reference](simplesamlphp-reference-sp-remote)
264-
* [Use case: Setting up an IdP for Google Apps](simplesamlphp-googleapps)
264+
* [Use case: Setting up an IdP for G Suite (Google Apps)](simplesamlphp-googleapps)
265265
* [Identity Provider Advanced Topics](simplesamlphp-idp-more)
266266
* [Automated Metadata Management](simplesamlphp-automated_metadata)
267267
* [Maintenance and configuration](simplesamlphp-maintenance)

docs/simplesamlphp-maintenance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ alternative, you may log to flat files.
205205

206206
## Apache configuration
207207

208-
Basic Apache configruation is described in [SimpleSAMLphp Installation](simplesamlphp-install#section_6).
208+
Basic Apache configuration is described in [SimpleSAMLphp Installation](simplesamlphp-install#section_6).
209209
However, your IdP or SP is most likely a valuable website that you want to configure securely. Here are some checks.
210210

211211
* Make sure you use HTTPS with a proper certificate. The best way is to not

metadata-templates/saml20-sp-remote.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
);
1515

1616
/*
17-
* This example shows an example config that works with Google Apps for education.
17+
* This example shows an example config that works with G Suite (Google Apps) for education.
1818
* What is important is that you have an attribute in your IdP that maps to the local part of the email address
19-
* at Google Apps. In example, if your google account is foo.com, and you have a user that has an email john@foo.com, then you
19+
* at G Suite. In example, if your Google account is foo.com, and you have a user that has an email john@foo.com, then you
2020
* must set the simplesaml.nameidattribute to be the name of an attribute that for this user has the value of 'john'.
2121
*/
2222
$metadata['google.com'] = array(

0 commit comments

Comments
 (0)