Skip to content

Scope user listing to an organization unit - #17

Closed
Malith-19 wants to merge 9 commits into
mainfrom
feat/5861-ou-subtree-users
Closed

Malith-19 wants to merge 9 commits into
mainfrom
feat/5861-ou-subtree-users

Conversation

@Malith-19

@Malith-19 Malith-19 commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Purpose

Projects are being introduced as root organization units (thunder-id#5861, design in thunder-id#5862). To show the users of a project or organization unit in the Console, the user listing has to be scoped to that organization unit.

Approach

  • GET /users accepts an optional ouId query parameter. When set, the listing returns only the users directly in that organization unit. Users in organization units beneath it are not included.
  • The caller must be allowed to list users of that organization unit. This is the same check GET /users/tree/{path} applies, so an organization unit the caller cannot access returns 403 (SSE-4030).
  • An ouId that does not exist returns 404 with USR-1005, matching the user API's existing organization unit errors.
  • Pagination links keep the ouId parameter, and attribute filters work together with it.
  • Without ouId, the listing is unchanged. Internal callers of GetUserList (SCIM, declarative resources) pass an empty ouId.
  • GET /users/tree/{path} and GET /organization-units/{id}/users already list an organization unit's users, but they return only IDs and display names and do not support attribute filters. The Console's users page needs full user objects and filters, so the scope is added to GET /users.

Related Issues

Related PRs

  • N/A

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
    • Ran Vale and fixed all errors and warnings
  • Tests provided. (Add links if there are any)
    • Unit Tests
    • Integration Tests
  • Breaking changes. (Fill if applicable)
    • Breaking changes section filled.
    • breaking change label added.

Security checks

  • Followed secure coding standards in WSO2 Secure Coding Guidelines
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

bhagyasakalanka and others added 6 commits October 13, 2026 11:31
Signed-off-by: bhagyasakalanka <bsakalanka9@gmail.com>
Signed-off-by: bhagyasakalanka <bsakalanka9@gmail.com>
Signed-off-by: bhagyasakalanka <bsakalanka9@gmail.com>
Signed-off-by: bhagyasakalanka <bsakalanka9@gmail.com>
Keep a current version of the configuration, captured after each change
Export organization units in a stable order
@Malith-19
Malith-19 force-pushed the feat/5861-ou-subtree-users branch from 1751836 to d16958a Compare October 19, 2026 03:32
@Malith-19 Malith-19 changed the title Scope user listing to an organization unit subtree Scope user listing to an organization unit Oct 19, 2026
@Malith-19
Malith-19 force-pushed the feat/5861-ou-subtree-users branch from d16958a to 533e8dc Compare October 19, 2026 03:50
rajithacharith and others added 3 commits October 19, 2026 04:17
…ent-scope

Scope cache entries by the deployment a request acts for
Add an ouId query parameter to GET /users that limits the listing to the
users directly in that organization unit. Users in units beneath it are not
included. The caller must be allowed to list users of the unit, the same check
GET /users/tree/{path} applies, so an inaccessible unit returns 403 and an
unknown one returns USR-1005. Pagination links keep the parameter.

Refs thunder-id#5861
@Malith-19
Malith-19 force-pushed the feat/5861-ou-subtree-users branch from 533e8dc to 2ac5894 Compare October 19, 2026 05:48
@Malith-19 Malith-19 closed this Oct 23, 2026
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.

3 participants