Uh oh!
There was an error while loading. Please reload this page.
Fixing issue with ZEPPELIN-173: Zeppelin websocket server is vulnerab… - #205
Fixing issue with ZEPPELIN-173: Zeppelin websocket server is vulnerab…#205djoelz wants to merge 3 commits into
Conversation
…le to Cross-Site WebSocket Hijacking
There was a problem hiding this comment.
Could you explain little bit, why this if condition can be removed??
There was a problem hiding this comment.
I think it's a merge issue as I did not remove it. Let me double check
There was a problem hiding this comment.
Fixing in the next commit. Please review when you have time.
Leemoonsoo
commented
Aug 13, 2015
Tested and working nicely. Thanks for the contribution! |
…le to Cross-Site WebSocket Hijacking
djoelz
commented
Aug 13, 2015
I have fixed the merge issues and recommitted. Ready for your review. Thanks, From: Lee moon soo notifications@github.com Tested and working nicely. Thanks for the contribution! — |
Leemoonsoo
commented
Aug 14, 2015
Thanks, LGTM. |
djoelz
commented
Aug 14, 2015
Great! Next step is to merge? Who does this? |
Leemoonsoo
commented
Aug 14, 2015
Next step is, getting more review and votes, or waiting for enough time to have discussions and consensus (which is normally take a day at least). Then it's going to be merged. |
philwills
commented
Aug 17, 2015
Not sure if it's best to comment here, or open a new issue, but java.net.InetAddress.getLocalHost().getHostName();isn't going to return all possible addresses which a node might reasonably be listening on. For instance, on an EC2 node, this will return the private IP, but if you want to connect to that node from outside of Amazon's network, that address won't be visible, where as the public address will. I think there needs to at least be the option of setting an alternative value in config. |
corneadoug
commented
Aug 17, 2015
We got a similar problem, can't complete websocket handshake in some instalations since this commit |
Leemoonsoo
commented
Aug 17, 2015
@philwills@corneadoug Right, i'll create a patch, soon. Thanks! |
djoelz
commented
Aug 17, 2015
@Leemoonsoo can I suggest alternativeallowedsource as the configuration name? Also this will be used for my other pull request that affects REST endpoints as well. I could implement it also if you want. have you started already? |
Leemoonsoo
commented
Aug 17, 2015
@djoelz If you can implement, that would be really appreciated! |
djoelz
commented
Aug 18, 2015
@Leemoonsoo@jonbuffington is already doing the work. I will work closely with Jon to wrap this up. Thanks Jon! |
djoelz
commented
Aug 19, 2015
I have a fix for this. Will create the PR soon |
jitenderaswani
commented
Aug 20, 2015
Looking forward to this fix, I am unable to run Zeppelin in AWS. On my local machine, I don't have web-socket issue. |
Leemoonsoo
commented
Aug 20, 2015
@djoelz I also pushed a fix. @djoelz, @jitenderaswani please review #233. |
Fixing the socket cross-origin vulnerability as described in the Jira. Overwrote the checkOrigin in the WebSocketServlet class implemented by NotebookServer so that a list of all seen socket Get requests are kept and only Upgrade requests from the same origin will be accepted. Otherwise unauthorized will be returned. Included basic unit tests. Author: joelz <djoelz@gmail.com> Author: djoelz <joelz@microsoft.com> Closesapache#205 from djoelz/master and squashes the following commits: 08ff369 [djoelz] unecessary file 013f22d [joelz] Fixing issue with ZEPPELIN-173: Zeppelin websocket server is vulnerable to Cross-Site WebSocket Hijacking ea54b55 [joelz] Fixing issue with ZEPPELIN-173: Zeppelin websocket server is vulnerable to Cross-Site WebSocket Hijacking (cherry picked from commit d5ab911) Signed-off-by: Lee moon soo <moon@apache.org>
Refactor updating notebook
Fixing the socket cross-origin vulnerability as described in the Jira. Overwrote the checkOrigin in the WebSocketServlet class implemented by NotebookServer so that a list of all seen socket Get requests are kept and only Upgrade requests from the same origin will be accepted. Otherwise unauthorized will be returned.
Included basic unit tests.