-
Notifications
You must be signed in to change notification settings - Fork 35
/
enterprise-multi-account-identity-authority-centralized-management.yml
358 lines (357 loc) · 8.85 KB
/
enterprise-multi-account-identity-authority-centralized-management.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: 创建企业多账号资源夹与身份权限管理,支持新账号创建与现有账号集成,配置SAML单点登录。
en: Establish enterprise multi-account resource folders with identity and access
management, facilitating the creation of new accounts and integration with existing
ones, along with configuration for SAML single sign-on.
Parameters:
WhetherCreateAccount:
Type: String
Default: create-new
AllowedValues:
- create-new
- use-existing
Label:
zh-cn: 是否新建资源夹与账号
en: Whether to create an account
AssociationPropertyMetadata:
ValueLabelMapping:
create-new:
zh-cn: 新建资源夹与账号
en: Create new accounts
use-existing:
zh-cn: 使用现有账号
en: Use existing accounts
FolderName1:
Type: String
Default: Core
Label:
zh-cn: 资源夹名称
en: Folder name
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${WhetherCreateAccount}
- create-new
DisplayName1:
Type: String
Default: core_account_1
Label:
zh-cn: 账号名称
en: Account name
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${WhetherCreateAccount}
- create-new
Account1:
Type: String
Default: null
Required: true
Label:
zh-cn: 核心资源账号ID
en: Core account id
AssociationProperty: ALIYUN::ResourceManager::Account
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${WhetherCreateAccount}
- use-existing
SamlConfigurationMode:
Type: String
Default: Document
AllowedValues:
- Document
- Manual
Label:
zh-cn: 配置方式
en: Configuration mode
AssociationPropertyMetadata:
ValueLabelMapping:
Manual:
zh-cn: 手动配置
en: Manual
Document:
zh-cn: 元数据文档配置(Base64 编码)
en: Document
EncodedMetadataDocument:
Type: String
Default: null
Required: true
Label:
zh-cn: 元数据文档
en: Metadata file of the IdP
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${SamlConfigurationMode}
- Document
EntityId:
Type: String
Default: null
Required: true
Label:
zh-cn: IdP标识
en: Entity ID
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${SamlConfigurationMode}
- Manual
LoginUrl:
Type: String
Default: null
Required: true
Label:
zh-cn: IdP登录地址
en: Login URL
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${SamlConfigurationMode}
- Manual
X509Certificate:
Type: String
Default: null
Required: true
Label:
zh-cn: IdP证书
en: X.509 certificate
AssociationPropertyMetadata:
Visible:
Condition:
Fn::Equals:
- ${SamlConfigurationMode}
- Manual
Conditions:
CreateAccount:
Fn::Equals:
- create-new
- Ref: WhetherCreateAccount
IsManualConfiguration:
Fn::Equals:
- Manual
- Ref: SamlConfigurationMode
Resources:
RDFolder1:
Type: ALIYUN::ResourceManager::Folder
Condition: CreateAccount
Properties:
FolderName:
Ref: FolderName1
RDAccount1:
Type: ALIYUN::ResourceManager::Account
Condition: CreateAccount
Properties:
DisplayName:
Ref: DisplayName1
FolderId:
Fn::GetAtt:
- RDFolder1
- FolderId
DeleteAccount: true
EnableCloudSSO:
Type: ALIYUN::ROS::AutoEnableService
Properties:
ServiceName: CloudSSO
CloudSSODirectory:
Type: ALIYUN::CloudSSO::Directory
DependsOn:
- EnableCloudSSO
CloudSSOUser:
Type: ALIYUN::CloudSSO::User
Properties:
DirectoryId:
Ref: CloudSSODirectory
UserName: user1
CloudSSOCredential:
Type: ALIYUN::CloudSSO::SCIMServerCredential
Properties:
DirectoryId:
Ref: CloudSSODirectory
CloudSSOScimSynchronization:
Type: ALIYUN::CloudSSO::SCIMSynchronization
Properties:
DirectoryId:
Ref: CloudSSODirectory
CloudSSOSamlIdentityProvider:
Type: ALIYUN::CloudSSO::SAMLIdentityProvider
Properties:
DirectoryId:
Ref: CloudSSODirectory
EncodedMetadataDocument:
Fn::If:
- IsManualConfiguration
- Ref: ALIYUN::NoValue
- Ref: EncodedMetadataDocument
EntityId:
Fn::If:
- IsManualConfiguration
- Ref: EntityId
- Ref: ALIYUN::NoValue
LoginUrl:
Fn::If:
- IsManualConfiguration
- Ref: LoginUrl
- Ref: ALIYUN::NoValue
X509Certificate:
Fn::If:
- IsManualConfiguration
- Ref: X509Certificate
- Ref: ALIYUN::NoValue
SSOStatus: Enabled
CloudSSOAccessConfiguration:
Type: ALIYUN::CloudSSO::AccessConfiguration
Properties:
DirectoryId:
Ref: CloudSSODirectory
AccessConfigurationName: Configuration-ReadOnly
CloudSSOAddPermissionPolicy:
Type: ALIYUN::CloudSSO::PermissionPolicyToAccessConfigurationAddition
Properties:
DirectoryId:
Ref: CloudSSODirectory
AccessConfigurationId:
Ref: CloudSSOAccessConfiguration
PermissionPolicyType: System
PermissionPolicyName: ReadOnlyAccess
CloudSSOAccessConfigurationProvision1:
Type: ALIYUN::CloudSSO::AccessConfigurationProvision
Properties:
DirectoryId:
Ref: CloudSSODirectory
AccessConfigurationId:
Ref: CloudSSOAccessConfiguration
TargetType: RD-Account
TargetId:
Fn::If:
- CreateAccount
- Fn::GetAtt:
- RDAccount1
- AccountId
- Ref: Account1
CloudSSOAccessAssignment1:
Type: ALIYUN::CloudSSO::AccessAssignment
DependsOn:
- CloudSSOAccessConfigurationProvision1
Properties:
DirectoryId:
Ref: CloudSSODirectory
AccessConfigurationId:
Ref: CloudSSOAccessConfiguration
TargetType: RD-Account
TargetId:
Fn::If:
- CreateAccount
- Fn::GetAtt:
- RDAccount1
- AccountId
- Ref: Account1
PrincipalType: User
PrincipalId:
Fn::GetAtt:
- CloudSSOUser
- UserId
UserProvision1:
Type: ALIYUN::CloudSSO::UserProvision
Properties:
DirectoryId:
Ref: CloudSSODirectory
DuplicationStrategy: TakeOver
DeletionStrategy: Keep
PrincipalType: User
PrincipalId:
Fn::GetAtt:
- CloudSSOUser
- UserId
TargetType: RD-Account
TargetId:
Fn::If:
- CreateAccount
- Fn::GetAtt:
- RDAccount1
- AccountId
- Ref: Account1
Outputs:
FolderId:
Condition: CreateAccount
Description:
zh-cn: 资源管理资源夹ID
en: Resource management resource folder ID
Value:
Fn::GetAtt:
- RDFolder1
- FolderId
AccountId:
Condition: CreateAccount
Description:
zh-cn: 资源管理账号ID
en: Resource management account ID
Value:
Fn::GetAtt:
- RDAccount1
- AccountId
DirectoryId:
Description:
zh-cn: 云SSO目录Id
en: CloudSSO directory ID
Value:
Fn::GetAtt:
- CloudSSODirectory
- DirectoryId
UserId:
Description:
zh-cn: 云SSO用户Id
en: CloudSSO user ID
Value:
Fn::GetAtt:
- CloudSSOUser
- UserId
AccessConfigurationId:
Description:
zh-cn: 云SSO访问配置Id
en: CloudSSO access configuration ID
Value:
Fn::GetAtt:
- CloudSSOAccessConfiguration
- AccessConfigurationId
SCIMCredentialSecret:
Description:
zh-cn: 云SSO SCIM密钥
en: CloudSSO SCIM credential secret
NoEcho: true
Value:
Fn::GetAtt:
- CloudSSOCredential
- CredentialSecret
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- WhetherCreateAccount
- FolderName1
- DisplayName1
- Account1
Label:
default:
zh-cn: 配置资源目录
en:
Resource account
- Parameters:
- SamlConfigurationMode
- EncodedMetadataDocument
- EntityId
- LoginUrl
- X509Certificate
Label:
default:
zh-cn: 配置单点登录
en: Configuration single sign-on
TemplateTags:
- acs:technical-solution:account:企业多账号身份权限集中管理