@@ -249,24 +249,24 @@ func ParseSSHConfigOption(opt string) (key string, value string, err error) {
249
249
// TODO: These config options were created back when coder only had api keys.
250
250
// Today, the config is ambigously used for all of them. For example:
251
251
// - cli based api keys ignore all settings
252
- // - login uses the default lifetime, not the MaxTokenLifetime
253
- // - Tokens use the Default & MaxTokenLifetime
252
+ // - login uses the default lifetime, not the MaximumTokenDuration
253
+ // - Tokens use the Default & MaximumTokenDuration
254
254
// - ... etc ...
255
255
// The rational behind each decision is undocumented. The naming behind these
256
256
// config options is also confusing without any clear documentation.
257
257
// 'CreateAPIKey' is used to make all sessions, and it's parameters are just
258
258
// 'LifetimeSeconds' and 'DefaultLifetime'. Which does not directly correlate to
259
259
// the config options here.
260
260
type SessionLifetime struct {
261
- // DisableSessionExpiryRefresh will disable automatically refreshing api
261
+ // DisableExpiryRefresh will disable automatically refreshing api
262
262
// keys when they are used from the api. This means the api key lifetime at
263
263
// creation is the lifetime of the api key.
264
- DisableSessionExpiryRefresh serpent.Bool `json:"disable_session_expiry_refresh ,omitempty" typescript:",notnull"`
264
+ DisableExpiryRefresh serpent.Bool `json:"disable_expiry_refresh ,omitempty" typescript:",notnull"`
265
265
266
- // DefaultSessionDuration is for api keys, not tokens.
267
- DefaultSessionDuration serpent.Duration `json:"max_session_expiry " typescript:",notnull"`
266
+ // DefaultDuration is for api keys, not tokens.
267
+ DefaultDuration serpent.Duration `json:"default_duration " typescript:",notnull"`
268
268
269
- MaxTokenLifetime serpent.Duration `json:"max_token_lifetime,omitempty" typescript:",notnull"`
269
+ MaximumTokenDuration serpent.Duration `json:"max_token_lifetime,omitempty" typescript:",notnull"`
270
270
}
271
271
272
272
type DERP struct {
@@ -1604,7 +1604,7 @@ when required by your organization's security policy.`,
1604
1604
// We have to add in the 25 leap days for the frontend to show the
1605
1605
// "100 years" correctly.
1606
1606
Default : ((100 * 365 * time .Hour * 24 ) + (25 * time .Hour * 24 )).String (),
1607
- Value : & c .Sessions .MaxTokenLifetime ,
1607
+ Value : & c .Sessions .MaximumTokenDuration ,
1608
1608
Group : & deploymentGroupNetworkingHTTP ,
1609
1609
YAML : "maxTokenLifetime" ,
1610
1610
Annotations : serpent.Annotations {}.Mark (annotationFormatDuration , "true" ),
@@ -1798,7 +1798,7 @@ when required by your organization's security policy.`,
1798
1798
Flag : "session-duration" ,
1799
1799
Env : "CODER_SESSION_DURATION" ,
1800
1800
Default : (24 * time .Hour ).String (),
1801
- Value : & c .Sessions .DefaultSessionDuration ,
1801
+ Value : & c .Sessions .DefaultDuration ,
1802
1802
Group : & deploymentGroupNetworkingHTTP ,
1803
1803
YAML : "sessionDuration" ,
1804
1804
Annotations : serpent.Annotations {}.Mark (annotationFormatDuration , "true" ),
@@ -1809,7 +1809,7 @@ when required by your organization's security policy.`,
1809
1809
Flag : "disable-session-expiry-refresh" ,
1810
1810
Env : "CODER_DISABLE_SESSION_EXPIRY_REFRESH" ,
1811
1811
1812
- Value : & c .Sessions .DisableSessionExpiryRefresh ,
1812
+ Value : & c .Sessions .DisableExpiryRefresh ,
1813
1813
Group : & deploymentGroupNetworkingHTTP ,
1814
1814
YAML : "disableSessionExpiryRefresh" ,
1815
1815
},
0 commit comments