@@ -50,7 +50,7 @@ Metadata:
50
50
# Update the semantic version and run sam publish to publish a new version of your app
51
51
SemanticVersion : 1.0.0-rc.10
52
52
# best practice is to use git tags for each release and link to the version tag as your source code URL
53
- SourceCodeUrl : https://github.com/awslabs/ssosync/tree/1.0.0-rc.10
53
+ SourceCodeUrl : https://github.com/awslabs/ssosync/
54
54
55
55
Parameters :
56
56
FunctionName :
@@ -81,73 +81,108 @@ Parameters:
81
81
AllowedValues :
82
82
- json
83
83
- text
84
+ LogRetention :
85
+ Type : String
86
+ Description : Number of days to retain Logs for, leave empty to retain them indefinitely
87
+ Default : " "
88
+ AllowedPattern : ' (?!.*\s)|/d'
84
89
TimeOut :
85
90
Type : Number
86
91
Description : Timeout for the Lambda function
87
92
Default : 300
88
93
MinValue : 1
89
94
MaxValue : 900
90
95
96
+
91
97
GoogleCredentials :
92
98
Type : String
93
- Description : Credentials to log into Google (content of credentials.json)
99
+ Description : |
100
+ Credentials to log into Google (content of credentials.json)
101
+ ConstraintDescription : |
102
+ You should save this information when following this setup https://developers.google.com/admin-sdk/directory/v1/guides/delegation
94
103
NoEcho : true
95
104
GoogleAdminEmail :
96
105
Type : String
97
- Description : Google Admin email
106
+ Description : |
107
+ Google Admin email
108
+ ConstraintDescription : |
109
+ This is a use with admin authority on your Google Directory, you will have used this when following this setup https://developers.google.com/admin-sdk/directory/v1/guides/delegation
98
110
NoEcho : true
99
111
SCIMEndpointUrl :
100
112
Type : String
101
- Description : AWS IAM Identity Center - SCIM Endpoint Url
102
- NoEcho : true
113
+ Description : |
114
+ AWS IAM Identity Center - SCIM Endpoint Url
103
115
AllowedPattern : " https://scim.(us(-gov)?|ap|ca|cn|eu|sa)-(central|(north|south)?(east|west)?)-([0-9]{1}).amazonaws.com/(.*)-([a-z0-9]{4})-([a-z0-9]{4})-([a-z0-9]{12})/scim/v2/"
116
+ ConstraintDescription : |
117
+ You should save this information when following this setup https://docs.aws.amazon.com/singlesignon/latest/userguide/provision-automatically.html
118
+ NoEcho : true
104
119
SCIMEndpointAccessToken :
105
120
Type : String
106
- Description : AWS IAM Identity Center - SCIM AccessToken
121
+ Description : |
122
+ AWS IAM Identity Center - SCIM AccessToken
123
+ ConstraintDescription : |
124
+ You should save this information when following this setup https://docs.aws.amazon.com/singlesignon/latest/userguide/provision-automatically.html
107
125
NoEcho : true
108
126
Region :
109
127
Type : String
110
- Description : AWS Region where AWS IAM Identity Center is enabled
128
+ Description : |
129
+ AWS Region where AWS IAM Identity Center is enabled
130
+ ConstraintDescription : |
131
+ You can find this value on the settings page of the IAM Identity Center console page
111
132
AllowedPattern : ' (us(-gov)?|ap|ca|cn|eu|sa)-(central|(north|south)?(east|west)?)-\d'
112
133
IdentityStoreID :
113
134
Type : String
114
- Description : Identifier of Identity Store in AWS IAM Identity Center
135
+ Description : |
136
+ Identifier of Identity Store in AWS IAM Identity Center
137
+ ConstraintDescription : |
138
+ You can find this value on the settings page of the IAM Identity Center console page
115
139
NoEcho : true
116
140
AllowedPattern : ' d-[1-z0-9]{10}'
117
141
118
142
GoogleUserMatch :
119
143
Type : String
120
144
Description : |
121
- Google Workspace user filter query parameter, example: 'name:John* email:admin*', see: https://developers.google.com/admin-sdk/directory/v1/guides/search-users
145
+ Google Workspace user filter query parameter, example: 'name:John* email:admin*', leave empty if you do not wish to pass this parameter
146
+ ConstraintDescription : |
147
+ The parameter needs to be compliant with the Google admin-sdk api, https://developers.google.com/admin-sdk/directory/v1/guides/search-users
122
148
Default : " "
123
149
AllowedPattern : ' (?!.*\s)|(name|Name|NAME)(:([a-zA-Z0-9]{1,64})(\*))|(name|Name|NAME)(=([a-zA-Z0-9 ]{1,64}))|(email|Email|EMAIL)(:([a-zA-Z0-9.-_]{1,64})(\*))|(email|Email|EMAIL)(=([a-zA-Z0-9.-_]{1,64})@([a-zA-Z0-9.-]{5,260}))'
124
150
GoogleGroupMatch :
125
151
Type : String
126
152
Description : |
127
- Google Workspace group filter query parameter, example: 'name:Admin* email:aws-*', see: https://developers.google.com/admin-sdk/directory/v1/guides/search-groups
153
+ Google Workspace group filter query parameter, example: 'name:Admin* email:aws-*', leave empty if you do not wish to pass this parameter
154
+ ConstraintDescription : |
155
+ The parameter needs to be compliant with the Google admin-sdk api, see: https://developers.google.com/admin-sdk/directory/v1/guides/search-groups
128
156
Default : ' name:AWS*'
129
157
AllowedPattern : ' (?!.*\s)|(name|Name|NAME)(:([a-zA-Z0-9]{1,64})\*)|(name|Name|NAME)(=([a-zA-Z0-9 ]{1,64}))|(email|Email|EMAIL)(:([a-zA-Z0-9.-_]{1,64})\*)|(email|Email|EMAIL)(=([a-zA-Z0-9.-_]{1,64})@([a-zA-Z0-9.-]{5,260}))'
130
158
IgnoreGroups :
131
159
Type : String
132
160
Description : |
133
- Ignore these Google Workspace groups, leave empty if not required
161
+ Do NOT sync these Google Workspace groups into IAM Identity Center, leave empty if not required
162
+ ConstraintDescription : |
163
+ This should be a comma separated list of group names
134
164
Default : " "
135
- AllowedPattern : ' (?!.*\s)|([0-9a-zA-Z-= _]*)(,[0-9a-zA-Z-=@. _]*)*'
165
+ AllowedPattern : ' (?!.*\s)|([" 0-9a-zA-Z-=@. _]*)(,[" 0-9a-zA-Z-=@. _]*)*'
136
166
IgnoreUsers :
137
167
Type : String
138
168
Description : |
139
169
Ignore these Google Workspace users, leave empty if not required
170
+ ConstraintDescription : |
171
+ This should be a comma separated list of group names
140
172
Default : " "
141
173
AllowedPattern : ' (?!.*\s)|([0-9a-zA-Z-= _]*)(,[0-9a-zA-Z-=@. _]*)*'
142
174
IncludeGroups :
143
175
Type : String
144
176
Description : |
145
177
Include only these Google Workspace groups, leave empty if not required. (Only applicable for SyncMethod user_groups)
178
+ ConstraintDescription : |
179
+ This should be a comma separated list of group names
146
180
Default : " "
147
181
AllowedPattern : ' (?!.*\s)|([0-9a-zA-Z-= _]*)(,[0-9a-zA-Z-=@. _]*)*'
148
182
SyncMethod :
149
183
Type : String
150
- Description : Sync method to use
184
+ Description : |
185
+ Which sync method do you want to use with ssosync?
151
186
Default : groups
152
187
AllowedValues :
153
188
- groups
@@ -161,7 +196,8 @@ Conditions:
161
196
SetIgnoreGroups : !Not [!Equals [!Ref "IgnoreGroups", ""]]
162
197
SetIgnoreUsers : !Not [!Equals [!Ref "IgnoreUsers", ""]]
163
198
SetIncludeGroups : !Or [!Not [!Equals [!Ref "IncludeGroups", ""]], !Equals [!Ref "SyncMethod", groups]]
164
-
199
+ NotIndefinite : !Not [!Equals [!Ref "LogRetention", ""]]
200
+
165
201
Resources :
166
202
SSOSyncFunction :
167
203
Type : AWS::Serverless::Function
@@ -231,6 +267,15 @@ Resources:
231
267
Enabled : !If [OnSchedule, false, true]
232
268
Schedule : !If [OnSchedule, !Ref ScheduleExpression, "rate(15 minutes)"]
233
269
270
+ # Explicit log group that refers to the Lambda function
271
+ LogGroup :
272
+ Type : AWS::Logs::LogGroup
273
+ Condition : NotIndefinite
274
+ Properties :
275
+ LogGroupName : !Sub "/aws/lambda/${SSOSyncFunction}"
276
+ # Explicit retention time
277
+ RetentionInDays : !Ref LogRetention
278
+
234
279
AWSGoogleCredentialsSecret :
235
280
Type : " AWS::SecretsManager::Secret"
236
281
Properties :
0 commit comments