Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Least Privilege #188

Open
tom-huguenard opened this issue Jan 20, 2024 · 2 comments
Open

Least Privilege #188

tom-huguenard opened this issue Jan 20, 2024 · 2 comments
Assignees

Comments

@tom-huguenard
Copy link

Since every demo eventually becomes production code, may I suggest/request that your demo demonstrate the practice of least privilege?

In particular, I would love for you to provide a "Least Privilege Stack" that creates the IAM permissions sufficient to building and deploying the sam-app stack.

It would be sufficient, I suppose, to provide a list of those least privilege access rights so the user can then create them.

@jplock jplock self-assigned this Jan 20, 2024
@jplock
Copy link
Contributor

jplock commented Jan 20, 2024

The Lambda functions are using scoped down roles and the Amplify role is only used for deployment. Is there another area you’d like to see least privileged followed?

@tom-huguenard
Copy link
Author

Thanks for asking.

Try running the SAM deploy with an assumed role with no privileges. You will gradually discover all the missing privileges. When you fix all the missing privileges with least-privilege, you will have a policy document you can share with this project that a naive user can attach to his or her assumed role.

This is the process the naive user needs to undergo to make this demo successfully deploy. However, the naive user may be unaware of least-privilege, or may simply not have the time to scope down roles. The naive user will do things like give the assumed role much broader permissions.

Some of these quick starts suggest the work be undertaken in an "admin" account. Which is the ultimate in ignoring least-privilege.

I'd like for you to take on the responsibility of guiding the naive user to

  1. use an assumed role for CLI
    (I am attaching ar.py that I use to assume a role)
    [ar.py.txt](https://github.com/aws-samples/aws-plaid-demo-app/files/14001519/ar.py.txt
  2. Assign least privileges to that role
  3. Be able to successfully run the SAM deploy out of the box.

Thanks for listening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants