increase default max-token-duration (#6467)

This commit is contained in:
Kira Pilot
2023-03-07 06:35:48 -08:00
committed by GitHub
parent 87ed7a7dba
commit ef2e86f309
5 changed files with 53 additions and 9 deletions

View File

@ -499,10 +499,11 @@ func newConfig() *codersdk.DeploymentConfig {
Default: flag.Lookup("test.v") == nil && !buildinfo.IsDev(),
},
MaxTokenLifetime: &codersdk.DeploymentConfigField[time.Duration]{
Name: "Max Token Lifetime",
Usage: "The maximum lifetime duration users can specify when creating an API token.",
Flag: "max-token-lifetime",
Default: 24 * 30 * time.Hour,
Name: "Max Token Lifetime",
Usage: "The maximum lifetime duration users can specify when creating an API token.",
Flag: "max-token-lifetime",
// max time.Duration is 290 years
Default: 290 * 365 * 24 * time.Hour,
},
Swagger: &codersdk.SwaggerConfig{
Enable: &codersdk.DeploymentConfigField[bool]{

View File

@ -147,7 +147,7 @@ Flags:
can specify when creating an API
token.
Consumes $CODER_MAX_TOKEN_LIFETIME
(default 720h0m0s)
(default 2540400h0m0s)
--oauth2-github-allow-everyone Allow all logins, setting this
option means allowed orgs and teams
must be empty.