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

Custom Authorizer not replicating IAM permissions correctly #1191

Closed
lferreira-tenchi opened this issue Mar 8, 2021 · 0 comments · Fixed by #1798
Closed

Custom Authorizer not replicating IAM permissions correctly #1191

lferreira-tenchi opened this issue Mar 8, 2021 · 0 comments · Fixed by #1798

Comments

@lferreira-tenchi
Copy link

Custom Authorizer not replicating IAM permissions correctly

Current Behavior
Given the following policy returned from the custom authorizer:

{
   "Version":"2012-10-17",
   "Statement":[
      {
         "Action":"execute-api:Invoke",
         "Effect":"Allow",
         "Resource":[
            "arn:aws:execute-api:*:*:random-api-id/local/GET/me",
            "arn:aws:execute-api:*:*:random-api-id/local/GET/organizations"
         ]
      }
   ]
}

serverless-offline wrongly allows me to access /organizations/0000 or /organizations/0000/members or even /me/invites. That behavior is unexpected and does not match the behavior of a deployed stack.

The correct behavior is to block all requests that do not match /organizations or /me exactly as there is no wildcard on neither of the rules (i.e. arn:aws:execute-api:::random-api-id/local/GET/organizations*)

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

Successfully merging a pull request may close this issue.

2 participants