{"action":"created","comment":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments/71316734","id":71316734,"diff_hunk":"@@ -0,0 +1,67 @@\n+### Introduction\n+\n+Currently the Docker volume driver for VSphere allows any container on any VM with access to a given datastore\n+to create, mount, and delete volumes at will. There are no limits to the size of the volumes that\n+can be created or quotas for datastore usage for container volumes. This lack of access control\n+takes the management of storage out of the hands of the IT administrator and puts it in the hands of\n+the developer. This is a worrying proposition to many IT admins, and since they are the ones that\n+must allow deployment of the driver and it's associated host agent, we must allow them to regain\n+control with proper enforcement mechanisms that limit damage due to malfeasance or mistake.\n+\n+### Permissions Model\n+\n+Since docker containers run inside VMs, and can have root permissions, we cannot rely on the VM user\n+for access control. Permissions must be granted to a VM, since VMs are created and managed\n+by the IT administrator. This brings up a few issues:\n+\n+  1. How are VMs identified in order to grant permissions?\n+  2. What is the granularity of a permission?\n+  3. Where are permissions stored?\n+  4. What are the actual permissions?\n+\n+In order to answer these questions, we must consider 2 scenarios. The first scenarios is permissions\n+for a single VM with a local datastore, and the second is multiple VMs with a shared datastore. The\n+model must work for both scenarios in order to be useful.\n+\n+1. VMs can share names so must be identified by unique IDs. These IDs should be unique across a\n+   cluster of hosts. If desired, we can associate many IDs with a Role that can be used to grant\n+   permissions. In this case permissions granted to a role apply to all VMs that have that role\n+   applied.\n+2. Permissions are managed per datastore. This means that VMs can have different privileges on\n+   different datastores. For instance, on one datastore a VM may be allowed to create volumes of a\n+   given size, while on another datastore the VM cannot create volumes at all. Note that in order to\n+   provide out of the box usability and experimentation, all datastores allow all operations with no\n+   restrictions. Permissions must be added per VM per Datastore by an administrator as necessary.\n+3. Since there is no useful centralized storage outside of VC for storing permissions, and we don't\n+   want to rely on VC, VM permissions for a given datastore shall reside inside the datastore. There\n+   must be a way to manage concurrency control and eliminate data races, so using a plain old file\n+   is probably not the solution. A preliminary idea is to store this data in a database such as\n+   Postgres or SQlite which already provides these capabilities. The downside of this is that now,\n+   we need to manage (possibly many) DB instances as part of our solution.","path":"doc/volume-permissions-spec.md","position":40,"original_position":40,"commit_id":"c2a8306a282243ecdc5762191297b369f4e35858","original_commit_id":"c2a8306a282243ecdc5762191297b369f4e35858","user":{"login":"govint","id":15854712,"avatar_url":"https://avatars.githubusercontent.com/u/15854712?v=3","gravatar_id":"","url":"https://api.github.com/users/govint","html_url":"https://github.com/govint","followers_url":"https://api.github.com/users/govint/followers","following_url":"https://api.github.com/users/govint/following{/other_user}","gists_url":"https://api.github.com/users/govint/gists{/gist_id}","starred_url":"https://api.github.com/users/govint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/govint/subscriptions","organizations_url":"https://api.github.com/users/govint/orgs","repos_url":"https://api.github.com/users/govint/repos","events_url":"https://api.github.com/users/govint/events{/privacy}","received_events_url":"https://api.github.com/users/govint/received_events","type":"User","site_admin":false},"body":"But if the datastore is lost or corrupt then the database too will be lost. We must have a separate storage thats used to keep storage entitlements.","created_at":"2016-07-19T10:58:05Z","updated_at":"2016-07-19T10:58:05Z","html_url":"https://github.com/vmware/docker-volume-vsphere/pull/514#discussion_r71316734","pull_request_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/514","_links":{"self":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments/71316734"},"html":{"href":"https://github.com/vmware/docker-volume-vsphere/pull/514#discussion_r71316734"},"pull_request":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/514"}}},"pull_request":{"url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/514","id":76674571,"html_url":"https://github.com/vmware/docker-volume-vsphere/pull/514","diff_url":"https://github.com/vmware/docker-volume-vsphere/pull/514.diff","patch_url":"https://github.com/vmware/docker-volume-vsphere/pull/514.patch","issue_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/514","number":514,"state":"open","locked":false,"title":"WIP: Add a draft of the permissions spec","user":{"login":"andrewjstone","id":466937,"avatar_url":"https://avatars.githubusercontent.com/u/466937?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewjstone","html_url":"https://github.com/andrewjstone","followers_url":"https://api.github.com/users/andrewjstone/followers","following_url":"https://api.github.com/users/andrewjstone/following{/other_user}","gists_url":"https://api.github.com/users/andrewjstone/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewjstone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewjstone/subscriptions","organizations_url":"https://api.github.com/users/andrewjstone/orgs","repos_url":"https://api.github.com/users/andrewjstone/repos","events_url":"https://api.github.com/users/andrewjstone/events{/privacy}","received_events_url":"https://api.github.com/users/andrewjstone/received_events","type":"User","site_admin":false},"body":"WIP: DO NOT MERGE\r\n\r\nThis is useful for discussion/commenting and is fairly minimal right now.","created_at":"2016-07-07T22:15:12Z","updated_at":"2016-07-19T10:58:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a327b938cd3f6992a5364bbdb3bdcfe82bce649","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/514/commits","review_comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/514/comments","review_comment_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/514/comments","statuses_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/c2a8306a282243ecdc5762191297b369f4e35858","head":{"label":"vmware:permissions-spec.ajs","ref":"permissions-spec.ajs","sha":"c2a8306a282243ecdc5762191297b369f4e35858","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":49599693,"name":"docker-volume-vsphere","full_name":"vmware/docker-volume-vsphere","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/docker-volume-vsphere","description":"Docker Volume Driver for vSphere.","fork":false,"url":"https://api.github.com/repos/vmware/docker-volume-vsphere","forks_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/forks","keys_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/teams","hooks_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/hooks","issue_events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/events","assignees_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/tags","blobs_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/languages","stargazers_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/stargazers","contributors_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/contributors","subscribers_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/subscribers","subscription_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/subscription","commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/merges","archive_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/downloads","issues_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/labels{/name}","releases_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/deployments","created_at":"2016-01-13T20:25:36Z","updated_at":"2016-07-18T06:55:29Z","pushed_at":"2016-07-19T05:15:27Z","git_url":"git://github.com/vmware/docker-volume-vsphere.git","ssh_url":"git@github.com:vmware/docker-volume-vsphere.git","clone_url":"https://github.com/vmware/docker-volume-vsphere.git","svn_url":"https://github.com/vmware/docker-volume-vsphere","homepage":"","size":6905,"stargazers_count":48,"watchers_count":48,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":82,"forks":4,"open_issues":82,"watchers":48,"default_branch":"master"}},"base":{"label":"vmware:master","ref":"master","sha":"152c75b77b891142d2c4ef0c02ab7f084b809e1c","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":49599693,"name":"docker-volume-vsphere","full_name":"vmware/docker-volume-vsphere","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/docker-volume-vsphere","description":"Docker Volume Driver for vSphere.","fork":false,"url":"https://api.github.com/repos/vmware/docker-volume-vsphere","forks_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/forks","keys_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/teams","hooks_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/hooks","issue_events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/events{/number}","events_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/events","assignees_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/assignees{/user}","branches_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/branches{/branch}","tags_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/tags","blobs_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/{sha}","languages_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/languages","stargazers_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/stargazers","contributors_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/contributors","subscribers_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/subscribers","subscription_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/subscription","commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/contents/{+path}","compare_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/merges","archive_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/downloads","issues_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues{/number}","pulls_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls{/number}","milestones_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/milestones{/number}","notifications_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/labels{/name}","releases_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/releases{/id}","deployments_url":"https://api.github.com/repos/vmware/docker-volume-vsphere/deployments","created_at":"2016-01-13T20:25:36Z","updated_at":"2016-07-18T06:55:29Z","pushed_at":"2016-07-19T05:15:27Z","git_url":"git://github.com/vmware/docker-volume-vsphere.git","ssh_url":"git@github.com:vmware/docker-volume-vsphere.git","clone_url":"https://github.com/vmware/docker-volume-vsphere.git","svn_url":"https://github.com/vmware/docker-volume-vsphere","homepage":"","size":6905,"stargazers_count":48,"watchers_count":48,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":82,"forks":4,"open_issues":82,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/514"},"html":{"href":"https://github.com/vmware/docker-volume-vsphere/pull/514"},"issue":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/514"},"comments":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/issues/514/comments"},"review_comments":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/514/comments"},"review_comment":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/pulls/514/commits"},"statuses":{"href":"https://api.github.com/repos/vmware/docker-volume-vsphere/statuses/c2a8306a282243ecdc5762191297b369f4e35858"}}}}
{"actor":{"display_login":"govint"}}