Before proceeding, is there an existing issue or discussion for this?
Description
Hi team,
Following up on our conversation in the community forum. We are developing a fleet filtering feature for deployments where a single RMF instance serves multiple departments, each with their own robot fleet. I wanted to open this issue so @aaronchongth on can follow up as discussed.
What we are building
We are making changes across three areas:
- Keycloak : group and role configuration to carry fleet and permission identity in the JWT, including a fleet claim via a Group Attribute Mapper
- Backend (api-server) : fleet-aware filtering on existing endpoints and new fleet-specific endpoints, enforced using claims from the JWT. A role-to-permission mapping is also added to translates a user's role claim into a set of allowed actions, which is then checked at the route level before any data is returned.
- Frontend (dashboard) : UI changes to reflect the filtered data and allow fleet selection where applicable
How fleet identity is carried
Fleet membership is communicated via a fleet claim in the JWT. On each request, the backend reads this claim to determine what data gets returned to the user.
For role-based permission separation within a department (e.g. regular user vs supervisor), we are currently using a role claim approach via existing Keycloak realm roles. Would a permissions claim embedded directly in the JWT be a better fit with the existing RMF auth model? Would appreciate some opinion on this :)
Concerns about pushing upstream
- Keycloak dependency : the current approach assumes the fleet claim is present in the JWT. Deployments not configured with fleet claims would receive empty results or 403 errors on affected endpoints. This needs to be made opt-in so existing deployments are unaffected.
- Modifications to existing endpoints : the fleet filtering touches existing endpoints, not only new ones. Without an opt-in guard, upgrading deployments would be affected.
Implementation Considerations
No response
Alternatives
No response
Additional information
No response
Before proceeding, is there an existing issue or discussion for this?
Description
Hi team,
Following up on our conversation in the community forum. We are developing a fleet filtering feature for deployments where a single RMF instance serves multiple departments, each with their own robot fleet. I wanted to open this issue so @aaronchongth on can follow up as discussed.
What we are building
We are making changes across three areas:
How fleet identity is carried
Fleet membership is communicated via a fleet claim in the JWT. On each request, the backend reads this claim to determine what data gets returned to the user.
For role-based permission separation within a department (e.g. regular user vs supervisor), we are currently using a role claim approach via existing Keycloak realm roles. Would a permissions claim embedded directly in the JWT be a better fit with the existing RMF auth model? Would appreciate some opinion on this :)
Concerns about pushing upstream
Implementation Considerations
No response
Alternatives
No response
Additional information
No response