Merged in feature/permit-integration-1 (pull request #172)

Permit integration - part 1

* WIP permit integration

* slim down build

* Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/permit-integration-1

* omit swagger from auth

* clean build

* comment

* part 1 completed

this is the initial permitio parts and tests without integration. Also testing.md since we have a new test target `task test:permitio`

* feature flag for no jwt validation

* permit integration

* fix ci unit tests

* ci fix

* build fix

* fix home handler

* fix redirect

* test fix

* update docs for auth
This commit is contained in:
Jay Brown
2025-07-11 19:27:14 +00:00
parent 673ba503c8
commit 2ff6e05ffc
53 changed files with 2800 additions and 292 deletions
+1 -5
View File
@@ -189,11 +189,7 @@ func New(ctx context.Context, cfg Config) (*Server, error) {
e := echo.New()
cfg.SetRouter(e)
// auth start - may move to separate rbac function
// update these to match the endpoints.
routePermissions := GetRoutePermissions()
cfg.SetAuthRoutePermissions(routePermissions)
// auth start - using Permit.io for authorization
cognitoauth.RegisterRoutes(cfg.GetRouter(), cfg)
// auth end
-11
View File
@@ -1,11 +0,0 @@
package api
func GetRoutePermissions() map[string][]string {
return map[string][]string{
"/client": {"exporters", "uploaders", "querybuilders"},
"/document": {"exporters", "querybuilders"},
"/query": {"exporters", "uploaders", "querybuilders"},
"/export": {"exporters"},
"/settings": {"exporters"},
}
}