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

fix: Limited permission for authorizers #7300

Merged
merged 1 commit into from
Feb 11, 2020
Merged

Conversation

pmuens
Copy link
Contributor

@pmuens pmuens commented Feb 7, 2020

What did you implement

Fixes a permission issue when using custom authorizers for API Gateways.

❗️ NOTE: Note entirely sure about the impact, but thus could result in a breaking change... ❗️

How can we verify it

The easiest way would be to run the integration tests. Other than that you could use this service config (provided by @glb):

service: test

provider:
  name: aws
  runtime: nodejs10.x

functions:
  example:
    role: exampleRole
    handler: bin/example
    events:
      - http:
          path: /echo
          method: GET
          authorizer:
            name: authorizer
            arn: arn:aws:lambda:us-east-1:111111111111:function:sample

Todos

  • Write and run all tests
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: NO
Is it a breaking change?: MAYBE

@codecov-io
Copy link

codecov-io commented Feb 7, 2020

Codecov Report

Merging #7300 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7300   +/-   ##
=======================================
  Coverage   88.12%   88.12%           
=======================================
  Files         239      239           
  Lines        8833     8833           
=======================================
  Hits         7784     7784           
  Misses       1049     1049
Impacted Files Coverage Δ
...ckage/compile/events/apiGateway/lib/permissions.js 87.5% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33291c8...12f7c29. Read the comment docs.

@pmuens
Copy link
Contributor Author

pmuens commented Feb 7, 2020

Thanks for reporting @glb 👍

Could you please review and test this PR to see if it fixes your problem? Thanks!

/cc @medikoo

medikoo
medikoo previously approved these changes Feb 10, 2020
Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pmuens thanks for looking into that. Looks great to me!

@pmuens
Copy link
Contributor Author

pmuens commented Feb 10, 2020

Thanks for the review @medikoo 👍

I rebased the branch so that it's in sync with master and it can be merged.

For some reason I couldn't run the integration tests locally. Could you run them and report back if the all pass? I was just testing this manually. Thanks!

@medikoo do you think this is a breaking change as the permissions are stricter compared to the way we handled it before?

@medikoo
Copy link
Contributor

medikoo commented Feb 11, 2020

@medikoo do you think this is a breaking change as the permissions are stricter compared to the way we handled it before?

If someone relied on it, I don't think it could have been conscious. I wouldn't treat it as breaking change (assuming we don't break resource relations in context of deployed service)

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it'll go de-sync again. I think it's fine, if you force merge it after rebasing

@pmuens pmuens merged commit c05dcb3 into master Feb 11, 2020
@pmuens pmuens deleted the authorizer-permissions branch February 11, 2020 11:52
@pmuens
Copy link
Contributor Author

pmuens commented Feb 11, 2020

Thanks for the review @medikoo 👍

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

Successfully merging this pull request may close these issues.

None yet

3 participants