-
Notifications
You must be signed in to change notification settings - Fork 881
feat!: add --default-token-lifetime
#14631
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
feat!: add --default-token-lifetime
#14631
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @ethanndickson and the rest of your teammates on |
2d3f8f4
to
5f56829
Compare
nice. we will definitely want to label this as a breaking change in our changelog. a couple of questions?
cc @stirby as I'll be PTO for the rest of this week |
Approach changed. |
--session-duration
--session-duration
--session-duration
--session-duration
_
--session-duration
_--session-duration
5f56829
to
b691a47
Compare
--session-duration
--default-token-lifetime
b691a47
to
67e03fa
Compare
67e03fa
to
43477bf
Compare
43477bf
to
c969613
Compare
Closes #13990.
Adds a new deployment value that influences the lifetime of tokens created via:
/users/{user}/keys [post]
- Used by/cli-auth
/users/{user}/keys/tokens [post]
- Used byTokens
page in web UI settings, andcoder tokens create
.The default value of this option is 7 days, to retain the existing TTL for
/cli-auth
tokens.Of note is that the web UI and
coder tokens create
supply default values when calling/tokens [post]
.Therefore, the only breaking change in this PR is for tokens created by directly calling
/users/{user}/keys/tokens [post]
without a lifetime in the request body. The default TTL for these tokens is 7 days, down from 30. Users calling this endpoint directly should already be specifying a lifetime, so this is unlikely to break any existing workflows.The tokens returned by
/users/{user}/keys [post]
are still refreshed with activity, unless--disable-session-expiry-refresh
is set.