...
Numberedheadings | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
IntroductionDeployers of moonshot enabled services may wish external users to authenticate to their service but control the user account that each particular user has access to. For example, mapping specific external users to specific local linux accounts when logging in through SSH, or specific external users to specific local mailboxes when logging in to Exchange, etc. Additionally, it often is the case that a user may have multiple identities he/she would like to associate with their local account. For example, a scientist may wish to use their institutional identity (as issued by their home institution), as well as perhaps a Google or Facebook account, where allowed. It is also the case that not all associations are trusted equally. In some cases, the institutional identity may have a higher level of assurance than a social platform like Google or Facebook, and the organisation may wish to restrict logging into more sensitive systems to identities with higher levels of assurance. For example, the scientist is allowed to use their Google or Facebook account to sign into reference libraries, user accounts, project and grant submission systems, but may only use their institutional identity to log into data libraries containing sensitive research data. Based on these requirements, i.e. mapping external to internal identifiers, multiple identities and different levels of assurance, a database table with four columns is sufficient. Where does the mapping happen?In this scenario, the mapping from external user to internal happens on the Moonshot RP Proxy. A single Moonshot RP Proxy can handle mappings for multiple Moonshot-enabled services, as the database will record which service the mapping is associated with. However, this means that the administrator of the Moonshot RP Proxy (or rather, the administrator of the database) will need to either manage all of the mappings for all of the services that make use of their Moonshot RP Proxy, or give all administrators of those systems access to the database. An alternative would be for each system that wishes to make use of mappings run their own Moonshot RP proxy. Configure the RP ProxyThe first thing needed is to configure your Moonshot RP Proxy (or Moonshot IdP if you are using that as both an IdP and an RP Proxy) to make use of the database of mappings that we will set up in the next step. Enable the FreeRADIUS SQL moduleTo access the database from your Moonshot RP proxy (FreeRADIUS), you must configure FreeRADIUS to enable database support. FreeRADIUS by default supports SQLite, MySQL/MariaDB, PostgreSQL, and any database that supports Unix ODBC connections. However, depending on your database dialect, you may have to install the FreeRADIUS module for it to enable this support. To add support for MySQL in FreeRADIUS on RHEL, issue the following command:
After installation, configure the SQL module:
Shared vs Different local identifiersThere are typically two deployment models for user mapping to multiple moonshot-enabled services managed by a single Moonshot RP Proxy:
Instructions differ depending on your particular deployment model, so follow the correct set of following instructions for you: Option 1 - Different local user identifier per systemConfigure the DatabaseThe first thing that is needed is a database to store these mappings. In your favourite database server software, create a table with four columns:
In MySQL, you can achieve this with the following command: The first column will contain the gss_acceptor name for the service, made up of the GSS-Acceptor-Service-Name and GSS-Acceptor-Host-Name of the service (e.g. host/ssh-server.example.com). The second column will store the incoming targeted identifier. The incoming value will generally be qualified, i.e. it will be a value with the incoming realm appended to it (i.e. value@REALM). The width is limited to the maximum length of the SAML The third column is the local account name. The width is limited to the maximum length of useradd(8) on Unix. On Windows, underlying usernames are limited to 20 characters for compatibility purposes (see Microsoft TechNet: Active Directory Maximum Limits - Scalability for more information on this). The fourth column is for information (and possibly integration) purposes and contains an identifier that identifies the service used. Suggested values are zero, indicating a local-to-local mapping, one indicating a Moonshot mapping, and any other value thereafter for clearly defined values as per your organisation's choice. This field could also indicate the level of assurance. The primary key is made up of the tuple of gss_acceptor and targeted_id, meaning that for a particular service and a particular external user, only one mapping can exist.
Configure the RP ProxyThe second thing needed is to configure your Moonshot RP Proxy (or Moonshot IdP if you are using that as both an IdP and an RP Proxy) to make use of the database of mappings. Enable the FreeRADIUS SQL moduleTo access the database from your Moonshot RP proxy (FreeRADIUS), you must configure FreeRADIUS to enable database support. FreeRADIUS by default supports SQLite, MySQL/MariaDB, PostgreSQL, and any database that supports Unix ODBC connections. However, depending on your database dialect, you may have to install the FreeRADIUS module for it to enable this support. Example - adding support for MySQL to FreeRADIUSTo add support for MySQL in FreeRADIUS on RHEL, issue the following command: bash
After installation, configure the SQL module: /etc/raddb/mods-available/sql In the Adjust the Remove the comments from the You must ensure that the login user and password are created in the database before you start the FreeRADIUS server. See your database documentation on how to create users in your database, or use the supplied FreeRADIUS setup scripts for your database dialect to create a default database. radius_db line to suit your database dialect. Take note of the additional options documented that may be applicable to your database dialect.Save the file and create a soft link to enable the SQL module: Using the Moonshot-Host-TargetedId attribute in a database lookupA typical Moonshot deployment uses three pseudonymous targeted identifiers as issued by a Moonshot IdP - the To use these identifiers as the incoming attribute to be used as the remote identifier for the user, do the following: Create a mapping policy configuration
Option 2 - Same local user identifier across all systemsConfigure the DatabaseThe first thing that is needed is a database to store these mappings. In your favourite database server software, create a table with three columns:
In MySQL, you can achieve this with the following command: The first column will store the incoming targeted identifier. The incoming value will generally be qualified, i.e. it will be a value with the incoming realm appended to it (i.e. value@REALM). The width is limited to the maximum length of the SAML The second column is the local account name. The width is limited to the maximum length of useradd(8) on Unix. On Windows, underlying usernames are limited to 20 characters for compatibility purposes (see Microsoft TechNet: Active Directory Maximum Limits - Scalability for more information on this). The third column is for information (and possibly integration) purposes and contains an identifier that identifies the service used. Suggested values are zero, indicating a local-to-local mapping, one indicating a Moonshot mapping, and any other value thereafter for clearly defined values as per your organisation's choice. This field could also indicate the level of assurance. The primary key is the targeted_id, meaning that for a particular external user, only one mapping can exist.
Using the Moonshot-Host-TargetedId attribute in a database lookupA typical Moonshot deployment uses three pseudonymous targeted identifiers as issued by a Moonshot IdP - the To use these identifiers as the incoming attribute to be used as the remote identifier for the user, do the following: Create a mapping policy configuration
Enabling the mapping policyTo use the policy, it has to be enabled by using it.
Testing the mappingCreate a manual mapping entry in your database with a test user from Janet (please contact us for it).
Populating the mapping databaseTo populate the mapping database in a production environment, you will need to create a system that will require the user to log in twice, once with their local user (which should give you access to the local username), and once with Moonshot to gain access to one (or more) of the Moonshot TargetedIds. Then you will be able to create an entry in the database that contains the mapping.
|