Repository navigation
CVE Services 2.10.0 — Root oversight and user management in the Data Registry - #2107
Open
david-rocca wants to merge 12 commits into
Open
david-rocca wants to merge 12 commits into
david-rocca wants to merge 12 commits into
Conversation
Enable Root oversight and descendant user management in the Data Registry
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root users can read organization and user records throughout the hierarchy they oversee. Root administrators can also create and manage descendant users, reset API secrets, and move users between organizations within that hierarchy. These permissions apply to the Data Registry API. PR diff against
devImportant Changes
GET /api/registry/organdGET /api/registry/usersinclude the requesting Root and its direct and indirect descendants. Pagination totals use the same scope. The hierarchy endpoint shows ancestors for context. Direct requests for ancestor, sibling, or unrelated records return403. [Registry read tests](https://github.com/CVEProject/cve-services/blob/f4dd7be9/test/integration-tests/registry-org/rootReadAccessTest.js#L149)ADMINusers, edit usernames, names, and status, reset API secrets, and grant or revokeADMINwithin their subtree. Removing the administrator role, Root authority, or oversight relationship revokes the delegated access. Self-demotion and descendant user deletion return403. [User management tests](https://github.com/CVEProject/cve-services/blob/f4dd7be9/test/integration-tests/user/userMoveAdminContractTest.js#L190)ADMINin both organizations, and promotion at the destination requires a separate grant. [Transfer tests](https://github.com/CVEProject/cve-services/blob/f4dd7be9/test/integration-tests/user/userMoveAdminContractTest.js#L257)Testing
f4dd7be9, 466 unit tests and 1,210 integration tests passed. Integration tests ran against a local three-member MongoDB replica set.root_1_4user, list registry organizations and users. Verify that descendantwindow_1appears and that a direct request for siblingroot_1_3returns403. [Demo accounts](https://github.com/CVEProject/cve-services/blob/f4dd7be9/README.md#root-demo-accounts)root_1_4administrator, create a test user inwindow_1, reset its API secret, and verify the old secret returns401. Grant the userADMIN, move it toroot_1_4, and verify it arrives as a regular member. [Integration scenarios](https://github.com/CVEProject/cve-services/blob/f4dd7be9/test/integration-tests/user/userMoveAdminContractTest.js#L363)