You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Authorization bypass: @RolesAllowed unenforced on file-service (DatasetResource) #5433
Follow-up to #4904 (now closed). That issue tracked @RolesAllowed annotations being unenforced across the microservices because they never registered Jersey's RolesAllowedDynamicFeature. Most services were since wired up (#5049 / #5199), and access-control-service is being addressed in #5421, but file-service was missed.
file-service registers JwtAuthFilter and the AuthValueFactoryProvider.Binder, but notRolesAllowedDynamicFeature. As a result, every @RolesAllowed annotation on DatasetResource is decorative: a request that authenticates with any valid JWT reaches the resource method regardless of the user's role.
Expected: a JWT whose role is below REGULAR/ADMIN should be rejected with 403 on these endpoints. Actual: the request succeeds; the role check is silently skipped.
How to reproduce?
Issue a JWT for a user whose role is below REGULAR (e.g. RESTRICTED or INACTIVE).
Observe: the request reaches createDataset and is processed; the @RolesAllowed(Array("REGULAR", "ADMIN")) check is not applied. (With RolesAllowedDynamicFeature registered, the same request returns 403.)
Activity
fix(auth): enforce @RolesAllowed in file-service by registering Roles…
fix(auth): enforce @RolesAllowed in file-service by registering Roles…
fix(auth): enforce @RolesAllowed in file-service by registering Roles…
fix(auth): enforce @RolesAllowed in file-service by registering Roles…