mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: add custom samesite options to auth cookies (#16885)
Allows controlling `samesite` cookie settings from the deployment config
This commit is contained in:
Generated
+4
-1
@@ -260,6 +260,10 @@ curl -X GET http://coder-server:8080/api/v2/deployment/config \
|
||||
"threshold_database": 0
|
||||
},
|
||||
"http_address": "string",
|
||||
"http_cookies": {
|
||||
"same_site": "string",
|
||||
"secure_auth_cookie": true
|
||||
},
|
||||
"in_memory_database": true,
|
||||
"job_hang_detector_interval": 0,
|
||||
"logging": {
|
||||
@@ -433,7 +437,6 @@ curl -X GET http://coder-server:8080/api/v2/deployment/config \
|
||||
},
|
||||
"redirect_to_access_url": true,
|
||||
"scim_api_key": "string",
|
||||
"secure_auth_cookie": true,
|
||||
"session_lifetime": {
|
||||
"default_duration": 0,
|
||||
"default_token_lifetime": 0,
|
||||
|
||||
Generated
+25
-3
@@ -1945,6 +1945,10 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
"threshold_database": 0
|
||||
},
|
||||
"http_address": "string",
|
||||
"http_cookies": {
|
||||
"same_site": "string",
|
||||
"secure_auth_cookie": true
|
||||
},
|
||||
"in_memory_database": true,
|
||||
"job_hang_detector_interval": 0,
|
||||
"logging": {
|
||||
@@ -2118,7 +2122,6 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
},
|
||||
"redirect_to_access_url": true,
|
||||
"scim_api_key": "string",
|
||||
"secure_auth_cookie": true,
|
||||
"session_lifetime": {
|
||||
"default_duration": 0,
|
||||
"default_token_lifetime": 0,
|
||||
@@ -2422,6 +2425,10 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
"threshold_database": 0
|
||||
},
|
||||
"http_address": "string",
|
||||
"http_cookies": {
|
||||
"same_site": "string",
|
||||
"secure_auth_cookie": true
|
||||
},
|
||||
"in_memory_database": true,
|
||||
"job_hang_detector_interval": 0,
|
||||
"logging": {
|
||||
@@ -2595,7 +2602,6 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
},
|
||||
"redirect_to_access_url": true,
|
||||
"scim_api_key": "string",
|
||||
"secure_auth_cookie": true,
|
||||
"session_lifetime": {
|
||||
"default_duration": 0,
|
||||
"default_token_lifetime": 0,
|
||||
@@ -2711,6 +2717,7 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
| `external_token_encryption_keys` | array of string | false | | |
|
||||
| `healthcheck` | [codersdk.HealthcheckConfig](#codersdkhealthcheckconfig) | false | | |
|
||||
| `http_address` | string | false | | Http address is a string because it may be set to zero to disable. |
|
||||
| `http_cookies` | [codersdk.HTTPCookieConfig](#codersdkhttpcookieconfig) | false | | |
|
||||
| `in_memory_database` | boolean | false | | |
|
||||
| `job_hang_detector_interval` | integer | false | | |
|
||||
| `logging` | [codersdk.LoggingConfig](#codersdkloggingconfig) | false | | |
|
||||
@@ -2729,7 +2736,6 @@ CreateWorkspaceRequest provides options for creating a new workspace. Only one o
|
||||
| `rate_limit` | [codersdk.RateLimitConfig](#codersdkratelimitconfig) | false | | |
|
||||
| `redirect_to_access_url` | boolean | false | | |
|
||||
| `scim_api_key` | string | false | | |
|
||||
| `secure_auth_cookie` | boolean | false | | |
|
||||
| `session_lifetime` | [codersdk.SessionLifetime](#codersdksessionlifetime) | false | | |
|
||||
| `ssh_keygen_algorithm` | string | false | | |
|
||||
| `strict_transport_security` | integer | false | | |
|
||||
@@ -3298,6 +3304,22 @@ Git clone makes use of this by parsing the URL from: 'Username for "https://gith
|
||||
| » `[any property]` | array of string | false | | |
|
||||
| `regex_filter` | [regexp.Regexp](#regexpregexp) | false | | Regex filter is a regular expression that filters the groups returned by the OIDC provider. Any group not matched by this regex will be ignored. If the group filter is nil, then no group filtering will occur. |
|
||||
|
||||
## codersdk.HTTPCookieConfig
|
||||
|
||||
```json
|
||||
{
|
||||
"same_site": "string",
|
||||
"secure_auth_cookie": true
|
||||
}
|
||||
```
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
|----------------------|---------|----------|--------------|-------------|
|
||||
| `same_site` | string | false | | |
|
||||
| `secure_auth_cookie` | boolean | false | | |
|
||||
|
||||
## codersdk.Healthcheck
|
||||
|
||||
```json
|
||||
|
||||
Generated
+11
@@ -992,6 +992,17 @@ Type of auth to use when connecting to postgres. For AWS RDS, using IAM authenti
|
||||
|
||||
Controls if the 'Secure' property is set on browser session cookies.
|
||||
|
||||
### --samesite-auth-cookie
|
||||
|
||||
| | |
|
||||
|-------------|--------------------------------------------|
|
||||
| Type | <code>lax\|none</code> |
|
||||
| Environment | <code>$CODER_SAMESITE_AUTH_COOKIE</code> |
|
||||
| YAML | <code>networking.sameSiteAuthCookie</code> |
|
||||
| Default | <code>lax</code> |
|
||||
|
||||
Controls the 'SameSite' property is set on browser session cookies.
|
||||
|
||||
### --terms-of-service-url
|
||||
|
||||
| | |
|
||||
|
||||
Reference in New Issue
Block a user