This is an automated email from the ASF dual-hosted git repository.

lahirujayathilake pushed a commit to branch auth-endpoints
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git

commit 326f4728550a6c3545418344aa2e9710386c1d0f
Author: lahiruj <[email protected]>
AuthorDate: Tue Jun 16 19:25:42 2026 -0400

    Switch swagger annotations to BearerAuth scheme
---
 cmd/server/main.go                                  | 8 ++++----
 connectors/ACCESS/AMIE-Processor/pkg/amie/loader.go | 5 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/cmd/server/main.go b/cmd/server/main.go
index 2f716d45c..ef956a6b1 100644
--- a/cmd/server/main.go
+++ b/cmd/server/main.go
@@ -47,13 +47,13 @@ import (
 
 // @title      Apache Custos Core API
 // @version    0.2.0
-// @description        REST API for Apache Custos: organizations, users, 
projects, compute clusters and allocations, audit traces, and the 
privilege/role authorization layer. Authenticate every request with the 
X-Custos-User-Id header. Connector endpoints (/connectors/<name>/...) are 
documented in separate specs.
+// @description        REST API for Apache Custos: organizations, users, 
projects, compute clusters and allocations, audit traces, and the 
privilege/role authorization layer. Authenticate every request with an OIDC 
bearer token in the Authorization header. Connector endpoints 
(/connectors/<name>/...) are documented in separate specs.
 // @host       localhost:8080
 // @BasePath   /
-// @securityDefinitions.apikey CustosUserHeader
+// @securityDefinitions.apikey BearerAuth
 // @in header
-// @name       X-Custos-User-Id
-// @description.CustosUserHeader       Identifies the calling user. Dev: 
dev-admin, dev-operator, dev-auditor, dev-researcher (see 
dev-ops/compose/seeds/dev_users_and_roles.sql).
+// @name       Authorization
+// @description.BearerAuth     OIDC bearer access token issued by the 
configured IdP. Prefix the value with "Bearer ".
 func main() {
        
slog.SetDefault(slog.New(tracing.SlogHandler(slog.NewJSONHandler(os.Stdout, 
nil))))
 
diff --git a/connectors/ACCESS/AMIE-Processor/pkg/amie/loader.go 
b/connectors/ACCESS/AMIE-Processor/pkg/amie/loader.go
index 96af76fdd..39440472d 100644
--- a/connectors/ACCESS/AMIE-Processor/pkg/amie/loader.go
+++ b/connectors/ACCESS/AMIE-Processor/pkg/amie/loader.go
@@ -63,9 +63,10 @@ const connectorName = "amie"
 // @description        REST endpoints for the ACCESS-CI AMIE connector, all 
under /connectors/amie/.
 // @host       localhost:8080
 // @BasePath   /
-// @securityDefinitions.apikey CustosUserHeader
+// @securityDefinitions.apikey BearerAuth
 // @in header
-// @name       X-Custos-User-Id
+// @name       Authorization
+// @description.BearerAuth     OIDC bearer access token issued by the 
configured IdP. Prefix the value with "Bearer ".
 func LoadConnector(ctx context.Context, database *sqlx.DB, eventBus 
*events.Bus, coreService *coreservice.Service, wg *sync.WaitGroup, mux 
*http.ServeMux, connectorConfig *custosconfig.ConnectorConfig) error {
        cfg := loadConfig(connectorConfig)
        if cfg.APIKey == "" || cfg.BaseURL == "" || cfg.SiteCode == "" {

Reply via email to