← Blog

NIST SP 800-63B Reauthentication for Long-Running LLM Sessions

Parminder Singh
Parminder Singh··8 min read
Summarize with AI

NIST SP 800-63B-4 requires periodic reauthentication of subscriber sessions and defines overall and inactivity timeout guidance by authentication assurance level. Long-running LLM applications need to apply those clocks to the human session, distinguish subscriber activity from background model traffic, terminate expired sessions, and resume work only after the relying party accepts a fresh authentication event.

Compliance & Regulationnistai-complianceidentity-and-authorizationzero-trustai-governanceaudit
NIST SP 800-63B Reauthentication for Long-Running LLM Sessions

A model stream can run for minutes while an agent task waits on a tool for hours. A browser tab can remain open for days. Neither event proves that the subscriber is still present. NIST SP 800-63B-4 puts reauthentication on the relying party's session, using an overall timeout and an inactivity timeout tied to the session's authentication assurance level.

Draw two clocks in the margin of the runbook. Subscriber activity can reset the inactivity clock. Only successful reauthentication resets both clocks.

TL;DR

  • Apply NIST SP 800-63B-4 timeout rules to the authenticated subscriber session, rather than to model execution time or access-token lifetime.
  • At AAL1, use a definite overall timeout, recommended at no more than 30 days; AAL2 recommends no more than 24 hours overall and 1 hour inactive; AAL3 requires no more than 12 hours overall and recommends 15 minutes inactive.
  • Background polling and tool callbacks do not establish subscriber presence. Token streaming and agent loops do not establish it either.
  • When either timeout expires, terminate the session and require the relying party's accepted reauthentication flow before new LLM work continues.

SP 800-63B-4 puts two clocks on the subscriber session

NIST SP 800-63B-4 Section 5.2 says periodic reauthentication shall confirm the subscriber's continued presence in an authenticated session. Its two clocks measure different events. The overall timeout starts at authentication or the most recent successful reauthentication, while the inactivity timeout measures a period without subscriber activity.

When either timeout expires, the session must terminate. Subscriber activity resets the inactivity timeout, while successful reauthentication resets both. NIST allows a relying party to warn the subscriber before expiry and give them a chance to make the session active or reauthenticate, as appropriate.

These rules govern the session between subscriber software and the relying party or credential service provider. They are independent of an LLM provider's streaming connection and model context window. They are also independent of its job queue and tool runtime. A server-sent event arriving in the browser means the server produced output. It supplies no evidence that the subscriber remains at the keyboard.

The 2025 fourth revision also tells agencies to establish and document the enforced overall and inactivity limits in the system security plan. Product defaults need an assurance-level and risk decision behind them.

Assurance level determines the timeout ceiling

NIST gives distinct requirements and recommendations for each authentication assurance level in Section 2:

  • AAL1 reauthentication requires periodic reauthentication and a definite overall timeout, which should be no more than 30 days. An inactivity timeout may be applied but is optional at AAL1.
  • AAL2 reauthentication requires a definite overall timeout, recommended at no more than 24 hours. The inactivity timeout should be no more than 1 hour.
  • After AAL2 inactivity expiry but before overall expiry, the verifier may allow reauthentication with a successful password or biometric comparison together with the session secret.
  • AAL3 reauthentication requires an overall timeout of no more than 12 hours and recommends an inactivity timeout of no more than 15 minutes. Reauthentication uses the same requirements as initial AAL3 authentication.

The capitalized terms change the implementation obligation. AAL3's 12-hour overall limit is a SHALL ceiling. The AAL1 and AAL2 overall values are SHOULD recommendations attached to the mandatory requirement for a definite timeout. System owners can choose shorter periods based on the data and endpoint involved.

My blunt view is that an indefinite AI workspace with an occasional token refresh is a convenience setting pretending to be session assurance.

LLM activity and subscriber activity need separate signals

Long-running LLM applications generate constant machine activity. A browser can receive response tokens while an agent polls a job. Tool callbacks may arrive after a scheduler starts another step. Websocket heartbeats and telemetry beacons continue without human input. Counting those events as subscriber activity can keep a session alive after the person has walked away.

