| 1 |
Google Apps |
| 2 |
=========== |
| 3 |
|
| 4 |
|image0| |
| 5 |
|
| 6 |
Presentation |
| 7 |
------------ |
| 8 |
|
| 9 |
`Google Apps <http://www.google.com/apps/>`__ can use SAML to |
| 10 |
authenticate users, behaving as an SAML service provider, as explained |
| 11 |
`here <http://code.google.com/googleapps/domain/sso/saml_reference_implementation.html>`__. |
| 12 |
|
| 13 |
To work with LL::NG it requires: |
| 14 |
|
| 15 |
- An `enterprise Google Apps |
| 16 |
account <http://www.google.com/apps/intl/en/business/index.html>`__ |
| 17 |
- LL::NG configured as :doc:`SAML Identity Provider<../idpsaml>` |
| 18 |
- Registered users on Google Apps with the same email than those used |
| 19 |
by LL::NG (email will be the NameID exchanged between Google Apps and |
| 20 |
LL::NG) |
| 21 |
|
| 22 |
Configuration |
| 23 |
------------- |
| 24 |
|
| 25 |
Google Apps control panel |
| 26 |
~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 27 |
|
| 28 |
|
| 29 |
.. attention:: |
| 30 |
|
| 31 |
This part is based on `SimpleSAMLPHP |
| 32 |
documentation <http://simplesamlphp.org/docs/1.6/simplesamlphp-googleapps>`__. |
| 33 |
|
| 34 |
As administrator, go in Google Apps control panel and click on Advanced |
| 35 |
tools: |
| 36 |
|
| 37 |
|image1| |
| 38 |
|
| 39 |
Then select ``Set up single sign-on (SSO)``: |
| 40 |
|
| 41 |
|image2| |
| 42 |
|
| 43 |
Now configure all SAML parameters: |
| 44 |
|
| 45 |
|image3| |
| 46 |
|
| 47 |
- **Enable Single Sign-On**: check the box. Uncheck it to disable SAML |
| 48 |
authentication (for example, if your Identity Provider is down). |
| 49 |
- **Sign-in page URL**: SSO access point (HTTP-Redirect binding). |
| 50 |
Example: http://auth.example.com/saml/singleSignOn |
| 51 |
- **Sign-out page URL**: this in not the SLO access point (Google Apps |
| 52 |
does not support SLO), but the main logout page. Example: |
| 53 |
http://auth.example.com/?logout=1 |
| 54 |
- **Change password URL**: where users can change their password. |
| 55 |
Example: http://auth.example.com |
| 56 |
|
| 57 |
|
| 58 |
.. attention:: |
| 59 |
|
| 60 |
You must check the option |
| 61 |
``Use a specific domain transmitter`` to force Google Apps to send the |
| 62 |
full entityId. |
| 63 |
|
| 64 |
Certificate |
| 65 |
~~~~~~~~~~~ |
| 66 |
|
| 67 |
For the certificate, you can build it from the signing private key |
| 68 |
registered in Manager. Select the key, and export it (button |
| 69 |
``Download``). This will download the public and the private key. |
| 70 |
|
| 71 |
Keep the private key in a file, for example lemonldap-ng-priv.key, then |
| 72 |
use openssl to generate an auto-signed certificate: |
| 73 |
|
| 74 |
:: |
| 75 |
|
| 76 |
openssl req -new -key lemonldap-ng-priv.key -out cert.csr |
| 77 |
openssl x509 -req -days 3650 -in cert.csr -signkey lemonldap-ng-priv.key -out cert.pem |
| 78 |
|
| 79 |
You can now the upload the certificate (``cert.pem``) on Google Apps. |
| 80 |
|
| 81 |
|
| 82 |
.. tip:: |
| 83 |
|
| 84 |
You can also use the certificate instead of public key in SAML |
| 85 |
metadata, see :doc:`SAML service configuration<../samlservice>`\ |
| 86 |
|
| 87 |
New Service Provider |
| 88 |
~~~~~~~~~~~~~~~~~~~~ |
| 89 |
|
| 90 |
You should have configured LL::NG as an |
| 91 |
:doc:`SAML Identity Provider<../idpsaml>`, |
| 92 |
|
| 93 |
Now we will add Google Apps as a new SAML Service Provider: |
| 94 |
|
| 95 |
#. In Manager, click on SAML service providers and the button |
| 96 |
``New service provider``. |
| 97 |
#. Set GoogleApps as Service Provider name. |
| 98 |
#. Set ``Email`` in ``Options`` » ``Authentication Response`` » |
| 99 |
``Default NameID format`` |
| 100 |
#. Disable all signature flags in ``Options`` » ``Signature``, except |
| 101 |
``Sign SSO message`` which should be to ``On`` |
| 102 |
#. Select ``Metadata``, and unprotect the field to paste the following |
| 103 |
value: |
| 104 |
|
| 105 |
.. code-block:: xml |
| 106 |
|
| 107 |
<md:EntityDescriptor entityID="google.com" xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"> |
| 108 |
<SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"> |
| 109 |
<AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://www.google.com/a/mydomain.org/acs" index="1" /> |
| 110 |
<NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</NameIDFormat> |
| 111 |
</SPSSODescriptor> |
| 112 |
</md:EntityDescriptor> |
| 113 |
|
| 114 |
|
| 115 |
.. attention:: |
| 116 |
|
| 117 |
Change **mydomain.org** (in ``AssertionConsumerService`` |
| 118 |
markup, parameter ``Location``) into your Google Apps domain. Also adapt |
| 119 |
your entityID to match the Assertion issuer: google.com/a/mydomain.org |
| 120 |
|
| 121 |
|
| 122 |
Application menu |
| 123 |
~~~~~~~~~~~~~~~~ |
| 124 |
|
| 125 |
You can add a link in :doc:`application menu<../portalmenu>` to display |
| 126 |
Google Apps to users. |
| 127 |
|
| 128 |
You need to adapt some parameters: |
| 129 |
|
| 130 |
- **Address**: set one of Google Apps URL (all Google Apps product a |
| 131 |
distinct URL), for example |
| 132 |
http://www.google.com/calendar/hosted/mydomain.org/render |
| 133 |
- **Display**: As Google Apps is not a protected application, set to |
| 134 |
``On`` to always display it |
| 135 |
|
| 136 |
|
| 137 |
.. attention:: |
| 138 |
|
| 139 |
Change **mydomain.org** into your Google Apps |
| 140 |
domain |
| 141 |
|
| 142 |
Logout |
| 143 |
~~~~~~ |
| 144 |
|
| 145 |
Google Apps does not support Single Logout (SLO). |
| 146 |
|
| 147 |
Google Apps has a configuration parameter to redirect user on a specific |
| 148 |
URL after Google Apps logout (see :doc:`Google Apps control panel<>`). |
| 149 |
|
| 150 |
To manage the other way (LL::NG → Google Apps), you can add a dedicated |
| 151 |
:doc:`logout forward rule<../logoutforward>`: |
| 152 |
|
| 153 |
:: |
| 154 |
|
| 155 |
GoogleApps => http://www.google.com/calendar/hosted/mydomain.org/logout |
| 156 |
|
| 157 |
|
| 158 |
.. attention:: |
| 159 |
|
| 160 |
Change **mydomain.org** into your Google Apps |
| 161 |
domain |
| 162 |
|
| 163 |
.. |image0| image:: /applications/googleapps_logo.png |
| 164 |
:class: align-center |
| 165 |
.. |image1| image:: /documentation/googleapps-menu.png |
| 166 |
:class: align-center |
| 167 |
.. |image2| image:: /documentation/googleapps-sso.png |
| 168 |
:class: align-center |
| 169 |
.. |image3| image:: /documentation/googleapps-ssoconfig.png |
| 170 |
:class: align-center |
| 171 |
|