Skip to content

Commit

Permalink
[GH-1027] - Adding cloudformation permission to PivotRoleNestedStack (#…
Browse files Browse the repository at this point in the history
…1040)

### Feature or Bugfix

- Bugfix


### Detail

Adding cloudformation permission to PivotRoleNestedStack

### Relates
- #1027

### Security
Please answer the questions below briefly where applicable, or write
`N/A`. Based on
[OWASP 10](https://owasp.org/Top10/en/).

- Does this PR introduce or modify any input fields or queries - this
includes
fetching data from storage outside the application (e.g. a database, an
S3 bucket)? NO
  - Is the input sanitized?
- What precautions are you taking before deserializing the data you
consume?
  - Is injection prevented by parametrizing queries?
  - Have you ensured no `eval` or similar functions are used?
- Does this PR introduce any functionality or component that requires
authorization? No
- How have you ensured it respects the existing AuthN/AuthZ mechanisms?
  - Are you logging failed auth attempts?
- Are you using or adding any cryptographic features? No
  - Do you use a standard proven implementations?
  - Are the used keys controlled by the customer? Where are they stored?
- Are you introducing any new policies/roles/users? Yes
  - Have you used the least-privilege principle? How? ----> Update by @dlpzx: added permissions are restricted to particular prefixed CloudFormation stacks


By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

---------

Co-authored-by: trajopadhye <tejas.rajopadhye@yahooinc.com>
  • Loading branch information
TejasRGitHub and trajopadhye authored Feb 14, 2024
1 parent 54d444c commit f58d878
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deploy/cdk_exec_policy/cdkExecPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ Resources:
Effect: Allow
Action:
- 'cloudformation:*'
Resource: !Sub 'arn:${AWS::Partition}:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/CDKToolkit/*'
Resource:
- !Sub 'arn:${AWS::Partition}:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/CDKToolkit/*'
- !Sub 'arn:${AWS::Partition}:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/${EnvironmentResourcePrefix}*'

- Sid: ECR
Effect: Allow
Expand Down

0 comments on commit f58d878

Please sign in to comment.