Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase default session timeout to 8 hours idle, 24 hours absolute #5920

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nexus/examples/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[console]
# Directory for static assets. Absolute path or relative to CWD.
static_dir = "out/console-assets"
session_idle_timeout_minutes = 480 # 6 hours
session_idle_timeout_minutes = 480 # 8 hours
session_absolute_timeout_minutes = 1440 # 24 hours

# List of authentication schemes to support.
Expand Down
4 changes: 2 additions & 2 deletions nexus/tests/config.test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
[console]
# Directory for static assets. Absolute path or relative to CWD.
static_dir = "tests/static"
session_idle_timeout_minutes = 60
session_absolute_timeout_minutes = 480
session_idle_timeout_minutes = 480 # 8 hours
session_absolute_timeout_minutes = 1440 # 24 hours

# List of authentication schemes to support.
[authn]
Expand Down
2 changes: 1 addition & 1 deletion nexus/tests/integration_tests/console_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ async fn log_in_and_extract_token(
let (session_token, rest) = session_cookie.split_once("; ").unwrap();

assert!(session_token.starts_with("session="));
assert_eq!(rest, "Path=/; HttpOnly; SameSite=Lax; Max-Age=28800");
assert_eq!(rest, "Path=/; HttpOnly; SameSite=Lax; Max-Age=86400");

session_token.to_string()
}
Expand Down
2 changes: 1 addition & 1 deletion nexus/tests/integration_tests/password_login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ async fn expect_login_success(
.split_once("; ")
.expect("session cookie: bad cookie header value (missing semicolon)");
assert!(token_cookie.starts_with("session="));
assert_eq!(rest, "Path=/; HttpOnly; SameSite=Lax; Max-Age=28800");
assert_eq!(rest, "Path=/; HttpOnly; SameSite=Lax; Max-Age=86400");
let (_, session_token) = token_cookie
.split_once('=')
.expect("session cookie: bad cookie header value (missing 'session=')");
Expand Down
4 changes: 2 additions & 2 deletions smf/nexus/multi-sled/config-partial.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
[console]
# Directory for static assets. Absolute path or relative to CWD.
static_dir = "/var/nexus/static"
session_idle_timeout_minutes = 60
session_absolute_timeout_minutes = 480
session_idle_timeout_minutes = 480 # 8 hours
session_absolute_timeout_minutes = 1440 # 24 hours

[authn]
schemes_external = ["session_cookie", "access_token"]
Expand Down
4 changes: 2 additions & 2 deletions smf/nexus/single-sled/config-partial.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
[console]
# Directory for static assets. Absolute path or relative to CWD.
static_dir = "/var/nexus/static"
session_idle_timeout_minutes = 60
session_absolute_timeout_minutes = 480
session_idle_timeout_minutes = 480 # 8 hours
session_absolute_timeout_minutes = 1440 # 24 hours

[authn]
schemes_external = ["session_cookie", "access_token"]
Expand Down
Loading