Tools / ForgeRock IAM interview questions
What is ForgeRock AM's Session Management and what types of sessions exist?
Session management in ForgeRock AM refers to the lifecycle of the authentication state a user establishes after successfully completing an authentication tree. When a user authenticates, AM creates a session and returns a session token to the client (typically as a cookie named iPlanetDirectoryPro). Subsequent requests from that client include the token, and AM validates it to grant access without re-authentication.
AM supports two distinct session types:
Stateful Sessions (CTS-backed) — The session record is stored in the Core Token Service (backed by DS). The session token (SSOToken) is an opaque identifier that references this server-side record. AM must query CTS on every validation call to retrieve session properties. Stateful sessions support rich server-side state — you can store arbitrary attributes in the session, modify them during the session lifetime, and rely on idle timeout (reset on activity) vs maximum timeout (hard ceiling). These sessions participate in cross-realm SSO via the session service.
Stateless Sessions (JWT-based) — The entire session state is encoded in a signed (and optionally encrypted) JWT. No server-side storage is needed; AM validates the session by verifying the JWT signature. This scales better horizontally — any AM node can validate any session without a CTS lookup. The trade-off is that stateless sessions have fixed expiry baked into the JWT and cannot have their attributes modified after issuance. Idle timeout is approximate (based on a rolling JWT issuance) rather than exact.
Session lifecycle operations:
- Validate — Check if a session token is still valid.
- Get — Retrieve session properties (user DN, auth level, etc.).
- Logout — Invalidate the session (stateful: remove CTS record; stateless: add token ID to a blocklist).
- Refresh — Reset the idle timeout on a stateful session.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
