Rancher-SAML-ADFS (Authentik)

What is Rancher

An enterprise platform for managing Kubernetes Everywhere Rancher is a platform built to address the needs of the DevOps teams deploying applications with Kubernetes, and the IT staff responsible for delivering an enterprise-critical service.

-- https://rancher.com/products/rancher

Preparation

The following placeholders will be used:

Under Customization -> Property Mappings, create a SAML Property Mapping. Give it a name like "SAML Rancher User ID". Set the SAML name to rancherUidUsername and the expression to the following

return f"{user.pk}-{user.username}"

Create an application in authentik. Set the Launch URL to https://rancher.company, as Rancher does not currently support IdP-initiated logins.

Create a SAML provider with the following parameters:

You can of course use a custom signing certificate, and adjust durations.

Rancher

In Rancher, navigate to Global -> Security -> Authentication, and select ADFS.

Fill in the fields

For the private key and certificate, you can either generate a new pair (in authentik, navigate to Identity & Cryptography -> Certificates and select Generate), or use an existing pair.

Copy the metadata from authentik, and paste it in the metadata field.

Click on save to test the authentication.


Revision #3
Created 10 September 2023 23:12:11
Updated 21 January 2024 19:22:56 by joliveira