Runtime and Request Values
The root API passes copied, value-oriented request data to plugins. Struct fields are public surface; whether they are populated depends on the adapter and invocation point. Empty strings, zero values, empty collections, and nil interfaces must always be handled.
IDPInfo
type IDPInfo struct {
RequestedScopes []string
UserGroups []string
AllowedClientScopes []string
AllowedClientGrantTypes []string
GrantType string
ClientID string
ClientName string
RedirectURI string
MFAMethod string
MFACompleted bool
}
| Field | Meaning |
|---|---|
RequestedScopes | Scopes requested by the current identity-provider flow. |
UserGroups | Groups known for the subject at this stage. |
AllowedClientScopes | Scopes configured for the resolved client. |
AllowedClientGrantTypes | Grant types configured for the resolved client. |
GrantType | Current OAuth/OIDC grant type. |
ClientID | Resolved identity-provider client ID. |
ClientName | Resolved display name of that client. |
RedirectURI | Current validated redirect URI when applicable. Treat as sensitive/high-cardinality. |
MFAMethod | Current MFA method identifier. |
MFACompleted | Whether MFA has completed in the current flow. |
These values are populated only on relevant IdP paths and only when known at the extension stage. The custom-hook adapter currently leaves all IDP fields empty.
RequestDiagnostics
type RequestDiagnostics struct {
StatusMessage string
BruteForceName string
EnvironmentName string
LatencyMillis int64
BruteForceCounter uint
HTTPStatus int
}
| Field | Meaning |
|---|---|
StatusMessage | Current host status text, if one exists. It may be user-visible and must not be treated as a stable code. |
BruteForceName | Name of the applicable brute-force rule/check. |
EnvironmentName | Environment source/check diagnostic name. |
LatencyMillis | Bounded current request latency in milliseconds. |
BruteForceCounter | Current brute-force counter. |
HTTPStatus | Current HTTP status when an HTTP-facing path has one. |
All fields are public surface. Population is adapter- and stage-dependent; custom hooks currently leave the complete struct at zero values.
RequestSnapshot
type RequestSnapshot struct {
Headers map[string][]string
IDP IDPInfo
Session string
ExternalSessionID string
Service string
Protocol string
Method string
Username string
Account string
AccountField string
UniqueUserID string
DisplayName string
ClientIP string
ClientPort string
ClientNet string
ClientHost string
ClientID string
UserAgent string
LocalIP string
LocalPort string
OIDCCID string
SAMLEntityID string
AuthLoginAttempt uint
TLS TLSInfo
Diagnostics RequestDiagnostics
Runtime RuntimeFlags
HealthCheck bool
}
Field reference
| Field | Meaning and production population |
|---|---|
Headers | Copied request headers. Authorization, proxy-authorization, cookie, and configured password-bearing headers are removed rather than replaced. Never assume every adapter has headers. |
IDP | Safe IdP inputs described above. Broadly populated on IdP flows; empty for custom hooks today. |
Session | Host request/session correlation ID. Sensitive even though exposed. Auth and hook adapters populate it when available. |
ExternalSessionID | External correlation/session ID; broad auth adapter may populate it, hook adapter does not. |
Service | Nauthilus service name. The hook adapter sets exactly custom_hook. |
Protocol | Protocol identifier. The hook adapter sets exactly http. |
Method | Current operation/method; hook adapter also supplies the actual HTTP method separately in HookRequest.Method. |
Username | Current login/subject string. Hook adapter uses the bearer subject when one was authenticated. |
Account | Resolved account value, if known; hook adapter leaves empty. |
AccountField | Backend attribute name that supplied Account; must be printable ASCII when returned by a backend. Hook adapter leaves empty. |
UniqueUserID | Resolved stable subject identifier, if known; hook adapter leaves empty. |
DisplayName | Resolved display name, if known; hook adapter leaves empty. |
ClientIP | Client address string. Hook adapter derives it from the HTTP request. Validate before network decisions. |
ClientPort | Client source port string. Hook adapter derives it from the HTTP request. |
ClientNet | Host-scoped client network string; hook adapter currently leaves empty. |
ClientHost | Resolved/observed client host string. Hook adapter can populate it. |
ClientID | General client identifier from the auth state; not the same field as IDP.ClientID. Hook adapter leaves empty. |
UserAgent | Copied user-agent string. Attacker-controlled and high-cardinality. |
LocalIP | Local listener address, if the adapter supplies it; hook adapter leaves empty. |
LocalPort | Local listener port, if supplied; hook adapter leaves empty. |
OIDCCID | OIDC client correlation ID. Hook bearer authentication derives it from client_id, then azp, then sub when available. |
SAMLEntityID | SAML entity ID on applicable paths; hook adapter leaves empty. |
AuthLoginAttempt | Current authentication attempt counter; hook adapter leaves zero. |
TLS | Normalized TLS data. Auth adapter broadly supplies it; hook adapter currently leaves it zero. |
Diagnostics | Current bounded outcome metadata; hook adapter leaves zero. |
Runtime | Copied host-derived flags. Hook adapter currently sets only Authenticated when its authentication path succeeds. |
HealthCheck | Whether this is a health-check path; hook adapter currently leaves false. |
The normal authentication adapter broadly fills fields from the host request
state. Runtime.LocalRequest is currently an alias of the internal no-auth
condition. Both EnvironmentStageExpected and SubjectStageExpected are
currently derived only from configured Lua sources, not from the native Go
source plans.
Ownership and security
Maps and slices are request-local copies at the production boundary. Mutating them neither updates Nauthilus nor constitutes a supported result channel. Treat the snapshot as immutable. It contains no password, but many fields remain sensitive or attacker-controlled; do not copy it wholesale into logs, traces, metrics, runtime deltas, policy facts, or hook responses.
TLSLegacyInfo
type TLSLegacyInfo struct {
State string
SessionID string
ClientVerify string
ClientDN string
ClientCommonName string
Issuer string
ClientNotBefore string
ClientNotAfter string
SubjectDN string
IssuerDN string
ClientSubjectDN string
ClientIssuerDN string
Protocol string
CipherSuite string
Serial string
Fingerprint string
}
These fields preserve safe value copies of the legacy ssl_* request vocabulary: TLS state, session identifier, client verification result, client/subject/issuer distinguished names, client common name, validity bounds, negotiated protocol and cipher, certificate serial, and fingerprint. Values are strings because this is a compatibility view; plugins must not infer cryptographic verification from text alone.