Skip to content

Commit

Permalink
Fix marshmellow verison, and prevent jose from verifying access token…
Browse files Browse the repository at this point in the history
… hash

* Pin marshmellow to a version less than 3. This might be fixed in Netflix#99
* Disable at_hash verification if present in the JWT, since the bless lambda doesn't have access to the a hash of the access token.
  • Loading branch information
stoggi committed Nov 4, 2019
1 parent cce9d5c commit 24af4b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bless/aws_lambda/bless_lambda_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def lambda_handler_user(
config.get(JWTAUTH_SECTION, JWTAUTH_SIGNATURE_JWK_OPTION),
audience=config.get(JWTAUTH_SECTION, JWTAUTH_AUDIENCE_OPTION),
issuer=config.get(JWTAUTH_SECTION, JWTAUTH_ISSUER_OPTION),
algorithms=config.get(JWTAUTH_SECTION, JWTAUTH_SIGNATURE_ALGORITHM_OPTION)
algorithms=config.get(JWTAUTH_SECTION, JWTAUTH_SIGNATURE_ALGORITHM_OPTION),
options={'verify_at_hash': False}
)
username_claim = config.get(JWTAUTH_SECTION, JWTAUTH_USERNAME_CLAIM_OPTION)
if username_claim not in claims.keys():
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
'boto3',
'cryptography',
'ipaddress',
'marshmallow',
'kmsauth'
'marshmallow<3',
'kmsauth',
'python-jose[cryptography]'
],
extras_require={
'tests': [
Expand Down

0 comments on commit 24af4b4

Please sign in to comment.