{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/vic/pulls/comments/67590617","id":67590617,"diff_hunk":"@@ -125,12 +131,60 @@ func (d *Dispatcher) initDiagnosticLogs(conf *metadata.VirtualContainerHostConfi\n \t}\n }\n \n+func (d *Dispatcher) registerExtension(conf *metadata.VirtualContainerHostConfigSpec) error {\n+\tlog.Infoln(\"Registering VCH as a vSphere extension\")\n+\textensionManager := object.NewExtensionManager(d.session.Vim25())\n+\textension := types.Extension{\n+\t\tDescription: &types.Description{\n+\t\t\tLabel:   \"VIC\",\n+\t\t\tSummary: \"vSphere Integrated Containers Virtual Container Host\",\n+\t\t},\n+\t\tCompany: \"VMware, Inc.\",\n+\t\tVersion: \"0.2\",\n+\t\tKey:     \"com.vmware.vic\",\n+\t}","path":"lib/install/management/dispatcher.go","position":49,"original_position":49,"commit_id":"c3ef77684b5f72b5772b6137c86fa51c847d302d","original_commit_id":"c3ef77684b5f72b5772b6137c86fa51c847d302d","user":{"login":"caglar10ur","id":205498,"avatar_url":"https://avatars.githubusercontent.com/u/205498?v=3","gravatar_id":"","url":"https://api.github.com/users/caglar10ur","html_url":"https://github.com/caglar10ur","followers_url":"https://api.github.com/users/caglar10ur/followers","following_url":"https://api.github.com/users/caglar10ur/following{/other_user}","gists_url":"https://api.github.com/users/caglar10ur/gists{/gist_id}","starred_url":"https://api.github.com/users/caglar10ur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caglar10ur/subscriptions","organizations_url":"https://api.github.com/users/caglar10ur/orgs","repos_url":"https://api.github.com/users/caglar10ur/repos","events_url":"https://api.github.com/users/caglar10ur/events{/privacy}","received_events_url":"https://api.github.com/users/caglar10ur/received_events","type":"User","site_admin":false},"body":"Can you move them to const section so that we can see as soon as we open the file. Also where is that 0.2 coming from :) ?","created_at":"2016-06-18T00:18:47Z","updated_at":"2016-06-18T00:18:47Z","html_url":"https://github.com/vmware/vic/pull/1134#discussion_r67590617","pull_request_url":"https://api.github.com/repos/vmware/vic/pulls/1134","_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments/67590617"},"html":{"href":"https://github.com/vmware/vic/pull/1134#discussion_r67590617"},"pull_request":{"href":"https://api.github.com/repos/vmware/vic/pulls/1134"}}},"pull_request":{"url":"https://api.github.com/repos/vmware/vic/pulls/1134","id":74303603,"html_url":"https://github.com/vmware/vic/pull/1134","diff_url":"https://github.com/vmware/vic/pull/1134.diff","patch_url":"https://github.com/vmware/vic/pull/1134.patch","issue_url":"https://api.github.com/repos/vmware/vic/issues/1134","number":1134,"state":"open","locked":false,"title":"RFC: Registering a vSphere Extension for eventual use w/ RBAC","user":{"login":"gigawhitlocks","id":3743903,"avatar_url":"https://avatars.githubusercontent.com/u/3743903?v=3","gravatar_id":"","url":"https://api.github.com/users/gigawhitlocks","html_url":"https://github.com/gigawhitlocks","followers_url":"https://api.github.com/users/gigawhitlocks/followers","following_url":"https://api.github.com/users/gigawhitlocks/following{/other_user}","gists_url":"https://api.github.com/users/gigawhitlocks/gists{/gist_id}","starred_url":"https://api.github.com/users/gigawhitlocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gigawhitlocks/subscriptions","organizations_url":"https://api.github.com/users/gigawhitlocks/orgs","repos_url":"https://api.github.com/users/gigawhitlocks/repos","events_url":"https://api.github.com/users/gigawhitlocks/events{/privacy}","received_events_url":"https://api.github.com/users/gigawhitlocks/received_events","type":"User","site_admin":false},"body":"_This is currently WIP but it's time to start taking feedback_\r\n\r\nThis PR adds a routine to vic-machine to register a vSphere extension for us to do certificate-based authentication against. This is in lieu of creating a 'service account' or having a VI admin do this. Presumably more advanced RBAC may involve SSO-based authentication & authorization but this change allows the VCH to have the permissions allowed to it by the vSphere extension API without storing the VI admin's credentials in plain text.\r\n\r\nIt modifies the shared vSphere Session object to prefer certificates to username/password, and uses the extraconfig library to store the generated cert/key added to the extension.\r\n\r\nTODO:\r\n* More extensive testing (so far I've only tested against vSphere and behavior against ESX is undefined -- this will _obviously_ be addressed before merge) & test cases need to be written\r\n\r\n* Strip the VI admin credentials from anywhere they might appear _outside of this change_ and outside of vic-machine (which needs them to bootstrap the install process).\r\n\r\n* Anything y'all suggest\r\n\r\n* If @emlin merges `delete` before this gets in I'll have to add a routine to that to unregister the extension also.","created_at":"2016-06-17T20:52:09Z","updated_at":"2016-06-18T00:18:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e97b9eb2e7c6ea1b8f26bfc550780b0cd6be2b7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vmware/vic/pulls/1134/commits","review_comments_url":"https://api.github.com/repos/vmware/vic/pulls/1134/comments","review_comment_url":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/vic/issues/1134/comments","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/c3ef77684b5f72b5772b6137c86fa51c847d302d","head":{"label":"gigawhitlocks:rbac-extension","ref":"rbac-extension","sha":"c3ef77684b5f72b5772b6137c86fa51c847d302d","user":{"login":"gigawhitlocks","id":3743903,"avatar_url":"https://avatars.githubusercontent.com/u/3743903?v=3","gravatar_id":"","url":"https://api.github.com/users/gigawhitlocks","html_url":"https://github.com/gigawhitlocks","followers_url":"https://api.github.com/users/gigawhitlocks/followers","following_url":"https://api.github.com/users/gigawhitlocks/following{/other_user}","gists_url":"https://api.github.com/users/gigawhitlocks/gists{/gist_id}","starred_url":"https://api.github.com/users/gigawhitlocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gigawhitlocks/subscriptions","organizations_url":"https://api.github.com/users/gigawhitlocks/orgs","repos_url":"https://api.github.com/users/gigawhitlocks/repos","events_url":"https://api.github.com/users/gigawhitlocks/events{/privacy}","received_events_url":"https://api.github.com/users/gigawhitlocks/received_events","type":"User","site_admin":false},"repo":{"id":55534993,"name":"vic","full_name":"gigawhitlocks/vic","owner":{"login":"gigawhitlocks","id":3743903,"avatar_url":"https://avatars.githubusercontent.com/u/3743903?v=3","gravatar_id":"","url":"https://api.github.com/users/gigawhitlocks","html_url":"https://github.com/gigawhitlocks","followers_url":"https://api.github.com/users/gigawhitlocks/followers","following_url":"https://api.github.com/users/gigawhitlocks/following{/other_user}","gists_url":"https://api.github.com/users/gigawhitlocks/gists{/gist_id}","starred_url":"https://api.github.com/users/gigawhitlocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gigawhitlocks/subscriptions","organizations_url":"https://api.github.com/users/gigawhitlocks/orgs","repos_url":"https://api.github.com/users/gigawhitlocks/repos","events_url":"https://api.github.com/users/gigawhitlocks/events{/privacy}","received_events_url":"https://api.github.com/users/gigawhitlocks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gigawhitlocks/vic","description":"Integrated containers on vSphere","fork":true,"url":"https://api.github.com/repos/gigawhitlocks/vic","forks_url":"https://api.github.com/repos/gigawhitlocks/vic/forks","keys_url":"https://api.github.com/repos/gigawhitlocks/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gigawhitlocks/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gigawhitlocks/vic/teams","hooks_url":"https://api.github.com/repos/gigawhitlocks/vic/hooks","issue_events_url":"https://api.github.com/repos/gigawhitlocks/vic/issues/events{/number}","events_url":"https://api.github.com/repos/gigawhitlocks/vic/events","assignees_url":"https://api.github.com/repos/gigawhitlocks/vic/assignees{/user}","branches_url":"https://api.github.com/repos/gigawhitlocks/vic/branches{/branch}","tags_url":"https://api.github.com/repos/gigawhitlocks/vic/tags","blobs_url":"https://api.github.com/repos/gigawhitlocks/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gigawhitlocks/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gigawhitlocks/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/gigawhitlocks/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gigawhitlocks/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/gigawhitlocks/vic/languages","stargazers_url":"https://api.github.com/repos/gigawhitlocks/vic/stargazers","contributors_url":"https://api.github.com/repos/gigawhitlocks/vic/contributors","subscribers_url":"https://api.github.com/repos/gigawhitlocks/vic/subscribers","subscription_url":"https://api.github.com/repos/gigawhitlocks/vic/subscription","commits_url":"https://api.github.com/repos/gigawhitlocks/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/gigawhitlocks/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/gigawhitlocks/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/gigawhitlocks/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/gigawhitlocks/vic/contents/{+path}","compare_url":"https://api.github.com/repos/gigawhitlocks/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gigawhitlocks/vic/merges","archive_url":"https://api.github.com/repos/gigawhitlocks/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gigawhitlocks/vic/downloads","issues_url":"https://api.github.com/repos/gigawhitlocks/vic/issues{/number}","pulls_url":"https://api.github.com/repos/gigawhitlocks/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/gigawhitlocks/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/gigawhitlocks/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gigawhitlocks/vic/labels{/name}","releases_url":"https://api.github.com/repos/gigawhitlocks/vic/releases{/id}","deployments_url":"https://api.github.com/repos/gigawhitlocks/vic/deployments","created_at":"2016-04-05T18:57:06Z","updated_at":"2016-04-05T18:57:13Z","pushed_at":"2016-06-17T22:53:34Z","git_url":"git://github.com/gigawhitlocks/vic.git","ssh_url":"git@github.com:gigawhitlocks/vic.git","clone_url":"https://github.com/gigawhitlocks/vic.git","svn_url":"https://github.com/gigawhitlocks/vic","homepage":null,"size":24125,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"vmware:master","ref":"master","sha":"d9f7a205751e1a7f0b1fec700006409e08d6ee0e","user":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"repo":{"id":49597898,"name":"vic","full_name":"vmware/vic","owner":{"login":"vmware","id":473334,"avatar_url":"https://avatars.githubusercontent.com/u/473334?v=3","gravatar_id":"","url":"https://api.github.com/users/vmware","html_url":"https://github.com/vmware","followers_url":"https://api.github.com/users/vmware/followers","following_url":"https://api.github.com/users/vmware/following{/other_user}","gists_url":"https://api.github.com/users/vmware/gists{/gist_id}","starred_url":"https://api.github.com/users/vmware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmware/subscriptions","organizations_url":"https://api.github.com/users/vmware/orgs","repos_url":"https://api.github.com/users/vmware/repos","events_url":"https://api.github.com/users/vmware/events{/privacy}","received_events_url":"https://api.github.com/users/vmware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vmware/vic","description":"Integrated containers on vSphere","fork":false,"url":"https://api.github.com/repos/vmware/vic","forks_url":"https://api.github.com/repos/vmware/vic/forks","keys_url":"https://api.github.com/repos/vmware/vic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/vic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/vic/teams","hooks_url":"https://api.github.com/repos/vmware/vic/hooks","issue_events_url":"https://api.github.com/repos/vmware/vic/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/vic/events","assignees_url":"https://api.github.com/repos/vmware/vic/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/vic/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/vic/tags","blobs_url":"https://api.github.com/repos/vmware/vic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/vic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/vic/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/vic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/vic/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/vic/languages","stargazers_url":"https://api.github.com/repos/vmware/vic/stargazers","contributors_url":"https://api.github.com/repos/vmware/vic/contributors","subscribers_url":"https://api.github.com/repos/vmware/vic/subscribers","subscription_url":"https://api.github.com/repos/vmware/vic/subscription","commits_url":"https://api.github.com/repos/vmware/vic/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/vic/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/vic/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/vic/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/vic/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/vic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/vic/merges","archive_url":"https://api.github.com/repos/vmware/vic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/vic/downloads","issues_url":"https://api.github.com/repos/vmware/vic/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/vic/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/vic/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/vic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/vic/labels{/name}","releases_url":"https://api.github.com/repos/vmware/vic/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/vic/deployments","created_at":"2016-01-13T19:53:57Z","updated_at":"2016-06-15T22:44:22Z","pushed_at":"2016-06-18T00:17:16Z","git_url":"git://github.com/vmware/vic.git","ssh_url":"git@github.com:vmware/vic.git","clone_url":"https://github.com/vmware/vic.git","svn_url":"https://github.com/vmware/vic","homepage":null,"size":62260,"stargazers_count":90,"watchers_count":90,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":36,"mirror_url":null,"open_issues_count":431,"forks":36,"open_issues":431,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/vic/pulls/1134"},"html":{"href":"https://github.com/vmware/vic/pull/1134"},"issue":{"href":"https://api.github.com/repos/vmware/vic/issues/1134"},"comments":{"href":"https://api.github.com/repos/vmware/vic/issues/1134/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/vic/pulls/1134/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/vic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/vic/pulls/1134/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/vic/statuses/c3ef77684b5f72b5772b6137c86fa51c847d302d"}}}}
{"actor":{"display_login":"caglar10ur"}}