File tree Expand file tree Collapse file tree 3 files changed +66
-1
lines changed
Expand file tree Collapse file tree 3 files changed +66
-1
lines changed Original file line number Diff line number Diff line change 3535 - name : Validate template (products stackset)
3636 run : sam validate --lint --template ./products/stackset.yaml
3737
38+ - name : Validate template (client product)
39+ run : sam validate --lint --template ./products/client/product.yaml
40+
3841 - name : Validate template (server product)
3942 run : sam validate --lint --template ./products/server/product.yaml
4043
Original file line number Diff line number Diff line change 1+ AWSTemplateFormatVersion : ' 2010-09-09'
2+ Description : Create a Cognito User Pool Client
3+
4+ Parameters :
5+ CognitoUserPoolId :
6+ Type : AWS::SSM::Parameter::Value<String>
7+ Description : The ID of the user pool to which the resource server belongs
8+ Default : /org/authnz/UserPoolId
9+ ClientName :
10+ Type : String
11+ Description : The name of the client
12+ AllowedAuthScopes :
13+ Type : CommaDelimitedList
14+ Description : The allowed OAuth scopes
15+
16+ Resources :
17+ CognitoUserPoolClient :
18+ Type : AWS::Cognito::UserPoolClient
19+ Properties :
20+ ClientName : !Ref ClientName
21+ UserPoolId : !Ref CognitoUserPoolId
22+ PreventUserExistenceErrors : ENABLED
23+ EnableTokenRevocation : true
24+ GenerateSecret : true
25+ TokenValidityUnits :
26+ IdToken : minutes
27+ AccessToken : minutes
28+ RefreshToken : days
29+ AccessTokenValidity : 10
30+ IdTokenValidity : 10
31+ RefreshTokenValidity : 1
32+ AllowedOAuthFlowsUserPoolClient : true
33+ AllowedOAuthFlows :
34+ - client_credentials
35+ AllowedOAuthScopes : !Ref AllowedAuthScopes
36+ ReadAttributes :
37+ - name
38+ WriteAttributes :
39+ - name
40+ ExplicitAuthFlows :
41+ - ALLOW_USER_SRP_AUTH
42+ - ALLOW_REFRESH_TOKEN_AUTH
43+ SupportedIdentityProviders :
44+ - COGNITO
Original file line number Diff line number Diff line change @@ -50,4 +50,22 @@ Resources:
5050 Type : AWS::ServiceCatalog::PortfolioProductAssociation
5151 Properties :
5252 PortfolioId : !Ref ApiAuthnzPortfolio
53- ProductId : !Ref CognitoResourceServerProduct
53+ ProductId : !Ref CognitoResourceServerProduct
54+
55+ CognitoUserPoolClientProduct :
56+ Type : AWS::ServiceCatalog::CloudFormationProduct
57+ Properties :
58+ Name : Cognito User Pool Client
59+ Description : Create a Cognito User Pool Client
60+ Owner : ServerlessOps
61+ ProvisioningArtifactParameters :
62+ - Name : latest
63+ Description : latest release
64+ Info :
65+ LoadTemplateFromURL : !Sub 'https://${CfnTemplateBucket}.s3.amazonaws.com/serverlessops-api-authnz/${GitHubSha}/client/product.yaml'
66+
67+ CognitoUserPoolClientProductAssociation :
68+ Type : AWS::ServiceCatalog::PortfolioProductAssociation
69+ Properties :
70+ PortfolioId : !Ref ApiAuthnzPortfolio
71+ ProductId : !Ref CognitoUserPoolClientProduct
You can’t perform that action at this time.
0 commit comments