{"action":"opened","number":88,"pull_request":{"url":"https://api.github.com/repos/apiman/apiman/pulls/88","id":31689021,"html_url":"https://github.com/apiman/apiman/pull/88","diff_url":"https://github.com/apiman/apiman/pull/88.diff","patch_url":"https://github.com/apiman/apiman/pull/88.patch","issue_url":"https://api.github.com/repos/apiman/apiman/issues/88","number":88,"state":"open","locked":false,"title":"Idea for transport secure: Concept 2","user":{"login":"msavy","id":423513,"avatar_url":"https://avatars.githubusercontent.com/u/423513?v=3","gravatar_id":"","url":"https://api.github.com/users/msavy","html_url":"https://github.com/msavy","followers_url":"https://api.github.com/users/msavy/followers","following_url":"https://api.github.com/users/msavy/following{/other_user}","gists_url":"https://api.github.com/users/msavy/gists{/gist_id}","starred_url":"https://api.github.com/users/msavy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msavy/subscriptions","organizations_url":"https://api.github.com/users/msavy/orgs","repos_url":"https://api.github.com/users/msavy/repos","events_url":"https://api.github.com/users/msavy/events{/privacy}","received_events_url":"https://api.github.com/users/msavy/received_events","type":"User","site_admin":false},"body":"I've spent a long while today working through a few different implementations of how to represent transport security in apiman. Although the implementations are simple, there are a wide range of security implications we need to consider.\r\n\r\nThis is my preferred idea vs concept 1, and turns out to be simpler, I think, but has a few downsides which are worth considering. We will also need to extend this in some way to try and make sure that side-channels (like policies making requests) and connectors (i.e. backend connections) obey the same rules (or at least dire warnings that isn't really secure otherwise).\r\n\r\nEssentially we simply encapsulate this logic into the request. \r\n\r\nAdvantages:\r\n - Encapsulates this into the request, keeps the implementation very simple\r\n - This object is forwarded onto various areas of the system, and they can use it to determine that they should also utilise secure connections\r\n - In the future we could consider methods of enforcing this security on the basis of the TLS status (e.g. add a connectSecure method for connectors and call that if request had transport security).\r\n\r\nDisadvantages:\r\n - Initially I had 'isTransportSecure' on the response, too. I deleted that because most stateful protocols don't include that information on the response (only on the request, obviously). The downside is that if we implement a stateless protocol that still has security but treats request and response separately then we'll probably need to add that back in.\r\n- Something could accidentally unset the isTransportSecure status, which would break security for anything that relies upon it. \r\n\r\nSome other ideas: ","created_at":"2015-03-22T15:05:49Z","updated_at":"2015-03-22T15:05:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apiman/apiman/pulls/88/commits","review_comments_url":"https://api.github.com/repos/apiman/apiman/pulls/88/comments","review_comment_url":"https://api.github.com/repos/apiman/apiman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apiman/apiman/issues/88/comments","statuses_url":"https://api.github.com/repos/apiman/apiman/statuses/492db7ad1e4dbf4a557d6ea75f592b772a0a2128","head":{"label":"msavy:idea-for-transport-secure-2","ref":"idea-for-transport-secure-2","sha":"492db7ad1e4dbf4a557d6ea75f592b772a0a2128","user":{"login":"msavy","id":423513,"avatar_url":"https://avatars.githubusercontent.com/u/423513?v=3","gravatar_id":"","url":"https://api.github.com/users/msavy","html_url":"https://github.com/msavy","followers_url":"https://api.github.com/users/msavy/followers","following_url":"https://api.github.com/users/msavy/following{/other_user}","gists_url":"https://api.github.com/users/msavy/gists{/gist_id}","starred_url":"https://api.github.com/users/msavy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msavy/subscriptions","organizations_url":"https://api.github.com/users/msavy/orgs","repos_url":"https://api.github.com/users/msavy/repos","events_url":"https://api.github.com/users/msavy/events{/privacy}","received_events_url":"https://api.github.com/users/msavy/received_events","type":"User","site_admin":false},"repo":{"id":22376591,"name":"apiman","full_name":"msavy/apiman","owner":{"login":"msavy","id":423513,"avatar_url":"https://avatars.githubusercontent.com/u/423513?v=3","gravatar_id":"","url":"https://api.github.com/users/msavy","html_url":"https://github.com/msavy","followers_url":"https://api.github.com/users/msavy/followers","following_url":"https://api.github.com/users/msavy/following{/other_user}","gists_url":"https://api.github.com/users/msavy/gists{/gist_id}","starred_url":"https://api.github.com/users/msavy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msavy/subscriptions","organizations_url":"https://api.github.com/users/msavy/orgs","repos_url":"https://api.github.com/users/msavy/repos","events_url":"https://api.github.com/users/msavy/events{/privacy}","received_events_url":"https://api.github.com/users/msavy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/msavy/apiman","description":"API Management","fork":true,"url":"https://api.github.com/repos/msavy/apiman","forks_url":"https://api.github.com/repos/msavy/apiman/forks","keys_url":"https://api.github.com/repos/msavy/apiman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/msavy/apiman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/msavy/apiman/teams","hooks_url":"https://api.github.com/repos/msavy/apiman/hooks","issue_events_url":"https://api.github.com/repos/msavy/apiman/issues/events{/number}","events_url":"https://api.github.com/repos/msavy/apiman/events","assignees_url":"https://api.github.com/repos/msavy/apiman/assignees{/user}","branches_url":"https://api.github.com/repos/msavy/apiman/branches{/branch}","tags_url":"https://api.github.com/repos/msavy/apiman/tags","blobs_url":"https://api.github.com/repos/msavy/apiman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/msavy/apiman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/msavy/apiman/git/refs{/sha}","trees_url":"https://api.github.com/repos/msavy/apiman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/msavy/apiman/statuses/{sha}","languages_url":"https://api.github.com/repos/msavy/apiman/languages","stargazers_url":"https://api.github.com/repos/msavy/apiman/stargazers","contributors_url":"https://api.github.com/repos/msavy/apiman/contributors","subscribers_url":"https://api.github.com/repos/msavy/apiman/subscribers","subscription_url":"https://api.github.com/repos/msavy/apiman/subscription","commits_url":"https://api.github.com/repos/msavy/apiman/commits{/sha}","git_commits_url":"https://api.github.com/repos/msavy/apiman/git/commits{/sha}","comments_url":"https://api.github.com/repos/msavy/apiman/comments{/number}","issue_comment_url":"https://api.github.com/repos/msavy/apiman/issues/comments{/number}","contents_url":"https://api.github.com/repos/msavy/apiman/contents/{+path}","compare_url":"https://api.github.com/repos/msavy/apiman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/msavy/apiman/merges","archive_url":"https://api.github.com/repos/msavy/apiman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/msavy/apiman/downloads","issues_url":"https://api.github.com/repos/msavy/apiman/issues{/number}","pulls_url":"https://api.github.com/repos/msavy/apiman/pulls{/number}","milestones_url":"https://api.github.com/repos/msavy/apiman/milestones{/number}","notifications_url":"https://api.github.com/repos/msavy/apiman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/msavy/apiman/labels{/name}","releases_url":"https://api.github.com/repos/msavy/apiman/releases{/id}","created_at":"2014-07-29T10:43:39Z","updated_at":"2015-02-14T08:32:20Z","pushed_at":"2015-03-22T14:45:53Z","git_url":"git://github.com/msavy/apiman.git","ssh_url":"git@github.com:msavy/apiman.git","clone_url":"https://github.com/msavy/apiman.git","svn_url":"https://github.com/msavy/apiman","homepage":null,"size":21889,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"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":"master"}},"base":{"label":"apiman:master","ref":"master","sha":"50938cf02f9e681af8507610cfdd9ef024842ead","user":{"login":"apiman","id":9597575,"avatar_url":"https://avatars.githubusercontent.com/u/9597575?v=3","gravatar_id":"","url":"https://api.github.com/users/apiman","html_url":"https://github.com/apiman","followers_url":"https://api.github.com/users/apiman/followers","following_url":"https://api.github.com/users/apiman/following{/other_user}","gists_url":"https://api.github.com/users/apiman/gists{/gist_id}","starred_url":"https://api.github.com/users/apiman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiman/subscriptions","organizations_url":"https://api.github.com/users/apiman/orgs","repos_url":"https://api.github.com/users/apiman/repos","events_url":"https://api.github.com/users/apiman/events{/privacy}","received_events_url":"https://api.github.com/users/apiman/received_events","type":"Organization","site_admin":false},"repo":{"id":12319410,"name":"apiman","full_name":"apiman/apiman","owner":{"login":"apiman","id":9597575,"avatar_url":"https://avatars.githubusercontent.com/u/9597575?v=3","gravatar_id":"","url":"https://api.github.com/users/apiman","html_url":"https://github.com/apiman","followers_url":"https://api.github.com/users/apiman/followers","following_url":"https://api.github.com/users/apiman/following{/other_user}","gists_url":"https://api.github.com/users/apiman/gists{/gist_id}","starred_url":"https://api.github.com/users/apiman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiman/subscriptions","organizations_url":"https://api.github.com/users/apiman/orgs","repos_url":"https://api.github.com/users/apiman/repos","events_url":"https://api.github.com/users/apiman/events{/privacy}","received_events_url":"https://api.github.com/users/apiman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apiman/apiman","description":"API Management","fork":false,"url":"https://api.github.com/repos/apiman/apiman","forks_url":"https://api.github.com/repos/apiman/apiman/forks","keys_url":"https://api.github.com/repos/apiman/apiman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apiman/apiman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apiman/apiman/teams","hooks_url":"https://api.github.com/repos/apiman/apiman/hooks","issue_events_url":"https://api.github.com/repos/apiman/apiman/issues/events{/number}","events_url":"https://api.github.com/repos/apiman/apiman/events","assignees_url":"https://api.github.com/repos/apiman/apiman/assignees{/user}","branches_url":"https://api.github.com/repos/apiman/apiman/branches{/branch}","tags_url":"https://api.github.com/repos/apiman/apiman/tags","blobs_url":"https://api.github.com/repos/apiman/apiman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apiman/apiman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apiman/apiman/git/refs{/sha}","trees_url":"https://api.github.com/repos/apiman/apiman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apiman/apiman/statuses/{sha}","languages_url":"https://api.github.com/repos/apiman/apiman/languages","stargazers_url":"https://api.github.com/repos/apiman/apiman/stargazers","contributors_url":"https://api.github.com/repos/apiman/apiman/contributors","subscribers_url":"https://api.github.com/repos/apiman/apiman/subscribers","subscription_url":"https://api.github.com/repos/apiman/apiman/subscription","commits_url":"https://api.github.com/repos/apiman/apiman/commits{/sha}","git_commits_url":"https://api.github.com/repos/apiman/apiman/git/commits{/sha}","comments_url":"https://api.github.com/repos/apiman/apiman/comments{/number}","issue_comment_url":"https://api.github.com/repos/apiman/apiman/issues/comments{/number}","contents_url":"https://api.github.com/repos/apiman/apiman/contents/{+path}","compare_url":"https://api.github.com/repos/apiman/apiman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apiman/apiman/merges","archive_url":"https://api.github.com/repos/apiman/apiman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apiman/apiman/downloads","issues_url":"https://api.github.com/repos/apiman/apiman/issues{/number}","pulls_url":"https://api.github.com/repos/apiman/apiman/pulls{/number}","milestones_url":"https://api.github.com/repos/apiman/apiman/milestones{/number}","notifications_url":"https://api.github.com/repos/apiman/apiman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apiman/apiman/labels{/name}","releases_url":"https://api.github.com/repos/apiman/apiman/releases{/id}","created_at":"2013-08-23T09:29:20Z","updated_at":"2015-03-21T11:18:18Z","pushed_at":"2015-03-22T14:51:54Z","git_url":"git://github.com/apiman/apiman.git","ssh_url":"git@github.com:apiman/apiman.git","clone_url":"https://github.com/apiman/apiman.git","svn_url":"https://github.com/apiman/apiman","homepage":null,"size":26021,"stargazers_count":29,"watchers_count":29,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":3,"forks":23,"open_issues":3,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apiman/apiman/pulls/88"},"html":{"href":"https://github.com/apiman/apiman/pull/88"},"issue":{"href":"https://api.github.com/repos/apiman/apiman/issues/88"},"comments":{"href":"https://api.github.com/repos/apiman/apiman/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/apiman/apiman/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/apiman/apiman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apiman/apiman/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/apiman/apiman/statuses/492db7ad1e4dbf4a557d6ea75f592b772a0a2128"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":84,"deletions":28,"changed_files":9}}