{"action":"created","comment":{"url":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls/comments/63229197","id":63229197,"diff_hunk":"@@ -0,0 +1,71 @@\n+\n+#!/bin/bash\n+\n+source /etc/environment\n+\n+#Disable authentication\n+\n+#curl  -L http://127.0.0.1:2379/v2/auth/enable -XDELETE\n+\n+etcdctlrootusername=$(etcdctl get /etcdctl/config/root-user)\n+etcdctlrootpassword=$(etcdctl get /etcdctl/config/root-password)\n+etcdctletcdreadusername=$(etcdctl get /etcdctl/config/read-user)\n+etcdctletcdreadpassword=$(etcdctl get /etcdctl/config/read-password)\n+etcdctletcdreadwriteusername=$(etcdctl get /etcdctl/config/write-user)\n+etcdctletcdreadwritepassword=$(etcdctl get /etcdctl/config/write-password)\n+\n+#add a root user\n+\n+echo '{\"user\":\"'$(eval echo $etcdctlrootusername)'\", \"password\":\"'$(eval echo $etcdctlrootpassword)'\"}' > /home/core/mesos-systemd/v3/util/root.json\n+curl  -L http://127.0.0.1:2379/v2/auth/users/$(eval echo $etcdctlrootusername) -XPUT -d \"@/home/core/mesos-systemd/v3/util/root.json\"\n+\n+\n+#add a non root read only user\n+echo '{\"user\":\"'$(eval echo $etcdctletcdreadusername)'\", \"password\":\"'$(eval echo $etcdctletcdreadpassword)'\"}' > /home/core/mesos-systemd/v3/util/etcdreaduser.json\n+curl   -L http://127.0.0.1:2379/v2/auth/users/$(eval echo $etcdctletcdreadusername) -XPUT -d \"@/home/core/mesos-systemd/v3/util/etcdreaduser.json\"\n+\n+#add a non root readwrite user\n+echo '{\"user\":\"'$(eval echo $etcdctletcdreadwriteusername)'\", \"password\":\"'$(eval echo $etcdctletcdreadwritepassword)'\"}' > /home/core/mesos-systemd/v3/util/etcdwriteuser.json\n+curl  -L http://127.0.0.1:2379/v2/auth/users/$(eval echo $etcdctletcdreadwriteusername) -XPUT -d \"@/home/core/mesos-systemd/v3/util/etcdwriteuser.json\"\n+\n+#Create a read only role:\n+\n+etcdctl role add readonlyrolename","path":"v3/util/etcdctl-auth-root.sh","position":33,"original_position":33,"commit_id":"8d55466448c3a6e416b04d9ad5eaf61c20d2cdd6","original_commit_id":"8d55466448c3a6e416b04d9ad5eaf61c20d2cdd6","user":{"login":"anshupande","id":4743879,"avatar_url":"https://avatars.githubusercontent.com/u/4743879?v=3","gravatar_id":"","url":"https://api.github.com/users/anshupande","html_url":"https://github.com/anshupande","followers_url":"https://api.github.com/users/anshupande/followers","following_url":"https://api.github.com/users/anshupande/following{/other_user}","gists_url":"https://api.github.com/users/anshupande/gists{/gist_id}","starred_url":"https://api.github.com/users/anshupande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anshupande/subscriptions","organizations_url":"https://api.github.com/users/anshupande/orgs","repos_url":"https://api.github.com/users/anshupande/repos","events_url":"https://api.github.com/users/anshupande/events{/privacy}","received_events_url":"https://api.github.com/users/anshupande/received_events","type":"User","site_admin":false},"body":"readonlyrole will work as well","created_at":"2016-05-13T18:23:11Z","updated_at":"2016-05-13T18:23:11Z","html_url":"https://github.com/adobe-platform/mesos-systemd/pull/166#discussion_r63229197","pull_request_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls/166","_links":{"self":{"href":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls/comments/63229197"},"html":{"href":"https://github.com/adobe-platform/mesos-systemd/pull/166#discussion_r63229197"},"pull_request":{"href":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls/166"}}},"pull_request":{"url":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls/166","id":65514347,"html_url":"https://github.com/adobe-platform/mesos-systemd/pull/166","diff_url":"https://github.com/adobe-platform/mesos-systemd/pull/166.diff","patch_url":"https://github.com/adobe-platform/mesos-systemd/pull/166.patch","issue_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/issues/166","number":166,"state":"open","locked":false,"title":"start PR for etcd - enable authentication","user":{"login":"anshupande","id":4743879,"avatar_url":"https://avatars.githubusercontent.com/u/4743879?v=3","gravatar_id":"","url":"https://api.github.com/users/anshupande","html_url":"https://github.com/anshupande","followers_url":"https://api.github.com/users/anshupande/followers","following_url":"https://api.github.com/users/anshupande/following{/other_user}","gists_url":"https://api.github.com/users/anshupande/gists{/gist_id}","starred_url":"https://api.github.com/users/anshupande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anshupande/subscriptions","organizations_url":"https://api.github.com/users/anshupande/orgs","repos_url":"https://api.github.com/users/anshupande/repos","events_url":"https://api.github.com/users/anshupande/events{/privacy}","received_events_url":"https://api.github.com/users/anshupande/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-06T18:33:49Z","updated_at":"2016-05-13T18:23:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"200569d84abddc413695c9ef92debcf686e75625","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls/166/commits","review_comments_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls/166/comments","review_comment_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/issues/166/comments","statuses_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/statuses/8d55466448c3a6e416b04d9ad5eaf61c20d2cdd6","head":{"label":"adobe-platform:etcd-security","ref":"etcd-security","sha":"8d55466448c3a6e416b04d9ad5eaf61c20d2cdd6","user":{"login":"adobe-platform","id":16107061,"avatar_url":"https://avatars.githubusercontent.com/u/16107061?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe-platform","html_url":"https://github.com/adobe-platform","followers_url":"https://api.github.com/users/adobe-platform/followers","following_url":"https://api.github.com/users/adobe-platform/following{/other_user}","gists_url":"https://api.github.com/users/adobe-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe-platform/subscriptions","organizations_url":"https://api.github.com/users/adobe-platform/orgs","repos_url":"https://api.github.com/users/adobe-platform/repos","events_url":"https://api.github.com/users/adobe-platform/events{/privacy}","received_events_url":"https://api.github.com/users/adobe-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":35570054,"name":"mesos-systemd","full_name":"adobe-platform/mesos-systemd","owner":{"login":"adobe-platform","id":16107061,"avatar_url":"https://avatars.githubusercontent.com/u/16107061?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe-platform","html_url":"https://github.com/adobe-platform","followers_url":"https://api.github.com/users/adobe-platform/followers","following_url":"https://api.github.com/users/adobe-platform/following{/other_user}","gists_url":"https://api.github.com/users/adobe-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe-platform/subscriptions","organizations_url":"https://api.github.com/users/adobe-platform/orgs","repos_url":"https://api.github.com/users/adobe-platform/repos","events_url":"https://api.github.com/users/adobe-platform/events{/privacy}","received_events_url":"https://api.github.com/users/adobe-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe-platform/mesos-systemd","description":"Systemd scripts to run Mesos on CoreOS","fork":false,"url":"https://api.github.com/repos/adobe-platform/mesos-systemd","forks_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/forks","keys_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/teams","hooks_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/hooks","issue_events_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/issues/events{/number}","events_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/events","assignees_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/assignees{/user}","branches_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/branches{/branch}","tags_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/tags","blobs_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/languages","stargazers_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/stargazers","contributors_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/contributors","subscribers_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/subscribers","subscription_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/subscription","commits_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/issues/comments{/number}","contents_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/contents/{+path}","compare_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/merges","archive_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/downloads","issues_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/issues{/number}","pulls_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/labels{/name}","releases_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/releases{/id}","deployments_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/deployments","created_at":"2015-05-13T19:31:57Z","updated_at":"2016-01-15T19:51:46Z","pushed_at":"2016-05-13T17:58:34Z","git_url":"git://github.com/adobe-platform/mesos-systemd.git","ssh_url":"git@github.com:adobe-platform/mesos-systemd.git","clone_url":"https://github.com/adobe-platform/mesos-systemd.git","svn_url":"https://github.com/adobe-platform/mesos-systemd","homepage":"","size":497,"stargazers_count":1,"watchers_count":1,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":9,"forks":18,"open_issues":9,"watchers":1,"default_branch":"master"}},"base":{"label":"adobe-platform:master","ref":"master","sha":"71f2c85b7bfaa002f70237f30329fbcceea4d4ba","user":{"login":"adobe-platform","id":16107061,"avatar_url":"https://avatars.githubusercontent.com/u/16107061?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe-platform","html_url":"https://github.com/adobe-platform","followers_url":"https://api.github.com/users/adobe-platform/followers","following_url":"https://api.github.com/users/adobe-platform/following{/other_user}","gists_url":"https://api.github.com/users/adobe-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe-platform/subscriptions","organizations_url":"https://api.github.com/users/adobe-platform/orgs","repos_url":"https://api.github.com/users/adobe-platform/repos","events_url":"https://api.github.com/users/adobe-platform/events{/privacy}","received_events_url":"https://api.github.com/users/adobe-platform/received_events","type":"Organization","site_admin":false},"repo":{"id":35570054,"name":"mesos-systemd","full_name":"adobe-platform/mesos-systemd","owner":{"login":"adobe-platform","id":16107061,"avatar_url":"https://avatars.githubusercontent.com/u/16107061?v=3","gravatar_id":"","url":"https://api.github.com/users/adobe-platform","html_url":"https://github.com/adobe-platform","followers_url":"https://api.github.com/users/adobe-platform/followers","following_url":"https://api.github.com/users/adobe-platform/following{/other_user}","gists_url":"https://api.github.com/users/adobe-platform/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe-platform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe-platform/subscriptions","organizations_url":"https://api.github.com/users/adobe-platform/orgs","repos_url":"https://api.github.com/users/adobe-platform/repos","events_url":"https://api.github.com/users/adobe-platform/events{/privacy}","received_events_url":"https://api.github.com/users/adobe-platform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe-platform/mesos-systemd","description":"Systemd scripts to run Mesos on CoreOS","fork":false,"url":"https://api.github.com/repos/adobe-platform/mesos-systemd","forks_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/forks","keys_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/teams","hooks_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/hooks","issue_events_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/issues/events{/number}","events_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/events","assignees_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/assignees{/user}","branches_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/branches{/branch}","tags_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/tags","blobs_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/languages","stargazers_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/stargazers","contributors_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/contributors","subscribers_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/subscribers","subscription_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/subscription","commits_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/issues/comments{/number}","contents_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/contents/{+path}","compare_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/merges","archive_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/downloads","issues_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/issues{/number}","pulls_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/labels{/name}","releases_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/releases{/id}","deployments_url":"https://api.github.com/repos/adobe-platform/mesos-systemd/deployments","created_at":"2015-05-13T19:31:57Z","updated_at":"2016-01-15T19:51:46Z","pushed_at":"2016-05-13T17:58:34Z","git_url":"git://github.com/adobe-platform/mesos-systemd.git","ssh_url":"git@github.com:adobe-platform/mesos-systemd.git","clone_url":"https://github.com/adobe-platform/mesos-systemd.git","svn_url":"https://github.com/adobe-platform/mesos-systemd","homepage":"","size":497,"stargazers_count":1,"watchers_count":1,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":9,"forks":18,"open_issues":9,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls/166"},"html":{"href":"https://github.com/adobe-platform/mesos-systemd/pull/166"},"issue":{"href":"https://api.github.com/repos/adobe-platform/mesos-systemd/issues/166"},"comments":{"href":"https://api.github.com/repos/adobe-platform/mesos-systemd/issues/166/comments"},"review_comments":{"href":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls/166/comments"},"review_comment":{"href":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adobe-platform/mesos-systemd/pulls/166/commits"},"statuses":{"href":"https://api.github.com/repos/adobe-platform/mesos-systemd/statuses/8d55466448c3a6e416b04d9ad5eaf61c20d2cdd6"}}}}