Define subscriber activity as a meaningful, authenticated interaction from the subscriber endpoint under the relying party's policy. Examples can include sending a new prompt or approving a tool call. Changing a model or data scope and explicitly extending the session after a warning can also qualify. Passive output rendering and background refreshes should leave the inactivity clock untouched. The same applies to telemetry beacons and automated retries.

The application also needs to resist synthetic activity. A script that repeatedly calls a harmless endpoint should not preserve a human session unless the relying party has intentionally classified that action as subscriber activity and can defend the decision. Sensitive approvals deserve fresh authentication or step-up rules independent of the ordinary inactivity clock.

NIST's session-binding requirements say the session inherits at most the AAL of the authentication event that created it. Session continuity rests on a session secret. A service cannot raise the AAL because an agent completed a complex task or because an access token carries a strong-looking claim.

Access-token lifetime cannot replace reauthentication

SP 800-63B-4 Section 5.1.3 says a relying party shall not treat the presence of an access token as evidence of subscriber presence without other signals. Access and refresh tokens can remain valid after the authentication session has ended and the subscriber has left the application.

A backend may hold a valid OAuth access token for a model gateway or retrieval system. It may also hold one for a tool API. Refresh logic can keep obtaining new credentials while the browser session sits unattended. Those service credentials support application access. They do not reset the human session's NIST clocks.

Keep four lifetime categories separate in the architecture:

  • The subscriber session has its overall deadline and inactivity deadline. It also has a current AAL and last accepted reauthentication event.
  • Inbound access tokens have issuer, audience, scope, and expiration rules controlled by the resource server.
  • Provider credentials have workload-specific lifetime and custody rules, separate from the initiating person's session.
  • Tool credentials have workload-specific lifetime and custody rules, separate from the initiating person's session.

The post-authentication gap guide explains why a previously authenticated identity still needs request-time authority. Reauthentication confirms continued presence under the selected AAL. It does not automatically authorize every model, tool, tenant, or data class.

Expiry needs a deterministic stop and resume contract

When the inactivity or overall deadline arrives, NIST says the session shall terminate. The LLM application needs to translate that requirement into a defined state transition for synchronous streams and asynchronous work.

Block new model requests and stop accepting subscriber approvals or tool instructions under the expired session. Block scope changes as well. Invalidate the relying party session secret according to the session architecture. For a response already streaming, choose and document a risk-based policy: terminate immediately, or withhold delivery by either finishing only a bounded non-sensitive response or placing resumable output in protected storage. The selected behavior must avoid treating continued model traffic as renewed subscriber presence.

Asynchronous jobs require an ownership decision made before launch. A job can run under a service identity after the subscriber session ends only when policy explicitly authorizes that mode and records delegated authority and expiry. The policy must also separate later result access from job execution. A human-session cookie should never become an invisible perpetual credential for an agent loop.

After successful reauthentication, issue or refresh the session binding and record the accepted reauthentication event. Reset both clocks and re-evaluate request-time authorization. The per-request LLM authorization guide covers the second decision. Resume tokens and job identifiers should be opaque, scoped, short-lived, and useless without the newly accepted session.

Federation makes the relying party authoritative

An enterprise LLM application often delegates authentication to an identity provider. The identity provider and relying party then maintain separate sessions. NIST Section 5.2 explains that expiry at one does not automatically terminate the other.

When the relying party's session expires, a still-active identity-provider session might issue a new assertion without an explicit subscriber authentication ceremony. The identity provider can communicate authentication time and method, but NIST says the relying party is authoritative on whether reauthentication requirements have been met.

The LLM application must therefore request and validate the federation signals needed for its assurance policy. Compare authentication time with the overall deadline and validate the authentication method. Require the appropriate authentication context and demand fresh interaction where policy calls for it. A redirect that returns immediately with an assertion based on an old identity-provider session may fail the application's continued-presence requirement.

Record the relying-party session ID or a protected correlation value and the selected AAL. Add the original authentication and latest accepted reauthentication timestamps. Follow them with both deadlines and the identity-provider event timestamp, then record the final decision. Avoid storing authenticators or session secrets in the audit event. Access tokens and complete assertions should also stay out of it.

Release tests should run both clocks under real topology

A useful acceptance suite uses controllable clocks with the deployed identity-provider and relying-party. It should also cover the gateway and stream handler, along with the job queue and audit path. Wall-clock sleeps make tests slow and unreliable. A test clock or bounded administrative fixture should advance deadlines deterministically without creating a production bypass.

Include these cases:

  • An AAL2 session receives meaningful subscriber activity before 1 hour under the configured policy. The inactivity deadline resets, while the 24-hour overall deadline remains fixed.
  • Background token streaming and websocket heartbeats leave the inactivity deadline unchanged. Job polling, tool callbacks, and telemetry also leave it unchanged.
  • Inactivity expiry terminates the session and blocks a new prompt. The configured AAL2 reauthentication path succeeds only under the allowed session-secret and authenticator rules.
  • Overall expiry requires reauthentication even if the subscriber was active one second earlier.
  • An AAL3 session reaches the 12-hour ceiling and uses the full AAL3 authentication requirements. A passive identity-provider assertion fails the freshness policy.
  • A valid access token remains unexpired after the relying-party session ends. The application still blocks subscriber actions.
  • A queued job follows its documented delegated-execution policy, and result retrieval requires a currently authorized session.
  • Direct access to an origin, old API version, streaming endpoint, or tool-approval route cannot bypass the same session decision.

Capture clock values and AAL with the triggering event. Record the reauthentication result and route decision, followed by job state and outbound model attempts. The release fails if machine traffic preserves subscriber presence or if either expired clock still permits a new model action.

DeepInspect

DeepInspect can apply identity-aware policy to authenticated user or agent requests deliberately routed through its HTTP path to an LLM endpoint. The relying party and identity system must first enforce SP 800-63B-4 session bindings, timeout clocks, and reauthentication. For each later routed request, DeepInspect can evaluate the trusted identity context with route and model. It can also evaluate tenant and data classification, then produce a per-decision record.

DeepInspect cannot prove subscriber presence from an access token or perform the user's reauthentication ceremony. Session termination and identity-provider freshness stay with the relying party and identity system. Authenticator requirements, background-job authority, and session-secret custody stay with the credential service provider, identity provider, and verifier. Direct provider calls and local runtimes remain outside its enforcement evidence. The same applies to STDIO tools and HTTP traffic that bypasses the routed path.

Book a demo today.

Frequently asked questions

Does NIST require every LLM session to use AAL2?

SP 800-63B-4 defines requirements for sessions assessed at AAL1 and at the higher AAL2 or AAL3 levels. Selecting the appropriate AAL follows the digital identity risk process and the relying party's application context. The mere use of an LLM does not assign an AAL. A deployment handling sensitive enterprise data or high-impact actions may justify AAL2 or AAL3 through its risk assessment. Once selected, the application must enforce that level's authentication and reauthentication rules consistently.

Does every prompt reset the inactivity timeout?

A relying party may treat a genuine prompt submission by the authenticated subscriber as session activity under a documented policy. Automated prompt generation and background retries should remain machine events. Scheduled agent steps and tool callbacks should remain machine events too. The policy needs a reliable way to distinguish the two. Sensitive prompts or approvals can also trigger step-up authentication despite recent activity. Inactivity measures subscriber presence, rather than packet flow or model work.

Can an OAuth refresh token keep the LLM session alive?

A refresh token can obtain another access token under the authorization server's policy. It supplies no proof that the subscriber remains present. NIST explicitly warns that access and refresh tokens can remain valid after the authentication session ends. The relying party must enforce its own session deadlines and accepted reauthentication event. Backend token refresh and human-session reauthentication are separate state machines, even when they share an identity provider.

What happens to a model response when the session expires mid-stream?

NIST requires session termination when a timeout expires, while application owners define the safe handling of work already in progress. The policy can close the stream immediately or retain bounded output in protected storage for later authorized retrieval. It should prevent the stream itself from resetting inactivity and should block new prompts or approvals. Document the chosen state transition, then test it against sensitive output and provider retries.

Who decides whether federated reauthentication was fresh enough?

The relying party makes the final freshness decision. NIST notes that the identity-provider session and relying-party session are independent. The identity provider can provide authentication time and method. It can also add context in an assertion. The relying party evaluates those signals against its AAL and timeout policy. If the identity-provider session yields an assertion without the required fresh subscriber interaction, the relying party can demand another authentication event before creating a new session.