-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow explicit AWS::NoValue for Api and HttpApi Gateway Default Autho…
…rizer Use AWS::NoValue rather than NONE to preserve backwards compatibility with any templates that have authorizers named NONE
- Loading branch information
1 parent
9074ad0
commit d5d7f94
Showing
22 changed files
with
6,762 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
144 changes: 144 additions & 0 deletions
144
tests/translator/input/api_with_auth_explicit_inline_no_default.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
Resources: | ||
MyApiWithCognitoAuth: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: Prod | ||
Auth: | ||
DefaultAuthorizer: !Ref AWS::NoValue | ||
Authorizers: | ||
MyCognitoAuth: | ||
UserPoolArn: !GetAtt MyUserPool.Arn | ||
|
||
MyApiWithLambdaTokenAuth: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: Prod | ||
Auth: | ||
DefaultAuthorizer: !Ref AWS::NoValue | ||
Authorizers: | ||
MyLambdaTokenAuth: | ||
FunctionArn: !GetAtt MyAuthFn.Arn | ||
|
||
MyApiWithLambdaRequestAuth: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: Prod | ||
Auth: | ||
DefaultAuthorizer: !Ref AWS::NoValue | ||
Authorizers: | ||
MyLambdaRequestAuth: | ||
FunctionPayloadType: REQUEST | ||
FunctionArn: !GetAtt MyAuthFn.Arn | ||
Identity: | ||
Headers: | ||
- Authorization1 | ||
MyAuthFn: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: s3://bucket/key | ||
Handler: index.handler | ||
Runtime: nodejs12.x | ||
MyFn: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
CodeUri: s3://bucket/key | ||
Handler: index.handler | ||
Runtime: nodejs12.x | ||
Events: | ||
CognitoNoAuth: | ||
Type: Api | ||
Properties: | ||
RestApiId: !Ref MyApiWithCognitoAuth | ||
Method: get | ||
Path: /cognito/no-auth | ||
CognitoNoAuthAnyMethod: | ||
Type: Api | ||
Properties: | ||
RestApiId: !Ref MyApiWithCognitoAuth | ||
Method: any | ||
Path: /cognito/any/no-auth | ||
Cognito: | ||
Type: Api | ||
Properties: | ||
RestApiId: !Ref MyApiWithCognitoAuth | ||
Method: get | ||
Path: /any/cognito | ||
Auth: | ||
Authorizer: MyCognitoAuth | ||
CognitoAnyMethod: | ||
Type: Api | ||
Properties: | ||
RestApiId: !Ref MyApiWithCognitoAuth | ||
Method: any | ||
Path: /any/cognito | ||
Auth: | ||
Authorizer: MyCognitoAuth | ||
LambdaTokenNoAuth: | ||
Type: Api | ||
Properties: | ||
RestApiId: !Ref MyApiWithLambdaTokenAuth | ||
Method: get | ||
Path: /lambda-token/no-auth | ||
LambdaTokenNoAuthAnyMethod: | ||
Type: Api | ||
Properties: | ||
RestApiId: !Ref MyApiWithLambdaTokenAuth | ||
Method: any | ||
Path: /lambda-token/any/no-auth | ||
LambdaToken: | ||
Type: Api | ||
Properties: | ||
RestApiId: !Ref MyApiWithLambdaTokenAuth | ||
Method: get | ||
Path: /lambda-token | ||
Auth: | ||
Authorizer: MyLambdaTokenAuth | ||
LambdaTokenAnyMethod: | ||
Type: Api | ||
Properties: | ||
RestApiId: !Ref MyApiWithLambdaTokenAuth | ||
Method: any | ||
Path: /any/lambda-token | ||
Auth: | ||
Authorizer: MyLambdaTokenAuth | ||
LambdaRequestNoAuth: | ||
Type: Api | ||
Properties: | ||
RestApiId: !Ref MyApiWithLambdaRequestAuth | ||
Method: get | ||
Path: /lambda-request/no-auth | ||
LambdaRequestNoAuthAnyMethod: | ||
Type: Api | ||
Properties: | ||
RestApiId: !Ref MyApiWithLambdaRequestAuth | ||
Method: any | ||
Path: /lambda-request/any/no-auth | ||
LambdaRequest: | ||
Type: Api | ||
Properties: | ||
RestApiId: !Ref MyApiWithLambdaRequestAuth | ||
Method: get | ||
Path: /lambda-request | ||
Auth: | ||
Authorizer: MyLambdaRequestAuth | ||
LambdaRequestAnyMethod: | ||
Type: Api | ||
Properties: | ||
RestApiId: !Ref MyApiWithLambdaRequestAuth | ||
Method: any | ||
Path: /any/lambda-request | ||
Auth: | ||
Authorizer: MyLambdaRequestAuth | ||
MyUserPool: | ||
Type: AWS::Cognito::UserPool | ||
Properties: | ||
UserPoolName: UserPoolName | ||
Policies: | ||
PasswordPolicy: | ||
MinimumLength: 8 | ||
UsernameAttributes: | ||
Schema: | ||
- AttributeDataType: String | ||
Name: email | ||
Required: false |
Oops, something went wrong.