Skip to main content

Session Service Early Access

The Session Service is the central store for user session state in k8shell. It records every session opened through the SSH Proxy or the Console (via the API Server), tracks session lifecycle events, and optionally captures full session streams for audit and compliance purposes.

The diagram below shows the Session Service's position in the platform and its integration points.

The following outlines the key responsibilities of the Session Service:

  • Session creation — when a user connects via the SSH Proxy or opens an interactive session through the Console, the calling service creates a session record in the Session Service.
  • Session lifecycle tracking — the Session Service tracks the active state of each session. Callers report metrics (ingress and egress byte volumes) periodically over the lifetime of the session.
  • Session retrieval — the API Server queries the Session Service to list active and historical sessions for a user. This powers the session list in the Console and last command in the workspace.
  • Session stream recording — when recording is enabled for a session, the SSH Proxy or API Server streams the raw session data to the Session Service. Streams are stored in asciinema format for terminal sessions and PCAP format for raw TCP sessions, enabling full replay and forensic analysis.