google_api_gateway_test/terraform/openapi_spec.yaml

62 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2024-10-16 03:03:52 +00:00
swagger: "2.0"
info:
title: the-gateway foo
description: "Run auth through Google API Gateway."
version: "1.0.0"
schemes:
- "https"
produces:
- application/json
x-google-backend:
address: ${backend_url}
paths:
"/":
get:
description: "Hello World."
operationId: "helloWorld"
responses:
200:
description: "Success."
schema:
type: string
"/.well-known/jwks.json":
get:
description: "JWKS."
operationId: "jwks"
responses:
200:
description: "Success."
schema:
type: string
"/some_protected_endpoint":
get:
description: "An endpoint that requires auth."
operationId: "someProtectedEndpoint"
security:
- your_custom_auth_id: []
responses:
200:
description: "Success."
schema:
type: string
"/get_short_lived_token":
get:
description: "An endpoint that gives a short-lived JWT."
operationId: "getShortLivedToken"
security:
- your_custom_auth_id: []
responses:
200:
description: "Success."
schema:
type: string
securityDefinitions:
your_custom_auth_id:
authorizationUrl: ""
flow: "implicit"
type: "oauth2"
# The value below should be unique
x-google-issuer: "issuer of the token"
x-google-jwks_uri: "${backend_url}/.well-known/jwks.json"
x-google-audiences: "${client_id}"