@@ -4,92 +4,95 @@ This documentation is for enabling shibboleth with omnibus-gitlab package.
...
@@ -4,92 +4,95 @@ This documentation is for enabling shibboleth with omnibus-gitlab package.
In order to enable Shibboleth support in gitlab we need to use Apache instead of Nginx (It may be possible to use Nginx, however this is difficult to configure using the bundled Nginx provided in the omnibus-gitlab package). Apache uses mod_shib2 module for shibboleth authentication and can pass attributes as headers to omniauth-shibboleth provider.
In order to enable Shibboleth support in gitlab we need to use Apache instead of Nginx (It may be possible to use Nginx, however this is difficult to configure using the bundled Nginx provided in the omnibus-gitlab package). Apache uses mod_shib2 module for shibboleth authentication and can pass attributes as headers to omniauth-shibboleth provider.
To enable the Shibboleth OmniAuth provider you must configure Apache shibboleth module.
To enable the Shibboleth OmniAuth provider you must:
Installation and configuration of module it self is out of scope of this document.
Check <https://wiki.shibboleth.net/> for more info.
1. Configure Apache shibboleth module. Installation and configuration of module it self is out of scope of this document.
Check https://wiki.shibboleth.net/ for more info.
You can find Apache config in gitlab-recipes (<https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/web-server/apache>).
1. You can find Apache config in gitlab-recipes (https://gitlab.com/gitlab-org/gitlab-recipes/tree/master/web-server/apache)
The following changes are needed to enable Shibboleth:
Following changes are needed to enable shibboleth:
1. Protect omniauth-shibboleth callback URL:
protect omniauth-shibboleth callback URL:
```
```
<Location /users/auth/shibboleth/callback>
<Location /users/auth/shibboleth/callback>
AuthType shibboleth
AuthType shibboleth
ShibRequestSetting requireSession 1
ShibRequestSetting requireSession 1
ShibUseHeaders On
ShibUseHeaders On
require valid-user
require valid-user
</Location>
</Location>
Alias /shibboleth-sp /usr/share/shibboleth
Alias /shibboleth-sp /usr/share/shibboleth
<Location /shibboleth-sp>
<Location /shibboleth-sp>
Satisfy any
Satisfy any
</Location>
</Location>
<Location /Shibboleth.sso>
<Location /Shibboleth.sso>
SetHandler shib
SetHandler shib
</Location>
</Location>
```
```
exclude shibboleth URLs from rewriting, add "RewriteCond %{REQUEST_URI} !/Shibboleth.sso" and "RewriteCond %{REQUEST_URI} !/shibboleth-sp", config should look like this:
1. Exclude shibboleth URLs from rewriting. Add `RewriteCond %{REQUEST_URI} !/Shibboleth.sso` and `RewriteCond %{REQUEST_URI} !/shibboleth-sp`. Config should look like this:
1.[Reconfigure][] or [restart GitLab][] for the changes to take effect if you
```
1.[Reconfigure](../administration/restart_gitlab.md#omnibus-gitlab-reconfigure) or [restart](../administration/restart_gitlab.md#installations-from-source) GitLab for the changes to take effect if you
installed GitLab via Omnibus or from source respectively.
installed GitLab via Omnibus or from source respectively.
On the sign in page there should now be a "Sign in with: Shibboleth" icon below the regular sign in form. Click the icon to begin the authentication process. You will be redirected to IdP server (Depends on your Shibboleth module configuration). If everything goes well the user will be returned to GitLab and will be signed in.
On the sign in page, there should now be a "Sign in with: Shibboleth" icon below the regular sign in form. Click the icon to begin the authentication process. You will be redirected to IdP server (depends on your Shibboleth module configuration). If everything goes well the user will be returned to GitLab and will be signed in.
## Apache 2.4 / GitLab 8.6 update
## Apache 2.4 / GitLab 8.6 update
The order of the first 2 Location directives is important. If they are reversed,
The order of the first 2 Location directives is important. If they are reversed,
you will not get a shibboleth session!
you will not get a shibboleth session!
...
@@ -135,6 +138,3 @@ you will not get a shibboleth session!
...
@@ -135,6 +138,3 @@ you will not get a shibboleth session!