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

refactor(apigateway): authorization models #581

Merged

Conversation

ml019
Copy link
Contributor

@ml019 ml019 commented May 21, 2022

Intent of Change

  • Refactor (non-breaking change which improves the structure or operation of the implementation)

Description

Support additional model values for the case of IP filtering in combination with a lambda authorizer. Also rename the config attribute to more correctly reflect its purpose in controlling authorization rather than authentication.

Motivation and Context

When used with a lambda authorizer, the default value of "IP" incorrectly provides an explicit ALLOW rather than relying on it to come from the policy provided by the authorizer. By providing explicit values to be used with the authorizer, the configuration can be validated as appropriate.

How Has This Been Tested?

Local template generation

Related Changes

Prerequisite PRs:

Dependent PRs:

  • None

Consumer Actions:

  • None

@ml019 ml019 requested a review from a team May 21, 2022 07:20
@ml019 ml019 self-assigned this May 21, 2022
@ml019
Copy link
Contributor Author

ml019 commented May 22, 2022

@roleyfoley I've added prefixed values for the SIG4 models. In a future breaking change, we can remove the non-prefixed ones. I'll rise a ticket to add this to the list for the next breaking change.

@roleyfoley roleyfoley force-pushed the refactor/api-gateway-resource-policies branch from 19e6e21 to daeb3f4 Compare May 22, 2022 10:09
@ml019 ml019 force-pushed the refactor/api-gateway-resource-policies branch from daeb3f4 to 0b542ab Compare May 23, 2022 00:27
ml019 added 4 commits May 23, 2022 10:48
Support additional model values for the case of IP filtering in
combination with a lambda authorizer. Also rename the config attribute
to more correctly reflect its purpose in controlling authorization
rather than authentication.

When used with a lambda authorizer, the default value of "IP" incorrectly
provides an explict ALLOW rather than relying on it to come from the policy
provided by the authorizer. By providing explicit values to be used with the
authorizer, the configuration can be validated as appropriate.
Force the user to correct misconfigurations of the authorization model
if use of authorizers is detected.
Add AWS specific values for authroisation models involving SIG4.

This will permit the removal of the non-preofixed versions in a future
breaking change.
Move the non-prefixed SIG4 authorization models to the AWS provider
as they are very specific to AWS. A future change can remove the
non-prefixed ones, though moving them to the AWS provider largely
isolates them anyway.
@ml019 ml019 force-pushed the refactor/api-gateway-resource-policies branch from 0b542ab to 77d71cf Compare May 23, 2022 00:49
@roleyfoley roleyfoley merged commit a55a2f1 into hamlet-io:master May 23, 2022
@ml019 ml019 deleted the refactor/api-gateway-resource-policies branch May 26, 2022 00:48
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 this pull request may close these issues.

2 participants