SG SealGrid Athena Docs

Sign-in Sessions & Server Restarts

By default, restarting the Athena server signs out every logged-in operator — the next click lands them back on the login page. This is deliberate: for security, Athena generates a fresh token signing key each time it starts, which instantly invalidates all tokens issued by the previous run. This page explains that behaviour, how it differs from the ordinary token and idle-session timeouts, and how to change it if you would rather have sessions survive a restart.

This affects console operators / API clients — the people who sign in to Athena. It does not disconnect managed machines: enrolled agents authenticate with their own certificates and reconnect automatically after a server restart. See Certificates & PKI for how agents authenticate.

Why everyone is signed out after a restart#

When you sign in, Athena issues you a session token. That token is cryptographically signed with a secret signing key held by the server, and every subsequent request is accepted only if its signature still verifies against that key. With signing-key rotation enabled (the default), the server generates a brand-new random key every time it starts. Tokens signed with the previous key no longer verify, so they are all rejected at once and their holders are returned to the login screen.

This is a security feature, not a fault. It guarantees that a token captured from one run of the server cannot be replayed against a later run, and that any restart — planned maintenance, an upgrade, a crash recovery — cleanly ends every session that was open beforehand. The trade-off is the visible one: an administrator who restarts the service should expect to sign in again, and to let colleagues know they will too.

The signing-key rotation setting#

The behaviour is controlled by a single server configuration key. It is a deliberate server-level security decision, so it lives in the server configuration file rather than the console UI:

SettingConfig keyDefaultMeaning
Signing-key rotation Security:EnableJwtSecretRotation true When true, the server generates a new random signing key on every startup, which invalidates all existing sessions. When false, the server reuses a fixed configured key, so sessions remain valid across restarts (until they expire normally).

With rotation enabled the key is generated in memory at startup and is never written to disk or configuration — there is nothing to manage. This is the recommended setting for production, and no further action is required to benefit from it.

Keeping sessions alive across restarts#

If frequent restarts make the sign-out disruptive — for example in a lab, during iterative configuration, or where an external load balancer restarts the service often — you can turn rotation off and pin a fixed signing key. Sessions then survive restarts and end only when their token expires or the operator is idle-timed-out (see below).

Set both keys in the server configuration file appsettings.json:

// appsettings.json
"Security": {
  "EnableJwtSecretRotation": false
},
"Jwt": {
  "Secret": "<a long random secret, at least 32 characters>"
}

Or with the equivalent environment variables (useful for container deployments):

Security__EnableJwtSecretRotation=false
Jwt__Secret=<a long random secret, at least 32 characters>

Restart the server for the change to take effect. From then on, sessions persist across restarts because every run signs and verifies tokens with the same key.

When rotation is off, the fixed key must be at least 32 characters; the server will refuse to start otherwise. Treat this value as a secret — anyone who obtains it can forge session tokens. Use a long, random string, keep it out of source control, and prefer supplying it through an environment variable or your secret store. Do not ship the placeholder value from the sample configuration into production. Because turning rotation off removes the automatic invalidate-on-restart protection, leave it enabled unless you have a specific reason to change it.

How this relates to token and idle timeouts#

Signing-key rotation is one of three independent controls that decide how long a console session lasts. They work together, and whichever fires first ends the session:

ControlWhat ends the sessionWhere it is set
Signing-key rotation A server restart (when rotation is enabled) invalidates every session at once, regardless of how much token life remained. Security:EnableJwtSecretRotation — configuration file only (this page).
Token Expiration An absolute ceiling on a session: once the token reaches its lifetime it stops working even if the operator is active. Settings → Security (also API / PowerShell).
Session Timeout (idle) A rolling idle limit: after this many minutes with no activity the operator is warned and then signed out. Activity resets it; 0 disables it. Settings → Security (also API / PowerShell).

In short: Token Expiration and Session Timeout govern the length of a session while the server keeps running, and you tune both from the Security Settings screen. Signing-key rotation is the separate, restart-driven behaviour described here. Even with a very long token lifetime and the idle timeout disabled, a restart still signs everyone out while rotation is enabled — which is exactly why you change this setting, and not the timeouts, if you want sessions to survive restarts.

Restart checklist for admins#

Related: Security Settings for token and idle-session timeouts, Login Rate Limiting for failed-login lockouts, Authentication & SSO for how operators sign in, and Configuration for how the server reads its configuration file and environment variables.