Replies: 5 comments 14 replies
-
@slashmili unfortunately the Livebook web app and the iframe needs to be served from a different origin, more details: livebook/assets/js/hooks/js_view/iframe.js Lines 7 to 10 in 940d511 The ideal solution would be if you could configure Teleport to pass all requests to Livebook "/public/*" path without authentication. Under these paths we serve assets from the kino packages, so not requiring auth should be fine, hence "public". Is that something that you can configure? |
Beta Was this translation helpful? Give feedback.
-
@jonatanklosko do you remember why we use separate domains even with the sandbox? Is it to stack the security benefits? If so, should we also serve the iframe from Livebook for people who need to opt-in into the same domain? |
Beta Was this translation helpful? Give feedback.
-
In case this does not work, we should probably remove the Teleport integration :( |
Beta Was this translation helpful? Give feedback.
-
@slashmili I’m on the same boat. Encountered the same issue and spent many hours trying different things before giving up and eventually referred to this discussion. I’m curious to hear what you ended up doing or if you found any workaround. |
Beta Was this translation helpful? Give feedback.
-
For the record we have given up on the idea of running Livebook on Teleport. We are looking for alternative tools to Teleport. Luckily for us it's easy because we just picked up Teleport. I'll create a PR to revert #2296 |
Beta Was this translation helpful? Give feedback.
-
Hi!
I'm trying to put Livebook behind Teleport. However I'm running into an issue with the
iframe
that Livebook loads.How it works:
a. I'm hosting the Livebook on
https://livebook.teleport.mydomain.com
b. When loading a smartcell, it opens an iframe(with sandbox mode) which loads
https://livebookusercontent.com/iframe/v5.html
c. the v5.html now loads javascript on my
livebook.teleport.mydomain.com/assets/.../main.js
The problem is that when the
v5.html
opensmain.js
onlivebook.teleport.mydomain.com
, Teleport–which acts like a proxy–detects the request as a new request and redirects the request to the teleport login page. which fails because the login page of Teleport doesn't haveAccess-Control-Allow-Origin: *
in the headerWe looked into different options,
livebook-iframe.teleport.mydomain.com
and configureLIVEBOOK_IFRAME_URL
but it was the same, Teleport didn't like that.As I mentioned the only one that it works is if we put Livebook and the iframe service behind nginx and serve both under the same domain
livebook.teleport.mydomain.com
behind Teleport proxy.Based on #2366 (comment) , we are loading the js from an iframe(using different domain) because of security reasons.
In my search, I came across How to Safeguard your Site with HTML5 Sandbox article which I guess explains what we are doing here with the sandbox option in iframe
And if I understood it correctly, in A sandbox approach section it says:
Does it mean it's ok to host iframe and Livebook under the same domain? and the security part of it is taken care by the sandbox option of iframe?
Beta Was this translation helpful? Give feedback.
All reactions