This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IAMATLASCORPDeveloperAccess.yml
177 lines (177 loc) · 4.94 KB
/
IAMATLASCORPDeveloperAccess.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
AWSTemplateFormatVersion: 2010-09-09
Metadata:
'AWS::CloudFormation::Designer':
e175a0cd-6d63-4701-84ca-97fc0a0981e3:
size:
width: 60
height: 60
position:
x: 250
'y': -50
z: 0
embeds: []
isassociatedwith:
- 85a8a87c-1560-49ba-b44d-d305e4da922c
e2486f67-0df5-4b8f-bea4-2e2a34026fd5:
size:
width: 60
height: 60
position:
x: 550
'y': 60
z: 0
embeds: []
dependson:
- 60c113b8-19cc-456e-8ecb-83be7dd9ab88
85a8a87c-1560-49ba-b44d-d305e4da922c:
size:
width: 60
height: 60
position:
x: 60
'y': -50
z: 0
embeds: []
isassociatedwith:
- e175a0cd-6d63-4701-84ca-97fc0a0981e3
60c113b8-19cc-456e-8ecb-83be7dd9ab88:
size:
width: 60
height: 60
position:
x: 550
'y': -50
z: 0
embeds: []
171670e4-82d5-4c52-891f-e86130c3c4b4:
size:
width: 60
height: 60
position:
x: 670
'y': -50
z: 0
embeds: []
e8caaf85-48e4-4ed1-9a61-be7c3326ad22:
size:
width: 60
height: 60
position:
x: 670
'y': 60
z: 0
embeds: []
dependson:
- 171670e4-82d5-4c52-891f-e86130c3c4b4
Resources:
IAMATLASCorpAzureAdUser:
Type: 'AWS::IAM::User'
Properties:
UserName: ATLAS_CORP-AzureAD-User
Metadata:
'AWS::CloudFormation::Designer':
id: e175a0cd-6d63-4701-84ca-97fc0a0981e3
IAMATLASCORPAdministratorAccessPolicy:
Type: 'AWS::IAM::Policy'
Properties:
PolicyName: ATLAS_CORP-AdministratorAccess
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action: '*'
Resource: '*'
- Effect: Deny
Action: '*'
Resource:
- !Sub 'arn:aws:iam::${AWS::AccountId}:policy/ATLAS_CORP*'
- !Sub 'arn:aws:iam::${AWS::AccountId}:user/ATLAS_CORP*'
- !Sub 'arn:aws:iam::${AWS::AccountId}:saml-provider/ATLAS_CORP*'
Roles:
- !Ref IAMATLASCORPAdministratorRole
Metadata:
'AWS::CloudFormation::Designer':
id: e2486f67-0df5-4b8f-bea4-2e2a34026fd5
DependsOn:
- IAMATLASCORPAdministratorRole
IAMATLASCORPAzureADAccessPolicy:
Type: 'AWS::IAM::Policy'
Properties:
PolicyName: ATLAS_CORP-AzureAD-Access
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action: 'iam:ListRoles'
Resource: '*'
Users:
- !Ref IAMATLASCorpAzureAdUser
Metadata:
'AWS::CloudFormation::Designer':
id: 85a8a87c-1560-49ba-b44d-d305e4da922c
IAMATLASCORPAdministratorRole:
Type: 'AWS::IAM::Role'
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Federated: !Sub 'arn:aws:iam::${AWS::AccountId}:saml-provider/ATLAS_CORP-AzureAD'
Action: 'sts:AssumeRoleWithSAML'
Condition:
StringEquals:
'SAML:aud': 'https://signin.aws.amazon.com/saml'
Metadata:
'AWS::CloudFormation::Designer':
id: 60c113b8-19cc-456e-8ecb-83be7dd9ab88
IAMATLASCorpDeveloperRole:
Type: 'AWS::IAM::Role'
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Federated: !Sub 'arn:aws:iam::${AWS::AccountId}:saml-provider/ATLAS_CORP-AzureAD'
Action: 'sts:AssumeRoleWithSAML'
Condition:
StringEquals:
'SAML:aud': 'https://signin.aws.amazon.com/saml'
Metadata:
'AWS::CloudFormation::Designer':
id: 171670e4-82d5-4c52-891f-e86130c3c4b4
IAMATLASCORPDeveloperPolicy:
Type: 'AWS::IAM::Policy'
Properties:
PolicyName: ATLAS_CORP-DeveloperAccess
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
NotAction:
- 'iam:*'
- 'organizations:*'
- 'account:*'
Resource: '*'
- Effect: Allow
Action:
- 'iam:CreateServiceLinkedRole'
- 'iam:DeleteServiceLinkedRole'
- 'iam:ListRoles'
- 'organizations:DescribeOrganization'
- 'account:ListRegions'
Resource: '*'
- Effect: Deny
Action: '*'
Resource:
- !Sub 'arn:aws:iam::${AWS::AccountId}:policy/ATLAS_CORP*'
- !Sub 'arn:aws:iam::${AWS::AccountId}:user/ATLAS_CORP*'
- !Sub 'arn:aws:iam::${AWS::AccountId}:saml-provider/ATLAS_CORP*'
Roles:
- !Ref IAMATLASCorpDeveloperRole
Metadata:
'AWS::CloudFormation::Designer':
id: e8caaf85-48e4-4ed1-9a61-be7c3326ad22
DependsOn:
- IAMATLASCorpDeveloperRole