Skip to content

Sign people in through your identity provider (OpenID Connect)

PUT
/org/sso
curl --request PUT \
--url https://api.global.stillbox.example/v1/org/sso \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "protocol": "oidc", "issuer": "example", "client_id": "example", "saml_metadata": "example", "saml_metadata_url": "example", "client_secret": "example", "enabled": true, "enforced": false, "default_role": "member" }'

Owners give the provider’s issuer address, and the client ID and secret of an app registered there with redirect_uri as its sign-in redirect (ADR 0034). People with an email in one of the organization’s verified domains then sign in with “Sign in with single sign-on” and join with default_role the first time. With enforced, those domains’ people can’t sign in any other way.

Media typeapplication/json
object
protocol
string
default: oidc
Allowed values: oidc saml
issuer

OpenID Connect: e.g. https://login.microsoftonline.com//v2.0, https://accounts.google.com or https://.okta.com. Required for OpenID Connect.

string
client_id

Required for OpenID Connect.

string
saml_metadata

SAML only. The identity provider’s metadata XML. Give this or saml_metadata_url.

string
<= 1048576 characters
saml_metadata_url

SAML only. Where to read the identity provider’s metadata (https).

string
client_secret

Required the first time; omit to keep the current one.

string
enabled
boolean
default: true
enforced
boolean
default_role
string
default: member
Allowed values: member auditor

The setting

Media typeapplication/json
object
configured
required
boolean
protocol
required
string
default: oidc
Allowed values: oidc saml
saml
required

What to give the identity provider, and what its metadata says.

object
sp_entity_id
required

Our entity ID (audience) to register at the identity provider.

string
acs_url
required

Our assertion consumer service (reply URL)

string
sp_metadata_url
required

Our metadata

string
idp_entity_id
string
idp_sso_url
string
idp_cert_expires_at

When the identity provider’s signing certificate expires.

string format: date-time
metadata_url

Where the identity provider’s metadata was read from.

string
issuer
string
client_id
string
secret_set
required

Whether a client secret is kept; it is never shown.

boolean
enabled
required
boolean
enforced
required
boolean
default_role
required
string
Allowed values: member auditor
redirect_uri
required

Register this as the app’s redirect address at the identity provider.

string
domains
required
Array<object>
object
domain
required
string
verified
required
boolean
verified_at
string format: date-time
record_name
required

The TXT record to add, e.g. _stillbox-verification.acme.com.

string
record_value
required
string
updated_at
string format: date-time
secrets_ready
required
boolean

Example

{
"protocol": "oidc",
"default_role": "member"
}

The request is invalid

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

The API key is missing or invalid

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

Only an owner can do this (owner_only), or the invitation is for another address (not_invited)

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}