Skip to content

Instantly share code, notes, and snippets.

@paulgear
Last active January 20, 2022 03:45
Show Gist options
  • Save paulgear/59bf1dc41b7924969a5e6a30a9709c8f to your computer and use it in GitHub Desktop.
Save paulgear/59bf1dc41b7924969a5e6a30a9709c8f to your computer and use it in GitHub Desktop.
Example for aws_api_gateway_rest_api bug
{
"openapi" : "3.0.1",
"info" : {
"title" : "this-api-gateway",
"version" : "1.0"
},
"paths" : {
"/test-auth" : {
"x-amazon-apigateway-any-method" : {
"responses" : {
"200" : {
"description" : "200 response",
"content" : {}
}
},
"security" : [ {
"auth0-authorizer" : [ ]
} ],
"x-amazon-apigateway-integration" : {
"responses" : {
"default" : {
"statusCode" : "200"
}
},
"requestTemplates" : {
"application/json" : "{\"statusCode\": 200}\n"
},
"passthroughBehavior" : "when_no_match",
"timeoutInMillis" : 29000,
"type" : "mock"
}
}
}
},
"securitySchemes" : {
"auth0-authorizer" : {
"type" : "apiKey",
"name" : "Authorization",
"in" : "header",
"x-amazon-apigateway-authtype" : "custom",
"x-amazon-apigateway-authorizer" : {
"authorizerCredentials" : "arn:aws:iam::***:role/lambda-auth0-authorizer",
"authorizerResultTtlInSeconds" : 300,
"authorizerUri" : "arn:aws:apigateway:ap-southeast-2:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-southeast-2:***:function:lambda-auth0-authorizer/invocations",
"identityValidationExpression" : "^Bearer [-0-9a-zA-z\\.]*$",
"type" : "token"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment