Watch
0
0
Fork
You've already forked hyperhive
0

raise the cert role token ttl to 1h

This commit is contained in:
atlas 2026-10-28 20:18:18 +01:00 • committed by mara
commit 099af86cd2

View file

@ -35,7 +35,7 @@ pub const DEFAULT_CERT_MOUNT: &str = "cert";
/// it leaves one lease per login for the mount's default of 32 days.
/// [`SecretStore`] holds the token it logs in with and renews nothing: log in
/// again rather than keep a handle past this.
pub const CERT_ROLE_TOKEN_TTL: &str = "15m";
pub const CERT_ROLE_TOKEN_TTL: &str = "1h";
/// Upper bound on one request to the store, login included.
///
@ -738,8 +738,8 @@ mod tests {
#[test]
fn a_cert_role_is_written_with_short_lived_tokens() {
let r = cert_role_request("cert", "hive-agent-a", "PEM", "hive-agent-a", &["shared"]);
assert_eq!(r.token_ttl.as_deref(), Some("15m"));
assert_eq!(r.token_max_ttl.as_deref(), Some("15m"));
assert_eq!(r.token_ttl.as_deref(), Some("1h"));
assert_eq!(r.token_max_ttl.as_deref(), Some("1h"));
// The control: the rest of the role is still written.
assert_eq!(
r.allowed_common_names,