Skip to content

Instantly share code, notes, and snippets.

@nntsugu
Last active April 24, 2020 05:06
Show Gist options
  • Save nntsugu/732e4c84f07d759d1db9e6905413ff28 to your computer and use it in GitHub Desktop.
Save nntsugu/732e4c84f07d759d1db9e6905413ff28 to your computer and use it in GitHub Desktop.
任意のPathを付与したIAM UserがIAMUserChangePasswordだけで自分のパスワードが変更できるかのテスト
AWSTemplateFormatVersion: "2010-09-09"
Metadata:
Generator: "console"
Description: ""
Resources:
UserWithDeepPath:
Type: "AWS::IAM::User"
Properties:
UserName: "test-w-deep-path"
Path: "/hoge/fuga/"
LoginProfile:
Password: "Password!"
PasswordResetRequired: true
UserWithSinglePath:
Type: "AWS::IAM::User"
Properties:
UserName: "test-w-single-path"
Path: "/hoge/"
LoginProfile:
Password: "Password!"
PasswordResetRequired: true
GroupTestStaff:
Type: "AWS::IAM::Group"
Properties:
GroupName: "test-staff"
ManagedPolicyArns: [
"arn:aws:iam::aws:policy/IAMUserChangePassword"
]
UserToGroupAdditionTestStaff:
Type: 'AWS::IAM::UserToGroupAddition'
Properties:
GroupName: !Ref GroupTestStaff
Users:
- !Ref UserWithDeepPath
- !Ref UserWithSinglePath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment