-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Add MFAVerificationInterval option for roles #45569
Conversation
4f448ee
to
5939d87
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking it 😃
// tsh proxy * derivatives. | ||
// It's only effective if the session requires MFA. | ||
// If not set, defaults to `max_session_ttl`. | ||
int64 MinMFAVerificationInterval = 30 [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that Alan imported the gogo proto wrappers, can we use the google.protobuf.Duration
instead of the typecast?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it and it didn't play well, we get a Duration
struct that is not nice to use, not the durationpb
one. So I think better keep the legacy approach with the typecast
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you include de std duration flag for gogo? It generates a time.Duration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I missed that. Now looks ok, changed 1fdb62b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will you be creating a follow up PR that updates our documentation to include this new functionality?
290babe
to
3155daa
Compare
* add min mfa ttl * Fix missing import * Take into account cluster wide's requirement of per session MFA. * Add tests. * Protobufs update. * Rename minMFAVerificationInterval to MFAVerificationInterval * Use google.protobuf.Duration instead of casttype Duration. * Remove unnecessary types.NewDuration cast. * Update docs for mfaVerificationInterval. --------- Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
* add min mfa ttl * Fix missing import * Take into account cluster wide's requirement of per session MFA. * Add tests. * Protobufs update. * Rename minMFAVerificationInterval to MFAVerificationInterval * Use google.protobuf.Duration instead of casttype Duration. * Remove unnecessary types.NewDuration cast. * Update docs for mfaVerificationInterval. --------- Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
* add min mfa ttl * Fix missing import * Take into account cluster wide's requirement of per session MFA. * Add tests. * Protobufs update. * Rename minMFAVerificationInterval to MFAVerificationInterval * Use google.protobuf.Duration instead of casttype Duration. * Remove unnecessary types.NewDuration cast. * Update docs for mfaVerificationInterval. --------- Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
This PR adds a new option to the roles spec -MFAVerificationInterval (mostly implemented by @tigrato). It allows to set a limit on TTL of the local tsh proxy certificates. Currently they were issued for the whole duration of
max_session_ttl
which sometimes could be too long and some clients wanted to be able to shorten that period. If the new options is set, proxy will try to reissue certificates more often requiring to provide MFA for reissuing, so effectively client can now freely select what length between MFA checks is allowed.Fixes: #36638
Changelog: Allow to limit duration of local tsh proxy certificates with a new MFAVerificationInterval option.