Skip to content

Change an identity provider, keeping its sign-in URLs

View as Markdown
PATCH
/v1/auth/providers/{providerId}
curl --request PATCH \
--url https://example.com/v1/auth/providers/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "providerId": "example", "kind": "oidc", "displayName": "example", "domains": [ "example" ], "join": "invite", "joinRole": "viewer", "metadata": {}, "issuer": "https://example.com", "clientId": "example", "clientSecretRef": "example", "scopes": [ "example" ], "authorizationEndpoint": "https://example.com", "tokenEndpoint": "https://example.com", "userinfoEndpoint": "https://example.com", "jwksEndpoint": "https://example.com", "claimMapping": { "userId": "example", "email": "example", "displayName": "example", "scopes": { "claim": "example", "delimiter": "example" }, "metadata": [ "example" ] }, "idpMetadataXml": "example", "idpEntityId": "example", "idpSsoUrl": "https://example.com", "idpCertificates": [ "example" ], "spSigningKeyRef": "example", "spDecryptionKeyRef": "example", "spSigningCertificates": [ "example" ], "spDecryptionCertificates": [ "example" ], "wantAssertionsSigned": true, "attributeMapping": { "userId": "example", "email": "example", "displayName": "example" } }'

Merges the changes into the stored provider and checks the result as a registration is (400 invalid-provider-config, provider-key-refused, connection-key-refused or reserved-name-prefix, or 409 identity-provider-key-in-use, so a provider that already names such a secret is refused until it names one of its own; 422 identity-provider-invalid when the deployment can’t use it). The provider keeps its signIn, so nothing changes on the identity provider’s side. Not mounted when the deployment can’t update providers.

providerId
required
string
>= 1 characters
Idempotency-Key
string
>= 1 characters

Caller-supplied idempotency key, scoped to the caller: the same key from someone else in the workspace is their own request (from 0.1.5). Retries with the same key return the original response byte-identical (per docs/API-ROUTE-CONVENTIONS.md §3.1). A retry sent while the first request still runs is answered 409 idempotency-key-in-flight with Retry-After, on a runtime whose store holds keys (from 0.1.5); retry after it, and you get the first request’s answer. An answer that carries a secret (a new API key or public run token, a session token, a generated signing secret) isn’t kept: a retry gets 409 idempotency-key-replay-withheld, with the first request’s status and when it succeeded (from 0.1.5). A request whose key store can’t be read before it runs is answered 503 idempotency-store-unavailable with Retry-After: nothing ran, so retry with the same key (from 0.3.0).

Media typeapplication/json

Changes to a registered identity provider: a field given replaces the stored one, null removes an optional one, and anything not given stays. The result must still be a whole provider of its kind (the fields IdentityProviderConfig requires for it), checked as a registration is. providerId and kind can’t change; signIn is the deployment’s and is ignored. A new issuer drops the endpoints discovered from the old one.

object
>= 1 properties
providerId

Must match the path when given.

string
>= 1 characters
kind

oidc: an OpenID Connect identity provider people sign in with (Okta, Entra ID, Google, Keycloak…); its endpoints come from its discovery document. saml: a SAML 2.0 identity provider people sign in with.

string
Allowed values: oidc saml
displayName
string | null
>= 1 characters
domains
One of:
Array<string>
join
One of:
string
Allowed values: invite domain
joinRole
One of:
string
Allowed values: viewer runner none
metadata
One of:
object
key
additional properties
any
issuer
string format: uri
clientId
string
>= 1 characters
clientSecretRef

Opaque reference resolved server-side. Never a plaintext secret. Sign-in’s only: a tool, an endpoint, a webhook trigger, a destination, a connection app, a model provider or a pack’s env that names it is refused (400 identity-provider-key-refused), and a secret a tool, an endpoint, a webhook trigger, a destination or a connection app already uses is refused here (409 identity-provider-key-in-use). If one app registration serves both sign-in and a connection, give each a client secret of its own.

string
>= 1 characters
scopes
One of:
Array<string>
authorizationEndpoint
string | null format: uri
tokenEndpoint
string | null format: uri
userinfoEndpoint
string | null format: uri
jwksEndpoint
string | null format: uri
claimMapping
One of:

Per-provider claim mapping. All fields optional; closer to OIDC defaults (sub/email/name) → fewer overrides needed.

object
userId
string
>= 1 characters
email
string
>= 1 characters
displayName
string
>= 1 characters
scopes

Claim path + optional delimiter for extracting Kindgi OAuth scopes from provider claims. When absent, scopes come from the token response scope field instead.

object
claim
required
string
>= 1 characters
delimiter
string
metadata
Array<string>
idpMetadataXml
string | null
>= 1 characters
idpEntityId
string | null
>= 1 characters
idpSsoUrl
string | null format: uri
idpCertificates
One of:
Array<string>
spSigningKeyRef
string | null
>= 1 characters
spDecryptionKeyRef
string | null
>= 1 characters
spSigningCertificates
One of:
Array<string>
spDecryptionCertificates
One of:
Array<string>
wantAssertionsSigned
boolean | null
attributeMapping
One of:
object
userId
string
>= 1 characters
email
string
>= 1 characters
displayName
string
>= 1 characters

