-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for cookie's SameSite
attribute to be configurable
#60522
Comments
Pinging @elastic/kibana-security (Team:Security) |
Pinging @elastic/kibana-platform (Team:Platform) |
Seing hapijs/hapi#3987,
it seems we will need to only set this header when the user's browser supports it? |
That depends. According to our support matrix, we only support the latest GA version of each browser listed. We support both Chrome and Safari, but both of their latest versions appear to support If this was a configurable value (defaulting to I think we should discuss changing our default to |
Is there a solution for kibana on elastic cloud? |
You may want to consider backporting or documenting some kind of proxy solution for existing users. This change is currently rolling out in Chrome stable which will mean any of your users with a cross-site iframe embed for their dashboard will not be able to access it. |
This definitely threw us through a loop. Would be great to have some proxy documentation to get around this for new Kibana developers :) |
@legrego Does the Security team have the capacity to work on documentation?
@joshdover What is the earliest release we can work on this? I suppose |
Yeah 7.8 is pretty full for us. Do we have an idea of how difficult of a fix this is? |
We've decided to go ahead and fix this and maybe make it configurable (opt-in) to ensure we don't break older browser support (esp. IE11). We will backport this to 7.7 with @LeeDr's blessing. |
can be postponed by 7.8-7.9 https://blog.chromium.org/2020/04/temporarily-rolling-back-samesite.html |
@restrry @joshdover
To make Kibana work in an iframe on a 3rd party website we will need to set cookies like this |
Is the current plan to introduce a setting to configure the |
We can, but without the Hapi upgrade, I don't think it'll solve the embeddable problem with Chrome, as it doesn't appear we can set the value to My understanding is that the Hapi upgrade is at least soft-blocked on removal of the Legacy Platform. @watson experimented with an upgrade to |
There a couple of options:
As a note: Chrome resumed the Same Site cookie changes in July. It means we must fix the issue in 7.9 and it cannot wait for the plugins to finish migration (#56205 targeted v7.10) https://blog.chromium.org/2020/05/resuming-samesite-cookie-changes-in-july.html |
The solution depends on how deep we are going to backport the fix. Hapi version update we can backport to v7.7 at best. |
To allow third-party cookies in iFrame, add the parameter |
Is there any way to set |
@gaetano603 In some of the newer versions, adding the following parameters in kibana.yml does the same thing: |
I tried but it fails because SameSite is not allowed. |
@gaetano603 I'm afraid you have to upgrade. It's supported starting from v7.8.1. |
@restrry hence, if I don't set the |
@gaetano603 This is a question that I think is better suited to the Kibana discuss forum or contacting our support team. We reserve Github for bugs and feature requests: https://discuss.elastic.co/c/elastic-stack/kibana/7 |
@gaetano603 Executing an HTTP POST call to that endpoint will return a cookie that can be used for login. The JSON object that needs to be sent is shown in this post: https://discuss.elastic.co/t/kibana-7-10-login-issues/255201/3. But, this needs to happen before the user sees the page. |
I thought the problem might be that CORS are not enabled. |
@gaetano603 you need to access the server over HTTPS connection |
Would having an nginx reverse proxy handling the https do? |
I believe so. |
A quick follow up question. How would I need to define this if i were to add the env vars via docker-compose?
Would this be correct? Update This worked.
|
Currently, Kibana does not set the
SameSite
attribute on its session cookie. Up until recently, this was tolerable, but Chrome recently (version80
) updated its default configuration to treat unsetSameSite
attributes to meanLax
(https://www.chromestatus.com/feature/5088147346030592).This is problematic for users who embed Kibana in an iframe. We should allow the
SameSite
setting to be configurable viakibana.yml
, so users can choose if they wantStrict
,Lax
, orNone
.The text was updated successfully, but these errors were encountered: