-
Notifications
You must be signed in to change notification settings - Fork 1
/
assume-role-mfa.config.yaml
50 lines (49 loc) · 1.48 KB
/
assume-role-mfa.config.yaml
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
iam_policies:
secretmanager:
action:
- secretsmanager:DescribeSecret
- secretsmanager:GetSecretValue
- secretsmanager:PutSecretValue
- secretsmanager:TagResource
- secretsmanager:UntagResource
- secretsmanager:UpdateSecretVersionStage
resource:
- Fn::Sub: arn:aws:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:/${EnvironmentName}/jenkins/mfa/*
condition:
StringLike:
secretsmanager:resource/AllowRotationLambdaArn:
Fn::Sub: 'arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${EnvironmentName}-ciinabox-mfa-iam-access-key-rotator'
iam-manage-keys:
action:
- iam:CreateAccessKey
- iam:DeleteAccessKey
- iam:ListAccessKeys
resource:
- Fn::Sub: arn:aws:iam::${AWS::AccountId}:user/ciinabox/mfa/*
condition:
StringEquals:
iam:ResourceTag/ciinabox:name:
Ref: EnvironmentName
logging:
action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
- logs:DescribeLogStreams
- logs:DescribeLogGroups
resource:
- arn:aws:logs:*:*:*
key_rotator:
roles: {}
functions:
CiinaboxKeyRotator:
named: true
function_name:
Fn::Sub: ${EnvironmentName}-ciinabox-mfa-iam-access-key-rotator
code: key_rotator
handler: app.lambda_handler
runtime: python3.11
timeout: 30
role: KeyRotator
allowed_sources:
- principal: secretsmanager.amazonaws.com