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

Handle all API endpoints through the authorizer #419

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

ZoogieZork
Copy link
Contributor

@ZoogieZork ZoogieZork commented Feb 10, 2025

Description

Moves all API Gateway endpoints to use the authorizer, including the ones previously using the NONE authorizer.

Additionally, the bulk of the type-checking issues have been corrected, but some remain (due to limitations with typechecking Django models).

Motivation and Context

Keeps all of the authorization logic in a single place. This enables future flexibility in handling these requests, such as additional logging.

Additionally, this works around security scanners which flag any API Gateway resource with a NONE authorizer.

How Has This Been Tested?

Tested in non-prod environment.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation change

Checklist

  • My code follows conforms to the coding standards.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Determining whether a path skips authorization is moved to the
authorizer lambda.

This allows for additional handling of "passthrough" requests by
modifying the authorizer, such as logging or additional contextual
routing.
@ZoogieZork ZoogieZork marked this pull request as ready for review February 10, 2025 22:43
@ZoogieZork ZoogieZork requested a review from a team as a code owner February 10, 2025 22:43
Copy link
Contributor

@mdfleury-wbd mdfleury-wbd left a comment

Choose a reason for hiding this comment

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

LGTM

@ZoogieZork ZoogieZork merged commit 65cc2af into main Feb 11, 2025
6 checks passed
@ZoogieZork ZoogieZork deleted the zoogiezork/authorizer-types branch February 11, 2025 17:19
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