{"action":"created","comment":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/comments/114973163","pull_request_review_id":36480682,"id":114973163,"diff_hunk":"@@ -0,0 +1,129 @@\n+// -*- Mode: Go; indent-tabs-mode: t -*-\n+\n+/*\n+ * Copyright (C) 2017 Canonical Ltd\n+ *\n+ * This program is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License version 3 as\n+ * published by the Free Software Foundation.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+ *\n+ */\n+\n+package builtin\n+\n+import (\n+\t\"fmt\"\n+\t\"strings\"\n+\n+\t\"github.com/snapcore/snapd/interfaces\"\n+\t\"github.com/snapcore/snapd/interfaces/apparmor\"\n+\t\"github.com/snapcore/snapd/interfaces/seccomp\"\n+)\n+\n+const onlineAccountsServicePermanentSlotAppArmor = `\n+# Description: Allow operating as the Online Accounts service.\n+\n+# DBus accesses\n+#include <abstractions/dbus-session-strict>\n+\n+dbus (send)\n+    bus=session\n+    path=/org/freedesktop/DBus\n+    interface=org.freedesktop.DBus\n+    member={RequestName,ReleaseName,GetConnectionCredentials}\n+    peer=(name=org.freedesktop.DBus, label=unconfined),\n+\n+# Allow binding the service to the requested connection name\n+dbus (bind)\n+\tbus=session\n+\tname=\"com.ubuntu.OnlineAccounts.Manager\",\n+`\n+\n+const onlineAccountsServiceConnectedSlotAppArmor = `\n+# Allow service to interact with connected clients\n+dbus (receive, send)\n+\tbus=session\n+\tpath=/com/ubuntu/OnlineAccounts{,/**}\n+\tinterface=com.ubuntu.OnlineAccounts.Manager\n+\tpeer=(label=###PLUG_SECURITY_TAGS###),\n+`\n+\n+const onlineAccountsServiceConnectedPlugAppArmor = `\n+# Description: Allow using Online Accounts service. Allowed to auto-connect\n+# because the access to user data is actually mediated by the Online Accounts\n+# service itself.\n+\n+#include <abstractions/dbus-session-strict>\n+\n+# Online Accounts v2 API\n+dbus (receive, send)\n+    bus=session\n+    interface=com.ubuntu.OnlineAccounts.Manager\n+    path=/com/ubuntu/OnlineAccounts{,/**}\n+    peer=(label=###SLOT_SECURITY_TAGS###),","path":"interfaces/builtin/online_accounts_service.go","position":71,"original_position":71,"commit_id":"fab0e292d267abad8b16fbf349ed8257a1db8ee8","original_commit_id":"fab0e292d267abad8b16fbf349ed8257a1db8ee8","user":{"login":"zyga","id":784262,"avatar_url":"https://avatars3.githubusercontent.com/u/784262?v=3","gravatar_id":"","url":"https://api.github.com/users/zyga","html_url":"https://github.com/zyga","followers_url":"https://api.github.com/users/zyga/followers","following_url":"https://api.github.com/users/zyga/following{/other_user}","gists_url":"https://api.github.com/users/zyga/gists{/gist_id}","starred_url":"https://api.github.com/users/zyga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zyga/subscriptions","organizations_url":"https://api.github.com/users/zyga/orgs","repos_url":"https://api.github.com/users/zyga/repos","events_url":"https://api.github.com/users/zyga/events{/privacy}","received_events_url":"https://api.github.com/users/zyga/received_events","type":"User","site_admin":false},"body":"Do we need to add dbus introspection here? CC @jdstrand ","created_at":"2017-05-05T11:02:59Z","updated_at":"2017-05-05T11:05:18Z","html_url":"https://github.com/snapcore/snapd/pull/2869#discussion_r114973163","pull_request_url":"https://api.github.com/repos/snapcore/snapd/pulls/2869","_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments/114973163"},"html":{"href":"https://github.com/snapcore/snapd/pull/2869#discussion_r114973163"},"pull_request":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/2869"}}},"pull_request":{"url":"https://api.github.com/repos/snapcore/snapd/pulls/2869","id":106468883,"html_url":"https://github.com/snapcore/snapd/pull/2869","diff_url":"https://github.com/snapcore/snapd/pull/2869.diff","patch_url":"https://github.com/snapcore/snapd/pull/2869.patch","issue_url":"https://api.github.com/repos/snapcore/snapd/issues/2869","number":2869,"state":"open","locked":false,"title":"interfaces/builtin: add online-accounts-service interface","user":{"login":"mardy","id":59287,"avatar_url":"https://avatars1.githubusercontent.com/u/59287?v=3","gravatar_id":"","url":"https://api.github.com/users/mardy","html_url":"https://github.com/mardy","followers_url":"https://api.github.com/users/mardy/followers","following_url":"https://api.github.com/users/mardy/following{/other_user}","gists_url":"https://api.github.com/users/mardy/gists{/gist_id}","starred_url":"https://api.github.com/users/mardy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mardy/subscriptions","organizations_url":"https://api.github.com/users/mardy/orgs","repos_url":"https://api.github.com/users/mardy/repos","events_url":"https://api.github.com/users/mardy/events{/privacy}","received_events_url":"https://api.github.com/users/mardy/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-02-16T07:27:01Z","updated_at":"2017-05-05T11:05:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73aaef4b6415d1d68f76fedd0d1d8b7399f2e780","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/snapcore/snapd/pulls/2869/commits","review_comments_url":"https://api.github.com/repos/snapcore/snapd/pulls/2869/comments","review_comment_url":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/snapcore/snapd/issues/2869/comments","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/fab0e292d267abad8b16fbf349ed8257a1db8ee8","head":{"label":"mardy:accounts-interface","ref":"accounts-interface","sha":"fab0e292d267abad8b16fbf349ed8257a1db8ee8","user":{"login":"mardy","id":59287,"avatar_url":"https://avatars1.githubusercontent.com/u/59287?v=3","gravatar_id":"","url":"https://api.github.com/users/mardy","html_url":"https://github.com/mardy","followers_url":"https://api.github.com/users/mardy/followers","following_url":"https://api.github.com/users/mardy/following{/other_user}","gists_url":"https://api.github.com/users/mardy/gists{/gist_id}","starred_url":"https://api.github.com/users/mardy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mardy/subscriptions","organizations_url":"https://api.github.com/users/mardy/orgs","repos_url":"https://api.github.com/users/mardy/repos","events_url":"https://api.github.com/users/mardy/events{/privacy}","received_events_url":"https://api.github.com/users/mardy/received_events","type":"User","site_admin":false},"repo":{"id":64119703,"name":"snapd","full_name":"mardy/snapd","owner":{"login":"mardy","id":59287,"avatar_url":"https://avatars1.githubusercontent.com/u/59287?v=3","gravatar_id":"","url":"https://api.github.com/users/mardy","html_url":"https://github.com/mardy","followers_url":"https://api.github.com/users/mardy/followers","following_url":"https://api.github.com/users/mardy/following{/other_user}","gists_url":"https://api.github.com/users/mardy/gists{/gist_id}","starred_url":"https://api.github.com/users/mardy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mardy/subscriptions","organizations_url":"https://api.github.com/users/mardy/orgs","repos_url":"https://api.github.com/users/mardy/repos","events_url":"https://api.github.com/users/mardy/events{/privacy}","received_events_url":"https://api.github.com/users/mardy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mardy/snapd","description":"The snapd and snap tools enable systems to work with .snap files.","fork":true,"url":"https://api.github.com/repos/mardy/snapd","forks_url":"https://api.github.com/repos/mardy/snapd/forks","keys_url":"https://api.github.com/repos/mardy/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mardy/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mardy/snapd/teams","hooks_url":"https://api.github.com/repos/mardy/snapd/hooks","issue_events_url":"https://api.github.com/repos/mardy/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/mardy/snapd/events","assignees_url":"https://api.github.com/repos/mardy/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/mardy/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/mardy/snapd/tags","blobs_url":"https://api.github.com/repos/mardy/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mardy/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mardy/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/mardy/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mardy/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/mardy/snapd/languages","stargazers_url":"https://api.github.com/repos/mardy/snapd/stargazers","contributors_url":"https://api.github.com/repos/mardy/snapd/contributors","subscribers_url":"https://api.github.com/repos/mardy/snapd/subscribers","subscription_url":"https://api.github.com/repos/mardy/snapd/subscription","commits_url":"https://api.github.com/repos/mardy/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/mardy/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/mardy/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/mardy/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/mardy/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/mardy/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mardy/snapd/merges","archive_url":"https://api.github.com/repos/mardy/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mardy/snapd/downloads","issues_url":"https://api.github.com/repos/mardy/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/mardy/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/mardy/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/mardy/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mardy/snapd/labels{/name}","releases_url":"https://api.github.com/repos/mardy/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/mardy/snapd/deployments","created_at":"2016-07-25T09:02:10Z","updated_at":"2016-07-25T09:02:13Z","pushed_at":"2017-05-05T11:01:25Z","git_url":"git://github.com/mardy/snapd.git","ssh_url":"git@github.com:mardy/snapd.git","clone_url":"https://github.com/mardy/snapd.git","svn_url":"https://github.com/mardy/snapd","homepage":"","size":45960,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":"snapcore:master","ref":"master","sha":"0328d6df0fb2cf13672af4d2a2a8fc1be7737797","user":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars2.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"repo":{"id":44672744,"name":"snapd","full_name":"snapcore/snapd","owner":{"login":"snapcore","id":19532717,"avatar_url":"https://avatars2.githubusercontent.com/u/19532717?v=3","gravatar_id":"","url":"https://api.github.com/users/snapcore","html_url":"https://github.com/snapcore","followers_url":"https://api.github.com/users/snapcore/followers","following_url":"https://api.github.com/users/snapcore/following{/other_user}","gists_url":"https://api.github.com/users/snapcore/gists{/gist_id}","starred_url":"https://api.github.com/users/snapcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapcore/subscriptions","organizations_url":"https://api.github.com/users/snapcore/orgs","repos_url":"https://api.github.com/users/snapcore/repos","events_url":"https://api.github.com/users/snapcore/events{/privacy}","received_events_url":"https://api.github.com/users/snapcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/snapcore/snapd","description":"The snapd and snap tools enable systems to work with .snap files.","fork":false,"url":"https://api.github.com/repos/snapcore/snapd","forks_url":"https://api.github.com/repos/snapcore/snapd/forks","keys_url":"https://api.github.com/repos/snapcore/snapd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snapcore/snapd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snapcore/snapd/teams","hooks_url":"https://api.github.com/repos/snapcore/snapd/hooks","issue_events_url":"https://api.github.com/repos/snapcore/snapd/issues/events{/number}","events_url":"https://api.github.com/repos/snapcore/snapd/events","assignees_url":"https://api.github.com/repos/snapcore/snapd/assignees{/user}","branches_url":"https://api.github.com/repos/snapcore/snapd/branches{/branch}","tags_url":"https://api.github.com/repos/snapcore/snapd/tags","blobs_url":"https://api.github.com/repos/snapcore/snapd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snapcore/snapd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snapcore/snapd/git/refs{/sha}","trees_url":"https://api.github.com/repos/snapcore/snapd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snapcore/snapd/statuses/{sha}","languages_url":"https://api.github.com/repos/snapcore/snapd/languages","stargazers_url":"https://api.github.com/repos/snapcore/snapd/stargazers","contributors_url":"https://api.github.com/repos/snapcore/snapd/contributors","subscribers_url":"https://api.github.com/repos/snapcore/snapd/subscribers","subscription_url":"https://api.github.com/repos/snapcore/snapd/subscription","commits_url":"https://api.github.com/repos/snapcore/snapd/commits{/sha}","git_commits_url":"https://api.github.com/repos/snapcore/snapd/git/commits{/sha}","comments_url":"https://api.github.com/repos/snapcore/snapd/comments{/number}","issue_comment_url":"https://api.github.com/repos/snapcore/snapd/issues/comments{/number}","contents_url":"https://api.github.com/repos/snapcore/snapd/contents/{+path}","compare_url":"https://api.github.com/repos/snapcore/snapd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snapcore/snapd/merges","archive_url":"https://api.github.com/repos/snapcore/snapd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snapcore/snapd/downloads","issues_url":"https://api.github.com/repos/snapcore/snapd/issues{/number}","pulls_url":"https://api.github.com/repos/snapcore/snapd/pulls{/number}","milestones_url":"https://api.github.com/repos/snapcore/snapd/milestones{/number}","notifications_url":"https://api.github.com/repos/snapcore/snapd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snapcore/snapd/labels{/name}","releases_url":"https://api.github.com/repos/snapcore/snapd/releases{/id}","deployments_url":"https://api.github.com/repos/snapcore/snapd/deployments","created_at":"2015-10-21T11:51:46Z","updated_at":"2017-05-05T07:26:50Z","pushed_at":"2017-05-05T11:01:27Z","git_url":"git://github.com/snapcore/snapd.git","ssh_url":"git@github.com:snapcore/snapd.git","clone_url":"https://github.com/snapcore/snapd.git","svn_url":"https://github.com/snapcore/snapd","homepage":"","size":46857,"stargazers_count":707,"watchers_count":707,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":170,"mirror_url":null,"open_issues_count":29,"forks":170,"open_issues":29,"watchers":707,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/2869"},"html":{"href":"https://github.com/snapcore/snapd/pull/2869"},"issue":{"href":"https://api.github.com/repos/snapcore/snapd/issues/2869"},"comments":{"href":"https://api.github.com/repos/snapcore/snapd/issues/2869/comments"},"review_comments":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/2869/comments"},"review_comment":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/snapcore/snapd/pulls/2869/commits"},"statuses":{"href":"https://api.github.com/repos/snapcore/snapd/statuses/fab0e292d267abad8b16fbf349ed8257a1db8ee8"}}}}
{"actor":{"display_login":"zyga"}}