Updated.

Media typeapplication/json
object
providerId
required
string
>= 1 characters
provider
required
One of: discriminator: kind

An OpenID Connect identity provider people sign in with. The endpoints come from the issuer’s discovery document when absent, and are returned once the deployment has them.

object
providerId
required
string
>= 1 characters
displayName

The name a sign-in page shows (“Sign in with …”). Default: providerId.

string
>= 1 characters
domains

The email domains whose people sign in with this provider (lowercase, e.g. acme.com): how an email-first sign-in page finds it.

Array<string>
join

Who may sign in the first time: invite (default) lets in only people a tenant admin added. domain also lets in anyone this provider says has a verified email at one of domains, when the deployment routes that domain to this tenant: they become a person holding joinRole. Someone removed from the tenant stays out. It needs the deployment’s authorization store: without one, setting it answers 409 domain-join-needs-authorization.

string
Allowed values: invite domain
joinRole

What someone who joins by domain gets: viewer (default) or runner (who also runs its agents and flows) on the tenant’s default project, or none, a tenant member with no project. Never tenant admin. Setting it needs join: domain; it’s kept while join is invite.

string
Allowed values: viewer runner none
signIn
One of:
object
redirectUri
required
string format: uri
metadata
object
key
additional properties
any
kind
required
string
Allowed value: oidc
issuer
required
string format: uri
clientId
required
string
>= 1 characters
clientSecretRef
required

Opaque reference resolved server-side. Never a plaintext secret. Sign-in’s only: a tool, an endpoint, a webhook trigger, a destination, a connection app, a model provider or a pack’s env that names it is refused (400 identity-provider-key-refused), and a secret a tool, an endpoint, a webhook trigger, a destination or a connection app already uses is refused here (409 identity-provider-key-in-use). If one app registration serves both sign-in and a connection, give each a client secret of its own.

string
>= 1 characters
scopes

Default openid email profile.

Array<string>
authorizationEndpoint
string format: uri
tokenEndpoint
string format: uri
userinfoEndpoint
string format: uri
jwksEndpoint
string format: uri
claimMapping

Per-provider claim mapping. All fields optional; closer to OIDC defaults (sub/email/name) → fewer overrides needed.

object
userId
string
>= 1 characters
email
string
>= 1 characters
displayName
string
>= 1 characters
scopes

Claim path + optional delimiter for extracting Kindgi OAuth scopes from provider claims. When absent, scopes come from the token response scope field instead.

object
claim
required
string
>= 1 characters
delimiter
string
metadata
Array<string>
Example
{
"provider": {
"join": "invite",
"joinRole": "viewer",
"kind": "oidc"
}
}

Malformed request body, or a configuration that isn’t a provider’s (invalid-provider-config). Or provider-key-refused: a secret reference names a model provider’s key (details.secret, details.providerId); store the identity provider’s own secret under its own name and name that. Or connection-key-refused: it names the account key of a texts connection app registration (details.secret, details.appId), which only that registration names. Or reserved-name-prefix: it names a secret under the reserved kindgi. prefix (details.secret).

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Missing / malformed / expired / revoked bearer token.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Not a tenant admin (permission-denied). Without an authorization store, a tenant admin is the deployment’s API token, an admin key, or a console signed in with either. Or this deployment’s operator manages sign-in (identity-providers-operator-managed, KINDGI_AUTH_TENANT_PROVIDERS=off): only the deployment’s own token can change its providers.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

No identity provider registered with that id under this workspace.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Idempotency-Key was reused with a different body, or resource-state conflict. Or identity-provider-key-in-use: a secret reference names a secret that a tool (its current version), an MCP endpoint, a webhook endpoint, a webhook trigger, a destination or a connection app registration uses; details.secret names it and details.usedBy lists each (kind, id, a tool’s version). An identity provider’s secret is sign-in’s only: store its own secret under its own name. Nothing is stored. Or this deployment has no secrets store (identity-providers-need-secrets-store, KINDGI_SECRETS_BACKEND): a provider’s client secret and keys are references into one, so no provider is added or changed until it has one. Or the change sets join: domain or joinRole where the deployment has no authorization store (domain-join-needs-authorization, KINDGI_OPENFGA_API_URL): without one, roles aren’t checked, so no one joins by domain. A value sent back as stored isn’t a change. Or idempotency-key-in-flight (with Retry-After): a request with the same Idempotency-Key still runs, so this one wasn’t run; send it again after Retry-After to get that request’s answer.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}
Retry-After
integer
>= 1

Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.

The request body is over the API’s limit (request-too-large; details.maxBytes says how much).

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

The deployment could not use the configuration (identity-provider-invalid).

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}
Retry-After
integer
>= 1

Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.

Server error (unmapped domain code or framework crash).

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

The Idempotency-Key store (idempotency-store-unavailable) or the authorization store (authz-backend-unavailable) couldn’t be reached before the request ran, or the database was too busy for its authorization check (database-busy), so nothing was changed; Retry-After (whole seconds) says when to try again with the same key. Or tenant-state-unavailable (with Retry-After), on a runtime serving many workspaces: the workspace’s state couldn’t be read, so nothing was changed.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}
Retry-After
integer
>= 1

Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.

See also