Deployment and administration manual
INDIGO-DataCloud IAM Configuration
Configuring Keystone to accept the INDIGO IAM OpenID Connect authentication is basically configuring it for OpenID Connect.
This is a step-by-step guide on how to set it up.
Requirements
Openstack Liberty or later.
Keystone API v3 with federations enabled.
Using INDIGO IAM OpenID connect API (PROVISIONAL)
INDIGO IAM needs to be configured to work with a client, so it need to be registered and some parameters tuned.
Go to the test IAM instance. You need to be registered by INDIGO AAI
Team, so contact them in order to do so.
Register a new client, under Self Service Client Registration.
Introduce the name of your choice.
Introduce the allowed redirect URIs. Assuming that your server is
keystone.example.org and the endpoint is running in port 5000 the
redirect URI will be https://keystone.example.org:5000/v3/auth/OS-FEDERATION/websso/oidc/redirect.
In Credentials tab, keep Client Secret over HTTP Basic. It is the
only valid method at this moment.
Once you save it, go to the main tab again and keep a copy of the
following fields.
Client ID.
Client Secret.
Registration Endpoint.
Registration Access Token.
Please keep them in a secure place, as you will need them to configure your Keystone server and further modify your client if needed.
Installing mod_auth_openidc
Keystone is a WSGI application that runs under Apache 2 and can be combined with different authentication systems provided by Apache modules.
In order to work with OpenID Connect, install and configure mod_auth_openidc.
There are different releases available for different Linux distributions as well as source code to be compiled.
Please check the most appropriate version for your distribution and install it:
mod_auth_openidc
configuration
mod_auth_openidc
configurationIAM is a prototype at this stage, and it will only work with Basic HTTP authentication (this will changed in the future), so you need to specify this in the configuration.
Ensure that the mod_auth_openidc is enabled:
LoadModule auth_openidc_module /usr/lib/apache2/modules/mod_auth_openidc.so
Add the following lines inside the VirtualHost
in your Keystone Apache configuration file.
Default location varies between distributions:
Ubuntu/Debian: /etc/apache2/sites-enabled/wsgi-keystone-conf
Centos: /etc/httpd/conf.d/wsgi-keystone.conf
Substitute the following values:
<CLIENT ID>
: Client ID as obtained from the IAM.<CLIENT SECRET>
: Client Secret as obtained from the IAM.<PASSPHRASE>
: A password used for crypto purposes. Put something of your choice here.<KEYSTONE HOST>
: Your Keystone host.
OpenStack Identity (Keystone) configuration
Once Apache is set up to authenticate using OpenID Connect, you need to configure Keystone so that it is able to consume the OpenID Connect credentials.
This is done by setting up the Federation plugins. Ensure that the following options are set in the corresponding sections in your keystone configuration file (/etc/keystone/keystone.conf
):
Ensure that /etc/keystone/sso_callback_template.html
exists on your system.
Keystone Groups, Projects and Mapping setup
To manage federated users, Keystone will maps them according to some rules inside groups. Then, roles can be granted to these groups within one or more projects/tenants.
First create a group that will hold all the INDIGO users, after create a project for them. Note that you can chose whatever naming you want.
Grant user roles to the whole indigo_group into the indigo project:
Now the federation plugin needs to be setup.
Openstack Liberty
The first step is adding a mapping, so that incoming users are matched to a specific group. Using the group created above, create the following JSON mapping. Save the following into a temporary file like indigo_mapping.json:
Openstack Mitaka
In the Mitaka release, shadow userswhere introduced, as such the JSON mapping is the following:
The remote (IAM) ID of the user - OIDC-sub
attribute - will be mapped into into an ephemeral keystone local user - < OIDC-sub >_iamID
Hereon procedure is common to liberty and mitaka.
Load the mapping as follows:
Create the corresponding Identity Provider and protocol.
Note: to get an homogeneous authentication flow in the INDIGO sites, one should use the same values for the identity provider (indigo-dc) and protocol (openidc):
If you need to change the mapping at a later stage, you can update it by:
OpenStack Dashboard (Horizon) Configuration
Whenever a user selects the IAM authentication it is redirected to the correct authentication server.
Ensure that the following is included in your dashboard configuration file, usually located under /etc/openstack_dashboard/local_settings.py
or /etc/openstack-dashboard/local_settings
:
Last updated