Skip to content

CVE Services 2.10.0 — Root oversight and user management in the Data Registry - #2107

Open
david-rocca wants to merge 12 commits into
devfrom
2.10.0-release
Open

david-rocca wants to merge 12 commits into
devfrom
2.10.0-release

Conversation

@david-rocca

Copy link
Copy Markdown
Collaborator

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 dev

Important Changes

  1. Organization and user visibility. GET /api/registry/org and GET /api/registry/users include 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 return 403. [Registry read tests](https://github.com/CVEProject/cve-services/blob/f4dd7be9/test/integration-tests/registry-org/rootReadAccessTest.js#L149)
  2. User administration. Root administrators can create regular or ADMIN users, edit usernames, names, and status, reset API secrets, and grant or revoke ADMIN within their subtree. Removing the administrator role, Root authority, or oversight relationship revokes the delegated access. Self-demotion and descendant user deletion return 403. [User management tests](https://github.com/CVEProject/cve-services/blob/f4dd7be9/test/integration-tests/user/userMoveAdminContractTest.js#L190)
  3. User transfers. Both source and destination must be within the Root administrator’s subtree. When moving a descendant user, submit the existing username, status, and name fields. Send profile edits separately. The move clears ADMIN in 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

  1. At f4dd7be9, 466 unit tests and 1,210 integration tests passed. Integration tests ran against a local three-member MongoDB replica set.
  2. As the seeded ordinary root_1_4 user, list registry organizations and users. Verify that descendant window_1 appears and that a direct request for sibling root_1_3 returns 403. [Demo accounts](https://github.com/CVEProject/cve-services/blob/f4dd7be9/README.md#root-demo-accounts)
  3. As the root_1_4 administrator, create a test user in window_1, reset its API secret, and verify the old secret returns 401. Grant the user ADMIN, move it to root_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)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant