[SERVER-11300] Possible to Create Circular Roles Created: 22/Oct/13 Updated: 11/Jul/16 Resolved: 23/Oct/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Security |
| Affects Version/s: | 2.5.3 |
| Fix Version/s: | 2.5.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Samantha Ritter (Inactive) | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | 26qa | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
Using updateRole, it is possible to create a role that contains a reference to itself: > db.runCommand( { updateRole: "king", roles: [ "king" ] }) Running this command gives the following error: ERROR: Inconsistent role graph during authorization manager intialization. Only direct privileges available. Cycle in dependency graph: king@test -> king@test after applying oplog entry u Querying for the role afterwards with rolesInfo yields the following result: ], afterwards, subsequent role-related commands (like createRole, dropRole) throw the same error that the updateRole command generated. It seems that grantRolesToRole also allows for this: > db.runCommand( { createRole: "princess", privileges: [], roles: [] }); ); ERROR: Inconsistent role graph during authorization manager intialization. Only direct privileges available. Cycle in dependency graph: princess@testAuth -> princess@testAuth after applying oplog entry u {"roles":[ ], |
| Comments |
| Comment by auto [ 23/Oct/13 ] |
|
Author: {u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}Message: |