OIDC data
An OIDC test supplies the identity and data that authentication should be
assumed to have returned. You can then test rules such as principal mapping
from preferred_username. You do not supply a signed token or contact an IdP.
Use this object as the oidc property of a successful
authentication assumption, with
mode = "verified-oidc". The name means verification is assumed, not
performed by the test runner. Token, ID token and UserInfo are independent:
no data is copied between them or inferred from the requesting name.
See OIDC authorization for product configuration and request methods for SSH/HTTP eligibility.
Properties
issuer
The HTTPS issuer. It must exactly match the configured flow's issuer after supported template evaluation. An unrelated issuer is an error.
subject
string
The assumed authenticated subject (sub). This starts as the identity's
principal; configured principal mapping can change the principal, not this subject.
token
The OAuth token data. Supply an object when the rule needs token fields, or
null for known absence. If omitted, token data is unknown and errors when read.
idToken
The verified ID-token data to assume. When retrieveIdToken is enabled, the
observation must be supplied even if principal mapping does not read it.
See visibility and absence for when null is accepted.
userInfo
The UserInfo data to assume. Enabled retrieveUserInfo requires an object:
null is not a successful retrieval. With retrieval disabled, omission can
leave this data unknown.
OAuth token
If an object is supplied, all properties below are required, including empty
strings or an empty extra object where appropriate. This is a data record,
not an encoded token. For policy access, see OIDC Token context.
accessToken
string
Synthetic access-token value.
tokenType
string
Token type, for example Bearer.
refreshToken
string
Synthetic refresh-token value; use "" when empty. No refresh is performed.
expiry
Assumed expiry metadata. It is not checked as proof of token validity.
extra
Complete OAuth extra fields. Missing keys have the product's absent-value
behavior rather than being invented. Use object {} for no extra fields.
ID token
All properties below are required when an object is supplied. The data describes an assumed verified token, not a JWT to verify. Policy access follows the OIDC ID Token context.
issuer
Must agree with the OIDC identity's issuer.
subject
string
Must agree with the OIDC identity's subject.
audience
[]string
The assumed audience list. Supplying it does not verify an actual token's audience.
expiry
Assumed expiry time.
issuedAt
Assumed issue time.
nonce
string
Nonce metadata; supply "" explicitly when empty.
accessTokenHash
string
Access-token hash metadata; supply "" explicitly when empty.
claims
The complete claims map. For example, a preferred_username claim can be used
by the configured principal template. Use object {} when no raw claims are needed.
UserInfo
All properties below are required when an object is supplied. See OIDC User Info context for policy access.
subject
string
Must agree with the OIDC identity's subject.
profile
string
Profile value; supply "" explicitly when empty.
email
string
Email value; supply "" explicitly when empty.
emailVerified
bool
Assumed email-verification state. false is a value, not an omitted observation.
claims
The complete UserInfo claims map, separate from ID-token claims.
Example
This is a value for input.authentication, not a complete suite. It assumes
the configured flow is named primary, uses the issuer below and enables
retrieveIdToken while disabling retrieveUserInfo:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
For a complete runnable configuration and suite, see the OIDC examples.
Visibility and absence
The product's retrieveIdToken/retrieveUserInfo settings determine which data
configuration templates can read. Supplying a hidden record does not make it
visible. Hiding a record does not change the authenticated issuer or subject.
null for an ID token is permitted with refresh enabled, but fails when
retrieveIdToken is true and both refresh and forced-disposal verification are
disabled. UserInfo retrieval always needs an object when enabled. An absent
OAuth token is known absent; its token fields have no value in policy templates.
The result exposes the identity and authentication binding, not token/claim dumps. Principal mapping changes only the principal.
Consistent values and types
Metadata and any duplicate standard claims must agree. For example, a raw
sub claim cannot contradict subject, even when the record is hidden.
Do not duplicate standard claims unless your test needs them.
Claims and extra fields use the same JSON-derived types as production policy
templates. In particular, numeric claims are floating-point values: compare
them with 1.0, not integer 1, in a Go template. This does not change the
integer/float distinction in the original Lua input. Canonical metadata and
aliases such as accessToken/access_token follow the linked context references.
Timestamps in templates
Metadata times use the UTC timestamp type.
Configuration templates receive time values with the supplied UTC zone.
Host-local formatting is not reproduced. Time method chains such as
.expiry.Local or .issuedAt.Location are unsupported. Read specific data
fields, not entire token objects; see template limits.