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 microservices, workflow-compiling-service requires no token at all #4904
@RolesAllowed annotations on microservice resources are not enforced because none of the microservices register Jersey's RolesAllowedDynamicFeature. The annotations are decorative — anyone with a valid JWT can hit endpoints labeled @RolesAllowed(Array("ADMIN")), regardless of the user's role.
workflow-compiling-service is worse: it registers neither JwtAuthFilter nor RolesAllowedDynamicFeature, so its @RolesAllowed endpoint runs without any authentication or authorization at all.
amber correctly registers RolesAllowedDynamicFeature (amber/.../web/TexeraWebApplication.scala:142 and amber/.../web/ComputingUnitMaster.scala:172), so its annotations work as intended.
computing-unit-managing-service/.../resource/ComputingUnitAccessResource.scala:104 — same
workflow-compiling-service/.../resource/WorkflowCompilationResource.scala:59 — same (and the request is unauthenticated to begin with)
How to reproduce?
Issue a JWT for a user whose role is below the one a @RolesAllowed annotation requires (e.g. role INACTIVE against @RolesAllowed(Array("REGULAR", "ADMIN"))).
curl -H "Authorization: Bearer <that-token>" http://localhost:<port>/api/<annotated-endpoint> against config-service or computing-unit-managing-service.
Observe: the request succeeds with 200. The role check is silently skipped.
For workflow-compiling-service, omit the token entirely: any request reaches the resource method. No JwtAuthFilter runs because the service never registers it.
changed the title [-]Microservices do not enforce @RolesAllowed; workflow-compiling-service has no auth filter at all[/-][+]Authorization bypass: @RolesAllowed unenforced on microservices, workflow-compiling-service requires no token at all[/+]on May 4, 2026
Fixed. Enforcement re-landed in #5199 (all five microservices now register JwtAuthFilter + RolesAllowedDynamicFeature via the shared AuthFeatures.register), file-service was covered in #5198, and #5743 added RoleAnnotationEnforcer, which fails service startup if any HTTP resource method lacks @RolesAllowed/@PermitAll/@DenyAll — so annotations can no longer silently be decorative. workflow-compiling-service now requires a JWT as well. Follow-up (out of scope here): notebook-migration-service registers the auth stack but doesn't run RoleAnnotationEnforcer yet.
Activity
[-]Microservices do not enforce @RolesAllowed; workflow-compiling-service has no auth filter at all[/-][+]Authorization bypass: @RolesAllowed unenforced on microservices, workflow-compiling-service requires no token at all[/+]Yicong-Huang commentedon May 4, 2026
@chenlica please check this issue.
Ma77Ball commentedon May 13, 2026
/take
fix: enforce @RolesAllowed on microservice resources (apache#5049)
Yicong-Huang commentedon May 24, 2026
@Ma77Ball please make sure to reopen the issue when revert lands.
fix: enforce @RolesAllowed on microservice resources (apache#5199)
Yicong-Huang commentedon Jun 7, 2026
still have more work to do
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: enforce @RolesAllowed on microservice resources (apache#5049)
fix: enforce @RolesAllowed on microservice resources (apache#5199)
fix(auth): enforce @RolesAllowed in file-service by registering Roles…
Yicong-Huang commentedon Jul 5, 2026
Fixed. Enforcement re-landed in #5199 (all five microservices now register
JwtAuthFilter+RolesAllowedDynamicFeaturevia the sharedAuthFeatures.register), file-service was covered in #5198, and #5743 addedRoleAnnotationEnforcer, which fails service startup if any HTTP resource method lacks@RolesAllowed/@PermitAll/@DenyAll— so annotations can no longer silently be decorative. workflow-compiling-service now requires a JWT as well. Follow-up (out of scope here): notebook-migration-service registers the auth stack but doesn't runRoleAnnotationEnforceryet.fix(auth): enforce role annotation coverage in notebook-migration-ser…