Repository navigation
Open
Labels
Area/GatewayAny issues related to API deployment in gateway, routing etc.Any issues related to API deployment in gateway, routing etc.Area/Platform-APIAspect/APIAPI definitions, contracts, OpenAPI, interfacesAPI definitions, contracts, OpenAPI, interfacesSeverity/MajorType/Bug
Description
Please select the area the issue is related to
Gateway, Platform API
Please select the aspect the issue is related to
Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI)
Description
A GraphQL API's upstream credential (upstream.main.auth) never reaches the backend. Unlike REST APIs, platform-api does put it in the deployment, but the gateway drops it. There are two problems:
- The backend gets no credential. The gateway's copy of the API has no
authunderupstream.main, and the backend receives noAuthorizationheader. The gateway'sUpstreamschema (gateway/gateway-controller/api/management-openapi.yaml:4489) has no auth field, so the block is discarded. - The credential is stored in plaintext. The deployment artifact platform-api keeps (the
deployments.contentrow) holds the value in clear text:
spec:
displayName: b12-gql
version: v1
context: /b12
upstream:
main:
url: http://192.168.5.2:8095/graphql
auth:
type: bearer
header: ""
value: gql-backend-tokenExpected: the backend receives the credential, and platform-api stores it as a secret reference rather than as plaintext in the deployment.
Actual: the credential is dropped on the gateway and kept in plaintext in platform-api's database.
Steps to Reproduce
- Create a GraphQL API with an upstream bearer credential.
POST /api/v0.9/graphql-apistakesmultipart/form-datawith ametadatapart:
{"id":"b12-gql","displayName":"b12-gql","context":"/b12","version":"v1","projectId":"default","schemaSource":"inline","sdl":"type Query { hello: String }","upstream":{"main":{"url":"<echo-backend>/graphql","auth":{"type":"bearer","value":"gql-backend-token"}}}}. It returns201. - Deploy it:
POST /api/v0.9/graphql-apis/b12-gql/deploymentswith{"name":"d1","base":"current","gatewayId":"<gateway-id>"}. Wait forDEPLOYED. - Read the stored artifact for that deployment from platform-api's database:
SELECT content FROM deployments WHERE uuid='<deploymentId>'. It containsvalue: gql-backend-token, as shown above. - The gateway's copy (
GET /api/management/v1/graphql-apison the gateway controller) shows"upstream":{"main":{"url":"<echo-backend>/graphql"}}with noauth. - Call the API through the gateway:
POST <router>/b12with{"query":"{hello}"}. It returns200, and the echo backend shows noAuthorizationheader.
Severity Level of the Issue
Severity/Major (Important functionality is broken. Should be prioritized. Doesn't need immediate attention)
Environment Details (with versions)
- Source:
mainatf5c93849. - platform-api built from source (SQLite).
- Gateway images (
gateway-controller/gateway-runtime2026.09.24) built from that commit. - Echo backend:
ghcr.io/wso2/api-platform/sample-service:latest. - macOS with Rancher Desktop.
Metadata
Metadata
Assignees
Labels
Area/GatewayAny issues related to API deployment in gateway, routing etc.Any issues related to API deployment in gateway, routing etc.Area/Platform-APIAspect/APIAPI definitions, contracts, OpenAPI, interfacesAPI definitions, contracts, OpenAPI, interfacesSeverity/MajorType/Bug
Activity