Skip to content

[Feature request]: Fleet filtering feature for multi-tenant deployments #1081

Description

@asrafhamid

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

  1. 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.
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions