aws-samples / aws-samples/amazon-cloudfront-waf-secretsmanager

Not authorised to update WAF Managed rule set

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
26
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Hello,

I can across an issue with the IAM policy used for the lamba function when it attempted to update the managed rule set on the managed rule set.

This is the error I received:
Error: An error occurred (AccessDeniedException) when calling the UpdateWebACL operation: User: arn:aws:sts::xxxxxxxxxxx:assumed-role/xxxxxxxxxxx/xxxxxxxxxxx is not authorized to perform: wafv2:UpdateWebACL on resource: arn:aws:wafv2:ap-southeast-2:xxxxxxxxxxx:regional/managedruleset/

To overcome this issue, I applied the following to the CFN template.
- Effect: Allow
Action:
- wafv2:UpdateWebACL
Resource: !Sub 'arn:aws:wafv2:${AWS::Region}:${AWS::AccountId}:regional/managedruleset/*'

Is my workaround the best approach and is this expected behaviour?

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the CloudFormation template's IAM policy for the Lambda function and the permission used for the WAF UpdateWebACL operation. Compare the existing resource scope with the reported managed rule set ARN and determine whether the proposed permission is expected and appropriately scoped.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cloud, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.