Portal Community

Session Architecture

Passport maintains two distinct session layers:

Passport Session

The master session at the IdP level. Established once when the user first authenticates. Lives in the IAM_Sessions table. Controls how long the user can access connected applications without re-authenticating to Passport.

SP/Client Session

The local session maintained by each application after it receives a valid assertion. Managed entirely by the SP. Passport has no visibility into SP session state — only the SAML SessionIndex or OIDC refresh token links them.

Session Lifetime Policies

PolicyDefaultConfigurableDescription
Absolute session lifetime8 hoursPer tenantMaximum time a Passport session is valid regardless of activity
Idle timeout2 hoursPer tenantSession expires if no SSO activity within this window
Remember-me duration30 daysPer tenantExtended session when user selects "remember this device"
SAML assertion window5 minPer consumerNotOnOrAfter in assertion — SP must process within this window
OIDC access token15 minPer clientAccess token validity — refresh token extends the session
OIDC refresh token7 daysPer clientRefresh token validity — rotated on each use

Session Establishment Flow

1

First SSO Request

No Passport session cookie exists. Passport presents the login form. User authenticates with username + password (and MFA if configured).

2

Session Created

Passport creates an entry in IAM_Sessions with a cryptographically signed session token. A HttpOnly; Secure; SameSite=None cookie is set on the Passport domain.

3

Assertion Issued

Passport issues the SAML assertion or OIDC token to the requesting application. The SAML assertion includes the SessionIndex which links the SP session to the Passport session for SLO purposes.

4

Subsequent SSO Requests

When the user visits a second application, the Passport session cookie is present. Passport validates the session and issues a new assertion immediately — no login prompt. This is the SSO experience.

5

Session Expiry

When the session exceeds the absolute lifetime or idle timeout, the session is invalidated. The next SSO request triggers a fresh authentication prompt.

Single Logout (SLO)

SAML Single Logout ensures that when a user logs out from one application, all other SSO-connected applications are also notified and can terminate their local sessions.

SLO Flow

1

Initiating SP sends LogoutRequest

POST /passport/saml/slo
SAMLRequest=base64-encoded-LogoutRequest
&SigAlg=http://www.w3.org/2001/04/xmldsig-more#rsa-sha256
&Signature=...
2

Passport validates the request

Validates the LogoutRequest signature, extracts the NameID and SessionIndex, and locates the corresponding Passport session.

3

Fan-out LogoutRequests to all SPs

Passport sends an SLO LogoutRequest to every SP that participated in the session (identified by SessionIndex). These are sent in parallel with a configurable timeout.

4

Session Destroyed + LogoutResponse

Passport destroys the session regardless of SP response status. Returns a LogoutResponse to the initiating SP with success status.

Best-Effort SLO

Passport sends SLO requests to all SPs but does not retry on failure. If an SP is unavailable during SLO, its local session may remain active until it naturally expires. This is standard SAML SLO behavior — not a Passport limitation. Design SP session lifetimes accordingly.

Session Admin Operations

// List all active sessions for a user
GET /passport/admin/users/{userId}/sessions
Authorization: Bearer {admin-token}

// Forcibly terminate a specific session
DELETE /passport/admin/sessions/{sessionId}
Authorization: Bearer {admin-token}

// Terminate all sessions for a user (account lockout scenario)
DELETE /passport/admin/users/{userId}/sessions
Authorization: Bearer {admin-token}
{ "reason": "security-incident", "notifyUser": true }