Skip to content

Commit

Permalink
Also log whether API key is in trusted list
Browse files Browse the repository at this point in the history
  • Loading branch information
nikki-t committed Oct 1, 2024
1 parent becae13 commit fa1ebbc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hydrocron/api/controllers/authorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def authorization_handler(event, context):
trusted_key_list = json.loads(STORED_API_KEY_TRUSTED)
logging.info("x-hydrocron-key: %s", api_key_trusted)
logging.info("trusted_key_list: %s", trusted_key_list)
logging.info("api_key_trusted in trusted_key_list: %s", api_key_trusted in trusted_key_list)

if api_key_trusted and api_key_trusted in trusted_key_list:
response_policy = create_policy("trusted_partner", "Allow", event["methodArn"], api_key_trusted)
Expand Down

0 comments on commit fa1ebbc

Please sign in to comment.