Connect a SAML application
Set up single sign-on to a SAML 2.0 application, with your AuthFI project as the identity provider.
Your project is a SAML 2.0 identity provider. Connect an application to it, and people sign in to that application with their AuthFI account instead of a separate password. This is single sign-on (SSO).
Use this guide for any application that supports SAML 2.0. For an application that supports OpenID Connect, see Add sign-in to an app.
Before you begin
You need:
- A plan that includes SAML single sign-on. Without it, the endpoints on this page return
403. - Permission to add applications in the AuthFI console.
- Administrator access to the application's SAML or SSO settings.
In SAML terms, your project is the identity provider (IdP) and the application is the service provider (SP).
Collect the application's SAML details
In the application's SSO settings, find these values. Applications name them differently, so common alternatives are listed.
You need the signing certificate only if the application signs its sign-in requests. You add it after registering.
Register the application in AuthFI
- In the console, open Integrations > Applications and select Register.
- Under What are you connecting?, choose SAML.
- Under Which direction does trust flow?, choose We sign them in. AuthFI is the identity provider, and your people sign in to the application. This choice cannot be changed later.
- Enter the values you collected.
- Review the summary and select Register.
The last step shows the Metadata, SSO and IdP-initiated URLs for this application.
Configure the application
Open the application's page in the console and go to the Connect section. It shows everything the application needs from your project. These values are the same for every SAML application in the project.
If the application accepts a metadata URL, select Copy beside the metadata URL and paste it into the application. The application then reads the other values from the metadata, and picks up a new certificate when your signing key rotates. The metadata lists the current certificate and, during a rotation, the previous one. To upload a file instead, select Download .xml.
If the application needs each value separately, the same section lists them:
The sign-on endpoint accepts the HTTP-Redirect and HTTP-POST bindings.
In the application, require a signed assertion. AuthFI signs the assertion with RSA-SHA256.
Assign the application
An application that no group is assigned to is open to everyone in the project. To restrict it, select Assign a group on the application's page and choose a group. The first assignment closes the application to everyone else, and the console warns you before it does.
Check that it works
Start a sign-in from AuthFI. Open the IdP-initiated URL the console showed you. It has this form, with your handle in place of salesforce:
https://acme.authfi.io/saml/idp-initiated/salesforceSign in if you are asked to. You arrive in the application, signed in as yourself.
Then test the other direction. Open the application's own sign-in page and choose SSO. The application sends you to AuthFI and back.
How a sign-in starts
A SAML sign-in can start from either side.
What the application receives
AuthFI posts a SAML response to the ACS URL through the person's browser. The response contains one signed assertion.
The groups attribute lists only the groups shared with this application, not every group the person belongs to.
Change the NameID and attributes
Each application can have its own NameID and attributes. On the application's page, open the What it receives section.
- To start from what a common application expects, choose a template under Start from what the app documents: AuthFI default, Google Workspace, Salesforce, AWS IAM Identity Center, Microsoft claim names or Empty.
- Under Who they are (NameID), choose Their email address or Their user ID, which never changes. The console shows the format that will be sent:
emailAddressorpersistent. - Under Attributes, select + Add an attribute. Enter the name the application expects and choose its value.
- Select Save.
You can define up to 50 attributes. An attribute with no value for a person is left out of that person's assertion.
Require signed sign-in requests
If the application signs its requests, give AuthFI its certificate so the signature can be verified.
- On the application's page, open the Requests it sends section.
- Select Add the application's certificate, paste the certificate or select Upload a file, and select Register it.
- To reject any request that is not signed, turn on Refuse unsigned requests.
How sign-in requests are validated
When the application starts the sign-in, AuthFI validates its request before it shows the sign-in page. A request that fails a check gets a 403.
- The request names an application registered in the project.
Destination, when present, is your project's sign-on URL.- The request is no more than 5 minutes old.
- An ACS URL in the request equals the registered ACS URL.
- The signature verifies, when the application has a signing certificate or signed requests are required.
AuthFI honours two options in a request:
ForceAuthn. The person signs in again, even with a session.- A requested authentication class. If it cannot be met, the application receives a signed response with the status
NoAuthnContext.