data-dot-all / dataall

A modern data marketplace that makes collaboration among diverse users (like business, analysts and engineers) easier, increasing efficiency and agility in data projects on AWS.
https://data-dot-all.github.io/dataall/
Apache License 2.0
236 stars 82 forks source link

Restrict pivotRole permissions with DENY statement #1681

Closed dlpzx closed 3 weeks ago

dlpzx commented 3 weeks ago

Feature or Bugfix

Detail

Add more restrictions to pivot role that DENY any updates on itself. This prevents the pivot role from granting more permissions to itself in case it is compromised.

As an alternative, the first thing that came to mind is the addition of permission boundaries: add the boundary to the pivot role would restrict the permissions that it can grant itself to the boundary specified. This solution does not restrict it to the absolute minimum level of permissions (which is what it currently has) unless we specify a permission boundary identical to the IAM role policy. Keeping a permission boundary in sync with the pivot role policies adds overhead.

Another alternative was to use NotResource in the IAM policy statements of the original IAM permissions; but it was not as intuitive. Plus, I like it better to specify the resources explicitly

Relates

Security

Please answer the questions below briefly where applicable, or write N/A. Based on OWASP 10.

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