Details
Description
1. Created two standalone collections Default.Default.IP6rRnuecrlJ57jlcUwFrolIwN, Default.Default.vE and loaded 1k docs into each one of them.
2. Created a user and role.
user: testmohsin,
role: TAF-role-88j4p
3. Granted DROP index privilege to the role
GRANT DROP INDEX ON COLLECTION Default.Default.IP6rRnuecrlJ57jlcUwFrolIwN,Default.Default.vE TO `TAF-role-88j4p`;
|
[
|
{
|
"Privilege": { |
"PrivilegeId": "20e0c1ba-fc79-49f4-a8be-3c7b4e6c290d", |
"Grantor": "Administrator", |
"Grantee": "TAF-role-88j4p", |
"GranteeUuid": "49b70cf5-6c4b-4d37-821f-f11ec21359d3", |
"GranteeType": "ROLE", |
"Privilege": "DROP", |
"ObjectType": "INDEX", |
"Timestamp": "Wed Apr 24 17:36:22 PDT 2024", |
"Object": { |
"DatabaseName": "Default", |
"ScopeName": "Default", |
"ObjectName": "vE" |
}
|
}
|
},
|
{
|
"Privilege": { |
"PrivilegeId": "563e554e-b68c-4106-a70f-e4bc1ab05aa0", |
"Grantor": "Administrator", |
"Grantee": "TAF-role-88j4p", |
"GranteeUuid": "49b70cf5-6c4b-4d37-821f-f11ec21359d3", |
"GranteeType": "ROLE", |
"Privilege": "DROP", |
"ObjectType": "INDEX", |
"Timestamp": "Wed Apr 24 17:50:27 PDT 2024", |
"Object": { |
"DatabaseName": "Default", |
"ScopeName": "Default", |
"ObjectName": "IP6rRnuecrlJ57jlcUwFrolIwN" |
}
|
}
|
}
|
]
|
4. Granted role TAF-role-88j4p to user testmohsin.
{
|
"AssignedRole": { |
"AssignmentId": "e54c7919-315c-4bf3-a5aa-25393244fcb5", |
"Assigner": "Administrator", |
"Assignee": "testmohsin", |
"AssigneeId": "e1e120f5-f5f4-471b-abd5-2174279983c9", |
"AssignedRoleName": "TAF-role-88j4p", |
"Timestamp": "Wed Apr 24 17:40:12 PDT 2024" |
}
|
}
|
5. Created an index on collection Default.Default.IP6rRnuecrlJ57jlcUwFrolIwN.
create index `TAF-index-4d5v4` on Default.Default.IP6rRnuecrlJ57jlcUwFrolIwN(name:string);
|
6. Dropped the index using 'testmohsin' users credentials.
drop index Default.Default.IP6rRnuecrlJ57jlcUwFrolIwN.`TAF-index-4d5v4`;
|
7. I see that the DROP privilege that was granted to the role on collection Default.Default.IP6rRnuecrlJ57jlcUwFrolIwN is now removed
[
|
{
|
"Privilege": { |
"PrivilegeId": "20e0c1ba-fc79-49f4-a8be-3c7b4e6c290d", |
"Grantor": "Administrator", |
"Grantee": "TAF-role-88j4p", |
"GranteeUuid": "49b70cf5-6c4b-4d37-821f-f11ec21359d3", |
"GranteeType": "ROLE", |
"Privilege": "DROP", |
"ObjectType": "INDEX", |
"Timestamp": "Wed Apr 24 17:36:22 PDT 2024", |
"Object": { |
"DatabaseName": "Default", |
"ScopeName": "Default", |
"ObjectName": "vE" |
}
|
}
|
}
|
]
|