You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by elek <gi...@git.apache.org> on 2017/03/20 14:37:18 UTC
[GitHub] zeppelin pull request #2166: [ZEPPELIN-2288] Fix Cross-Site WebSocket check
GitHub user elek opened a pull request:
https://github.com/apache/zeppelin/pull/2166
[ZEPPELIN-2288] Fix Cross-Site WebSocket check
Change-Id: Iad87ebe0b5dd6bd67a12e47fe83fbd0e1e71bda9
### What is this PR for?
ZEPPELIN-173 implemented an optional check for the Origin header during the websocket connection creation. This check is no longer active since jetty is upgraded to 9 as the checkOrigin method is no longer called automatically.
This fix, just calls the existing check from the WebsocketCreator manually.
### What type of PR is it?
Bug Fix
### Todos
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-2288
### How should this be tested?
1. Set `zeppelin.server.allowed.origins` in zeppelin-site.xml other than the default `*`. Eg. `xxxx`
2. Start zeppelin
3. Try to open the zeppelin ws conection with different origin:
```
curl 'http://localhost:8080/ws' -H 'Host: localhost:8080' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Sec-WebSocket-Version: 13' -H 'origin: http://other:8080' -H 'Sec-WebSocket-Extensions: permessage-deflate' -H 'Sec-WebSocket-Key: BpiqAMwZaQUJQ//NtEaQPw==' -H 'Connection: keep-alive, Upgrade' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'Upgrade: websocket'
```
4. The websocket creation should be failed if the origin is not localhost or not the string configurated at 2.
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/elek/zeppelin ZEPPELIN-2288
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/2166.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2166
----
commit 9f8f998b3b318b946422bc798e27beed178c5084
Author: Elek, M�rton <el...@users.noreply.github.com>
Date: 2017-03-20T14:23:51Z
[ZEPPELIN-2288] Fix Cross-Site WebSocket check
Change-Id: Iad87ebe0b5dd6bd67a12e47fe83fbd0e1e71bda9
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2166: [ZEPPELIN-2288] Fix Cross-Site WebSocket check
Posted by elek <gi...@git.apache.org>.
Github user elek commented on the issue:
https://github.com/apache/zeppelin/pull/2166
Branch is rebased to apache/master and travis is enabled.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2166: [ZEPPELIN-2288] Fix Cross-Site WebSocket check
Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:
https://github.com/apache/zeppelin/pull/2166
Thanks @elek for the contribution!
LGTM and merge to master and branch-0.7 if no further discussions.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin pull request #2166: [ZEPPELIN-2288] Fix Cross-Site WebSocket check
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/zeppelin/pull/2166
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2166: [ZEPPELIN-2288] Fix Cross-Site WebSocket check
Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:
https://github.com/apache/zeppelin/pull/2166
Tested and it works well.
Could you setup travis-ci for your fork and see if it passes the test? Please take a look [CI](http://zeppelin.apache.org/contribution/contributions.html#continuous-integration).
Broken CI just fixed in master branch. So after setting up CI, you'll need to rebase this branch from master.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2166: [ZEPPELIN-2288] Fix Cross-Site WebSocket check
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2166
Thank you for the contribution.
LGTM!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---