SAMLSSO with LDAP roles#
A SAML provider says who somebody is. Often it does not say which groups they are in, and the groups are what decides their folders. The directory knows the groups.
This page joins the two: SAMLSSO signs the person in, and then hands the name to CrushLDAPGroup, which looks up the groups and builds the user, with everything that plugin can do: roles with template users, home folders from the directory, key mappings.
SAMLSSO has a directory lookup of its own in the lower half of its screen. For plain "which groups is this person in", that is enough, and simpler. Use the linking described here when you want the full directory plugin, or when the same directory rules should serve SAML logins and password logins alike.
How plugins are linked#
A plugin can be told to pass an accepted login on to another plugin. The link is made by the name of a configuration.
Every plugin has a first configuration, which carries the plugin's own name, and can have more, each with a name you give: see several configurations.
A configuration whose name is the name of another plugin, a tilde, and the name of one of that plugin's configurations, calls it:
| Name of the SAMLSSO configuration | Calls |
|---|---|
CrushLDAPGroup~ |
the first configuration of CrushLDAPGroup |
CrushLDAPGroup~SAMLAuth |
the configuration of CrushLDAPGroup that is named SAMLAuth |
Setting it up#
The directory side#
- In CrushLDAPGroup, Add a configuration and name it, say,
SAMLAuth. - Set it up completely: the directory, the search, the roles, the home folder. Use its test buttons until Validate User Login shows the right result for a test name.
- Leave it not enabled.
That last point is the heart of it. An enabled directory configuration answers every password login on the server. This one must answer only when SAMLSSO calls it. A configuration that is not enabled and is called by name still does its work.
The SAML side#
- In SAMLSSO, untick Enabled on the first configuration, the one that cannot be renamed.
- Add a configuration and name it
CrushLDAPGroup~SAMLAuth. - Set up the provider in it, as on the SAMLSSO page. Tick Enabled.
- Set SAMLSSO Cache Time to
-1, so that SAMLSSO does not ask a directory itself.
If you use "only used for Authentication"#
When SAMLSSO only used for Authentication is ticked, the plugin keeps the lookup switched on behind it. To change the cache time: untick the box, set SAMLSSO Cache Time to -1, tick the box again, save. Otherwise nothing arrives from the directory plugin.
What happens at a sign-in#
- The person signs in at the provider and comes back with the signed message.
- SAMLSSO checks the message and takes the name.
- It sees its own configuration's name and calls
CrushLDAPGroup, configurationSAMLAuth, with that name. - CrushLDAPGroup finds the person in the directory, without a password, since the provider has vouched for them. It checks the roles and builds the user.
- If the directory plugin refuses, because the person is in none of the roles, the sign-in is refused.
Things to know#
- The names must fit. The name the provider sends is the name the directory is searched for. If the provider sends
jdoe@example.com, search byuserPrincipalName; ifjdoe, bysAMAccountName. - The link is by name. Renaming either configuration breaks it silently: the SAML sign-in then finds no roles. After any rename, test.
- The same pairing exists for Radius and CrushLDAPGroup: RADIUS checks the password or the code, and the directory supplies the groups. The Radius configuration is named
CrushLDAPGroup~…in the same way. - For folders from your own application in place of a directory: SAMLSSO with a web application.
Not tried for this page#
Nothing was linked on the test server: it had no identity provider and no directory. The page follows the earlier documentation and the plugins' own messages.