Skip to content
Snippets Groups Projects
Commit 10aba630 authored by ale's avatar ale
Browse files

Add a grace time to the keystore TTL

Just to cover edge cases when sessions are about to expire.
parent c31919d0
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment