Skip to content
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

Safari doesn't let the user login into embedded iFrame when shared. #10176

Closed
bhavyarm opened this issue Feb 3, 2017 · 16 comments
Closed

Safari doesn't let the user login into embedded iFrame when shared. #10176

bhavyarm opened this issue Feb 3, 2017 · 16 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience

Comments

@bhavyarm
Copy link
Contributor

bhavyarm commented Feb 3, 2017

Kibana version: 5.2.0 (same bug in 5.1.2)

Elasticsearch version: 5.2.0

Server OS version: darwin_x_86_64

Browser version: Safari latest

Browser OS version: OS X

Original install method (e.g. download page, yum, from source, etc.): download page

Description of the problem including expected versus actual behavior: If you embed an iFrame into a validated html file and open it in Safari (for sharing a visualization or a dashboard) and the user has never logged in - Kibana doesn't let the user login. This doesn't happen in chrome or firefox.

Steps to reproduce:

  1. Create a test.html with an embedded iframe for either a visualization or dashboard
  2. Make sure user is not logged into Kibana on your safari browser
  3. Open the test.html - and try to login - you can't login.

Errors in browser console (if relevant):
You see "Unexpected CSS token:" as a warning. So, probably not really relevant.

safari_iframe

@bhavyarm bhavyarm added :Sharing bug Fixes for quality problems that affect the customer experience labels Feb 3, 2017
@marius-dr
Copy link
Member

Works fine on IE.

@kobelb
Copy link
Contributor

kobelb commented Feb 10, 2017

@bhavyarm - would you mind trying this again, but making sure that you cleared your cookies in Safari? We've seen the infinite login loop as described in https://github.com/elastic/x-pack/issues/4496 outside of an iFrame and I'd like to make sure it's not the same underlying issue.

@bhavyarm
Copy link
Contributor Author

@kobelb sorry. I just saw this comment. So yes. I cleared my cookies and safari still doesn't let the user login. Thanks!

@tbragin tbragin added the P2 label Feb 14, 2017
@tbragin tbragin assigned stacey-gammon and unassigned kobelb Feb 14, 2017
@egarl004
Copy link

egarl004 commented Aug 5, 2017

Is this issue still being tracked somewhere? It is still an issue with safari for me.

@samphibian
Copy link

@stacey-gammon @kobelb also having this issue - anywhere we can check on it?

@stacey-gammon
Copy link
Contributor

@samphibian - the trouble is that we haven't been able to reproduce this issue.

Are you also using version 5.2?

What if you bypass the iframe in Safari and visit the url directly, does login work in that case?

Does it work if you try it in Chrome?

Are you using Kibana behind a proxy or firewall?

@stacey-gammon stacey-gammon reopened this Aug 14, 2017
@samphibian
Copy link

@stacey-gammon I am using version 5.5.0. It does not work either via the iframe or if I visit the url directly in Safari, Chrome, or Opera. If I use the iframe, I get a message on the page saying session expired, but when I try logging in directly, I just get a message saying oops! error. try again. Kibana is behind a firewall, but the necessary ports are open and it is accessible using Firefox.

It might be a slightly different issue that just looks similar since I do get some errors in the console when using the 3 browsers I mentioned above (just not with Firefox). I can open up a new bug with all the details if that would be better.

@egarl004 said that they're also experiencing this issue

@samphibian
Copy link

@stacey-gammon Just checking in to see if there are any updates?

@stacey-gammon
Copy link
Contributor

stacey-gammon commented Aug 23, 2017

Hi @samphibian, sorry for the delay. I think you did the right thing in opening a new ticket, since it seems your issue really has nothing specific to do with iframes, nor safari.

@egarl004 - are you still running into this issue, and if so, is it just an issue when there is an iframe, or is there a login problem all the time?

I'm going to go ahead and close this back up, lets continue the discussion in the new ticket you opened. I'll try and take a deeper look today to see if I have any ideas as to what is going on.

@egarl004 - I'll reopen this one if your issue is specific to iframes/safari. If it looks more like @samphibian's issue, lets also follow up on that separate ticket.

@Shifter2600
Copy link

I have this same issue on ios devices.
I can't Change cors since I use elastic cloud and the official kibana Docker hosted in aws. Is there a solution for me? I'm on 5.6.1.

@stacey-gammon
Copy link
Contributor

@Shifter2600 - are you trying to log in via an iframe? or directly? If via an iframe, can you try to log in directly and see if that works? Then we can narrow down whether the problem is with the iframe or just with the login code.

@SeanHansell
Copy link

Login directly works. Still can't login to the iframe. iframe is how we present Kibana to clients. Need to have this fixed!

@kobelb
Copy link
Contributor

kobelb commented Jan 24, 2018

@SeanHansell we're been unable to replicate this issue to be able to determine the appropriate fix. Would you mind trying to login via the iFrame with another browser besides Safari to see if it works for you?

@uwrob
Copy link

uwrob commented Apr 11, 2018

Still does not work. It makes sharing dashboards/visualization unusable... very easy to replicate

If a user is already logged in on safari, the user can view embedded iframe. If a user is not already logged in and tries to view embedded iframe, the user is prompted to login and is unable to. The user gets redirected back to login page with no error message.

@ngriaznov
Copy link

ngriaznov commented Feb 14, 2019

Yes, we are having the same issue still in Kibana 6.6.0. Login using POST "/api/security/v1/login" does not work in iOS/OSX Safari, meaning that iFrame is not authorized after this call, and this works in majority of the browsers

@irnc
Copy link

irnc commented Nov 1, 2019

Issue is still reproducible in Safari 13.0.3 because Safari doesn't accept cookie set inside iframe, thus consecutive requests are redirected to login again.

Safari by default discards cookies set in an iframe unless the host that's serving the iframe has set a cookie before, outside the iframe. Safari is the only browser that does this.

This is stated in https://gist.github.com/iansltx/18caf551baaa60b79206 with possible workaround which is not applicated to Kibana.

@stacey-gammon @kobelb Could we consider reopening this issue?

hop-dev added a commit that referenced this issue Sep 5, 2024
## Summary

closes [#10176](elastic/security-team#10176)

I've been looking into a few of our flaky tests and come up with a
couple of actions, I will comment on them individually.

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience
Projects
None yet
Development

No branches or pull requests