# Trusted issuers

Source: https://www.pontive.com/docs/api-reference/management/trusted-issuers

Base URL: `https://api.{region}.pontive.com/v1` (operations that name another server say so).

Authentication: send `Authorization: Bearer <token>` with a secret key (`pontive_sk_…`, which implies its instance) or an access token issued for this API. A token that can reach several instances also names one with `X-Pontive-Instance-ID: inst_…`. Secret keys are for servers only.

## List trusted issuers

```http
GET https://api.{region}.pontive.com/v1/authn/trusted-issuers
```

Every issuer the instance trusts (at most 50). Needs sys:settings:read on the instance root.

Operation ID: `ListTrustedIssuers`

### Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | integer |  | Page number |
| `limit` | integer |  | Items per page, 1 to 100 |

### Responses

- `200` OK: ListTrustedIssuersResponse
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `500` Internal Server Error: ErrResponse

## Create trusted issuer

```http
POST https://api.{region}.pontive.com/v1/authn/trusted-issuers
```

Trust an external issuer to sign client assertions for this instance's service accounts and agents (workload identity federation, pontive-spec 20 B7): a CI provider's OIDC issuer such as GitHub Actions (https://token.actions.githubusercontent.com) or GitLab, a SPIFFE trust domain's JWT issuer, or a Kubernetes cluster's service account issuer. The issuer is an https URL, matched exactly against an assertion's iss. Without a jwks_uri it is read from the issuer's OpenID discovery document, which must name exactly this issuer. audiences (at most 10) are the aud values an assertion may carry; omitted, this instance's issuer and token endpoint. max_token_lifetime_seconds (default 3600, 60 to 86400) caps how far ahead an assertion's exp may be and how long after its iat. allow_reuse (default false) accepts the same token again until it expires, for workloads that reuse one token (Kubernetes projected tokens, cached SPIFFE JWT-SVIDs); false spends each jti, or a token with no jti whole, once. Trusting an issuer authenticates nobody by itself: a federated credential on a service account or agent does. cross_app_access makes the issuer an organization's enterprise IdP (Cross-App Access, pontive-spec 20 C8): it may then sign ID-JAGs for the organization's members, which an app presents with the urn:ietf:params:oauth:grant-type:jwt-bearer grant for a token to a registered API; the ID-JAG's sub is mapped to a user through the named sign-in connection's external identities (sso_app_id, sso_provider: an OpenID Connect sign-in connection whose discovery document is this issuer's), and the user must be a member of the organization. With cross_app_access, issuer may be omitted: it is the one that connection signs in with. At most 50 per instance. Needs sys:settings:manage on the instance root.

Operation ID: `CreateTrustedIssuer`

### Request body (`application/json`, required): CreateTrustedIssuerRequest

Issuer

### Responses

- `201` Created: TrustedIssuer
- `400` trusted_issuer_invalid, trusted_issuer_discovery_failed, trusted_issuer_limit_reached: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` instance_unclaimed: the instance is unclaimed; claim this instance to trust an external issuer (pontive-spec 47): ErrResponse
- `409` trusted_issuer_conflict: the instance already trusts this issuer: ErrResponse
- `500` Internal Server Error: ErrResponse

## Get trusted issuer

```http
GET https://api.{region}.pontive.com/v1/authn/trusted-issuers/{trusted_issuer_id}
```

Needs sys:settings:read on the instance root.

Operation ID: `GetTrustedIssuer`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `trusted_issuer_id` | string | yes | Trusted issuer ID (tis_) |

### Responses

- `200` OK: TrustedIssuer
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` trusted_issuer_not_found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Update trusted issuer

```http
PATCH https://api.{region}.pontive.com/v1/authn/trusted-issuers/{trusted_issuer_id}
```

Change the name, jwks_uri, audiences, enabled, allow_reuse, max_token_lifetime_seconds or cross_app_access; an absent field is left as it is. cross_app_access replaces the organization link (Cross-App Access, pontive-spec 20 C8); {"organization_id":""} removes it. jwks_uri "" reads it again from the issuer's discovery document; audiences, when present, replaces the list ([] means this instance's issuer and token endpoint). enabled false refuses every assertion the issuer signs at once. The issuer URL never changes: trust a new one instead. Needs sys:settings:manage on the instance root.

Operation ID: `UpdateTrustedIssuer`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `trusted_issuer_id` | string | yes | Trusted issuer ID (tis_) |

### Request body (`application/json`, required): UpdateTrustedIssuerRequest

Changes

### Responses

- `200` OK: TrustedIssuer
- `400` trusted_issuer_invalid, trusted_issuer_discovery_failed: ErrResponse
- `401` Unauthorized: ErrResponse
- `403` instance_unclaimed: the instance is unclaimed; claim this instance to trust an external issuer (pontive-spec 47): ErrResponse
- `404` trusted_issuer_not_found: ErrResponse
- `500` Internal Server Error: ErrResponse

## Delete trusted issuer

```http
DELETE https://api.{region}.pontive.com/v1/authn/trusted-issuers/{trusted_issuer_id}
```

Stop trusting an issuer. Refused while federated credentials name it: delete them first, or disable the issuer instead. Needs sys:settings:manage on the instance root.

Operation ID: `DeleteTrustedIssuer`

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `trusted_issuer_id` | string | yes | Trusted issuer ID (tis_) |

### Responses

