Lux: SSO through SAML
Introduction
You can enable SSO with your identity management system through the SAML 2.0 protocol. Hasura Pro is a SAML 2.0 compliant service provider.
Configuration
Configuring the identity provider
Create a new service provider on your SAML identity provider with the following configuration:
Configure the ACS URL, Entity ID, Recipient and Audience to be the lux callback URL.
- For path based deployments (
global.subDomain: false
), the lux callback URL ishttps://<LUX_DOMAIN>/auth/saml/callback
. - For sub-domain based deployments (
global.subDomain: true
), the lux callback URL ishttps://auth.<LUX_DOMAIN>/saml/callback
.
- For path based deployments (
Set the NameID format to
email address
.
Once created, note the metadata in XML format. Dynamic metadata through IdP metadata URL is also supported.
Configuring lux as the service provider
Ensure the
configs.authMethods
is set tosaml
in the overrides file / configmap.If you require SAML AuthN requests to be signed, configure the auth service with a keypair, steps
Insert a row in the
saml_idp
table in lux database to add the IdP configuration to lux. Go tohttps://data.<LUX_DOMAIN>
and run the following mutation from the console:mutation insertSamlIdp { insert_saml_idp_one ( object: { domain: "okta.com", idp_metadata_xml: "<?xml version=\"1.0\" encoding=\"UTF-8\"xml>\n<md:EntityDescr...." provider: "okta" disable_request_signing: false } ) { id } }
``
domain
: Domain tied to the email address of the users using SSO. If the emails of the users are tied to more than one domain, make the same mutation multiple times while changing thedomain
value.idp_metadata_xml
: Metadata of your identity provider in XML format. If you want to configure the metadata through a dynamic URL, you can keep this field empty and enter the metadata URL in theidp_metadata_url
field.provider
: The name of this identity providerdisable_request_signing
: Set this field totrue
if you want the SAML assertion request to be un-signed. (Default value isfalse
)
Caveats and limitations
- Only SP initiated flow is supported i.e. you can’t have a
Launch
button in your IdP dashboard to launch the project dashboard. - Session expiry time is currently not configurable.
- Single logout is currently not supported.
- Once SSO is enabled for an org, it is enforced for that org. This means, if an org is enabled for SSO, the emails from that org cannot use any other login mechanism such as google, github or email.
- Currently, only SAML with HTTP Post binding is supported.