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 byTokenspage in web UI settings, andcoder tokens create.The default value of this option is 7 days, to retain the existing TTL for
/cli-authtokens.Of note is that the web UI and
coder tokens createsupply 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-refreshis set.