{"action":"created","comment":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/comments/60802098","id":60802098,"diff_hunk":"@@ -34,6 +34,10 @@\n public class PropertiesUtil {\n     private static final Logger s_logger = Logger.getLogger(PropertiesUtil.class);\n \n+    public static String getDefaultApiCommandsFileName() {\n+        return \"commands.properties\";\n+    }","path":"utils/src/main/java/com/cloud/utils/PropertiesUtil.java","position":6,"original_position":6,"commit_id":"2aad991648cfeeefabd73ddaa4464822a4dc9922","original_commit_id":"2aad991648cfeeefabd73ddaa4464822a4dc9922","user":{"login":"jburwell","id":285646,"avatar_url":"https://avatars.githubusercontent.com/u/285646?v=3","gravatar_id":"","url":"https://api.github.com/users/jburwell","html_url":"https://github.com/jburwell","followers_url":"https://api.github.com/users/jburwell/followers","following_url":"https://api.github.com/users/jburwell/following{/other_user}","gists_url":"https://api.github.com/users/jburwell/gists{/gist_id}","starred_url":"https://api.github.com/users/jburwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jburwell/subscriptions","organizations_url":"https://api.github.com/users/jburwell/orgs","repos_url":"https://api.github.com/users/jburwell/repos","events_url":"https://api.github.com/users/jburwell/events{/privacy}","received_events_url":"https://api.github.com/users/jburwell/received_events","type":"User","site_admin":false},"body":"@bhaisaab my thinking is that commands.properties is only managed/used by the Authenticator mechanism.  Is it used more widely?","created_at":"2016-04-22T20:57:49Z","updated_at":"2016-04-22T20:57:49Z","html_url":"https://github.com/apache/cloudstack/pull/1489#discussion_r60802098","pull_request_url":"https://api.github.com/repos/apache/cloudstack/pulls/1489","_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments/60802098"},"html":{"href":"https://github.com/apache/cloudstack/pull/1489#discussion_r60802098"},"pull_request":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/1489"}}},"pull_request":{"url":"https://api.github.com/repos/apache/cloudstack/pulls/1489","id":66193929,"html_url":"https://github.com/apache/cloudstack/pull/1489","diff_url":"https://github.com/apache/cloudstack/pull/1489.diff","patch_url":"https://github.com/apache/cloudstack/pull/1489.patch","issue_url":"https://api.github.com/repos/apache/cloudstack/issues/1489","number":1489,"state":"open","locked":false,"title":"CLOUDSTACK-8562: Dynamic Role-Based API Checker for CloudStack","user":{"login":"bhaisaab","id":95203,"avatar_url":"https://avatars.githubusercontent.com/u/95203?v=3","gravatar_id":"","url":"https://api.github.com/users/bhaisaab","html_url":"https://github.com/bhaisaab","followers_url":"https://api.github.com/users/bhaisaab/followers","following_url":"https://api.github.com/users/bhaisaab/following{/other_user}","gists_url":"https://api.github.com/users/bhaisaab/gists{/gist_id}","starred_url":"https://api.github.com/users/bhaisaab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhaisaab/subscriptions","organizations_url":"https://api.github.com/users/bhaisaab/orgs","repos_url":"https://api.github.com/users/bhaisaab/repos","events_url":"https://api.github.com/users/bhaisaab/events{/privacy}","received_events_url":"https://api.github.com/users/bhaisaab/received_events","type":"User","site_admin":false},"body":"### CLOUDSTACK-8562: DB-Backed Dynamic Role Based API Access Checker\r\n\r\nThis feature allows root administrators to define new roles and associate API\r\npermissions to them.\r\n\r\nA limited form of role-based access control for the CloudStack management server\r\nAPI is provided through a properties file, commands.properties, embedded in the\r\nWAR distribution. Therefore, customizing API permissions requires unpacking the\r\ndistribution and modifying this file consistently on all servers. The old system\r\nalso does not permit the specification of additional roles.\r\n\r\nFS:\r\nhttps://cwiki.apache.org/confluence/display/CLOUDSTACK/Dynamic+Role+Based+API+Access+Checker+for+CloudStack\r\n\r\nDB-Backed Dynamic Role Based API Access Checker for CloudStack brings following\r\nchanges, features and use-cases:\r\n- Moves the API access definitions from commands.properties to the mgmt server DB\r\n- Allows defining custom roles (such as a read-only ROOT admin) beyond the\r\n  current set of four (4) roles\r\n- All roles will resolve to one of the four known roles types (Admin, Resource\r\n  Admin, Domain Admin and User) which maintains this association by requiring\r\n  all new defined roles to specify a role type.\r\n- Allows changes to roles and API permissions per role at runtime including additions or\r\n  removal of roles and/or modifications of permissions, without the need\r\n  of restarting management server(s)\r\n\r\nUpgrade/installation notes:\r\n- The feature will be enabled by default for new installations, existing\r\n  deployments will continue to use the older static role based api access checker\r\n  with an option to enable this feature\r\n- During fresh installation or upgrade, the upgrade paths will add four default\r\n  roles based on the four default role types\r\n- For ease of migration, at the time of upgrade commands.properties will be used\r\n  to add existing set of permissions to the default roles. cloud.account\r\n  will have a new role_id column which will be populated based on default roles\r\n  as well\r\n\r\nDynamic-roles migration tool: scripts/util/migrate-dynamicroles.py\r\n- Allows admins to migrate to the dynamic role based checker at a future date\r\n- Performs a harder one-way migrate and update\r\n- Migrates rules from existing commands.properties file into db and deprecates it\r\n- Enables an internal hidden switch to enable dynamic role based checker feature","created_at":"2016-04-12T17:10:41Z","updated_at":"2016-04-22T20:57:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2cd8d472a60175d204abf02bdc6d083bc809a82f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/cloudstack/pulls/1489/commits","review_comments_url":"https://api.github.com/repos/apache/cloudstack/pulls/1489/comments","review_comment_url":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/cloudstack/issues/1489/comments","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/2aad991648cfeeefabd73ddaa4464822a4dc9922","head":{"label":"shapeblue:dynamicroles-master","ref":"dynamicroles-master","sha":"2aad991648cfeeefabd73ddaa4464822a4dc9922","user":{"login":"shapeblue","id":6001764,"avatar_url":"https://avatars.githubusercontent.com/u/6001764?v=3","gravatar_id":"","url":"https://api.github.com/users/shapeblue","html_url":"https://github.com/shapeblue","followers_url":"https://api.github.com/users/shapeblue/followers","following_url":"https://api.github.com/users/shapeblue/following{/other_user}","gists_url":"https://api.github.com/users/shapeblue/gists{/gist_id}","starred_url":"https://api.github.com/users/shapeblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shapeblue/subscriptions","organizations_url":"https://api.github.com/users/shapeblue/orgs","repos_url":"https://api.github.com/users/shapeblue/repos","events_url":"https://api.github.com/users/shapeblue/events{/privacy}","received_events_url":"https://api.github.com/users/shapeblue/received_events","type":"Organization","site_admin":false},"repo":{"id":35481491,"name":"cloudstack","full_name":"shapeblue/cloudstack","owner":{"login":"shapeblue","id":6001764,"avatar_url":"https://avatars.githubusercontent.com/u/6001764?v=3","gravatar_id":"","url":"https://api.github.com/users/shapeblue","html_url":"https://github.com/shapeblue","followers_url":"https://api.github.com/users/shapeblue/followers","following_url":"https://api.github.com/users/shapeblue/following{/other_user}","gists_url":"https://api.github.com/users/shapeblue/gists{/gist_id}","starred_url":"https://api.github.com/users/shapeblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shapeblue/subscriptions","organizations_url":"https://api.github.com/users/shapeblue/orgs","repos_url":"https://api.github.com/users/shapeblue/repos","events_url":"https://api.github.com/users/shapeblue/events{/privacy}","received_events_url":"https://api.github.com/users/shapeblue/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shapeblue/cloudstack","description":"The upstream repository is at http://github.com/apache/cloudstack. This is ShapeBlue's support/patch branches and Apache CloudStack™ backup","fork":true,"url":"https://api.github.com/repos/shapeblue/cloudstack","forks_url":"https://api.github.com/repos/shapeblue/cloudstack/forks","keys_url":"https://api.github.com/repos/shapeblue/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shapeblue/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shapeblue/cloudstack/teams","hooks_url":"https://api.github.com/repos/shapeblue/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/shapeblue/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/shapeblue/cloudstack/events","assignees_url":"https://api.github.com/repos/shapeblue/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/shapeblue/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/shapeblue/cloudstack/tags","blobs_url":"https://api.github.com/repos/shapeblue/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shapeblue/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shapeblue/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/shapeblue/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shapeblue/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/shapeblue/cloudstack/languages","stargazers_url":"https://api.github.com/repos/shapeblue/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/shapeblue/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/shapeblue/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/shapeblue/cloudstack/subscription","commits_url":"https://api.github.com/repos/shapeblue/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/shapeblue/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/shapeblue/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/shapeblue/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/shapeblue/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/shapeblue/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shapeblue/cloudstack/merges","archive_url":"https://api.github.com/repos/shapeblue/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shapeblue/cloudstack/downloads","issues_url":"https://api.github.com/repos/shapeblue/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/shapeblue/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/shapeblue/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/shapeblue/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shapeblue/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/shapeblue/cloudstack/releases{/id}","deployments_url":"https://api.github.com/repos/shapeblue/cloudstack/deployments","created_at":"2015-05-12T10:22:21Z","updated_at":"2016-04-19T19:13:22Z","pushed_at":"2016-04-22T17:21:30Z","git_url":"git://github.com/shapeblue/cloudstack.git","ssh_url":"git@github.com:shapeblue/cloudstack.git","clone_url":"https://github.com/shapeblue/cloudstack.git","svn_url":"https://github.com/shapeblue/cloudstack","homepage":"http://shapeblue.com/packages","size":510083,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"d518b619dda69dde4ecc1640e6c007182c9a9b75","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":9759448,"name":"cloudstack","full_name":"apache/cloudstack","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/cloudstack","description":"Mirror of Apache Cloudstack","fork":false,"url":"https://api.github.com/repos/apache/cloudstack","forks_url":"https://api.github.com/repos/apache/cloudstack/forks","keys_url":"https://api.github.com/repos/apache/cloudstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/cloudstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/cloudstack/teams","hooks_url":"https://api.github.com/repos/apache/cloudstack/hooks","issue_events_url":"https://api.github.com/repos/apache/cloudstack/issues/events{/number}","events_url":"https://api.github.com/repos/apache/cloudstack/events","assignees_url":"https://api.github.com/repos/apache/cloudstack/assignees{/user}","branches_url":"https://api.github.com/repos/apache/cloudstack/branches{/branch}","tags_url":"https://api.github.com/repos/apache/cloudstack/tags","blobs_url":"https://api.github.com/repos/apache/cloudstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/cloudstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/cloudstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/cloudstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/cloudstack/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/cloudstack/languages","stargazers_url":"https://api.github.com/repos/apache/cloudstack/stargazers","contributors_url":"https://api.github.com/repos/apache/cloudstack/contributors","subscribers_url":"https://api.github.com/repos/apache/cloudstack/subscribers","subscription_url":"https://api.github.com/repos/apache/cloudstack/subscription","commits_url":"https://api.github.com/repos/apache/cloudstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/cloudstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/cloudstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/cloudstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/cloudstack/contents/{+path}","compare_url":"https://api.github.com/repos/apache/cloudstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/cloudstack/merges","archive_url":"https://api.github.com/repos/apache/cloudstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/cloudstack/downloads","issues_url":"https://api.github.com/repos/apache/cloudstack/issues{/number}","pulls_url":"https://api.github.com/repos/apache/cloudstack/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/cloudstack/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/cloudstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/cloudstack/labels{/name}","releases_url":"https://api.github.com/repos/apache/cloudstack/releases{/id}","deployments_url":"https://api.github.com/repos/apache/cloudstack/deployments","created_at":"2013-04-29T22:27:12Z","updated_at":"2016-04-19T06:58:22Z","pushed_at":"2016-04-22T17:36:43Z","git_url":"git://github.com/apache/cloudstack.git","ssh_url":"git@github.com:apache/cloudstack.git","clone_url":"https://github.com/apache/cloudstack.git","svn_url":"https://github.com/apache/cloudstack","homepage":null,"size":519092,"stargazers_count":358,"watchers_count":358,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":477,"mirror_url":"git://git.apache.org/cloudstack.git","open_issues_count":194,"forks":477,"open_issues":194,"watchers":358,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/1489"},"html":{"href":"https://github.com/apache/cloudstack/pull/1489"},"issue":{"href":"https://api.github.com/repos/apache/cloudstack/issues/1489"},"comments":{"href":"https://api.github.com/repos/apache/cloudstack/issues/1489/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/1489/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/cloudstack/pulls/1489/commits"},"statuses":{"href":"https://api.github.com/repos/apache/cloudstack/statuses/2aad991648cfeeefabd73ddaa4464822a4dc9922"}}}}