-
Notifications
You must be signed in to change notification settings - Fork 16
/
IAM.aws.txt
1985 lines (1630 loc) · 106 KB
/
IAM.aws.txt
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
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
IAM
VERSION ==> #2023-11-26
STS ==> #See STS doc for: ROLE, INSTANCE_PROFILE, SERVICE_LINKED_ROLE, SAML_PROVIDER, OPENID_PROVIDER
#Part of STS: CALLER_IDENTITY, ACCESS_KEY_INFO, DECODED_AUTH_MESSAGE
SUMMARY ==> #Principal: root, user, group, anonymous
#Long-term credentials: login profile, access key, signing certificate, service credential, SSH public key
#Login profile: password policy, hardware|virtual MFA device
#Policy: version, inline|managed, AWS managed, permission boundary
#Policy document: resource|identity-based, allow|deny, PACTION, simulation, auth message decode
#Condition operators: ARR, undefined, BOOL, STR, NUM, DATE, BUFFER, ARN, IP
#Condition keys: variables, defaults, principal, resource, time, HTTP request
#Reports: credentials, org|user accesses, summary
#Account alias
#Server certificate
@pulumi/aws-iam ##Pulumi PROV on top of @pulumi/aws[-native] for IAM, with higher-level KREZs
##Not very useful, i.e. not documented.
/=+===============================+=\
/ : : \
)==: API :==(
\ :_______________________________: /
\=+===============================+=/
NAME ==> #Identity and Access Management
FORMAT ==> #Request: query parameter, with ?Action and ?Version
#Response: XML
REQ_ID #RES.ResponseMetadata.RequestId
PAGINATION ==> #Req: Marker STR, MaxItems STR (def|max: 1e4)
#Res: IsTruncated BOOL, Marker STR
PRICING ==> #Free
REGION ==> #Not REGION-specific
IAMFullAccess #AWS managed POLICY. Grants all IAM PACTIONs
IAMReadOnlyAccess #AWS managed POLICY. Grants all read-only IAM PACTIONs
/=+===============================+=\
/ : : \
)==: LIMITS :==(
\ :_______________________________: /
\=+===============================+=/
GetAccountSummary() #Res: SUMMARY_MAP
SUMMARY_MAP #IAM limits ("Quota") and usage.
#Documented as OBJ, but actually an OBJ_ARR: key STR, value NUM
/=+===============================+=\
/ : : \
)==: IDENTITY :==(
\ :_______________________________: /
\=+===============================+=/
IDENTITY #Who is authenticated.
#Can be:
# - "Account": ROOT, or alternatively:
# - ACCOUNT_ID
# - CANONICAL_ACCOUNT_ID: only for cross-account S3 ACL
# - "User": USER
# - "FederatedUser": FEDERATED_USER
# - "AssumedRole": [ASSUMED_]ROLE, including through:
# - SERVICE_PRINCIPAL
# - SAML|OpenID
# - either as [ASSUMED_]ROLE, or as SAML_PROVIDER|'WEB_ID_DOMAIN'
# - "Anonymous"
# - only for S3, SNS, SQS
PRINCIPAL #IDENTITY performing a given request
ENTITY #Who is being permitted, from an authorization standpoint
#E.g. includes GROUPs, unlike IDENTITY.
ROOT ==> #1 per AWS account
#Cannot have identity-based POLICY, PERM_BOUNDARY, session policy
# - but can have resource-based POLICY, ACL, ORG POLICY
ROOT_ARN #'arn:aws:iam::ACCOUNT_ID:root'
UROLE #USER|ROLE
UGROLE #USER|GROUP|ROLE
#Should delete when not used anymore
/=+===============================+=\
/ : : \
)==: CALLER IDENTITY :==(
\ :_______________________________: /
\=+===============================+=/
GetCallerIdentity() #Req: empty
#Res: CURRENT_PRINCIPAL
##With Pulumi, this is at CW.getCallerIdentity(), not in IAM MODULE
CALLER_IDENTITY #Currently authenticated PRINCIPAL
CALLER_IDENTITY.Account #ACCOUNT_ID
CALLER_IDENTITY.Arn #ARN
CALLER_IDENTITY.UserId #Like COND_KEY aws:userid
/=+===============================+=\
/ : : \
)==: USER :==(
\ :_______________________________: /
\=+===============================+=/
CreateUser() #Req: USER
# - no Arn, UserId, CreateDate, PasswordLastUsed
#Res: User USER
UpdateUser() #Req: USER
# - no Arn, UserId, CreateDate, PasswordLastUsed, PermissionsBoundary, Tags
# - UserName -> UserName + NewUserName
# - Path -> NewPath
#Res: empty
GetUser() #Req: USER
# - only UserName
#Res: User USER
ListUsers() #Req: USER
# - only Path -> PathPrefix
#Res: Users USER_ARR
DeleteUser() #Req: USER
# - only UserName
#Res: empty
#To deactivate without deleting: attach POLICY denying all PACTIONs
USER #Real person.
#Prefer using ROLEs when possible, because their credentials is short-lived
# - e.g. by using an identity provider like AWS Identity Center
#Max 5000 (SUMMARY_MAP.Users[Quota])
#WAIT (GetUser()) UserExists: when it exists
##With Pulumi, delete|replace fails unless RPROPS.forceDestroy true if USER has either:
## - ACCESS_KEY|LOGIN_PROFILE|MFA_DEVICE not managed by PROV
## - a POLICY through PolicyAttachment (not UserPolicy[Attachment])
USER.Arn #USER_ARN. 'arn:aws:iam::ACCOUNT_ID:user[/PATH]/NAME'
USER.UserId #USER_MID
USER.UserName #'USER'
USER.Path #NAMEPATH
USER.CreateDate #'DATE'
USER.PasswordLastUsed #'DATE' of last LOGIN_PROFILE sign-in
#null if never signed in
#Time is 5-min throttled
TagUser()
ListUserTags()
UntagUser() #AWS TAGS
USER.Tags #RESOURCE_NAME: UserName 'USER'
AWS::IAM::User #RESPROPs: UserName, Path, Tags
#RESATTRs: Arn
new User(...CARGS[, OPTS]) #CUSER. CKRESOURCE wrapping USER
#Is IGRANTABLE. Is ICPRINCIPAL
User.fromUserArn
(...CARGS, 'USER_ARN')->ICUSER #
User.fromUserName
(...CARGS, 'USER')->ICUSER #
ICUSER.userArn
OPTS|ICUSER.userName
OPTS.path #USER.*
/=+===============================+=\
/ : : \
)==: GROUP :==(
\ :_______________________________: /
\=+===============================+=/
CreateGroup() #Req: GROUP
# - no Arn, GroupId, CreateDate
#Res: FGROUP
# - no Users
UpdateGroup() #Req:
# - no Arn, GroupId, CreateDate
# - GroupName -> GroupName + NewGroupName
# - Path -> NewPath
#Res: empty
AddUserToGroup() #Req: GROUP_USER
#Res: empty
RemoveUserFromGroup() #Req: GROUP_USER
#Res: empty
GetGroup() #Req: GROUP
# - only GroupName
#Res: FGROUP
ListGroups() #Req: GROUP
# - only Path -> PathPrefix
#Res: Groups GROUP_ARR
ListGroupsForUser() #Req: FGROUP
# - only UserName
#Res: Groups GROUP_ARR
DeleteGroup() #Req: GROUP
# - only GroupName
#Res: empty
GROUP #Sets of USERs
#Allow managing permissions of multiple USERs.
#Not meant for authentication.
#USER can belong to 0, 1 or several GROUPs.
#Should prefer attaching POLICYs to GROUPs than USERs, when possible
#Max 300 (flexible to 500) (SUMMARY_MAP.Groups[Quota])
#Max 10 per user (SUMMARY_MAP.GroupsPerUserQuota)
ADMIN GROUP ==> #Recommended instead of using root
#Can do everything or almost.
#Can use AdministratorAccess|PowerUserAccess AWS managed ROLE
GROUP.Arn #GROUP_ARN. 'arn:aws:iam::ACCOUNT_ID:group[/PATH]/NAME'
GROUP.GroupId #GROUP_MID
GROUP.GroupName #'GROUP'
GROUP.Path #NAMEPATH
GROUP.CreateDate #'DATE'
FGROUP #GROUP, including the list of USERs
##With Pulumi, either:
## - 1 GroupMembership per GROUP (GROUP + USER_ARR)
## - 1 UserGroupMembership per USER (GROUP_ARR + USER)
FGROUP.Users #USER_ARR
FGROUP.Group #GROUP
GROUP_USER #One USER in a GROUP
GROUP_USER.UserName #'USER'
GROUP_USER.GroupName #'GROUP'
AWS::IAM::Group #RESPROPs: GroupName, Path
#RESATTRs: Arn
AWS::IAM::UserToGroupAddition #RESPROPs: GroupName, Users 'USER'_ARR
new Group(...CARGS[, OPTS]) #CGROUP. CKRESOURCE wrapping GROUP
#Is IGRANTABLE. Is ICPRINCIPAL
Group.fromGroupArn
(...CARGS, GROUP_ARN)->ICGROUP #
Group.fromGroupName
(...CARGS, 'GROUP')->ICGROUP #
OPTS|ICGROUP.groupArn
OPTS|ICGROUP.groupName
OPTS.path #GROUP.*
CUSER_OPTS.groups #ICGROUP_ARR (def: [])
ICUSER.addToGroup(ICGROUP) #
ICGROUP.addUser(ICUSER) #
/=+===============================+=\
/ : : \
)==: CREDENTIALS :==(
\ :_______________________________: /
\=+===============================+=/
CREDENTIALS #One of:
# - LOGIN_PROFILE
# - optionally with [VIRTUAL_]MFA_DEVICE
# - ACCESS_KEY
# - including through STS (MFA, FEDERATED_USER, AssumeRole(), SAML_PROVIDER, OPENID_PROVIDER)
# - SIGNING_CERTIFICATE
# - SERVICE_CREDENTIAL
# - SSH_PUBLIC_KEY
#New users have no credentials.
#"Long-term", as opposed to short-term TEMP_CREDS
# - prefer TEMP_CREDS
# - should be rotated
# - should be deleted when not used anymore
#Some services have additional authentication methods, e.g. EC2 asymmetric key pair
GenerateCredentialReport() #Req: empty
#Res: CREDENTIAL_REQ
GetCredentialReport() #Req: empty
#Res: CREDENTIAL_REPORT
CREDENTIAL_REQ.Description #STR
CREDENTIAL_REQ.State #'STARTED', 'INPROGRESS' or 'COMPLETE'
CREDENTIAL_REPORT #All CREDENTIALs of current ACCOUNT
#Throttled once per 4h
CREDENTIAL_REPORT.GeneratedTime #'DATE'
CREDENTIAL_REPORT.ReportFormat #'text/csv'
CREDENTIAL_REPORT.Content #'CSV_BASE64' of CREDENTIAL_CONTENT_ARR
CREDENTIAL_CONTENT #CREDENTIALs of a USER
CREDENTIAL_CONTENT.user #'USER'
CREDENTIAL_CONTENT.arn #USER_ARN
CREDENTIAL_CONTENT
.user_creation_time #'DATE'
/=+===============================+=\
/ : : \
)==: LOGIN PROFILE :==(
\ :_______________________________: /
\=+===============================+=/
CreateLoginProfile() #Req: LOGIN_PROFILE
# - no CreateDate
#Res: LoginProfile LOGIN_PROFILE
# - no Password
UpdateLoginProfile() #Req: LOGIN_PROFILE
# - no CreateDate
#Res: empty
ChangePassword() #Req: LOGIN_PROFILE
# - only Password -> OldPassword + NewPassword
#Res: empty
GetLoginProfile() #Req: LOGIN_PROFILE
# - only UserName
#Res: LoginProfile LOGIN_PROFILE
# - no Password
DeleteLoginProfile() #Req: LOGIN_PROFILE
# - only UserName
#Res: empty
LOGIN_PROFILE #Password of a user to login to web console UI
#Max 1 per user
LOGIN_PROFILE.UserName #'USER'
LOGIN_PROFILE.CreateDate #'DATE'
LOGIN_PROFILE.Password #STR
#ASCII only
##With Pulumi:
## - use RPROPS.PasswordLength NUM (def: 20) instead
## - i.e. let Pulumi generate
## - OUTPUTS.password STR: plain
## - OUTPUTS.encryptedPassword STR: encrypted, base64
## - can also use RPROPS.pgpKey STR
## - like LOGIN_PROFILE, but using OUTPUTS.encryptedPassword
LOGIN_PROFILE
.PasswordResetRequired #BOOL (def: false). Set to true to require resetting password.
ROOT_PASSWORD #Unlike non-root:
# - no LOGIN_PROFILE
# - use email address, not username
# - can be reset via email
# - if MFA, require also phone number
# - [VIRTUAL_]MFA_DEVICE can only be managed in UI
PASSWORD #LOGIN_PROFILE|ROOT_PASSWORD
CREDENTIAL_CONTENT #'TRUE|FALSE'. Whether there is a LOGIN_PROFILE.
.password_enabled #'not_supported' if root.
CREDENTIAL_CONTENT #'DATE' of last PASSWORD login
.password_last_used #Can be 'no_information' (never used) or 'N/A' (no PASSWORD)
CREDENTIAL_CONTENT #'DATE' of last LOGIN_PROFILE.Password change
.password_last_changed #Can be 'not_supported' (root) or 'N/A' (not done)
IAMUserChangePassword #AWS managed POLICY. Grants GetPassword + GetAccountPasswordPolicy
# - so users can see password policy when changing it, especially in UI
SIGN-IN URLS ==> #Root: https://console.aws.amazon.com
#User: https://ACCOUNT_ID.signin.aws.amazon.com/console[?region=REGION]
#Version: 2023-03-03
AWS BUILDER ID ==> #Long-term credentials tied to real user, not to an AWS account
#Can be used to login to AWS at https://profile.aws.amazon.com
#Can also be used to login to other AWS related services:
#AWS re:Post, CodeCatalyst, Whisperer
#Can use MFA
SIGN-IN LOGGING ==> #On CloudTrail: SERVICE_DOMAIN 'signin.amazonaws.com', ACTION 'ConsoleLogin'
#RESP.ConsoleLogin 'Success|Failure'
CLOUDTRAIL_METADATA LoginTo #'URL'
CLOUDTRAIL_METADATA.MobileVersion #'Yes|No'
AWS::IAM::User #Includes RESPROPs: LoginProfile OBJ: Password, PasswordResetRequired
CUSER_OPTS.password #CSECRET. LOGIN_PROFILE.Password
CUSER_OPTS.passwordResetRequired #LOGIN_PROFILE.*
/=+===============================+=\
/ : : \
)==: PASSWORD POLICY :==(
\ :_______________________________: /
\=+===============================+=/
UpdateAccountPasswordPolicy() #Req: PASSWORD_POLICY
# - no ExpirePasswords
#Res: empty
#Does not apply to existing passwords, except MaxPasswordAge
GetAccountPasswordPolicy() #Req: empty
#Res: PasswordPolicy PASSWORD_POLICY
DeleteAccountPasswordPolicy() #Req: empty
#Res: empty
PASSWORD_POLICY #Constraints on all LOGIN_PROFILE.Password
##With CloudFormation, must use AwsCommunity::IAM::PasswordPolicy
PASSWORD_POLICY
.AllowUsersToChangePassword #BOOL (def: false)
PASSWORD_POLICY.MaxPasswordAge #NUM. Require resetting password after NUM days.
#Warning in UI when 2 weeks before expiration
#Max 3 years
PASSWORD_POLICY.ExpirePasswords #BOOL. True when MaxPasswordAge defined
PASSWORD_POLICY.HardExpiry #BOOL (def: false). When true, expired password can only be updated by root, not user.
CREDENTIAL_CONTENT #'DATE' of next rotation with PASSWORD_POLICY.MaxPasswordAge
.password_next_rotation #Can be 'not_supported' (root)
PASSWORD_POLICY
.PasswordReusePrevention #NUM. If set, remembers last NUM passwords and do not allow re-using them.
PASSWORD_POLICY
.MinimumPasswordLength #NUM (def: 8)
PASSWORD_POLICY.Require* #Default:
# - false for each
# - but 3 out of 4 must be true
PASSWORD_POLICY
.RequireLowercaseCharacters #BOOL
PASSWORD_POLICY
.RequireUppercaseCharacters #BOOL
PASSWORD_POLICY.RequireNumbers #BOOL
PASSWORD_POLICY.RequireSymbols #BOOL
/=+===============================+=\
/ : : \
)==: MFA :==(
\ :_______________________________: /
\=+===============================+=/
EnableMFADevice() #Req: MFA_DEVICE
# - no EnableDate
#Res: empty
ResyncMFADevice() #Req: MFA_DEVICE
# - no EnableDate
#Res: empty
#Re-enable MFA_DEVICE.
#Needed for example when took too much time to enther MFA_DEVICE.AuthenticationCode1|2
#Not needed with FIDO_KEY
GetMFADevice() #Req: MFA_DEVICE
# - only UserName, SerialNumber
#Res: MFA_DEVICE
# - no AutenticationCode1|2
ListMFADevices() #Req: MFA_DEVICE
# - only UserName
#Res: MFADevices MFA_DEVICE_ARR
# - no AutenticationCode1|2
DeactivateMFADevice() #Req: MFA_DEVICE
# - only SerialNumber, UserName
#Res: empty
MFA_DEVICE #MFA hardware device to use with LOGIN_PROFILE
#Max 8 per user
MFA_DEVICE.SerialNumber #MFA_DEVICE_MID
MFA_DEVICE.UserName #'USER'
MFA_DEVICE.EnableDate #'DATE'
MFA_DEVICE.AuthenticationCode1 #STR. First code from MFA device on creation.
MFA_DEVICE.AuthenticationCode2 #STR. Second code from MFA device on creation, i.e. must enter 2 back-to-back
FIDO_KEY #MFA_DEVICE with stronger protection
#Cannot be used with STS
#Can only be managed in the UI
/=+===============================+=\
/ : : \
)==: VIRTUAL MFA :==(
\ :_______________________________: /
\=+===============================+=/
CreateVirtualMFADevice() #Req: VIRTUAL_MFA_DEVICE
# - only VirtualMFADeviceName, Path, Tags
#Res: VirtualMFADevice VIRTUAL_MFA_DEVICE
# - no VirtualMFADeviceName, Path
ListVirtualMFADevices() #Req:
# - AssignmentStatus 'Assigned', 'Unassigned' or 'Any' (def)
#Res: VirtualMFADevices VIRTUAL_MFA_ARR
# - no VirtualMFADeviceName, Path
DeleteVirtualMFADevice() #Req: VIRTUAL_MFA_DEVICE
# - only SerialNumber
#Res: empty
VIRTUAL_MFA_DEVICE #MFA mobile app to use with LOGIN_PROFILE
#Max 1 per user (SUMMARY_MAP.AccountMFAEnabled|MFADevices[InUse])
VIRTUAL_MFA_DEVICE.SerialNumber #VIRTUAL_MFA_DEVICE_ARN. 'arn:aws:iam::ACCOUNT_ID:mfa[/PATH]/NAME'
VIRTUAL_MFA_DEVICE
.VirtualMFADeviceName #'VIRTUAL_MFA_DEVICE'
VIRTUAL_MFA_DEVICE.Path #NAMEPATH
VIRTUAL_MFA_DEVICE.User #USER
VIRTUAL_MFA_DEVICE.EnableDate #'DATE'
VIRTUAL_MFA_DEVICE
.Base32StringSeed #Base32-encoded STR. Secret key used for creation
VIRTUAL_MFA_DEVICE.QRCodePNG #'PNG_BASE64' of the creation QR code
#QR code content is 'otpauth://totp/VIRTUAL_MFA_DEVICE@ACCOUNT_ID|USER?secret=BASE_32_STRING_SEED'
TagMFADevice()
ListMFADeviceTags()
UntagMFADevice() #AWS TAGS
VIRTUAL_MFA_DEVICE.Tags #RESOURCE_NAME: SerialNumber VIRTUAL_MFA_DEVICE_ARN
CREDENTIAL_CONTENT.mfa_active #'TRUE|FALSE'. Whether there is a MFA_DEVICE
MFA SIGN-IN LOGGING ==> #Followig are on ACTION 'ConsoleLogin'
CLOUDTRAIL_METADATA MFAIdentifier #[VIRTUAL_]MFA_DEVICE_ARN
CLOUDTRAIL_METADATA MFAUsed #'Yes|No'
MFA LOGGING CHECK ==> #On CloudTrail: SERVICE_DOMAIN 'signin.amazonaws.com', ACTION 'CheckMfa'
#RESP.CheckMfa 'Success|Failure'
CLOUDTRAIL_METADATA MFAType #'Virtual MFA' or 'Multiple MFA Devices'
iamMfaEnabledForConsoleAccess ##Pulumi POLICY that checks that every USER has 1 [VIRTUAL_]MFA_DEVICE
AWS::IAM::VirtualMFADevice #RESPROPs:
# - VirtualMfaDeviceName, Path, Tags
# - Users 'USER'_ARR
#RESATTRs: SerialNumber
/=+===============================+=\
/ : : \
)==: ACCESS KEY :==(
\ :_______________________________: /
\=+===============================+=/
CreateAccessKey() #Req: ACCESS_KEY
# - only UserName
#Res: AccessKey ACCESS_KEY
# - no AccessKeyLastUsed
UpdateAccessKey() #Req: ACCESS_KEY
# - no CreateDate, SecretAccessKey, AccessKeyLastUsed
#Res: empty
GetAccessKeyLastUsed() #Req: ACCESS_KEY
# - only AccessKeyId
#Res: ACCESS_KEY
# - only UserName, AccessKeyLastUsed
ListAccessKeys() #Req: ACCESS_KEY
# - only UserName
#Res: AccessKeyMetadata ACCESS_KEY_ARR
# - no SecretAccessKey, AccessKeyLastUsed
DeleteAccessKey() #Req: ACCESS_KEY
# - only AccessKeyId, UserName
#Res: empty
ACCESS_KEY #Programmatic credentials
#Avoid with root (prefer LOGIN_PROFILE)
#Rotation best practices:
# - keep old one while updating consumers to use new one
# - wait a few days and check for LastUsedDate to ensure not used anymore
# - put as Status 'Inactive' for a few days before deleting
#Max 2 per user|root (SUMMARY_MAP.AccountAccessKeysPresent|AccessKeysPerUserQuota)
ACCESS_KEY.AccessKeyId #ACCESS_KEY_ID, i.e. public part of the key
#20 chars
ACCESS_KEY.SecretAccessKey #SECRET_ACCESS_KEY, i.e. private part of the key
#40 chars
##With Pulumi:
## - named OUTPUTS.secret
## - can also use RPROPS.pgpKey STR
## - public GPG key, or 'keybase:USER'
## - additional PGP encryption when accessing through Pulumi, not on AWS resource itself
## - no OUTPUTS.secret
## - OUTPUTS.encryptedSecret:
## - ACCESS_KEY.SecretAccessKey + additional PGP encryption
## - user must decrypt with their key to get ACCESS_KEY.SecretAccessKey
## - also returns OUTPUTS.keyFingerprint STR
ACCESS_KEY.UserName #'USER' (def: current one)
ACCESS_KEY.CreateDate #'DATE'
ACCESS_KEY.AccessKeyLastUsed #ACCESS_KEY_LAST_USED
ACCESS_KEY_LAST_USED.LastUsedDate #'DATE'. null if not used in last 400 days
#15 minutes-throttle.
ACCESS_KEY_LAST_USED.Region #'REGION'. Not defined if not REGION-specific (e.g. S3)
ACCESS_KEY_LAST_USED.ServiceName #'SERVICE'
ACCESS_KEY.Status #'Active' (def) or 'Inactive' (manually disabled)
CREDENTIAL_CONTENT
.access_key_1|2_* #
CREDENTIAL_CONTENT
.access_key_*_active #'TRUE|FALSE'. Whether there is an ACCESS_KEY
CREDENTIAL_CONTENT #'DATE' of last update.
.access_key_*_last_rotated #Can be 'N/A' (no ACCESS_KEY)
CREDENTIAL_CONTENT #'DATE'. ACCESS_KEY.AccessKeyLastUsed.LastUsedDate
.access_key_*_last_used_date #Can be 'N/A' (no ACCESS_KEY, or never used)
CREDENTIAL_CONTENT #'DATE'. ACCESS_KEY.AccessKeyLastUsed.Region
.access_key_*_last_used_region #Can be 'N/A' (no ACCESS_KEY, or never used)
CREDENTIAL_CONTENT #'SERVICE'. ACCESS_KEY.AccessKeyLastUsed.ServiceName
.access_key_*_last_used_service #Can be 'N/A' (no ACCESS_KEY, or never used)
GetAccessKeyInfo() #Req: ACCESS_KEY_REQ
#Res: ACCESS_KEY_INFO
ACCESS_KEY_REQ #
ACCESS_KEY_REQ.AccessKeyId #ACCESS_KEY_ID
ACCESS_KEY_INFO #
ACCESS_KEY_INFO.Account #ACCOUNT_ID
iamAccessKeysRotated ##Pulumi POLICY that checks that every ACCESS_KEY is rotated,
##i.e.CreateDate is at most PPCONF.maxKeyAge days old (def: 90).
AWS::IAM::AccessKey ##RESPROPs:
## - UserName, Status
## - Serial: arbitrary NUM. Can be changed to force rotating the key
##RESATTRs: SecretAccessKey
new AccessKey(...CARGS, OPTS) #CACCESS_KEY. CKRESOURCE wrapping ACCESS_KEY
OPTS.user #CUSER. ACCESS_KEY.UserName
OPTS.status #ACCESS_KEY.*
OPTS.serial #See AWS::IAM::AccessKey
CACCESS_KEY.accessKeyId #ACCESS_KEY_ID, as STR_TK resolving to { Ref }
CACCESS_KEY.secretAccessKey #SECRET_ACCESS_KEY, as CSECRET resolving to { Fn::GetAtt }
/=+===============================+=\
/ : : \
)==: SIGNING CERTIFICATE :==(
\ :_______________________________: /
\=+===============================+=/
UploadSigningCertificate() #Req: SIGNING_CERTIFICATE
# - no CertificateId, UploadDate, Status
#Res: Certificate SIGNING_CERTIFICATE
UpdateSigningCertificate() #Req: SIGNING_CERTIFICATE
# - no UploadDate, CertificateBody
#Res: empty
ListSigningCertificates() #Req: SIGNING_CERTIFICATE
# - only UserName
#Res: Certificates SIGNING_CERTIFICATE_ARR
DeleteSigningCertificate() #Req: SIGNING_CERTIFICATE
# - only CertificateId, UserName
#Res: empty
SIGNING_CERTIFICATE #X.509 client certificate for a USER to login
#Max 2 per user (SUMMARY_MAP.AccountSigningCertificatesPresent|SigningCertificatesPerUserQuota)
SIGNING_CERTIFICATE.CertificateId #'SIGNING_CERTIFICATE'
SIGNING_CERTIFICATE.UploadDate #'DATE'
SIGNING_CERTIFICATE.UserName #'USER'
SIGNING_CERTIFICATE
.CertificateBody #'PEM'. X.509 public key certficate
SIGNING_CERTIFICATE.Status #'Active' (def) or 'Inactive'
CREDENTIAL_CONTENT.cert_1|2_* #
CREDENTIAL_CONTENT.cert_*_active #'TRUE|FALSE'. Whether there is a SIGNING_CERTIFICATE
CREDENTIAL_CONTENT
.cert_*_last_rotated #'DATE' of last update.
/=+===============================+=\
/ : : \
)==: SERVICE CREDENTIAL :==(
\ :_______________________________: /
\=+===============================+=/
CreateServiceSpecificCredential() #Req: SERVICE_CREDENTIAL
# - no ServiceSpecificCredentialId, CreateDate, ServiceUserName, Status
#Res: ServiceSpecificCredential SERVICE_CREDENTIAL
ResetServiceSpecificCredential() #Reset the password
#Req: SERVICE_CREDENTIAL
# - only ServiceSpecificCredentialId, UserName
#Res: ServiceSpecificCredential SERVICE_CREDENTIAL
UpdateServiceSpecificCredential() #Req: SERVICE_CREDENTIAL
# - no CreateDate, ServiceName, ServiceUserName
#Res: empty
ListServiceSpecificCredentials() #Req: SERVICE_CREDENTIAL
# - only ServiceName, UserName
#Res: ServiceSpecificCredentials SERVICE_CREDENTIAL_ARR
DeleteServiceSpecificCredential() #Req: SERVICE_CREDENTIAL
# - only ServiceSpecificCredentialId, UserName
#Res: empty
SERVICE_CREDENTIAL #Like LOGIN_PROFILE, but SERVICE-specific
#Only for CodeCommit and AWS Keyspaces
SERVICE_CREDENTIAL
.ServiceSpecificCredentialId #SERVICE_CREDENTIAL_MID
SERVICE_CREDENTIAL.CreateDate #'DATE'
SERVICE_CREDENTIAL.ServiceName #'SERVICE'
SERVICE_CREDENTIAL.UserName #'USER'
SERVICE_CREDENTIAL.ServiceUserName#STR. Credential's username
SERVICE_CREDENTIAL.Status #'Active' (def) or 'Inactive'
IAMSelfManage
ServiceSpecificCredentials #AWS managed POLICY. Grants all SERVICE_CREDENTIAL PACTIONs
/=+===============================+=\
/ : : \
)==: SSH PUBLIC KEY :==(
\ :_______________________________: /
\=+===============================+=/
UploadSSHPublicKey() #Req: SSH_PUBLIC_KEY
# - no SSHPulbicKeyId, UploadDate, Status, Encoding, Fingerprint
#Res: SSHPublicKey SSH_PUBLIC_KEY
# - no Encoding
UpdateSSHPublicKey() #Req: SSH_PUBLIC_KEY
# - no UploadDate, SSHPublicKeyBody, Encoding, Fingerprint
#Res: empty
GetSSHPublicKeys() #Req: SSH_PUBLIC_KEY
# - only SSHPublicKeyId, UserName, Encoding
#Res: SSHPublicKey SSH_PUBLIC_KEY
# - no Encoding
ListSSHPublicKey() #Req: SSH_PUBLIC_KEY
# - only UserName
#Res: SSHPublicKeys SSH_PUBLIC_KEY_ARR
# - no Encoding
DeleteSSHPublicKey() #Req: SSH_PUBLIC_KEY
# - only SSHPublicKeyId, UserName
#Res: empty
SSH_PUBLIC_KEY #SSH public key to authenticate a USER. Only for CodeCommit.
#Max 5 per USER
SSH_PUBLIC_KEY.SSHPublicKeyId #SSH_PUBLIC_KEY_MID
SSH_PUBLIC_KEY.UserName #'USER'
SSH_PUBLIC_KEY.UploadDate #'DATE'
SSH_PUBLIC_KEY.Status #'Active' (def) or 'Inactive'
SSH_PUBLIC_KEY.SSHPublicKeyBody #STR. Content of public key
SSH_PUBLIC_KEY.Encoding #'SSH' (ssh-rsa format) or 'PEM'. Format of SSH_PUBLIC_KEY.SSHPublicKeyBody
#Def: either
SSH_PUBLIC_KEY.Fingerprint #STR. MD5 hash of public key
IAMUserSSHKeys #AWS managed POLICY. Grants all SSH_PUBLIC_KEY PACTIONs
/=+===============================+=\
/ : : \
)==: POLICY :==(
\ :_______________________________: /
\=+===============================+=/
CreatePolicy() #Req: POLICY
# - no Arn, PolicyId, CreateDate, UpdateDate, IsAttachable, DefaultVersionId, PermissionsBoundaryUsageCount, AttachmentCount
#Res: Policy POLICY
# - no PolicyDocument
GetPolicy() #Req: POLICY
# - only Arn -> PolicyArn
#Res: Policy POLICY
# - no PolicyDocument
ListPolicies() #Req:
# - Path -> PathPrefix
# - OnlyAttached BOOL (def: false): if true, only if AttachmentCount > 0
# - PolicyUsageFilter 'PermissionsBoundary' or 'PermissionsPolicy'
# - Scope 'AWS', 'Local' or 'All' (def): whether AWS|customer managed policy
#Res: Policies POLICY_ARR
# - no PolicyDocument
ListPoliciesGrantingServiceAccess #Return policies for a given UGROLE on a given AWS service
() #Req:
# - Arn UGROLE_ARN
# - ServiceNamespaces 'SERVICE'_ARR
#Res: PoliciesGrantingServiceAccess ARR:
# - ServiceNamespace 'SERVICE'
# - Policies ARR:
# - EntityType 'USER|GROUP|ROLE'
# - EntityName STR
# - PolicyArn POLICY_ARN
# - PolicyName 'POLICY'
# - PolicyType 'INLINE' or 'MANAGED'
DeletePolicy() #Req: POLICY
# - only Arn -> PolicyArn
#Res: empty
POLICY #Set of permissions.
#Max 1500 (flexible to 5000) (SUMMARY_MAP.Policies[Quota])
#WAIT (GetPolicy()) PolicyExists: when it exists
##With CloudFormation, AWSSamples::IamUsersHavePolicy::Hook HOOK requires it for any USER
POLICY.Arn #POLICY_ARN. 'arn:aws:iam::ACCOUNT_ID:policy[/PATH]/POLICY'
POLICY.PolicyId #POLICY_MID
POLICY.PolicyName #'POLICY'
##With Pulumi, can use "namePrefix" to randomize
POLICY.Path #NAMEPATH (def: '/')
POLICY.CreateDate #'DATE'
POLICY.UpdateDate #'DATE'
POLICY.Description #STR
POLICY.PolicyDocument #POLICY_DOC
POLICY.IsAttachable #BOOL (def: true). If false, disabled.
TagPolicy()
ListPolicyTags()
UntagPolicy() #AWS TAGS
POLICY.Tags #RESOURCE_NAME: PolicyArn POLICY_ARN
/=+===============================+=\
/ : : \
)==: POLICY CDK :==(
\ :_______________________________: /
\=+===============================+=/
new Policy(...CARGS[, OPTS]) #CPOLICY. CKRESOURCE wrapping POLICY
#Ignored unless:
# - referenced, i.e. CPOLICY.policyName used
# - attached to USER|ROLE|GROUP, and POLICY_DOC is not empty
# - OPTS.force true (def: false)
#Is IGRANTABLE
Policy.fromPolicyName
(...CARGS, 'POLICY')->ICPOLICY #
OPTS|ICPOLICY.policyName #'POLICY' (def: 'CPOLICY')
OPTS|CPOLICY.document #CPOLICY_DOC. POLICY.PolicyDocument
OPTS.statements #CSTATEMENT_ARR
CPOLICY
.addStatements(CSTATEMENT,...) #
/=+===============================+=\
/ : : \
)==: POLICY VERSION :==(
\ :_______________________________: /
\=+===============================+=/
CreatePolicyVersion() #Req: POLICY_VERSION
# - no VersionId, CreateDate
# - Document -> PolicyDocument
# - IsDefaultVersion -> SetAsDefault
#Res: PolicyVersion POLICY_VERSION
# - no PolicyArn
SetDefaultPolicyVersion() #Req: POLICY_VERSION
# - only VersionId, PolicyArn
#Res: empty
GetPolicyVersion() #Req: POLICY_VERSION
# - only VersionId, PolicyArn
#Res: PolicyVersion POLICY_VERSION
# - no PolicyArn
ListPolicyVersions() #Req: POLICY_VERSION
# - only PolicyArn
#Res: Versions POLICY_VERSION_ARR
# - no PolicyArn
DeletePolicyVersion() #Req: POLICY_VERSION
# - only VersionId, PolicyArn
#Res: empty
POLICY_VERSION #Specific state of a given POLICY.
#Each POLICY update creates a new POLICY_VERSION
#Max 1e4 (SUMMARY_MAP.PolicyVersionsInUse[Quota])
#Max 5 per POLICY (SUMMARY_MAP.VersionsPerPolicyQuota)
POLICY_VERSION.VersionId #POLICY_VERSION_ID. 'vNUM[.*]'
POLICY_VERSION.PolicyArn #POLICY_ARN
POLICY_VERSION.CreateDate #'DATE'
POLICY_VERSION.Document #POLICY_DOC
POLICY.DefaultVersionId #POLICY_VERSION_ID of the POLICY_VERSION currently used
POLICY_VERSION.IsDefaultVersion #BOOL (def: false). True when POLICY.DefaultVersionId === POLICY_VERSION.VersionId
AWS::IAM::ManagedPolicy #Includes RESATTRs: DefaultVersionId
/=+===============================+=\
/ : : \
)==: INLINE POLICY :==(
\ :_______________________________: /
\=+===============================+=/
PutUGROLEPolicy() #Req: IPOLICY
#Res: empty
GetUGROLEPolicy() #Req: IPOLICY
# - only PolicyName, UGROLEName
#Res: IPOLICY
ListUGROLEsPolicies() #Req: IPOLICY
# - only UGROLEName
#Res: PolicyNames 'POLICY'_ARR
DeleteUGROLEPolicy() #Req: IPOLICY
# - only PolicyName, UGROLEName
#Res: empty
IPOLICY #Identity-based POLICY without an ARN, "embedded" to a single UGROLE
##With Pulumi, this is called User|Group|RolePolicy
IPOLICY.PolicyName #'POLICY'
IPOLICY.UGROLEName #STR
IPOLICY.PolicyDocument #POLICY_DOC
#Max 2KB for USER, 5KB for GROUP, 10KB for ROLE (SUMMARY_MAP.GUROLEPolicySizeQuota)
AWS::IAM::Policy #RESPROPs:
# - PolicyName
# - Users|Groups|Roles 'USER|GROUP|ROLE'_ARR
# - PolicyDocument POLICY_DOC_OBJ
#Prefer AWS::IAM::*Policy instead because does not support drift detection
AWS::IAM::User|Group|RolePolicy #RESPROPs:
# - PolicyName
# - UserName|GroupName|RoleName 'USER|GROUP|ROLE'
# - PolicyDocument POLICY_DOC_OBJ
AWS::IAM::User|Group|Role #Includes RESPROPs: Policies OBJ_ARR: PolicyName, PolicyDocument POLICY_DOC_OBJ
CPOLICY_OPTS.users|groups|roles #CUSER|CGROUP|CROLE_ARR
CPOLICY.attachToUser|Group|Role
(CUSER|CGROUP|CROLE) #
ICROLE_OPTS.inlinePolicies.CPOLICY#CPOLICY_DOC
ICUSER|ICGROUP|ICROLE
.attachInlinePolicy(CPOLICY) #
/=+===============================+=\
/ : : \
)==: MANAGED POLICY :==(
\ :_______________________________: /
\=+===============================+=/
AttachUGROLEPolicy() #Req: MPOLICY
# - only PolicyArn, UGROLEName
#Res: empty
ListAttachedUGROLEPolicies() #Req: MPOLICY
# - only UGROLEName
#Res: AttachedPolicies MPOLICY_ARR
# - no UGROLEName
ListEntitiesForPolicy() #Req:
# - PolicyArn
# - PathPrefix: of POLICY.Path
# - PolicyUsageFilter: like ListPolicies()
# - EntityFilter STR among:
# - 'User', 'Group' or 'Role'
# - 'AWSManagedPolicy' or 'LocalManagedPolicy' (like ListPolicies())
#Res: PolicyUGROLEs ARR
# - UGROLEId ARN
# - UGROLEName STR
DetachUGROLEPolicy() #Req: MPOLICY
# - only PolicyArn, UGROLEName
#Res: empty
MPOLICY #Identity-based POLICY with its own ARN, "attached" to 0-n UGROLEs
#Max 10 per UGROLE (flexible to 20) (SUMMARY_MAP.AttachedPoliciesPerGUROLEQuota)
#Max 6KB (SUMMARY_MAP.PolicySizeQuota)
##With Pulumi:
## - this is called User|Group|RolePolicyAttachment, to attach 1 POLICY to 1 USER|GROUP|ROLE
## - non-exclusive: can attach that POLICY to other USER|GROUP|ROLEs
## - can also use PolicyAttachment, to attach 1 POLICY to n USER|GROUP|ROLEs
## - exclusive: cannot attach that POLICY to other USER|GROUP|ROLEs
MPOLICY.PolicyArn #POLICY_ARN
COND_KEY iam:PolicyARN #MPOLICY.PolicyArn. Only for Attach|DetachUGROLEPolicy()
MPOLICY.PolicyName #'POLICY'
MPOLICY.UGROLEName #STR
POLICY.AttachmentCount #NUM of UGROLEs using this as a MPOLICY
AWS::IAM::ManagedPolicy #RESPROPs:
# - ManagedPolicyName, Path, Description
# - PolicyDocument POLICY_DOC_OBJ
# - Users|Groups|Roles 'USER|GROUP|ROLE'_ARR
#RESATTRs: PolicyArn, PolicyId, CreateDate, UpdateDate, IsAttachable, AttachmentCount
AWS::IAM::User|Group|Role #Includes RESPROPs: ManagedPolicyArns POLICY_ARN_ARR
/=+===============================+=\
/ : : \
)==: MANAGED POLICY CDK :==(
\ :_______________________________: /
\=+===============================+=/
new ManagedPolicy(...CARGS[,OPTS])#CMPOLICY. CKRESOURCE wrapping MPOLICY
#Is IGRANTABLE
ManagedPolicy
.fromManagedPolicyArn
(...CARGS, POLICY_ARN)->ICMPOLICY#
ManagedPolicy
.fromManagedPolicyName
(...CARGS, 'POLICY')->ICMPOLICY #
ManagedPolicy
.fromAwsManagedPolicyName
(...CARGS, 'POLICY')->ICMPOLICY #
OPTS|ICMPOLICY.managedPolicyArn
OPTS|CMPOLICY.managedPolicyName #MPOLICY.*
OPTS|CMPOLICY.description
OPTS|CMPOLICY.path #POLICY.*
OPTS|CMPOLICY.document
OPTS.statements
CMPOLICY
.addStatements(CSTATEMENT,...) #Like CPOLICY
OPTS.users|groups|roles
CMPOLICY.attachToUser|Group|Role
(CUSER|CGROUP|CROLE) #Like CPOLICY
CUSER|CGROUP|CROLE_OPTS
.managedPolicies #ICMPOLICY_ARR (def: [])
ICUSER|ICGROUP|ICROLE
.addManagedPolicy(ICMPOLICY) #
/=+===============================+=\
/ : : \
)==: AWS MANAGED POLICY :==(
\ :_______________________________: /
\=+===============================+=/
AWS MANAGED POLICY ==> #MPOLICY created by AWS.
#POLICY_ARN 'arn:aws:iam::aws:policy/NAME'
## - With Pulumi, can use CW.iam.ManagedPolicy.POLICY POLICY_ARN
#As opposed to "customer managed policy"
#Readonly