Docs
Live demo
POST/api/v2/targets/{id}/applications/{application_id}/access/preview
applications:manageAPI tokenDeprecated

Deprecated since 7.0.0, use POST /applications/{id}/sign-in/preview. Preview Principal-managed Dex OAuth client create, update, adopt, or delete without mutating Dex.

Parameters

Path2 required of 2
idstring · uuidpathrequired

Target ID (UUID)

application_idstring · uuidpathrequired

Application child target ID (UUID)

Request body application/json · ApplicationDexClientPreviewRequest

Dex OAuth client mutation preview request

Required2 of 12 fields
operationstringrequired
createupdateadoptdelete
client_idstringrequired
min length 1 · max length 256
Optional10 fields
contract_versioninteger

Set to 1 to enable explicit auth mode and native OIDC setup semantics.

1
namestring
max length 256
redirect_urisarray of string
connector_idsarray of string
connector_groupsmap of string → array of string
principal_group_claims_modestring

Selects all Principal memberships or only memberships granting access. Omitted requests preserve the current binding on update and use all_memberships on create.

all_membershipsaccess_groups
include_nested_groupsboolean

Grant access through ancestor groups. Omitted requests preserve the current binding on update and stay false on create.

require_emailboolean

Refuse the sign-in of a user without an email address on the Principal sign-in page. Applies to native OIDC clients that sign in through the Principal connector. The preview blocks it elsewhere. Omitted requests preserve the current binding on update and stay false on create.

native_oidc_enabledboolean

Requires contract_version 1. Enables native OIDC alongside the SSO gate on create. With the gate disabled, native mode is required. Omitted updates preserve the binding mode. Changing native mode requires recreating the client because its secret is shown only at create.

SSO gate settings for the Dex client. On update, fields left empty keep the values of the deployed gate (see auth_gate_options.current in the access read model). Only an explicit tls.source "inherit" re-targets the application Ingress secret. On create, empty fields take auth_gate_options.defaults.

8 fields
enabledboolean

Toggles the Principal oauth2-proxy gate. With contract_version 1, false selects native OIDC for create or preserves an existing native client. Gate-to-native updates are rejected and require delete/recreate.

manage_ingress_annotationsboolean

Controls application Ingress ownership while the gate is enabled. Omitted or true installs the Principal mutating webhook and converges auth annotations. An explicit false creates and readies the oauth2-proxy gate without changing or selecting the application Ingress, so operator-managed annotations can activate it later.

keep_users_logged_in_forstring
max length 32
send_authorization_headerboolean
send_groups_headerboolean

Controls whether the SSO gate requests the groups scope and forwards X-Auth-Request-Groups to the application. Omitted values default to true.

default true
ingress_class_namestring
max length 253
4 fields
sourcestring
inheritsecretissuercluster_issuerdisabled
secret_namestring
max length 253
issuer_namestring
max length 253
cluster_issuer_namestring
max length 253
trusted_network_idsarray of string · uuid

Organization network lists whose addresses reach the application without sign-in. Omitted keeps the current selection on update and selects none on create. An empty list lets no network in.

max items 50

Responses

200

Preview result

ApplicationDexClientMutationPreviewResponse · 11 fields
preview_idstring · uuidrequired
kindstringrequired
dex_client
target_idstring · uuidrequired
application_idstring · uuidrequired
source_hashstringrequired
resource_versionstring
writablebooleanrequired
operationsarray of ApplicationMutationOperationResponserequired
5 fields
typestringrequired
descriptionstring
source_idstring
beforearray of string
afterarray of string
2 fields
codestringrequired

Stable reason of the blocker. cluster_in_observe means the cluster is in Observe, so Principal doesn't change the SSO gate there until the cluster is managed again.

messagestringrequired
warningsarray of string
12 fields
contract_versionintegerrequired
1
preview_kindstringrequired
dex_client
operationstringrequired
createupdateadoptdelete
client_idstringrequired
native_oidc_enabledboolean

Effective native OIDC mode, including native-only bindings created by older backend versions. May be true together with auth_gate_enabled.

auth_gate_enabledbooleanrequired

Resolved auth mode that apply will persist.

