Docs / Running yasp
SAML sign-in
yasp can sign people in to the dashboard with SAML 2.0, alongside or instead of OpenID Connect. When both are configured, the sign-in page lets people choose.
SAML support links the C libraries libxmlsec1 and OpenSSL to verify signatures, so it is
an opt-in build feature. The static release binaries and the yasp image don't include it; the
yasp-saml image does.
# Getting a SAML build
- Docker: use the
yasp-samlimage, published with every release for linux/amd64 and linux/arm64. It takes the same settings and volume as theyaspimage:
Or build it yourself:docker pull ghcr.io/yasp-dev/yasp-saml:latestdocker build -f deploy/docker/Dockerfile --target yasp-saml -t yasp:saml . - From source: install the libraries, then build with the feature:
At run time the machine needssudo apt-get install -y libxmlsec1-dev libxml2-dev libclang-dev pkg-config # Debian/Ubuntu cargo build --release -p yasp --features samllibxmlsec1,libxmlsec1-opensslandlibxml2.
A build without the feature refuses to start when [saml] is configured, and says why.
# Registering yasp at your identity provider
yasp is the service provider. Give your IdP these values (replace the host with your
base_url):
| Setting | Value |
|---|---|
| Entity ID / audience | https://status.example.com/saml/metadata |
| Assertion consumer service (HTTP-POST) | https://status.example.com/saml/acs |
| SP metadata | https://status.example.com/saml/metadata |
| Name ID format | email address (or persistent) |
| Signing | sign the response or the assertion, RSA-SHA256 or stronger |
Send these attributes:
email(ormail, or the usual.../claims/emailaddress): the person's address. Without it, an email-format Name ID is used.groups: the groups that map to yasp roles (any attribute name; seerole_attribute).- optionally a display name (
name,displayname, or setname_attribute).
# Configuration
[saml]
# Where the IdP publishes its metadata (fetched at startup), or a local copy:
idp_metadata_url = "https://idp.example.com/realms/acme/protocol/saml/descriptor"
# idp_metadata_file = "/etc/yasp/idp-metadata.xml"
role_attribute = "groups" # the attribute holding groups (default: groups)
[saml.role_map]
admin = ["yasp-admins"]
editor = ["ops"]
viewer = ["everyone"]
[bootstrap] admin_emails and SCIM-provisioned groups apply to SAML sign-ins just as they do
to OIDC.
# What yasp checks
- The response or its assertion is signed by a certificate in the IdP's metadata, with RSA or ECDSA and SHA-256 or stronger (SHA-1 is refused). yasp won't start if the metadata has no signing certificate.
- The assertion comes from the IdP's entity ID, names yasp as its audience and the
/saml/acsaddress as its recipient, and is inside its validity window (3 minutes of clock skew allowed). - It answers a sign-in request yasp itself started in the last 10 minutes. The request's ID is
a keyed MAC of the short
RelayState, so IdP-initiated sign-in isn't accepted.
# Troubleshooting
Rejected responses are logged at warn with the reason (SAML response rejected). The usual
causes are a clock that's off, an entity ID or ACS address that doesn't match base_url
exactly, or an IdP that doesn't sign responses or assertions.