Skip to content

Commit

Permalink
Replace Managed Policy with equivalent inline policy (#405)
Browse files Browse the repository at this point in the history
* Replace AmazonAPIGatewayInvokeFullAccess Managed Policy with equivalent inline policy.

Some scanners are triggered by the prescence of the managed policy. This commit replaces the managed policy with an equivalent inline policy that will not trigger scanners. There's a small security win in being able to scope the API Gateway resource to the specific Account and Region.

* Update changelog
  • Loading branch information
ConnorKirk authored Mar 26, 2024
1 parent cb48fca commit e2af516
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Change Log

## v0.67

- [#405](https://github.com/awslabs/amazon-s3-find-and-forget/pull/405) Replace
AmazonAPIGatewayInvokeFullAccess managed policy with inline policy

## v0.66

- [#395](https://github.com/awslabs/amazon-s3-find-and-forget/issues/395):
Increase the speed of the json_handler by migrating from a list to a set.
Move from O(n) to O(1)
Increase the speed of the json_handler by migrating from a list to a set. Move
from O(n) to O(1)

## v0.65

Expand Down
12 changes: 10 additions & 2 deletions templates/auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ Resources:
ServiceInvokeRole:
Type: AWS::IAM::Role
Properties:
ManagedPolicyArns:
- !Sub arn:${AWS::Partition}:iam::aws:policy/AmazonAPIGatewayInvokeFullAccess
AssumeRolePolicyDocument:
Statement:
- Effect: Allow
Expand Down Expand Up @@ -93,6 +91,16 @@ Resources:
- !Sub "arn:${AWS::Partition}:glue:*:${AWS::AccountId}:database*"
- !Sub "arn:${AWS::Partition}:glue:*:${AWS::AccountId}:table*"
- !Sub "arn:${AWS::Partition}:glue:*:${AWS::AccountId}:partition*"
- PolicyName: APIGateway
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- "execute-api:Invoke"
- "execute-api:ManageConnections"
Resource: !Sub arn:${AWS::Partition}:execute-api:${AWS::Region}:${AWS::AccountId}:*


Outputs:
CognitoIdentityPoolId:
Expand Down

0 comments on commit e2af516

Please sign in to comment.