Move amber/web onto the in-house JwtAuthFilter
- Dominant language
- Scala
- Stars
- 314
- Forks
- 187
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 214
Description
### Task Summary
Once Dropwizard 4 is in place in amber and the namespace migration is complete, replace amber's toastshaman wiring with the in-house `org.apache.texera.auth.JwtAuthFilter` that the five microservices already use. Concretely:
- `amber/src/main/scala/org/apache/texera/web/TexeraWebApplication.scala` and `ComputingUnitMaster.scala`: replace `setupJwtAuth(environment)` calls with the in-house registration pattern (`AuthDynamicFeature(classOf[JwtAuthFilter])` + `UnauthorizedExceptionMapper` + `AuthValueFactoryProvider.Binder` + `RolesAllowedDynamicFeature`)
- Delete `amber/src/main/scala/org/apache/texera/web/auth/JwtAuth.scala`, `UserAuthenticator.scala`, `UserRoleAuthorizer.scala`
- Remove the `com.github.toastshaman:dropwizard-auth-jwt` dependency from `amber/build.sbt`
The behavior delta is small but visible: amber's challenge changes from `Bearer realm="realm"` to `Bearer realm="texera"`, and invalid-token responses gain the `error="invalid_token"` parameter the in-house filter already emits for the other services. Closes the unification tracked under #4901.
Part of #5423. Closes #4901 once landed.
### Task Type
- [x] Refactor / Cleanup
Contributor guide
Assessment
This issue has not been assessed yet.