forked from Netflix/bless
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support authentication using a JSON web token (JWT) Netflix#93
* Created new configuration section for JWT Auth - Configure a JWK to verify a JWT signature - Configure requried signature algorithms - Configure required audience and issuer claims - Configure name of username claim * Added code block in lambda_handler_user to validate JWT if configured - Require remote_usernames == bastion_user - Require valid JWT signature, expiry, and signature algorithm - Require username_claim in JWT - Require username_claim == bastion_user * Added unit tests for config and JWT validation
- Loading branch information
Showing
9 changed files
with
424 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ python-dateutil==2.8.0 | |
s3transfer==0.2.0 | ||
six==1.12.0 | ||
urllib3==1.24.3 | ||
python-jose[cryptography]==3.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Bless CA] | ||
ca_private_key_file = tests/aws_lambda/only-use-for-unit-tests.pem | ||
us-east-1_password = bogus-password-for-unit-test | ||
us-west-2_password = bogus-password-for-unit-test | ||
|
||
[JWT Auth] | ||
use_jwtauth = True | ||
jwtauth_signature_jwk = {"kty": "RSA","e": "AQAB","use": "sig","kid": "key1","alg": "RS256","n": "7V4O45XkdzKedgfbg3U1X_UeGF00wQH6APcuRX_702h-3QZI4VmAbBFgDDAJgHa1wunKPUKmwfmzFodLX6Bd2UvgHtzhHDAnrHYSOpV0jci7zxUhPN84PBbNRKNG-yAGPvNk4YbCWHywz7BKmTVnG9q4KSdWaHpyhljxedMdkt2JqdTJcwaAEfqT_0A-gcBWxyCPwRJJRLColM9g6lZU7-17Y3UNHwBFC4lahfd009CXY7WMbKIJMG0LuBjsmCE4L__IlrFlevVFyA0ShDjDh07gKD-f5WJ6WdgcZOL7X3rf-DK6MRBUW4ItIpG7DVVWN0Vj6SNQT3x1kwq55mIZTw"} | ||
jwtauth_signature_algorithm = RS256 | ||
jwtauth_issuer = https://issuer.example.com | ||
jwtauth_audience = 6c1d8893-9240-4f87-be95-1f21ef664ce0 | ||
jwtauth_username_claim = username |
Oops, something went wrong.