{"action":"created","comment":{"url":"https://api.github.com/repos/kaazing/gateway/pulls/comments/33214327","id":33214327,"diff_hunk":"@@ -0,0 +1,155 @@\n+##\n+# Copyright (c) 2007-2014, Kaazing Corporation. All rights reserved.\n+#\n+\n+## Scenario is: upstream and downstream requests shouldn't go through authentication\n+\n+# Conversation 1: create and upstream\n+# -----------------------------------\n+\n+connect tcp://127.0.0.1:8001\n+connected\n+\n+write \"GET /basic/;e/ct HTTP/1.1\\r\\n\"\n+write \"Accept: */*\\r\\n\"\n+write \"Content-Type: text/plain; charset=utf-8\\r\\n\"\n+write \"X-WebSocket-Version: wseb-1.0\\r\\n\"\n+write \"Referer: http://localhost:8001/?.kr=xs\\r\\n\"\n+write \"Accept-Language: en-US\\r\\n\"\n+write \"Accept-Encoding: gzip, deflate\\r\\n\"\n+write \"User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko\\r\\n\"\n+write \"Host: localhost:8001\\r\\n\"\n+write \"Connection: Keep-Alive\\r\\n\"\n+write \"Authorization: Basic am9lOndlbGNvbWU=\\r\\n\"\n+write \"\\r\\n\"\n+\n+read \"HTTP/1.1 201 Created\\r\\n\"\n+read \"Cache-Control: no-cache\\r\\n\"\n+read \"Content-Length: 134\\r\\n\"\n+read \"Content-Type: text/plain;charset=UTF-8\\r\\n\"\n+read /Date: .*/ \"\\r\\n\"\n+read \"Server: Kaazing Gateway\\r\\n\"\n+read \"\\r\\n\"\n+read \"http://localhost:8001\" /(?<up>.*)/ \"\\n\"\n+read \"http://localhost:8001\" /(?<down>.*)/ \"\\n\"\n+\n+write \"POST \"\n+write ${up}\n+write \" HTTP/1.1\\r\\n\"\n+write \"Accept: */*\\r\\n\"\n+write \"Content-Type: text/plain; charset=utf-8\\r\\n\"\n+write \"Referer: http://localhost:8001/?.kr=xs\\r\\n\"\n+write \"Accept-Language: en-US\\r\\n\"\n+write \"Accept-Encoding: gzip, deflate\\r\\n\"\n+write \"User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko\\r\\n\"\n+write \"Host: localhost:8001\\r\\n\"\n+write \"Content-Length: 10\\r\\n\"\n+write \"Connection: Keep-Alive\\r\\n\"\n+write \"Cache-Control: no-cache\\r\\n\"\n+#write \"Authorization: Basic am9lOndlbGNvbWU=\\r\\n\"\n+write \"\\r\\n\"\n+\n+# Message \"Hi\"\n+write [0xc2 0x80 0x02]\n+write \"Hi\"\n+\n+# reconnect\n+write [0x01 0x30 0x31 0xc3 0xbf]\n+\n+read \"HTTP/1.1 200 OK\\r\\n\"\n+read \"Content-Length: 0\\r\\n\"\n+read \"Content-Type: text/plain;charset=UTF-8\\r\\n\"\n+read /Date: .*/ \"\\r\\n\"\n+read \"Server: Kaazing Gateway\\r\\n\"\n+read \"\\r\\n\"\n+\n+read notify CREATED\n+\n+write await RESPONSE_RECEIVED\n+\n+# Do a clean close according to the wseb spec\n+write \"POST \"\n+write ${up}\n+write \" HTTP/1.1\\r\\n\"\n+write \"Accept: */*\\r\\n\"\n+write \"Content-Type: text/plain; charset=utf-8\\r\\n\"\n+write \"Referer: http://localhost:8001/?.kr=xs\\r\\n\"\n+write \"Accept-Language: en-US\\r\\n\"\n+write \"Accept-Encoding: gzip, deflate\\r\\n\"\n+write \"User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko\\r\\n\"\n+write \"Host: localhost:8001\\r\\n\"\n+write \"Content-Length: 10\\r\\n\"\n+write \"Connection: Keep-Alive\\r\\n\"\n+write \"Cache-Control: no-cache\\r\\n\"\n+write \"Authorization: Basic am9lOndlbGNvbWU=\\r\\n\"\n+write \"\\r\\n\"\n+\n+# Request WS Connection Close\n+write [0x01 0x30 0x32 0xc3 0xbf]\n+\n+# always end with reconnect frame per wseb spec\n+write [0x01 0x30 0x31 0xc3 0xbf]\n+\n+read \"HTTP/1.1 200 OK\\r\\n\"\n+read \"Content-Length: 0\\r\\n\"\n+read \"Content-Type: text/plain;charset=UTF-8\\r\\n\"\n+read /Date: .*/ \"\\r\\n\"","path":"transport/wseb/src/test/scripts/org/kaazing/gateway/transport/wseb/up.and.down.streams.http.no.authentication.rpt","position":96,"original_position":96,"commit_id":"d90232ebfcd322b1c6dbd296948d4bde01b244b5","original_commit_id":"d90232ebfcd322b1c6dbd296948d4bde01b244b5","user":{"login":"krismcqueen","id":9200734,"avatar_url":"https://avatars.githubusercontent.com/u/9200734?v=3","gravatar_id":"","url":"https://api.github.com/users/krismcqueen","html_url":"https://github.com/krismcqueen","followers_url":"https://api.github.com/users/krismcqueen/followers","following_url":"https://api.github.com/users/krismcqueen/following{/other_user}","gists_url":"https://api.github.com/users/krismcqueen/gists{/gist_id}","starred_url":"https://api.github.com/users/krismcqueen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krismcqueen/subscriptions","organizations_url":"https://api.github.com/users/krismcqueen/orgs","repos_url":"https://api.github.com/users/krismcqueen/repos","events_url":"https://api.github.com/users/krismcqueen/events{/privacy}","received_events_url":"https://api.github.com/users/krismcqueen/received_events","type":"User","site_admin":false},"body":"pull into expression","created_at":"2015-06-25T01:07:56Z","updated_at":"2015-06-25T01:07:56Z","html_url":"https://github.com/kaazing/gateway/pull/212#discussion_r33214327","pull_request_url":"https://api.github.com/repos/kaazing/gateway/pulls/212","_links":{"self":{"href":"https://api.github.com/repos/kaazing/gateway/pulls/comments/33214327"},"html":{"href":"https://github.com/kaazing/gateway/pull/212#discussion_r33214327"},"pull_request":{"href":"https://api.github.com/repos/kaazing/gateway/pulls/212"}}},"pull_request":{"url":"https://api.github.com/repos/kaazing/gateway/pulls/212","id":38501111,"html_url":"https://github.com/kaazing/gateway/pull/212","diff_url":"https://github.com/kaazing/gateway/pull/212.diff","patch_url":"https://github.com/kaazing/gateway/pull/212.patch","issue_url":"https://api.github.com/repos/kaazing/gateway/issues/212","number":212,"state":"open","locked":false,"title":"Upstream and downstream shouldn't have to go through authentication.","user":{"login":"jitsni","id":5131125,"avatar_url":"https://avatars.githubusercontent.com/u/5131125?v=3","gravatar_id":"","url":"https://api.github.com/users/jitsni","html_url":"https://github.com/jitsni","followers_url":"https://api.github.com/users/jitsni/followers","following_url":"https://api.github.com/users/jitsni/following{/other_user}","gists_url":"https://api.github.com/users/jitsni/gists{/gist_id}","starred_url":"https://api.github.com/users/jitsni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jitsni/subscriptions","organizations_url":"https://api.github.com/users/jitsni/orgs","repos_url":"https://api.github.com/users/jitsni/repos","events_url":"https://api.github.com/users/jitsni/events{/privacy}","received_events_url":"https://api.github.com/users/jitsni/received_events","type":"User","site_admin":false},"body":"* Upstream and downstream don't have to go through authentication\r\nThere are two code paths for wse:\r\n1) tcp | http | httpxe | wse\r\n2) tcp | http | wse\r\n\r\nIn the second case, http layer doesn't get REALM_NAME security option for\r\nupstream/downstream addresses. But in the first case, it does get REALM_NAME\r\nsecurity option. Hence, the security filters try to do authentication for\r\nupstream and downstream requests. This needs to be fixed similar to the second case.\r\n\r\n* cross-site-constraint is not getting propagated to httpxe layer while\r\nconstructing upstream and downstream resource addresses. This causes\r\nissues if the page is loaded from some other website even though\r\nthe <cross-site-constraint> specified to be \"*\"","created_at":"2015-06-25T00:14:07Z","updated_at":"2015-06-25T01:07:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a3e136daf6318509209ef628b1fd160a926d004","assignee":{"login":"krismcqueen","id":9200734,"avatar_url":"https://avatars.githubusercontent.com/u/9200734?v=3","gravatar_id":"","url":"https://api.github.com/users/krismcqueen","html_url":"https://github.com/krismcqueen","followers_url":"https://api.github.com/users/krismcqueen/followers","following_url":"https://api.github.com/users/krismcqueen/following{/other_user}","gists_url":"https://api.github.com/users/krismcqueen/gists{/gist_id}","starred_url":"https://api.github.com/users/krismcqueen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krismcqueen/subscriptions","organizations_url":"https://api.github.com/users/krismcqueen/orgs","repos_url":"https://api.github.com/users/krismcqueen/repos","events_url":"https://api.github.com/users/krismcqueen/events{/privacy}","received_events_url":"https://api.github.com/users/krismcqueen/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kaazing/gateway/pulls/212/commits","review_comments_url":"https://api.github.com/repos/kaazing/gateway/pulls/212/comments","review_comment_url":"https://api.github.com/repos/kaazing/gateway/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaazing/gateway/issues/212/comments","statuses_url":"https://api.github.com/repos/kaazing/gateway/statuses/d90232ebfcd322b1c6dbd296948d4bde01b244b5","head":{"label":"jitsni:wse.propagate.security","ref":"wse.propagate.security","sha":"d90232ebfcd322b1c6dbd296948d4bde01b244b5","user":{"login":"jitsni","id":5131125,"avatar_url":"https://avatars.githubusercontent.com/u/5131125?v=3","gravatar_id":"","url":"https://api.github.com/users/jitsni","html_url":"https://github.com/jitsni","followers_url":"https://api.github.com/users/jitsni/followers","following_url":"https://api.github.com/users/jitsni/following{/other_user}","gists_url":"https://api.github.com/users/jitsni/gists{/gist_id}","starred_url":"https://api.github.com/users/jitsni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jitsni/subscriptions","organizations_url":"https://api.github.com/users/jitsni/orgs","repos_url":"https://api.github.com/users/jitsni/repos","events_url":"https://api.github.com/users/jitsni/events{/privacy}","received_events_url":"https://api.github.com/users/jitsni/received_events","type":"User","site_admin":false},"repo":{"id":31753015,"name":"gateway","full_name":"jitsni/gateway","owner":{"login":"jitsni","id":5131125,"avatar_url":"https://avatars.githubusercontent.com/u/5131125?v=3","gravatar_id":"","url":"https://api.github.com/users/jitsni","html_url":"https://github.com/jitsni","followers_url":"https://api.github.com/users/jitsni/followers","following_url":"https://api.github.com/users/jitsni/following{/other_user}","gists_url":"https://api.github.com/users/jitsni/gists{/gist_id}","starred_url":"https://api.github.com/users/jitsni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jitsni/subscriptions","organizations_url":"https://api.github.com/users/jitsni/orgs","repos_url":"https://api.github.com/users/jitsni/repos","events_url":"https://api.github.com/users/jitsni/events{/privacy}","received_events_url":"https://api.github.com/users/jitsni/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jitsni/gateway","description":"Gateway distribution","fork":true,"url":"https://api.github.com/repos/jitsni/gateway","forks_url":"https://api.github.com/repos/jitsni/gateway/forks","keys_url":"https://api.github.com/repos/jitsni/gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jitsni/gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jitsni/gateway/teams","hooks_url":"https://api.github.com/repos/jitsni/gateway/hooks","issue_events_url":"https://api.github.com/repos/jitsni/gateway/issues/events{/number}","events_url":"https://api.github.com/repos/jitsni/gateway/events","assignees_url":"https://api.github.com/repos/jitsni/gateway/assignees{/user}","branches_url":"https://api.github.com/repos/jitsni/gateway/branches{/branch}","tags_url":"https://api.github.com/repos/jitsni/gateway/tags","blobs_url":"https://api.github.com/repos/jitsni/gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jitsni/gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jitsni/gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/jitsni/gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jitsni/gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/jitsni/gateway/languages","stargazers_url":"https://api.github.com/repos/jitsni/gateway/stargazers","contributors_url":"https://api.github.com/repos/jitsni/gateway/contributors","subscribers_url":"https://api.github.com/repos/jitsni/gateway/subscribers","subscription_url":"https://api.github.com/repos/jitsni/gateway/subscription","commits_url":"https://api.github.com/repos/jitsni/gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/jitsni/gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/jitsni/gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/jitsni/gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/jitsni/gateway/contents/{+path}","compare_url":"https://api.github.com/repos/jitsni/gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jitsni/gateway/merges","archive_url":"https://api.github.com/repos/jitsni/gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jitsni/gateway/downloads","issues_url":"https://api.github.com/repos/jitsni/gateway/issues{/number}","pulls_url":"https://api.github.com/repos/jitsni/gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/jitsni/gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/jitsni/gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jitsni/gateway/labels{/name}","releases_url":"https://api.github.com/repos/jitsni/gateway/releases{/id}","created_at":"2015-03-06T04:46:53Z","updated_at":"2015-05-07T04:00:27Z","pushed_at":"2015-06-25T00:18:55Z","git_url":"git://github.com/jitsni/gateway.git","ssh_url":"git@github.com:jitsni/gateway.git","clone_url":"https://github.com/jitsni/gateway.git","svn_url":"https://github.com/jitsni/gateway","homepage":null,"size":9910,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"kaazing:develop","ref":"develop","sha":"1f89b2f37aaac114aacf6bd0707824bbc5d22ecd","user":{"login":"kaazing","id":1056680,"avatar_url":"https://avatars.githubusercontent.com/u/1056680?v=3","gravatar_id":"","url":"https://api.github.com/users/kaazing","html_url":"https://github.com/kaazing","followers_url":"https://api.github.com/users/kaazing/followers","following_url":"https://api.github.com/users/kaazing/following{/other_user}","gists_url":"https://api.github.com/users/kaazing/gists{/gist_id}","starred_url":"https://api.github.com/users/kaazing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaazing/subscriptions","organizations_url":"https://api.github.com/users/kaazing/orgs","repos_url":"https://api.github.com/users/kaazing/repos","events_url":"https://api.github.com/users/kaazing/events{/privacy}","received_events_url":"https://api.github.com/users/kaazing/received_events","type":"Organization","site_admin":false},"repo":{"id":26745548,"name":"gateway","full_name":"kaazing/gateway","owner":{"login":"kaazing","id":1056680,"avatar_url":"https://avatars.githubusercontent.com/u/1056680?v=3","gravatar_id":"","url":"https://api.github.com/users/kaazing","html_url":"https://github.com/kaazing","followers_url":"https://api.github.com/users/kaazing/followers","following_url":"https://api.github.com/users/kaazing/following{/other_user}","gists_url":"https://api.github.com/users/kaazing/gists{/gist_id}","starred_url":"https://api.github.com/users/kaazing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaazing/subscriptions","organizations_url":"https://api.github.com/users/kaazing/orgs","repos_url":"https://api.github.com/users/kaazing/repos","events_url":"https://api.github.com/users/kaazing/events{/privacy}","received_events_url":"https://api.github.com/users/kaazing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaazing/gateway","description":"Kaazing Gateway","fork":false,"url":"https://api.github.com/repos/kaazing/gateway","forks_url":"https://api.github.com/repos/kaazing/gateway/forks","keys_url":"https://api.github.com/repos/kaazing/gateway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaazing/gateway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaazing/gateway/teams","hooks_url":"https://api.github.com/repos/kaazing/gateway/hooks","issue_events_url":"https://api.github.com/repos/kaazing/gateway/issues/events{/number}","events_url":"https://api.github.com/repos/kaazing/gateway/events","assignees_url":"https://api.github.com/repos/kaazing/gateway/assignees{/user}","branches_url":"https://api.github.com/repos/kaazing/gateway/branches{/branch}","tags_url":"https://api.github.com/repos/kaazing/gateway/tags","blobs_url":"https://api.github.com/repos/kaazing/gateway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaazing/gateway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaazing/gateway/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaazing/gateway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaazing/gateway/statuses/{sha}","languages_url":"https://api.github.com/repos/kaazing/gateway/languages","stargazers_url":"https://api.github.com/repos/kaazing/gateway/stargazers","contributors_url":"https://api.github.com/repos/kaazing/gateway/contributors","subscribers_url":"https://api.github.com/repos/kaazing/gateway/subscribers","subscription_url":"https://api.github.com/repos/kaazing/gateway/subscription","commits_url":"https://api.github.com/repos/kaazing/gateway/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaazing/gateway/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaazing/gateway/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaazing/gateway/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaazing/gateway/contents/{+path}","compare_url":"https://api.github.com/repos/kaazing/gateway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaazing/gateway/merges","archive_url":"https://api.github.com/repos/kaazing/gateway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaazing/gateway/downloads","issues_url":"https://api.github.com/repos/kaazing/gateway/issues{/number}","pulls_url":"https://api.github.com/repos/kaazing/gateway/pulls{/number}","milestones_url":"https://api.github.com/repos/kaazing/gateway/milestones{/number}","notifications_url":"https://api.github.com/repos/kaazing/gateway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaazing/gateway/labels{/name}","releases_url":"https://api.github.com/repos/kaazing/gateway/releases{/id}","created_at":"2014-11-17T07:40:57Z","updated_at":"2015-06-23T08:57:08Z","pushed_at":"2015-06-25T00:47:17Z","git_url":"git://github.com/kaazing/gateway.git","ssh_url":"git@github.com:kaazing/gateway.git","clone_url":"https://github.com/kaazing/gateway.git","svn_url":"https://github.com/kaazing/gateway","homepage":"","size":11481,"stargazers_count":26,"watchers_count":26,"language":"Java","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":38,"forks":20,"open_issues":38,"watchers":26,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/kaazing/gateway/pulls/212"},"html":{"href":"https://github.com/kaazing/gateway/pull/212"},"issue":{"href":"https://api.github.com/repos/kaazing/gateway/issues/212"},"comments":{"href":"https://api.github.com/repos/kaazing/gateway/issues/212/comments"},"review_comments":{"href":"https://api.github.com/repos/kaazing/gateway/pulls/212/comments"},"review_comment":{"href":"https://api.github.com/repos/kaazing/gateway/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaazing/gateway/pulls/212/commits"},"statuses":{"href":"https://api.github.com/repos/kaazing/gateway/statuses/d90232ebfcd322b1c6dbd296948d4bde01b244b5"}}}}