- Deploy to app engine flex with following config in
app.yaml:
endpoints_api_service:
name: hello.example.com
rollout_strategy: managed
- Deploy service config as such:
host: hello.example.com
securityDefinitions:
auth0_jwk:
authorizationUrl: ''
flow: implicit
type: oauth2
x-google-issuer: https://<TENANT>.auth0.com/
x-google-jwks_uri: https://<TENANT>.auth0.com/.well-known/jwks.json
x-google-audiences: https://hello.example.com
x-google-endpoints:
- name: hello.example.com
allowCors: true
security:
- auth0_jwk: []
- Hit the app engine endpoint with a token that looks like this:
{
"header": {...},
"payload": {
"iss": "https://<TENANT>.auth0.com/",
"sub": "<ID>",
"aud": [
"https://hello.example.com",
"https://<TENANT>.auth0.com/userinfo"
],
"iat": <>,
"exp": <>,
"azp": <>,
"scope": "openid email",
"permissions": []
},
"signature": <>
}
- Look at
X-Endpoint-API-UserInfo header received by the app engine app:
{
"claims": "{\"iss\":\"https://<TENANT>.auth0.com/\",\"sub\":\"<ID>\",\"aud\":\"\",\"iat\":<>\"exp\":<>,\"azp\":\"<>\",\"scope\":\"openid email\",\"permissions\":[]}","issuer":"https://<TENANT>.auth0.com/","id":"<ID>"}
Bug: aud is empty here
Expected: aud = https://hello.example.com
The same workflow when deployed using Cloud Run (except x-google-backend is included in service swagger yaml), creates a user info header that includes the audience field correctly.
app.yaml:X-Endpoint-API-UserInfoheader received by the app engine app:Bug:
audis empty hereExpected:
aud=https://hello.example.comThe same workflow when deployed using Cloud Run (exceptx-google-backendis included in service swagger yaml), creates a user info header that includes the audience field correctly.