Skip to content

Commit

Permalink
Log x-hydrocron-key header and trusted key list
Browse files Browse the repository at this point in the history
  • Loading branch information
nikki-t committed Oct 1, 2024
1 parent 774bf48 commit becae13
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hydrocron/api/controllers/authorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def authorization_handler(event, context):

api_key_trusted = "" if "x-hydrocron-key" not in event["headers"].keys() else event["headers"]["x-hydrocron-key"]
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)

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 becae13

Please sign in to comment.