trinodb / trino-gateway

https://trinodb.github.io/trino-gateway/
Apache License 2.0
122 stars 47 forks source link

Move gateway related APIs under a dedicated path #386

Open oneonestar opened 2 weeks ago

oneonestar commented 2 weeks ago

Follow up the discussion on Trino Gateway dev sync, 29 May 2024.

  • Discussed how we have context paths for Trino and Trino Gateway that overlap
    • Explained paths and extrawhitelist paths configuration
    • Decided to move to specific context for Trino Gateway in the longer run
    • For example /tgw/ui and /tgw/api and so on
    • And then assume all others have to be passed through
    • But that is a larger refactor for later (after airlift refactor and such)
All Gateway APIs ``` / /api/activeBackends /api/public/backends /api/public/backends/{name} /api/public/backends/{name}/state /api/queryHistory /api/queryHistoryDistribution /entity /entity /entity/{entityType} /gateway /gateway/backend/activate/{name} /gateway/backend/active /gateway/backend/all /gateway/backend/deactivate/{name} /gateway/backend/modify/add /gateway/backend/modify/delete /gateway/backend/modify/update /login /loginType /logout /oidc/callback /sso /trino/globalproperty/create /trino/globalproperty/delete/{name} /trino/globalproperty/read /trino/globalproperty/read/{name} /trino/globalproperty/update /trino/resourcegroup/create /trino/resourcegroup/delete/{resourceGroupId} /trino/resourcegroup/read /trino/resourcegroup/read/{resourceGroupId} /trino/resourcegroup/update /trino/selector/create /trino/selector/delete/ /trino/selector/read /trino/selector/read/{resourceGroupId} /trino/selector/update /userinfo /webapp/deleteBackend /webapp/deleteGlobalProperty /webapp/deleteResourceGroup /webapp/deleteSelector /webapp/findExactMatchSourceSelector /webapp/findGlobalProperty /webapp/findQueryHistory /webapp/findResourceGroup /webapp/findSelector /webapp/getAllBackends /webapp/getDistribution /webapp/getGlobalProperty /webapp/getResourceGroup /webapp/getSelector /webapp/saveBackend /webapp/saveExactMatchSourceSelector /webapp/saveGlobalProperty /webapp/saveResourceGroup /webapp/saveSelector /webapp/updateBackend /webapp/updateGlobalProperty /webapp/updateResourceGroup /webapp/updateSelector ```

I think moving everything under /trino-gateway/ make sense. We should also get an agreement with Trino developers on reserving this path for Trino Gateway only.

Also, there are some overlapping of function in these APIs. Might need to clean them up later.

Any other ideas?