Skip to content
New issue

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

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

Already on GitHub? # to your account

Paths other than /auth, underscores in file names #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions auth_function/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def lambda_handler(event, context):
policy.restApiId = apiGatewayArnTmp[0]
policy.region = tmp[3]
policy.stage = apiGatewayArnTmp[1]
policy.allowMethod('GET', '/auth')
policy.allowMethod('GET', event['path'])
authResponse = policy.build()
context = {
'SomeKey': 'SomeValue'
Expand Down Expand Up @@ -52,7 +52,7 @@ class AuthPolicy(object):
"""The principal used for the policy, this should be a unique identifier for the end user."""
version = "2012-10-17"
"""The policy version used for the evaluation. This should always be '2012-10-17'"""
pathRegex = "^[/.a-zA-Z0-9-\*]+$"
pathRegex = "^[/.a-zA-Z0-9-_\*]+$"
"""The regular expression used to validate resource paths for the policy"""

"""these are the internal lists of allowed and denied methods. These are lists
Expand Down