Britive platform release 2026.09.02 is now live in production.

Assign service identity's authenticating identity provider

Prev Next
Post
/api/workload/users/{targetUserId}/identity-provider
Security
HTTP
Type bearer
Path parameters
targetUserId
stringRequired

The random 20 alphanumeric string id of the service identity user.

Body parameters
Expand All
object

The existing identity provider to update.

idpId
integer (int32) Required

the identifier of the identity provider to assign to the service identity

tokenDuration
integer (int32) Required

duration in seconds the identity provider tokens issued for the service identity is valid for after initial token verification.

mappingAttributes
Array of object (MappingAttribute) Required

mapped custom attribute values.

object

mapped custom attribute value.

attrId
string
values
Array of string
string
Responses
200

Successfully assigned identity provider to service identity.

Expand All
object

model of the workload identity provider currently assigned to a service identity

idp
object (IdentityProvider)
idpType
string
id
integer (int32)
name
string
description
string
attributesMap
Array of object (AttributeMap)

Provider's identity attributes mapped to Britive service identity custom attributes.

object

Single identity provider attribute mapped to service identity custom attribute

idpAttr
string
userAttr
string
matchType
string

How the service identity's mapped attribute value is compared against the incoming token claim. EXACT compares literally. REGEX treats the stored value as a regular expression, applied fully anchored and case-insensitively by default; a pattern may opt into case-sensitive matching with the inline (?-i) modifier.

Optional, and omitting it means EXACT. Because updating an identity provider replaces its attribute map, a client that omits this field when updating a provider resets any mapping that was REGEX back to EXACT. The stored value is then compared literally, so a pattern such as repo:myorg/myrepo:ref:refs/heads/feature/.* will no longer match any token and the identities relying on it stop authenticating. Clients that update identity providers must read the current match type and send it back, not omit it.

Valid values[ "EXACT", "REGEX" ]
Default"EXACT"
validationWindow
integer (int32)

The amount of time in seconds, after the token has been issued/signed, Britive will attempt to validate the unverified token. Outside this window, token validation will fail.

tokenDuration
integer (int32)

duration in seconds the identity provider tokens issued for the service identity is valid for after initial token verification.

mappingAttributes
Array of object (MappingAttribute)

mapped custom attribute values.

object

mapped custom attribute value.

attrId
string
values
Array of string
string