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

Set default access request TTL to 1 week. #35799

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

mdwn
Copy link
Contributor

@mdwn mdwn commented Dec 15, 2023

The TTL for a request now defaults to 1 week. This will allow reviewers more time to review an access request before it disappears.

changelog: Access Request TTLs default to 1 week.

Copy link

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

Copy link
Collaborator

@zmb3 zmb3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend rephrasing the title (changelog, commit message) as well. As written it's not clear as to whether you are describing the current behavior or the new behavior.

I like to complete the sentence "If applied, this commit will..."

For example: set default access request TTL to 24h.

lib/services/access_request.go Outdated Show resolved Hide resolved
lib/services/access_request.go Outdated Show resolved Hide resolved
@mdwn mdwn changed the title Request TTL maxes out at 1 week. Set default access request TTL to 1 week. Dec 18, 2023
@mdwn mdwn force-pushed the mike.wilson/support-one-week-request-ttl branch from cc1ce18 to 4365cbd Compare December 18, 2023 16:30
web/packages/teleport/src/AccessRequests/utils.ts Outdated Show resolved Hide resolved
lib/services/access_request.go Outdated Show resolved Hide resolved

// requestTTL is the the TTL for an access request, i.e. the amount of time that
// the access request can be reviewed. Defaults to 1 week.
requestTTL = 7 * day
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to override this TTL, or is it always 7 days no matter what?

If the latter, then it feels disingenuous to say this "Defaults to 1 week" - default typically means "the value that is used if not otherwise specified."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a way to override it with the maxDuration flag. I'm not too familiar with this flag and how it works, however.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC we're here setting the object expiry (SetExpiry) to 7 days. Below, we use maxDuration to potentially modify SetSessionTTL, SetAccessExpiry, and SetMaxDuration, but not SetExpiry. Is there something I'm missing? If not, I think we should clarify the relationship between these settings and this maxDuration before making these changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we getting rid of all of these tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh, my bad. I didn't restore the tests after restoring the function.

@mdwn
Copy link
Contributor Author

mdwn commented Jan 26, 2024

Hey all, if you've arrived here you're probably wondering why this is not yet merged. There's some complexity with the fact that the access request itself may expire before the access request TTL (the time to review) expires. We're currently trying to figure out what to do here.

@smallinsky smallinsky self-requested a review February 1, 2024 17:50
The TTL for a request now defaults to 1 week. This will allow reviewers more
time to review an access request before it disappears.
@mdwn mdwn force-pushed the mike.wilson/support-one-week-request-ttl branch from ba91df6 to 358e527 Compare February 14, 2024 21:06
@mdwn mdwn removed the do-not-merge label Feb 14, 2024
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from smallinsky February 14, 2024 21:07
@mdwn mdwn added this pull request to the merge queue Feb 15, 2024
@mdwn mdwn removed this pull request from the merge queue due to a manual request Feb 15, 2024
@mdwn
Copy link
Contributor Author

mdwn commented Feb 15, 2024

I was going to merge this now that the rest of the bits are in place, but I'm going to do a bit more testing on second thought to make sure I didn't miss anything.

@mdwn
Copy link
Contributor Author

mdwn commented Feb 22, 2024

I've tested this in combination with the other change and things seem to behave, so I'm going to merge/backport this.

@mdwn mdwn added this pull request to the merge queue Feb 22, 2024
Merged via the queue into master with commit aa77570 Feb 22, 2024
42 checks passed
@mdwn mdwn deleted the mike.wilson/support-one-week-request-ttl branch February 22, 2024 21:20
@public-teleport-github-review-bot

@mdwn See the table below for backport results.

Branch Result
branch/v14 Failed
branch/v15 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants