-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
False
-
-
False
-
BIZ-610 - ROSA-HCP
-
-
In order to support customer APIs serviced by the swatch-contracts service, we need to implement auth & rbac for customers in quarkus.
We should support a new role - "customer", which is granted to any x-rh-identity principal that has customer details (see IdentityHeaderAuthenticationDetailsService#loadUserDetails for an analogue in the monolith). Update RoleAugmentor to grant "customer" when the principal is a customer. Update the DTO for RhIdentityPrincipal to contain necessary fields (see InsightsUserPrincipal in the monolith).
For testing, update the stubbed subscriptions metric endpoint in swatch-contracts to be limited to role "customer" via @RolesAllowed({"customer"}). Also update the monolith openapi spec to reflect via securityScheme that the contracts endpoint requires auth. (Add 3scaleIdentity to security scheme for the endpoint).
- is blocked by
-
SWATCH-1174 Design subscriptions metric endpoint
- Closed