feat!: add --default-token-lifetime (#14631)

This commit is contained in:
Ethan
2024-09-18 21:23:42 +10:00
committed by GitHub
parent 6de59371ea
commit fccf6f1e0e
14 changed files with 165 additions and 38 deletions
+1
View File
@@ -396,6 +396,7 @@ curl -X GET http://coder-server:8080/api/v2/deployment/config \
"secure_auth_cookie": true,
"session_lifetime": {
"default_duration": 0,
"default_token_lifetime": 0,
"disable_expiry_refresh": true,
"max_token_lifetime": 0
},
+5 -1
View File
@@ -1902,6 +1902,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
"secure_auth_cookie": true,
"session_lifetime": {
"default_duration": 0,
"default_token_lifetime": 0,
"disable_expiry_refresh": true,
"max_token_lifetime": 0
},
@@ -2328,6 +2329,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
"secure_auth_cookie": true,
"session_lifetime": {
"default_duration": 0,
"default_token_lifetime": 0,
"disable_expiry_refresh": true,
"max_token_lifetime": 0
},
@@ -4772,6 +4774,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
```json
{
"default_duration": 0,
"default_token_lifetime": 0,
"disable_expiry_refresh": true,
"max_token_lifetime": 0
}
@@ -4781,7 +4784,8 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
| Name | Type | Required | Restrictions | Description |
| ------------------------ | ------- | -------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `default_duration` | integer | false | | Default duration is for api keys, not tokens. |
| `default_duration` | integer | false | | Default duration is only for browser, workspace app and oauth sessions. |
| `default_token_lifetime` | integer | false | | |
| `disable_expiry_refresh` | boolean | false | | Disable expiry refresh will disable automatically refreshing api keys when they are used from the api. This means the api key lifetime at creation is the lifetime of the api key. |
| `max_token_lifetime` | integer | false | | |