pulumi / pulumi-aws-apigateway

Apache License 2.0
11 stars 5 forks source link

Lambda authorizers not created if properties missing #10

Closed danielrbradley closed 2 years ago

danielrbradley commented 2 years ago

Hello!

Issue details

If authType isn't set to 'custom', the deployment will succeed, but no authorization will be applied. This is mapped to the x-amazon-apigateway-authtype property.

Steps to reproduce

const api = new apigateway.RestAPI("api", {
    routes: [{
        path: "/",
        localPath: "www",
        // Define an authorizer which uses Lambda to validate the token from the Authorization header
        authorizers: [{
            authType: "custom",// <- if this property is not defined, authorization will be removed siliently
            parameterName: "Authorization",
            type: "request",
            identitySource: ["method.request.header.Authorization"],
            handler: authLambda,
        }]
    }],
});

Expected: Deployment should not succeed. Actual: Deployment succeeds but no authorizers are applied.

lukehoban commented 2 years ago

It looks like perhaps this is the same issue as tracked in https://github.com/pulumi/pulumi-awsx/issues/564?

danielrbradley commented 2 years ago

Closing as duplicate of https://github.com/pulumi/pulumi-awsx/issues/564

pulumi-bot commented 2 years ago

Cannot close issue without required labels: resolution/