Implement RabbitMQ RPC endpoint for user management API #34

Closed
opened 2025-07-15 04:24:27 +00:00 by hurui200320 · 0 comments
Member

In ticket clevermicro/user-management#24 and clevermicro/user-management#25, Abed implemented the HTTP endpoint for managing groups and tenants, we also have HTTP endpoints for query user information. But for CleverMicro, ideally, all the internal communication should be done through RabbitMQ.

This ticket will add RabbitMQ RPC endpoints for those HTTP endpoints, offering full support for both HTTP and RabbitMQ RPC.

For RabbitMQ RPC, we should add the following routing key to a direct exchange cleverthis.clevermicro.auth.endpoints:

  • token-service-v1: services related to JWT tokens, for example, query user info with a JWT token or verify the token, etc.
  • user-service-v1: services related to user management, for example, registering new users, query user details via user name and user id, etc.
  • group-service-v1: services related to group management, for example, CRUD of groups, managing the member inside the group, etc.
  • tenant-service-v1: service related to tenant management, for example, CRUD of tenant, managing groups and member inside the tenant, etc.
  • permission-service-v1: service related to service specific permission, mainly for managing the rules in keycloak via auth-service.

Note: The permission service is optional since right now CleverSwarm doesn't require any authorization (decide who can access what). The content of the user service may depend on what CleverSwarm needs.

This ticket will only add endpoint for user service, since that's the one required by CleverSwarm. The rest will be added when CleverSwarm and CleverBrag needs them.

This ticket should design the message format, and implement the RPC handlers (with some automation on endpoint discovery), and corresponding unit tests.

In ticket clevermicro/user-management#24 and clevermicro/user-management#25, Abed implemented the HTTP endpoint for managing groups and tenants, we also have HTTP endpoints for query user information. But for CleverMicro, ideally, all the internal communication should be done through RabbitMQ. This ticket will add RabbitMQ RPC endpoints for those HTTP endpoints, offering full support for both HTTP and RabbitMQ RPC. For RabbitMQ RPC, we should add the following routing key to a direct exchange `cleverthis.clevermicro.auth.endpoints`: + `token-service-v1`: services related to JWT tokens, for example, query user info with a JWT token or verify the token, etc. + `user-service-v1`: services related to user management, for example, registering new users, query user details via user name and user id, etc. + `group-service-v1`: services related to group management, for example, CRUD of groups, managing the member inside the group, etc. + `tenant-service-v1`: service related to tenant management, for example, CRUD of tenant, managing groups and member inside the tenant, etc. + `permission-service-v1`: service related to service specific permission, mainly for managing the rules in keycloak via auth-service. Note: The permission service is optional since right now CleverSwarm doesn't require any authorization (decide who can access what). The content of the user service may depend on what CleverSwarm needs. **This ticket will only add endpoint for user service, since that's the one required by CleverSwarm. The rest will be added when CleverSwarm and CleverBrag needs them.** This ticket should design the message format, and implement the RPC handlers (with some automation on endpoint discovery), and corresponding unit tests.
hurui200320 added the
Priority
Backlog
State
Unverified
Type
Task
labels 2025-07-15 04:24:27 +00:00
hurui200320 added this to the V.01 milestone 2025-07-15 07:27:37 +00:00
hurui200320 added a new dependency 2025-07-15 07:28:04 +00:00
hurui200320 added a new dependency 2025-07-15 07:28:49 +00:00
hurui200320 added
State
In Progress
Priority
High
and removed
State
Unverified
Priority
Backlog
labels 2025-07-16 05:08:05 +00:00
hurui200320 self-assigned this 2025-07-16 05:08:09 +00:00
hurui200320 added a new dependency 2025-07-25 08:06:28 +00:00
hurui200320 added
State
In Review
and removed
State
In Progress
labels 2025-07-25 08:13:01 +00:00
hurui200320 added
State
Completed
and removed
State
In Review
labels 2025-07-31 04:57:30 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Blocks
You do not have permission to read 3 dependencies
Depends on
Reference: clevermicro/user-management#34