Yicong-Huang opened a new pull request, #6116:
URL: https://github.com/apache/texera/pull/6116

   ### What changes were proposed in this PR?
   
   `AdminSettingsResource` (GET/PUT/reset over the `site_settings` table) was 
registered in texera-web, while config-service already owns seeding of the same 
table at startup and has the JWT auth stack registered. This PR makes 
config-service the single owner of the table's API by folding the endpoints 
into `ConfigResource` as the write side of the config API:
   
   - `GET /config/settings/{key}` — `REGULAR`+`ADMIN` (unchanged audience: 
non-admin pages read individual keys — dashboard logo/tabs, dataset upload 
limits). Note this also tightens access: the old texera-web GET had no role 
annotation at all.
   - `PUT /config/settings/{key}` — `ADMIN` only (same as before)
   - `POST /config/settings/reset/{key}` — `ADMIN` only (same as before)
   
   `AdminSettingsResource` is deleted from texera-web and the frontend 
`AdminSettingsService` base URL moves from `/api/admin/settings` to 
`/api/config/settings`, riding the existing `/api/config` routing in both 
`proxy.config.json` and the single-node nginx config — no proxy/nginx/k8s 
changes needed. Endpoint payload shapes are unchanged, so the admin settings 
page and all reader components work as before.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6115
   
   ### How was this PR tested?
   
   - `sbt ConfigService/test`: 18 tests pass, including 5 new cases in 
`ConfigResourceAuthSpec` pinning the auth gates of the new endpoints (anonymous 
→ 401 with Bearer challenge; REGULAR PUT/reset → 403; ADMIN reset of a key with 
no default → 404, proving the role gate admits ADMIN). The spec now also 
registers `AuthValueFactoryProvider.Binder`, mirroring production 
`AuthFeatures.register`, so `@Auth SessionUser` parameters resolve.
   - `sbt WorkflowExecutionService/compile` passes after removing the resource 
from texera-web.
   - `sbt scalafmtAll` clean.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (claude-fable-5)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to