Prerequisites
- A SAML 2.0 compliant Identity Provider (e.g., Auth0, OneLogin, Keycloak, Shibboleth)
- SnackBase installed and running
Step 1: Get Service Provider (SP) Information from SnackBase
You will need to provide the following information to your IdP:- SP Entity ID (Audience URI): A unique identifier for your SnackBase instance
- Example:
https://snackbase.yourdomain.com
- Example:
- Assertion Consumer Service (ACS) URL: The endpoint where the IdP sends the SAML assertion
- Example:
https://snackbase.yourdomain.com/api/v1/auth/saml/acs
- Example:
- NameID Format:
urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
Step 2: Configure your Identity Provider
- Create a new SAML application in your IdP
- Input the Entity ID and ACS URL from Step 1
- Ensure the IdP signs the assertion (SnackBase requires signed assertions or signed responses)
- Configure attribute mapping (optional but recommended):
- Map user email to
email,mail, orEmail - Map name to
firstName/lastNameordisplayName
- Map user email to
Step 3: Configure SnackBase
Collect the following information from your IdP metadata:- IdP Entity ID (Issuer): The unique identifier of your IdP
- IdP SSO URL: The URL where SnackBase will redirect users for login
- X.509 Certificate: The public certificate used to verify the IdP’s signature
| Field | Description |
|---|---|
idp_entity_id | The Issuer URI from your IdP |
idp_sso_url | The Single Sign-On URL from your IdP |
idp_x509_cert | The public certificate (PEM format) |
sp_entity_id | The Entity ID you defined in Step 1 |
assertion_consumer_url | The ACS URL you defined in Step 1 |
binding | Set to HTTP-Redirect (default) |
name_id_format | Set to urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress (default) |
Testing
- Save your configuration
- Attempt to sign in via the Generic SAML SSO button
Troubleshooting
Ensure the IdP is configured to sign either the assertion or the response. SnackBase requires at least one to be signed for security.
- Invalid signature: Check that the X.509 certificate is correctly copied and matches the IdP’s current certificate
- NameID format mismatch: Ensure the NameID format matches between IdP and SnackBase configuration
- Attribute mapping: Verify that attribute names in the SAML response match your SnackBase configuration