{"action":"created","comment":{"url":"https://api.github.com/repos/control-center/serviced/pulls/comments/79841018","id":79841018,"diff_hunk":"@@ -141,13 +142,16 @@ func (mux *TCPMux) muxConnection(conn net.Conn) {\n \t// make sure that we don't block indefinitely\n \tconn.SetReadDeadline(time.Now().Add(time.Second * 5))\n \n-\t// Read in the mux header (a 6-byte representation of a TCP address)\n-\tmuxHeader := make([]byte, 6)\n-\tif _, err := conn.Read(muxHeader); err != nil {\n+\t// Read in the authenticated mux header\n+\tauthMuxHeader, err := auth.ReadMuxHeader(conn)\n+\tif err != nil {\n \t\tlog.WithError(err).Warn(\"Unable to read valid mux header. Closing connection\")\n \t\tconn.Close()\n \t\treturn\n \t}\n+\t// TODO retrieve and validate the identity of the sender","path":"proxy/mux.go","position":22,"original_position":22,"commit_id":"dc18a9b83dd02ed3d1dd1189273551274b7a25eb","original_commit_id":"b8124f300ddf0865b94c0040e8f8eb7494500f79","user":{"login":"iancmcc","id":57971,"avatar_url":"https://avatars.githubusercontent.com/u/57971?v=3","gravatar_id":"","url":"https://api.github.com/users/iancmcc","html_url":"https://github.com/iancmcc","followers_url":"https://api.github.com/users/iancmcc/followers","following_url":"https://api.github.com/users/iancmcc/following{/other_user}","gists_url":"https://api.github.com/users/iancmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/iancmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iancmcc/subscriptions","organizations_url":"https://api.github.com/users/iancmcc/orgs","repos_url":"https://api.github.com/users/iancmcc/repos","events_url":"https://api.github.com/users/iancmcc/events{/privacy}","received_events_url":"https://api.github.com/users/iancmcc/received_events","type":"User","site_admin":false},"body":"Yes, this will be accomplished in the authorization stage of this feature. The current PR is for the authentication framework; nothing is rejected yet.","created_at":"2016-09-21T14:06:53Z","updated_at":"2016-09-21T14:06:53Z","html_url":"https://github.com/control-center/serviced/pull/2975#discussion_r79841018","pull_request_url":"https://api.github.com/repos/control-center/serviced/pulls/2975","_links":{"self":{"href":"https://api.github.com/repos/control-center/serviced/pulls/comments/79841018"},"html":{"href":"https://github.com/control-center/serviced/pull/2975#discussion_r79841018"},"pull_request":{"href":"https://api.github.com/repos/control-center/serviced/pulls/2975"}}},"pull_request":{"url":"https://api.github.com/repos/control-center/serviced/pulls/2975","id":85467196,"html_url":"https://github.com/control-center/serviced/pull/2975","diff_url":"https://github.com/control-center/serviced/pull/2975.diff","patch_url":"https://github.com/control-center/serviced/pull/2975.patch","issue_url":"https://api.github.com/repos/control-center/serviced/issues/2975","number":2975,"state":"open","locked":false,"title":"Add host authentication framework","user":{"login":"iancmcc","id":57971,"avatar_url":"https://avatars.githubusercontent.com/u/57971?v=3","gravatar_id":"","url":"https://api.github.com/users/iancmcc","html_url":"https://github.com/iancmcc","followers_url":"https://api.github.com/users/iancmcc/followers","following_url":"https://api.github.com/users/iancmcc/following{/other_user}","gists_url":"https://api.github.com/users/iancmcc/gists{/gist_id}","starred_url":"https://api.github.com/users/iancmcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iancmcc/subscriptions","organizations_url":"https://api.github.com/users/iancmcc/orgs","repos_url":"https://api.github.com/users/iancmcc/repos","events_url":"https://api.github.com/users/iancmcc/events{/privacy}","received_events_url":"https://api.github.com/users/iancmcc/received_events","type":"User","site_admin":false},"body":"**Please do not merge this yet.**\r\n\r\nThis PR adds key-based host authentication to serviced. When a host is added to the system on the master, the master generates an RSA key pair and gives it to the operator. The operator must then go to the host that was added and use `serviced host register KEYFILE` to register that host using that key pair. \r\n\r\nFrom then on, the host will automatically request an authentication token from the master every hour (configurable). That token will be needed to make mux connections, RPC requests, and REST requests. The token is signed by the master and contains information about the host's permissions, as well as a public key specific to that host that can be used to verify the request itself.","created_at":"2016-09-15T19:42:28Z","updated_at":"2016-09-21T14:06:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6483ccef462e28ae0c789172c961c19dc5f6c437","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/control-center/serviced/pulls/2975/commits","review_comments_url":"https://api.github.com/repos/control-center/serviced/pulls/2975/comments","review_comment_url":"https://api.github.com/repos/control-center/serviced/pulls/comments{/number}","comments_url":"https://api.github.com/repos/control-center/serviced/issues/2975/comments","statuses_url":"https://api.github.com/repos/control-center/serviced/statuses/dc18a9b83dd02ed3d1dd1189273551274b7a25eb","head":{"label":"control-center:feature/delegate-auth","ref":"feature/delegate-auth","sha":"dc18a9b83dd02ed3d1dd1189273551274b7a25eb","user":{"login":"control-center","id":8160673,"avatar_url":"https://avatars.githubusercontent.com/u/8160673?v=3","gravatar_id":"","url":"https://api.github.com/users/control-center","html_url":"https://github.com/control-center","followers_url":"https://api.github.com/users/control-center/followers","following_url":"https://api.github.com/users/control-center/following{/other_user}","gists_url":"https://api.github.com/users/control-center/gists{/gist_id}","starred_url":"https://api.github.com/users/control-center/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/control-center/subscriptions","organizations_url":"https://api.github.com/users/control-center/orgs","repos_url":"https://api.github.com/users/control-center/repos","events_url":"https://api.github.com/users/control-center/events{/privacy}","received_events_url":"https://api.github.com/users/control-center/received_events","type":"Organization","site_admin":false},"repo":{"id":11929217,"name":"serviced","full_name":"control-center/serviced","owner":{"login":"control-center","id":8160673,"avatar_url":"https://avatars.githubusercontent.com/u/8160673?v=3","gravatar_id":"","url":"https://api.github.com/users/control-center","html_url":"https://github.com/control-center","followers_url":"https://api.github.com/users/control-center/followers","following_url":"https://api.github.com/users/control-center/following{/other_user}","gists_url":"https://api.github.com/users/control-center/gists{/gist_id}","starred_url":"https://api.github.com/users/control-center/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/control-center/subscriptions","organizations_url":"https://api.github.com/users/control-center/orgs","repos_url":"https://api.github.com/users/control-center/repos","events_url":"https://api.github.com/users/control-center/events{/privacy}","received_events_url":"https://api.github.com/users/control-center/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/control-center/serviced","description":"Serviced is a PaaS runtime. It allows users to create, manage and scale services in a uniform way.","fork":false,"url":"https://api.github.com/repos/control-center/serviced","forks_url":"https://api.github.com/repos/control-center/serviced/forks","keys_url":"https://api.github.com/repos/control-center/serviced/keys{/key_id}","collaborators_url":"https://api.github.com/repos/control-center/serviced/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/control-center/serviced/teams","hooks_url":"https://api.github.com/repos/control-center/serviced/hooks","issue_events_url":"https://api.github.com/repos/control-center/serviced/issues/events{/number}","events_url":"https://api.github.com/repos/control-center/serviced/events","assignees_url":"https://api.github.com/repos/control-center/serviced/assignees{/user}","branches_url":"https://api.github.com/repos/control-center/serviced/branches{/branch}","tags_url":"https://api.github.com/repos/control-center/serviced/tags","blobs_url":"https://api.github.com/repos/control-center/serviced/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/control-center/serviced/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/control-center/serviced/git/refs{/sha}","trees_url":"https://api.github.com/repos/control-center/serviced/git/trees{/sha}","statuses_url":"https://api.github.com/repos/control-center/serviced/statuses/{sha}","languages_url":"https://api.github.com/repos/control-center/serviced/languages","stargazers_url":"https://api.github.com/repos/control-center/serviced/stargazers","contributors_url":"https://api.github.com/repos/control-center/serviced/contributors","subscribers_url":"https://api.github.com/repos/control-center/serviced/subscribers","subscription_url":"https://api.github.com/repos/control-center/serviced/subscription","commits_url":"https://api.github.com/repos/control-center/serviced/commits{/sha}","git_commits_url":"https://api.github.com/repos/control-center/serviced/git/commits{/sha}","comments_url":"https://api.github.com/repos/control-center/serviced/comments{/number}","issue_comment_url":"https://api.github.com/repos/control-center/serviced/issues/comments{/number}","contents_url":"https://api.github.com/repos/control-center/serviced/contents/{+path}","compare_url":"https://api.github.com/repos/control-center/serviced/compare/{base}...{head}","merges_url":"https://api.github.com/repos/control-center/serviced/merges","archive_url":"https://api.github.com/repos/control-center/serviced/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/control-center/serviced/downloads","issues_url":"https://api.github.com/repos/control-center/serviced/issues{/number}","pulls_url":"https://api.github.com/repos/control-center/serviced/pulls{/number}","milestones_url":"https://api.github.com/repos/control-center/serviced/milestones{/number}","notifications_url":"https://api.github.com/repos/control-center/serviced/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/control-center/serviced/labels{/name}","releases_url":"https://api.github.com/repos/control-center/serviced/releases{/id}","deployments_url":"https://api.github.com/repos/control-center/serviced/deployments","created_at":"2013-08-06T16:45:00Z","updated_at":"2016-09-01T22:28:08Z","pushed_at":"2016-09-21T13:21:04Z","git_url":"git://github.com/control-center/serviced.git","ssh_url":"git@github.com:control-center/serviced.git","clone_url":"https://github.com/control-center/serviced.git","svn_url":"https://github.com/control-center/serviced","homepage":null,"size":88110,"stargazers_count":94,"watchers_count":94,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":9,"forks":13,"open_issues":9,"watchers":94,"default_branch":"develop"}},"base":{"label":"control-center:develop","ref":"develop","sha":"60827a3a8c022da1556f8c00077735c6a3661cf0","user":{"login":"control-center","id":8160673,"avatar_url":"https://avatars.githubusercontent.com/u/8160673?v=3","gravatar_id":"","url":"https://api.github.com/users/control-center","html_url":"https://github.com/control-center","followers_url":"https://api.github.com/users/control-center/followers","following_url":"https://api.github.com/users/control-center/following{/other_user}","gists_url":"https://api.github.com/users/control-center/gists{/gist_id}","starred_url":"https://api.github.com/users/control-center/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/control-center/subscriptions","organizations_url":"https://api.github.com/users/control-center/orgs","repos_url":"https://api.github.com/users/control-center/repos","events_url":"https://api.github.com/users/control-center/events{/privacy}","received_events_url":"https://api.github.com/users/control-center/received_events","type":"Organization","site_admin":false},"repo":{"id":11929217,"name":"serviced","full_name":"control-center/serviced","owner":{"login":"control-center","id":8160673,"avatar_url":"https://avatars.githubusercontent.com/u/8160673?v=3","gravatar_id":"","url":"https://api.github.com/users/control-center","html_url":"https://github.com/control-center","followers_url":"https://api.github.com/users/control-center/followers","following_url":"https://api.github.com/users/control-center/following{/other_user}","gists_url":"https://api.github.com/users/control-center/gists{/gist_id}","starred_url":"https://api.github.com/users/control-center/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/control-center/subscriptions","organizations_url":"https://api.github.com/users/control-center/orgs","repos_url":"https://api.github.com/users/control-center/repos","events_url":"https://api.github.com/users/control-center/events{/privacy}","received_events_url":"https://api.github.com/users/control-center/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/control-center/serviced","description":"Serviced is a PaaS runtime. It allows users to create, manage and scale services in a uniform way.","fork":false,"url":"https://api.github.com/repos/control-center/serviced","forks_url":"https://api.github.com/repos/control-center/serviced/forks","keys_url":"https://api.github.com/repos/control-center/serviced/keys{/key_id}","collaborators_url":"https://api.github.com/repos/control-center/serviced/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/control-center/serviced/teams","hooks_url":"https://api.github.com/repos/control-center/serviced/hooks","issue_events_url":"https://api.github.com/repos/control-center/serviced/issues/events{/number}","events_url":"https://api.github.com/repos/control-center/serviced/events","assignees_url":"https://api.github.com/repos/control-center/serviced/assignees{/user}","branches_url":"https://api.github.com/repos/control-center/serviced/branches{/branch}","tags_url":"https://api.github.com/repos/control-center/serviced/tags","blobs_url":"https://api.github.com/repos/control-center/serviced/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/control-center/serviced/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/control-center/serviced/git/refs{/sha}","trees_url":"https://api.github.com/repos/control-center/serviced/git/trees{/sha}","statuses_url":"https://api.github.com/repos/control-center/serviced/statuses/{sha}","languages_url":"https://api.github.com/repos/control-center/serviced/languages","stargazers_url":"https://api.github.com/repos/control-center/serviced/stargazers","contributors_url":"https://api.github.com/repos/control-center/serviced/contributors","subscribers_url":"https://api.github.com/repos/control-center/serviced/subscribers","subscription_url":"https://api.github.com/repos/control-center/serviced/subscription","commits_url":"https://api.github.com/repos/control-center/serviced/commits{/sha}","git_commits_url":"https://api.github.com/repos/control-center/serviced/git/commits{/sha}","comments_url":"https://api.github.com/repos/control-center/serviced/comments{/number}","issue_comment_url":"https://api.github.com/repos/control-center/serviced/issues/comments{/number}","contents_url":"https://api.github.com/repos/control-center/serviced/contents/{+path}","compare_url":"https://api.github.com/repos/control-center/serviced/compare/{base}...{head}","merges_url":"https://api.github.com/repos/control-center/serviced/merges","archive_url":"https://api.github.com/repos/control-center/serviced/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/control-center/serviced/downloads","issues_url":"https://api.github.com/repos/control-center/serviced/issues{/number}","pulls_url":"https://api.github.com/repos/control-center/serviced/pulls{/number}","milestones_url":"https://api.github.com/repos/control-center/serviced/milestones{/number}","notifications_url":"https://api.github.com/repos/control-center/serviced/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/control-center/serviced/labels{/name}","releases_url":"https://api.github.com/repos/control-center/serviced/releases{/id}","deployments_url":"https://api.github.com/repos/control-center/serviced/deployments","created_at":"2013-08-06T16:45:00Z","updated_at":"2016-09-01T22:28:08Z","pushed_at":"2016-09-21T13:21:04Z","git_url":"git://github.com/control-center/serviced.git","ssh_url":"git@github.com:control-center/serviced.git","clone_url":"https://github.com/control-center/serviced.git","svn_url":"https://github.com/control-center/serviced","homepage":null,"size":88110,"stargazers_count":94,"watchers_count":94,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":9,"forks":13,"open_issues":9,"watchers":94,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/control-center/serviced/pulls/2975"},"html":{"href":"https://github.com/control-center/serviced/pull/2975"},"issue":{"href":"https://api.github.com/repos/control-center/serviced/issues/2975"},"comments":{"href":"https://api.github.com/repos/control-center/serviced/issues/2975/comments"},"review_comments":{"href":"https://api.github.com/repos/control-center/serviced/pulls/2975/comments"},"review_comment":{"href":"https://api.github.com/repos/control-center/serviced/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/control-center/serviced/pulls/2975/commits"},"statuses":{"href":"https://api.github.com/repos/control-center/serviced/statuses/dc18a9b83dd02ed3d1dd1189273551274b7a25eb"}}}}
{"actor":{"display_login":"iancmcc"}}