SAML Single Sign-On
One connection per enterprise customer
A SAML connection ties your customer's identity provider to an organization in your project. Their employees type a work email on your sign-in page and land at Okta or Entra; what comes back is a signed assertion BillDog verifies and turns into an ordinary session.
Sign the assertion or the response — never both
1. Create the connection
Project Settings → Auth → SSO connections → Add connection, kind saml. A connection belongs to exactly one environment — sandbox and production identities are different people, so you configure them separately — and normally to one organization, which is what makes directory-driven roles and entitlement inheritance work.
2. Give your customer three strings
The connection screen shows all three. They are returned by the same helpers the verifier compares against, so what you paste into the IdP and what BillDog enforces cannot drift apart.
| What the IdP calls it | Shape |
|---|---|
| ACS URL / Reply URL | https://api.billdog.io/v1/auth-sso-acs/<connection-id> |
| SP Entity ID / Audience URI | …/saml/p/<project-id>/production (or /sandbox) |
| Metadata URL | …/auth-sso-acs/<connection-id>/metadata |
The ACS URL is per connection, not per project, because the connection carries the certificate — the endpoint has to know which key to verify against before there is anything in the request body it can trust.
The SP metadata publishes no certificate of our own
3. Take their IdP's details
- IdP entity ID — the issuer in their assertions.
- SSO URL — where BillDog sends people to sign in.
- Signing certificate — the X.509 public certificate; every assertion is verified against it.
4. Route a domain to the connection
Link a verified organization domain to the connection. That is what turns "type your work email" into "get bounced to your own IdP" — the domain decides which connection an address belongs to. Linking refuses an unverified domain.
An IdP is authoritative for its own domain only
acme.com cannot assert bob@eng.acme.com. Without this, any customer's IdP could claim any of your users.SP-initiated and IdP-initiated
SP-initiated is the default and the safer one: the user starts on your page, BillDog builds the AuthnRequest, and the response is correlated to a request it actually made.
IdP-initiated — the user clicks your tile in their Okta dashboard — is opt-in per connection via allow_idp_initiated, and off unless you turn it on. It has no request to correlate against, which is a weaker position; enable it because a customer needs the app-dashboard tile, not by default.
What BillDog checks on every assertion
- Exactly one signature, verifying against the connection's certificate.
- The signature covers the assertion actually read — the defence against wrapping.
- Audience and issuer match this connection.
- Conditions are in-window.
- The assertion ID has not been seen before — replay is refused.
- The email is inside the routed, verified domain.
A rejected assertion returns a 401, and the reason is logged rather than returned. A verifier that explains precisely why it refused is a verifier that helps an attacker iterate.
Testing it
curl https://api.billdog.io/v1/auth-sso-acs/<connection-id>/metadataIf that returns real metadata, the connection exists and is readable by the IdP. Do the first end-to-end test in sandbox, with a sandbox connection — a production connection cannot be tested with sandbox identities.
Next
- SCIM provisioning — sync the directory, not just the sign-in.
- OIDC single sign-on
- Organizations
Was this page helpful?
Or rate this page: