Open tsuga opened 1 month ago
Findings:
AddApiKeyRequiredToCorsPreflight: Boolean
AddDefaultAuthorizerToCorsPreflight: Boolean
ApiKeyRequired: Boolean
Authorizers: CognitoAuthorizer | LambdaTokenAuthorizer | LambdaRequestAuthorizer
DefaultAuthorizer: String
InvokeRole: String
ResourcePolicy: ResourcePolicyStatement
UsagePlan: ApiUsagePlan
loadAwsServiceSpec
ins imported from @aws-cdk/aws-service-spec
module.db.json.gz
into buffer.db.json.gz
is generated via build-db.main() which creates instance of FullDatabase.FullDatabase
imports CloudFormation resource spec
, SAM resource spec
, etc. here.
CloudFormationResourceSpecification/us-east-1/100_sam
and SAMSpec/sam.schema.json
.AWS::Serverless::Api.Auth
, it only defines below properties:DefaultAuthorizer
Authorizers
AddDefaultAuthorizerToCorsPreflight
Will monitor to check if SAMSpec/sam.schema.json is updated in few days.
We will be loading the SAM resources from the official SAM schema https://raw.githubusercontent.com/aws/serverless-application-model/develop/schema_source/sam.schema.json
Once https://github.com/cdklabs/awscdk-service-spec/pull/898 is merged, you shall see the updated schemas with ResourcePolicy
, ApiKeyRequired
in it.
Describe the bug
AWS::Serverless::Api
supports various auth methods.However, only
AddDefaultAuthorizerToCorsPreflight
,Authorizers
, andDefaultAuthorizer
are supported. Others such asResourcePolicy
andApiKeyRequired
are not supported../node_modules/aws-cdk-lib/aws-sam/lib/sam.generated.d.ts
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
It should cover all supported options.
Current Behavior
only
AddDefaultAuthorizerToCorsPreflight
,Authorizers
, andDefaultAuthorizer
are supported.Reproduction Steps
See above
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.159.1 (build c66f4e3)
Framework Version
No response
Node.js Version
20
OS
ubuntu
Language
TypeScript
Language Version
No response
Other information
No response