Changes for page Permissions Configuration

Last modified by colinw on 2021/09/10 23:34

From version 10.1
edited by colinw
on 2014/11/10 23:00
Change comment: There is no comment for this version
To version 7.1
edited by colinw
on 2014/11/15 22:00
Change comment: Enabling/disabling permissions for a core server.

Summary

Details

Page properties
Content
... ... @@ -1,13 +1,30 @@
1 -==== **//On this page~://** ====
1 +{{layout}}
2 +{{layout-section ac:type="two_right_sidebar"}}
3 +{{layout-cell}}
4 +{{warning}}
5 +This page is currently being written. Although the information below is probably accurate, it may not be complete or may have errors.
6 +{{/warning}}
2 2  
8 +{{info}}
9 +The information on this page applies to **iSymphony 3.1+**.
10 +{{/info}}
3 3  
12 += (% style="color: rgb(0,0,0);" %)Description(%%) =
4 4  
5 -{{toc maxLevel="2" indent="1"/}}
14 +The Permissions resource provides access to query and define permissions for iSymphony. See the reference information below for details about the REST interactions used to define permissions. The rest of this description is provided to make it easier to understand the various interactions that go into the permission system in iSymphony.
15 +{{/layout-cell}}
6 6  
7 -= Description =
17 +{{layout-cell}}
18 +{{panel title="On this page:"}}
8 8  
9 -The Permissions resource provides access to query and define permissions for iSymphony. See the reference information below for details about the REST interactions used to define permissions. The rest of this description is provided to make it easier to understand the various interactions that go into the permission system in iSymphony.
10 10  
21 +{{toc maxLevel="2" indent="1"/}}
22 +{{/panel}}
23 +{{/layout-cell}}
24 +{{/layout-section}}
25 +
26 +{{layout-section ac:type="single"}}
27 +{{layout-cell}}
11 11  === Overview ===
12 12  
13 13  In version 3.0 and previous of iSymphony, permissions were defined for 'permissible' objects in the system - each object that could be controlled via permissions (extensions, queues, other users, etc) would store a list of the users allowed to perform actions on it, and which actions each was allowed to perform. Beginning in version 3.1 of iSymphony, the situation has been reversed, to make it easier to administer permissions and hopefully less confusing. Permissions are defined for each user or user group in the system, in a cascading manner. They are evaluated in order of decreasing specificity, and in the case of a conflicting tie, the action is allowed. This must be considered when using the REST system to define permissions. See the documentation for permissions for more details.
... ... @@ -14,21 +14,35 @@
14 14  
15 15  === Defaults ===
16 16  
17 -By default, all users in the system are allowed to perform all actions. Therefore, if a specific permission key has not been defined for a user (either on the user itself, or one of the groups it is a member of), that action should be considered allowed. When defining a permission, the default policy is also allowed, unless the allowed flag is set to false.
34 +By default, all users in the system are allowed to perform all actions. Therefore, if a specific permission key has not been defined for a user (either on the user itself, or one of the groups it is a member of), that action should be considered allowed. When defining a permission, the default policy is also allowed, unless the allowed flag is set to false.
18 18  
19 19  === **Exceptions** ===
20 20  
21 -The heart of the permission system lies in the exceptions to the rules. This allows for powerful combinations to be achieved. Generally, the objects defined by their UUIDs in the exceptions field will be allowed to perform an action if the allowed flag is false, and prevented from performing that action if the allowed flag is true. That is, they will follow the opposite of the general policy for that definition. There are a few special cases.
38 +The heart of the permission system lies in the exceptions to the rules. This allows for powerful combinations to be achieved. Generally, the objects defined by their UUIDs in the exceptions field will be allowed to perform an action if the allowed flag is false, and prevented from performing that action if the allowed flag is true. That is, they will follow the opposite of the general policy for that definition.
22 22  
40 +=== Special Values ===
41 +
42 +There are a few special predefined values that are used by the permission system. They are:
43 +
44 +* All Users Group: The all users group is hard-coded into iSymphony to contain all users. You can use this to set global permissions on the clients. The UUID for the 'All Users' group is 21d97061-ff6a-11e1-a21f-0800200c9a66.
45 +* 'Owned' permission target: In many cases, an administrator may want to defined that users only have access to their "own" objects: their user, their extensions, their phone numbers, etc. In this case, setting the permission to 'Deny', with the special exception df41edec-2707-46eb-8b8f-146b01d9b29e will only give users access to their own objects.
46 +
23 23  = Root Resource Paths =
24 24  
25 25  {{code}}
26 26  communication_manager/api/resource/core/{core_server_id}/permissions
27 -communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions
28 28  {{/code}}
29 29  
30 30  = JSON Representation =
31 31  
55 +{{code title="Core Server Permissions Enabled" language="js"}}
56 +{
57 + "permissionsEnabled": false
58 +}
59 +{{/code}}
60 +
61 +Note: the above object is only used to enable or disable permissions. See the page on the core server configuration itself to query the status of the permissions.
62 +
32 32  {{code title="PermissionConfig" language="js"}}
33 33   {
34 34   "key": "cellPhoneOriginateTo",
... ... @@ -89,10 +89,31 @@
89 89  
90 90  |=(% colspan="2" %)(% colspan="2" %)
91 91  (((
92 -{{{communication_manager/api/resource/core/{core_server_id}/permissions/userGroup/{user_group_id}}}}
123 +communication_manager/api/resource/core/{core_server_id}/permissions
124 +)))
125 +|=(((
126 +**Description**
127 +)))|(((
128 +Specifies whether permissions should be enabled or disabled for the entire core server. When disabled, no permission checks will be performed, so the rest of the settings specified in the permissions system will have no effect. Note that you must have a supported license installed to enable permissions.
93 93  
94 -{{{communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions/userGroup/{user_group_id}}}}
130 +**Parameters**:
131 +
132 +* core_server_id: The UUID of the core server
133 +
134 +**Errors**:
135 +
136 +* 500 'Your license does not support permissions.': Returned if you do not have a license installed, or if your license does not support permissions.
95 95  )))
138 +|=(((
139 +PUT
140 +)))|(((
141 +Sets whether permissions are enabled or disabled globally on the core server.
142 +)))
143 +
144 +|=(% colspan="2" %)(% colspan="2" %)
145 +(((
146 +{{{communication_manager/api/resource/core/{core_server_id}/permissions/userGroup/{user_group_id}}}}
147 +)))
96 96  |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
97 97  (((
98 98  **Description**
... ... @@ -119,8 +119,6 @@
119 119  |=(% colspan="2" %)(% colspan="2" %)
120 120  (((
121 121  {{{communication_manager/api/resource/core/{core_server_id}/permissions/userGroup/{user_group_id}/{key}}}}
122 -
123 -{{{communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions/userGroup/{user_group_id}/{key}}}}
124 124  )))
125 125  |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
126 126  (((
... ... @@ -178,8 +178,6 @@
178 178  |=(% colspan="2" %)(% colspan="2" %)
179 179  (((
180 180  {{{communication_manager/api/resource/core/{core_server_id}/permissions/user/{user_id}}}}
181 -
182 -{{{communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions/user/{user_id}}}}
183 183  )))
184 184  |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
185 185  (((
... ... @@ -207,8 +207,6 @@
207 207  |=(% colspan="2" %)(% colspan="2" %)
208 208  (((
209 209  {{{communication_manager/api/resource/core/{core_server_id}/permissions/user/{user_id}/{key}}}}
210 -
211 -{{{communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions/user/{user_id}/{key}}}}
212 212  )))
213 213  |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
214 214  (((
... ... @@ -265,26 +265,35 @@
265 265  
266 266  = Curl Examples =
267 267  
268 -=== Get ===
314 +{{info}}
315 +The server ID in the below examples is 9280cd1c-4ad7-4ed9-ae8a-0648b0b45cf7. You will need to change this to the appropriate ID for your installation, as well as change other IDs.
316 +{{/info}}
269 269  
318 +=== (% style="color: rgb(0,0,0);" %)Get all defined permissions for the 'All Users' group(%%) ===
319 +
270 270  {{code language="bash"}}
271 - 
321 +curl --user manager:manag3rpa55word -i -H "Content-Type: application/json" https://127.0.0.1:55050/communication_manager/api/resource/core/9280cd1c-4ad7-4ed9-ae8a-0648b0b45cf7/permissions/userGroup/21d97061-ff6a-11e1-a21f-0800200c9a66
272 272  {{/code}}
273 273  
274 -=== (% style="color: rgb(0,0,0);" %)Update(%%) ===
324 +=== Get all defined permissions for a specific user ===
275 275  
276 -{{code language="bash"}}
277 - 
326 +{{code}}
327 +curl --user manager:manag3rpa55word -i -H "Content-Type: application/json" https://127.0.0.1:55050/communication_manager/api/resource/core/9280cd1c-4ad7-4ed9-ae8a-0648b0b45cf7/permissions/user/8a026a93-3201-4554-b993-32576a3b8ea5
278 278  {{/code}}
279 279  
280 -=== Add ===
330 +=== (% style="color: rgb(0,0,0);" %)Deny the 'passwordChange' permission for the above user(%%) ===
281 281  
282 282  {{code language="bash"}}
283 - 
333 +curl --user manager:manag3rpa55word -i -H "Content-Type: application/json" -X PUT -d '{"key":"passwordChange","allowed":"false"}' https://127.0.0.1:55050/communication_manager/api/resource/core/9280cd1c-4ad7-4ed9-ae8a-0648b0b45cf7/permissions/user/8a026a93-3201-4554-b993-32576a3b8ea5/passwordChange
284 284  {{/code}}
285 285  
286 -=== Delete ===
336 +=== Remove the 'passwordChange' permission for the above user ===
287 287  
338 +Note: this will not prevent the user from changing their password. It will cause the user to inherit the permission of any user groups they are a part of.
339 +
288 288  {{code language="bash"}}
289 - 
341 +curl --user manager:manag3rpa55word -i -H "Content-Type: application/json" -X DELETE https://127.0.0.1:55050/communication_manager/api/resource/core/9280cd1c-4ad7-4ed9-ae8a-0648b0b45cf7/permissions/user/8a026a93-3201-4554-b993-32576a3b8ea5/passwordChange
290 290  {{/code}}
343 +{{/layout-cell}}
344 +{{/layout-section}}
345 +{{/layout}}