CrushMFT as a SAML identity provider (App Gateway)#
Apps that sign people in with SAML 2.0 (many business apps and older portals) can use CrushMFT as their identity provider. The person signs in at CrushMFT, and the app gets a signed assertion that names them. Only people whose roles give the app get one (who may use an app).
It is part of the App Gateway (Enterprise).
Turning it on#
- Set the sign-in address (Preferences, App Gateway, Sign-in & portal), such as
https://files.example.com. - Have a certificate with its key in the certificate store to sign with (RSA or EC). It may be the server's own or one made for this.
- On the Identity tab, tick Apps may sign their users in with SAML, pick the Signing certificate, and Save. The Entity id is the sign-in address with
/saml/metadataunless you give another. - Give each app the metadata address shown there (
https://files.example.com/saml/metadata), or its XML. - Add the app (Apps, Add app), untick Reached through CrushMFT if it is only signed in here, and in its SAML part read the app's metadata (by address, or pasted): the entity id, the assertion consumer address, the logout address and the app's signing certificate are filled in. Pick the NameID and the attributes, Save app.
- Give people the app (User Manager, Apps).
The addresses#
| Address | What it is |
|---|---|
/saml/metadata |
the identity provider's metadata: entity id, signing certificate, sign-in and logout addresses |
/saml/sso |
the sign-in: an AuthnRequest by HTTP-Redirect or HTTP-POST; the answer is posted to the app |
/saml/slo |
single logout: LogoutRequest and LogoutResponse, by HTTP-Redirect or HTTP-POST |
/saml/logout |
sign out of CrushMFT and of every SAML app of the session |
What it checks#
- The app is found by the
Issuerof its request. - Signed requests: an app with a signing certificate must sign its requests with it (the query of HTTP-Redirect, or a signature of the whole request for HTTP-POST). RSA or ECDSA with SHA-256 (a signed POST request may also use SHA-512); SHA-1 is refused. An ECDSA signature of a Redirect query is taken in either form (r and s side by side, or DER).
- Once only, and fresh: a request's ID is taken once; a request older than 5 minutes (plus 3 minutes for clocks that differ) is refused.
- The answer address: an
AssertionConsumerServiceURLmust be one the app registered; an index picks one of them; with neither, the first. Only HTTP-POST answers. - The XML: read with document types refused and nothing fetched from elsewhere; a signature counts only for the element it signs, by that element's ID.
- The person: their roles must give the app, and the app's Access conditions must allow them now; otherwise "You may not use …" and no assertion.
A request that arrives before the person signed in is kept for 10 minutes while they sign in, and answered afterwards.
The answer#
A Response posted to the app's address, with the assertion always signed (and the Response too when the app's Sign the whole Response too is on): the NameID, the audience (the app's entity id), the address it is for, 5 minutes of life, an AuthnStatement with a session index that stands for the CrushMFT session, and the attributes.
| NameID | Holds |
|---|---|
| Persistent (the default) | the user's id, which never changes |
| Email address | the email address; an account without one cannot sign in to that app |
| The user name | the user name |
Attributes are written field=Name, one a line, for example:
email=mail
name=displayName
groups=memberOf
user=uid
Fields: user, user_id, email, name, first_name, last_name, groups, roles. Groups and roles become one value each.
Encrypted assertions: with the app's Encrypt the assertion, the signed assertion is encrypted for the app's encryption certificate (RSA) and sent as an EncryptedAssertion, with a new key for every answer: AES-256-GCM with the key sent by RSA-OAEP and SHA-256 (XML Encryption 1.1), or AES-256-CBC with RSA-OAEP-MGF1P for apps that know only that. The signature is inside, so the app checks it after decrypting. Metadata with a key marked encryption (or a key not marked) fills in the certificate.
The signing certificate may be RSA or EC (P-256). With an EC certificate the assertions, the Responses and the metadata are signed with ECDSA, and the Redirect messages CrushMFT sends carry r and s side by side, as SAML libraries expect.
Sign-in started from CrushMFT#
With The portal's tile signs in from here, the app's tile on the portal posts a sign-in to the app without the app asking first (IdP-initiated). Leave it off unless the app needs it: most apps can start the sign-in themselves, and the tile then simply opens the app.
Single logout#
- Started by an app: its LogoutRequest (checked as sign-in requests are) ends the CrushMFT session it names. CrushMFT then sends a LogoutRequest to each other SAML app of that session that has a logout address, one after another as each answers, and finally answers the app that asked.
- Started at CrushMFT: the WebInterface's Logout, sign-out on an app's host and
/saml/logoutend the CrushMFT session and walk its SAML apps the same way, then show "Signed out" (Signing out).
The messages CrushMFT sends are signed with its certificate.
With a cluster#
Request IDs, requests kept during a sign-in and each session's apps live on the server that handled them. Keep one server as the sign-in server, or make the load balancer sticky by source address.