source_hashstring
17 fields
client_idstringrequired
issuerstring
namestring
redirect_urisarray of string
trusted_peersarray of string
publicbooleanrequired
native_oidc_enabledboolean

Effective native OIDC mode, including native-only bindings created by older backend versions. May be true together with auth_gate_enabled.

auth_gate_enabledboolean

Persisted auth mode observed for this binding. Null means a legacy binding.

can be null
logo_urlstring
connector_idsarray of string
connector_groupsmap of string → array of string
principal_group_claims_modestring

Principal group memberships exposed through Dex claims and downstream auth headers.

all_membershipsaccess_groups
include_nested_groupsboolean

Whether ancestor group memberships grant access and appear in the groups claim.

require_emailboolean

Whether the Principal connector refuses the sign-in of a user without an email address.

source_hashstring
last_observed_revisionstring
17 fields
client_idstringrequired
issuerstring
namestring
redirect_urisarray of string
trusted_peersarray of string
publicbooleanrequired
native_oidc_enabledboolean

Effective native OIDC mode, including native-only bindings created by older backend versions. May be true together with auth_gate_enabled.

auth_gate_enabledboolean

Persisted auth mode observed for this binding. Null means a legacy binding.

can be null
logo_urlstring
connector_idsarray of string
connector_groupsmap of string → array of string
principal_group_claims_modestring

Principal group memberships exposed through Dex claims and downstream auth headers.

all_membershipsaccess_groups
include_nested_groupsboolean

Whether ancestor group memberships grant access and appear in the groups claim.

require_emailboolean

Whether the Principal connector refuses the sign-in of a user without an email address.

source_hashstring
last_observed_revisionstring
17 fields
client_idstringrequired
issuerstring
namestring
redirect_urisarray of string
trusted_peersarray of string
publicbooleanrequired
native_oidc_enabledboolean

Effective native OIDC mode, including native-only bindings created by older backend versions. May be true together with auth_gate_enabled.

auth_gate_enabledboolean

Persisted auth mode observed for this binding. Null means a legacy binding.

can be null
logo_urlstring
connector_idsarray of string
connector_groupsmap of string → array of string
principal_group_claims_modestring

Principal group memberships exposed through Dex claims and downstream auth headers.

all_membershipsaccess_groups
include_nested_groupsboolean

Whether ancestor group memberships grant access and appear in the groups claim.

require_emailboolean

Whether the Principal connector refuses the sign-in of a user without an email address.

source_hashstring
last_observed_revisionstring

Per-application oauth2-proxy SSO gate change planned by a Dex client mutation preview.

18 fields
operationstringrequired
ensureremove
namespacestringrequired
ingress_namestringrequired
gate_namestringrequired
hoststringrequired
manage_ingress_annotationsbooleanrequired
requires_iac_updatebooleanrequired

Existing auth annotations are operator-managed and must be updated in IaC before traffic uses the Principal SSO gate.

ingress_annotationsmap of string → string

Exact NGINX auth annotations for the application Ingress.

ingress_class_namestring
keep_users_logged_in_forstring
send_authorization_headerbooleanrequired
send_groups_headerbooleanrequired

Whether the SSO gate requests the groups scope and forwards X-Auth-Request-Groups to the application.

proxy_prefixstring
issuer_urlstring
redirect_urlstring
source_rangesarray of string

Client addresses and ranges the SSO gate lets in without sign-in, from the selected network lists.

trusted_network_addresses_hiddenboolean

True when the caller can't read the security settings, so the preview leaves out the addresses of the selected trusted networks: source_ranges and the source range annotation of ingress_annotations. Apply still lets the selected networks in.

3 fields
organization_idstring · uuidrequired
target_idstring · uuidrequired
application_idstring · uuidrequired
403

Principal access denied, or upstream.authorization_failed when upstream credentials lack permissions

409

Conflict

502

The upstream service rejected its configured credentials (upstream.authentication_failed) or permissions (upstream.authorization_failed), or Principal could not connect to the target or another service the request needs (upstream.connection_failed). The Principal session remains valid.

Common errors: 400 401 404 413 429 503 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close