Add disabled option for cookie samesite attribute (#21472)
Breaking change: If disabled the cookie samesite cookie attribute will not be set, but if none the attribute will be set and is a breaking change compared to before where none did not render the attribute. This was due to a known issue in Safari. Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com> Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> Fixes #19847
This commit is contained in:
co-authored by
Arve Knudsen
Diana Payton
parent
492912845f
commit
a1579283a6
@@ -24,14 +24,14 @@ Do not change `defaults.ini`! Grafana defaults are stored in this file. Dependin
|
||||
- Custom configuration from `$WORKING_DIR/conf/custom.ini`
|
||||
- The custom configuration file path can be overridden using the `--config` parameter
|
||||
|
||||
**Linux**
|
||||
**Linux**
|
||||
|
||||
If you installed Grafana using the `deb` or `rpm` packages, then your configuration file is located at `/etc/grafana/grafana.ini` and a separate `custom.ini` is not used. This path is specified in the Grafana init.d script using `--config` file parameter.
|
||||
|
||||
**Windows**
|
||||
`sample.ini` is in the same directory as `defaults.ini` and contains all the settings commented out. Copy `sample.ini` and name it `custom.ini`.
|
||||
|
||||
**macOS**
|
||||
**macOS**
|
||||
By default, the configuration file is located at `/usr/local/etc/grafana/grafana.ini`.
|
||||
|
||||
## Comments in .ini Files
|
||||
@@ -361,7 +361,7 @@ Set to `true` if you host Grafana behind HTTPS. Default is `false`.
|
||||
|
||||
### cookie_samesite
|
||||
|
||||
Sets the `SameSite` cookie attribute and prevents the browser from sending this cookie along with cross-site requests. The main goal is mitigate the risk of cross-origin information leakage. It also provides some protection against cross-site request forgery attacks (CSRF), [read more here](https://www.owasp.org/index.php/SameSite). Valid values are `lax`, `strict` and `none`. Default is `lax`.
|
||||
Sets the `SameSite` cookie attribute and prevents the browser from sending this cookie along with cross-site requests. The main goal is to mitigate the risk of cross-origin information leakage. This setting also provides some protection against cross-site request forgery attacks (CSRF), [read more about SameSite here](https://www.owasp.org/index.php/SameSite). Valid values are `lax`, `strict`, `none`, and `disabled`. Default is `lax`. Using value `disabled` does not add any `SameSite` attribute to cookies.
|
||||
|
||||
### allow_embedding
|
||||
|
||||
@@ -611,7 +611,7 @@ You can choose between (s3, webdav, gcs, azure_blob, local). If left empty Grafa
|
||||
## [external_image_storage.s3]
|
||||
|
||||
### endpoint
|
||||
Optional endpoint URL (hostname or fully qualified URI) to override the default generated S3 endpoint. If you want to
|
||||
Optional endpoint URL (hostname or fully qualified URI) to override the default generated S3 endpoint. If you want to
|
||||
keep the default, just leave this empty. You must still provide a `region` value if you specify an endpoint.
|
||||
|
||||
## path_style_access
|
||||
|
||||
@@ -226,3 +226,14 @@ The handling of multi-valued template variables in dimension values has been cha
|
||||
## Upgrading to v6.6
|
||||
|
||||
The Generic OAuth setting `send_client_credentials_via_post`, used for supporting non-compliant providers, has been removed. From now on, Grafana will automatically detect if credentials should be sent as part of the URL or request body for a specific provider. The result will be remembered and used for additional OAuth requests for that provider.
|
||||
|
||||
### Important changes regarding SameSite cookie attribute
|
||||
|
||||
Chrome 80 treats cookies as `SameSite=Lax` by default if no `SameSite` attribute is specified, see https://www.chromestatus.com/feature/5088147346030592.
|
||||
|
||||
Due to this change in Chrome, the `[security]` setting `cookie_samesite` configured to `none` now renders cookies with `SameSite=None` attribute compared to before where no `SameSite` attribute was added to cookies. To get the old behavior, use value `disabled` instead of `none`, see [cookie_samesite in Configuration]({{< relref "configuration/#cookie-samesite" >}}) for more information.
|
||||
|
||||
**Note:** There is currently a bug affecting Mac OSX and iOS that causes `SameSite=None` cookies to be treated as `SameSite=Strict` and therefore not sent with cross-site requests. (See https://bugs.webkit.org/show_bug.cgi?id=198181.) Until this is fixed, `SameSite=None` might not work properly on Safari.
|
||||
|
||||
This version of Chrome also rejects insecure `SameSite=None` cookies. See https://www.chromestatus.com/feature/5633521622188032 for more information. Make sure that you
|
||||
change the `[security]` setting `cookie_secure` to `true` and use HTTPS when `cookie_samesite` is configured to `none`, otherwise authentication in Grafana won't work properly.
|
||||
|
||||
@@ -32,7 +32,7 @@ https://play.grafana.org/d/000000012/grafana-play-home?orgId=1&from=156871968017
|
||||
|
||||
You can embed a panel using an iframe on another web site. This tab will show you the html that you need to use.
|
||||
|
||||
> *Notice* This sharing require either anonymous access or setting [cookie_samesite]({{< relref "../installation/configuration.md#cookie-samesite" >}}) to none
|
||||
> **Note:** This sharing requires [allow_embedding]({{< relref "../installation/configuration.md#allow-embedding" >}}) enabled and anonymous access, or proper configuration of the [cookie_samesite]({{< relref "../installation/configuration.md#cookie-samesite" >}}) setting.
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user