Commit 10aba630 authored by ale's avatar ale

Add a grace time to the keystore TTL

Just to cover edge cases when sessions are about to expire.
parent c31919d0
Pipeline #5419 passed with stages
in 3 minutes and 30 seconds
......@@ -203,7 +203,9 @@ func (h *Server) maybeUnlockKeystore(ctx context.Context, username, password str
}
shard = userinfo.Shard
}
return true, h.keystore.Open(ctx, shard, username, password, h.authSessionLifetime)
// Add a 'grace time' of 30 minutes to the key ttl.
ttl := h.authSessionLifetime + 1800
return true, h.keystore.Open(ctx, shard, username, password, ttl)
}
// Callback called by the login handler whenever a user successfully
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment