Skip to content

Add management operations for agents, groups, roles and users - #41

Merged
brionmario merged 1 commit into
thunder-id:mainfrom
brionmario:feat-cp-dp-separation
Oct 27, 2026
Merged

brionmario merged 1 commit into
thunder-id:mainfrom
brionmario:feat-cp-dp-separation

Conversation

@brionmario

@brionmario brionmario commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Purpose

Adds agent, group, role and user management to the Android SDK: the management operations and Compose admin components for each. Roles carry their permissions, and the SDK can read the permissions an access token grants to decide what to show. This brings it in line with the equivalent JavaScript change (thunder-id/javascript-sdks#130).

Approach

  • Endpoints: groups, roles, agent types and user types join the existing management endpoint settings. Each collection defaults to {baseUrl}/{collection}.

  • Management APIs:

    • Groups and roles: list, get, create, update and delete, plus group members and role assignments.
    • Agent groups, agent roles, agent types, user groups and user types.
    • The transport gains sub-resource reads and actions for members and assignments.
  • Permissions: helpers that read the permissions an access token grants and match them the way the server does (system:user covers system:user:view), and granted permissions exposed through the SDK state.

  • UI: Compose admin components for users, groups, roles and agents (list, create, details, members, permissions and assignments), each with a Base* variant, with their strings.

  • Custom rendering: every admin component, Base* and connected, takes an optional trailing content lambda, the same pattern as BaseSignIn, and renders it in place of its own UI. It receives the component's state: rows, paging and selection for a list; values, setters, submit and validity for a form; the record and the allowed actions for details, members, assignments and permissions.

  • Search and filters: UserList and AgentList search on the server (users by username or email, agents by name), and RoleAssignments filters by assignee type. The server matches one attribute exactly, so the search applies on submit. The agents API gains filter, and ManagementFilter.equality builds the expression. Groups, roles and group members have no server filter, so they stay unfiltered.

  • Layout: the Compose components are grouped by function instead of by kind: auth/ (with buttons/, flow/ and guards/), account/, admin/ and common/. The data layer stays in management/. See Breaking Changes.

Related Issues

Related PRs

Samples-Ref: refs/pull/14/head

Playground

The playground exercises the new APIs:

  • capability checks for each new resource and for permissions
  • explorer stories for every admin component, with sample data, live variants and Compose snippets
  • a permissions view in the session inspector
  • a Custom rendering group that draws UserList, GroupCreate and UserDetails with Compose views through the trailing content lambda
  • a card showing where each management collection resolves

THUNDERID_ENDPOINT_<KEY> overrides one management collection's URL. The SDK gaps the playground hit are listed in its README.

Screenshots

From the playground on the Android emulator.

Admin components

UserList UserDetails GroupMembers
UserList UserDetails GroupMembers
RoleAssignments
RoleAssignments

Custom rendering through the content lambda

UserList as ListItems GroupCreate, Material form UserDetails, Material card
UserList as ListItems GroupCreate, Material form UserDetails, Material card

Verified locally: ./gradlew ktlintCheck assembleDebug in the playground, which builds the SDK as an included build, and ./gradlew testDebugUnitTest ktlintCheck for the SDK. The Custom rendering stories were not run on an emulator. The live management checks have only run signed out so far.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

🔀 Cross-SDK feature parity, ports raised

This pull request is labelled parity/prs-raised, so the capability it introduces is expected in the other ThunderID SDKs as well.

Ports (DO NOT EDIT)

  • thunder-id/javascript-sdks, JavaScript (React, Vue, Nuxt, Next.js, Express, React Router, TanStack Router, Browser, Node) => #130
  • thunder-id/ios-sdks, iOS => #33
  • thunder-id/flutter-sdks, Flutter => #51

3 of 3 sibling SDKs accounted for.

Every sibling SDK is accounted for.

The contract is in the SDK development specification.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@brionmario
brionmario force-pushed the feat-cp-dp-separation branch from e9568c9 to 704e1c7 Compare October 22, 2026 11:33
@brionmario brionmario changed the title Add groups, roles and permissions management, and let management APIs live on a separate control plane Add groups, roles and permissions management Oct 22, 2026
@brionmario brionmario changed the title Add groups, roles and permissions management Add management operations for agents, groups, roles and users Oct 26, 2026
@brionmario
brionmario force-pushed the feat-cp-dp-separation branch from 57a7a15 to a7cf716 Compare October 26, 2026 11:51
@brionmario brionmario added the parity/prs-raised Ports exist in the other SDKs, or are recorded as not applying there label Oct 26, 2026
@brionmario
brionmario force-pushed the feat-cp-dp-separation branch 2 times, most recently from e7eaaa9 to 515684e Compare October 26, 2026 12:42
DonOmalVindula
DonOmalVindula previously approved these changes Oct 27, 2026
Adds group and role management to the Android SDK alongside the
existing user and agent operations: list, get, create, update and
delete, group members and role assignments, agent and user groups and
roles, agent types and user types, each with its own endpoint setting.

Helpers read the permissions an access token grants and match them the
way the server does, and the granted permissions are exposed through
the SDK state.

Compose admin components cover users, groups, roles and agents (list,
create, details, members, permissions and assignments), each with a
Base variant and an optional trailing content lambda that replaces the
built-in UI. UserList and AgentList search on the server, and
RoleAssignments filters by assignee type. Admin table cells render in
the theme's content color.

The Compose components are now grouped by function instead of by kind:
auth (with buttons, flow and guards), account, admin and common.

BREAKING CHANGE: the components shipped in v1.5.0 (unchanged since v1.4.0) move to new packages
under dev.thunderid.compose.components: actions -> auth.buttons,
actions.adapters -> auth.buttons.adapters, flow -> auth, guards ->
auth.guards, presentation.auth -> auth (FlowErrorBanner -> auth.flow),
presentation.user -> account, presentation.organization -> common.
Apps update their imports; nothing else changes.

The playground exercises the new operations and components, including
custom rendering through the content lambda.

The PR builder can build the quickstart and run the E2E suite against a
samples pull request: a "Samples-Ref:" line in the pull request body
names the thunder-id/samples ref to fetch instead of main, so a change
that breaks the quickstart can be tested with the sample fix it ships
with.

Refs thunder-id/thunderid#5162

Signed-off-by: Brion <info@brionmario.com>
@brionmario
brionmario merged commit fbc0ebe into thunder-id:main Oct 27, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parity/prs-raised Ports exist in the other SDKs, or are recorded as not applying there

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants