You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "Ma77Ball (via GitHub)" <gi...@apache.org> on 2026/06/07 01:16:11 UTC
[I] Authorization bypass: @RolesAllowed unenforced on file-service (DatasetResource) [texera]
Ma77Ball opened a new issue, #5433:
URL: https://github.com/apache/texera/issues/5433
### What happened?
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 **not** `RolesAllowedDynamicFeature`. 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.
`DatasetResource` carries ~20 `@RolesAllowed(Array("REGULAR", "ADMIN"))` annotations, e.g.:
- `file-service/.../resource/DatasetResource.scala:258`: `@POST /api/dataset/create`
- `file-service/.../resource/DatasetResource.scala:345`: `@POST /api/dataset/{did}/version/create`
- `file-service/.../resource/DatasetResource.scala:435`: `@DELETE /api/dataset/{did}`
None of these role checks actually run today.
**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?
1. Issue a JWT for a user whose role is below `REGULAR` (e.g. `RESTRICTED` or `INACTIVE`).
2. `curl -X POST -H "Authorization: Bearer <that-token>" -H "Content-Type: application/json" http://localhost:<file-service-port>/api/dataset/create -d '{...}'`
3. 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`.)
### Version/Branch
1.3.0-incubating-SNAPSHOT (main)
### Commit Hash (Optional)
5c2eaa2ce
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Authorization bypass: @RolesAllowed unenforced on file-service (DatasetResource) [texera]
Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang closed issue #5433: Authorization bypass: @RolesAllowed unenforced on file-service (DatasetResource)
URL: https://github.com/apache/texera/issues/5433
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org