- `204` No Content
- `401` Unauthorized: ErrResponse
- `403` Forbidden: ErrResponse
- `404` trusted_issuer_not_found: ErrResponse
- `409` trusted_issuer_in_use: ErrResponse
- `500` Internal Server Error: ErrResponse

## Schemas

### ListTrustedIssuersResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | TrustedIssuer[] |  |  |
| `object` | string |  |  |
| `pagination` | Pagination |  | Pagination is the page answered (api-route-review D9). |

### ErrResponse

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | ErrBody |  |  |

### CreateTrustedIssuerRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allow_reuse` | boolean |  | AllowReuse defaults to false: each token (its jti, or the whole token with none) is accepted once. true accepts it again until it expires. |
| `audiences` | string[] |  | Audiences, at most 10; omitted, this instance's issuer and token endpoint. |
| `cross_app_access` | CrossAppAccess |  | CrossAppAccess, when present, replaces the organization link; one with an empty organization_id removes it. |
| `enabled` | boolean |  | Enabled defaults to true. |
| `issuer` | string |  | Issuer is an https URL with no query or fragment, matched exactly against an assertion's iss. Required, unless cross_app_access names a connection: then omitted, it is the issuer that connection signs in with. |
| `jwks_uri` | string |  | JWKSURI is optional: omitted, it is read from the issuer's OpenID discovery document ({issuer}/.well-known/openid-configuration). |
| `max_token_lifetime_seconds` | integer |  | MaxTokenLifetimeSeconds defaults to 3600; 60 to 86400. |
| `name` | string | yes |  |

### TrustedIssuer

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allow_reuse` | boolean |  | AllowReuse true accepts the same token again until it expires, each time verified in full (Kubernetes projected tokens, cached SPIFFE JWT-SVIDs); false spends its jti, or a token with no jti whole, once. |
| `audiences` | string[] |  | Audiences are the aud values an assertion may carry; empty means this instance's issuer and token endpoint. |
| `created_at` | string |  |  |
| `cross_app_access` | CrossAppAccess |  | CrossAppAccess, when present, replaces the organization link; one with an empty organization_id removes it. |
| `enabled` | boolean |  |  |
| `id` | string |  |  |
| `instance_id` | string |  |  |
| `issuer` | string |  | Issuer is the iss value, matched exactly. |
| `jwks_uri` | string |  | JWKSURI is where the issuer's signing keys are fetched from. |
| `max_token_lifetime_seconds` | integer |  | MaxTokenLifetimeSeconds is how far ahead an assertion's exp may be, and how long after its iat: 60 to 86400. |
| `name` | string |  |  |
| `object` | string |  |  |
| `updated_at` | string |  |  |

### UpdateTrustedIssuerRequest

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allow_reuse` | boolean |  | AllowReuse true accepts the same token again until it expires. |
| `audiences` | string[] |  | Audiences, when present, replaces the list; [] means this instance's issuer and token endpoint. |
| `cross_app_access` | CrossAppAccess |  | CrossAppAccess, when present, replaces the organization link; one with an empty organization_id removes it. |
| `enabled` | boolean |  | Enabled false refuses every assertion the issuer signs at once. |
| `jwks_uri` | string |  | JWKSURI set to "" reads it again from the issuer's discovery document. |
| `max_token_lifetime_seconds` | integer |  | MaxTokenLifetimeSeconds, 60 to 86400. |
| `name` | string |  |  |

### Pagination

Pagination is the page answered (api-route-review D9).

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | integer |  | Limit is the maximum number of items per page. |
| `page` | integer |  | Page is the 1-based index of the returned page. |
| `total` | integer |  | Total is the total number of items across all pages. |
| `total_pages` | integer |  | TotalPages is the total number of pages available. |

### ErrBody

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string |  | Code is the spec's machine-readable code for this error, in snake case: a domain code such as seat_limit_reached where the refusal has one, otherwise a generic one such as permission_denied, not_found, conflict, invalid_request or service_unavailable. |
| `details` | ErrDetail[] |  | Details are per-field findings, present only on a refusal that has them, e.g. a 422 invalid_theme names each invalid value by its path, a 422 package_invalid each problem, and a 409 capability_in_use each count by its name. |
| `doc_url` | string |  | DocURL links to documentation about this error, when available. |
| `message` | string |  | Message is a human-readable description of what went wrong. |
| `object` | string |  | Object is the discriminator; always "error". |
| `param` | string |  | Param names the request parameter this error refers to, when applicable. |
| `type` | "validation_error" \| "authentication_error" \| "authorization_error" \| "not_found" \| "conflict_error" \| "rate_limit_error" \| "internal_error" |  | Type is the error's category, set by its HTTP status: one of validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error, internal_error. |

### CrossAppAccess

CrossAppAccess, when present, replaces the organization link; one with
an empty organization_id removes it.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `organization_id` | string |  | OrganizationID is the organization. On an update, "" removes the link. |
| `sso_app_id` | string |  | SSOAppID is the app whose auth provider connection the organization's users sign in through. |
| `sso_provider` | string |  | SSOProvider is that connection's provider slug. |
| `tenant` | string |  | Tenant is a multi-tenant issuer's tenant identifier for the organization, which an ID-JAG's tenant claim must equal; empty for a single-tenant issuer. |

### ErrDetail

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `field` | string |  | Field is where the finding is: for a theme, its dotted path. |
| `message` | string |  | Message is what is wrong there. |
