-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gRPC authentication proposal - using gRPC secure channels
- Loading branch information
1 parent
0304ec6
commit 7a2b399
Showing
10 changed files
with
291 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.pyc | ||
__pycache__/* |
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,7 @@ | ||
__all__ = ['SERVER_CERTIFICATE', 'SERVER_CERTIFICATE_KEY', | ||
'generate_jwt_token', 'is_token_valid', 'CustomAuthMetadataPlugin', | ||
'SignatureValidationInterceptor'] | ||
|
||
from .helper_functions import SERVER_CERTIFICATE, SERVER_CERTIFICATE_KEY | ||
from .helper_functions import generate_jwt_token, is_token_valid | ||
from .plugins_interceptors import CustomAuthMetadataPlugin, SignatureValidationInterceptor |
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,74 @@ | ||
import datetime | ||
import os | ||
import jwt | ||
|
||
|
||
def load_credential_from_file(filepath): | ||
''' | ||
Loads certificate from file and returns it as bytes | ||
Args: | ||
filepath (str): The path to the file to load | ||
Returns: | ||
The content of the certificate file as bytes | ||
''' | ||
real_path = os.path.join(os.path.dirname(__file__), filepath) | ||
with open(real_path, "rb") as f: | ||
return f.read() | ||
|
||
|
||
token_secret = '3#pn$%agj02_r119*peydh&w+kt(2gy=n&e-68t19fup#33=)7' | ||
|
||
# sample token details | ||
jwt_token_details = { | ||
'id': 'labgrid', | ||
'username': 'labgrid-username', | ||
'firstName': 'firstName', | ||
'lastName': 'lastName', | ||
'email': '[email protected]', | ||
'isStaff': True, | ||
'exp': (datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(days=1)),} | ||
|
||
|
||
def generate_jwt_token(token_details=jwt_token_details, secret=token_secret): | ||
''' | ||
Generates a JWT token with the given token details and secret and return it | ||
''' | ||
return jwt.encode(token_details, secret, algorithm='HS256') | ||
|
||
|
||
def is_token_valid(token, secret_key=token_secret): | ||
''' | ||
Validates the given token using the secret key and returns True if the token is valid | ||
Args: | ||
token (str): The token to validate | ||
secret_key (str): The secret key to use for validation | ||
Returns: | ||
True if the token is valid, False otherwise | ||
''' | ||
try: | ||
decoded_token =jwt.decode(token, secret_key, algorithms=['HS256']) | ||
except jwt.ExpiredSignatureError: | ||
return False | ||
except jwt.InvalidTokenError: | ||
return False | ||
|
||
if not 'id' in decoded_token: | ||
return False | ||
|
||
if not 'exp' in decoded_token: | ||
return False | ||
|
||
exp_date = datetime.datetime.fromtimestamp(decoded_token['exp']) | ||
curr_date = datetime.datetime.utcnow() | ||
|
||
if exp_date < curr_date: | ||
return False | ||
|
||
return True | ||
|
||
SERVER_CERTIFICATE=load_credential_from_file('../Certificates/server.crt') | ||
SERVER_CERTIFICATE_KEY=load_credential_from_file('../Certificates/server.key') |
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,42 @@ | ||
import grpc | ||
from .helper_functions import generate_jwt_token, is_token_valid | ||
|
||
|
||
JWT_TOKEN = generate_jwt_token() | ||
|
||
class CustomAuthMetadataPlugin(grpc.AuthMetadataPlugin): | ||
''' | ||
Authentication plugin used to add {'x-signature', JWT_TOKEN} HTTP header | ||
''' | ||
def __call__(self, context, callback): | ||
signature = context.method_name[::-1] | ||
signature = JWT_TOKEN | ||
callback((("x-signature", signature),), None) | ||
|
||
|
||
class SignatureValidationInterceptor(grpc.aio.ServerInterceptor): | ||
''' | ||
Middleware used to validate the JWT token in the HTTP header | ||
''' | ||
def __init__(self): | ||
def abort(ignored_request, context): | ||
context.abort(grpc.StatusCode.UNAUTHENTICATED, "Invalid signature") | ||
self._abort_handler = grpc.unary_unary_rpc_method_handler(abort) | ||
|
||
def intercept_service(self, continuation, handler_call_details): | ||
''' | ||
Extracts the token from the HTTP header and validates it | ||
''' | ||
token = '' | ||
|
||
for item in handler_call_details.invocation_metadata: | ||
dictionary = item._asdict() | ||
if dictionary['key'] == 'x-signature': | ||
token = dictionary['value'] | ||
break | ||
|
||
if token != '': | ||
if is_token_valid(token): | ||
return continuation(handler_call_details) | ||
|
||
self._abort_handler() |
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,33 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIFrDCCA5SgAwIBAgIUF/RY4CD6al79N6+WEl0OLmRuv5YwDQYJKoZIhvcNAQEL | ||
BQAwfDELMAkGA1UEBhMCR0IxEzARBgNVBAcMCk1hbmNoZXN0ZXIxFDASBgNVBAoM | ||
C0FSTSBMaW1pdGVkMQ8wDQYDVQQLDAZDRS1HUFUxEjAQBgNVBAMMCWxvY2FsaG9z | ||
dDEdMBsGCSqGSIb3DQEJARYOY2UtZ3B1QGFybS5jb20wHhcNMjQxMDI2MTE0NDQ5 | ||
WhcNMjUxMDI2MTE0NDQ5WjB8MQswCQYDVQQGEwJHQjETMBEGA1UEBwwKTWFuY2hl | ||
c3RlcjEUMBIGA1UECgwLQVJNIExpbWl0ZWQxDzANBgNVBAsMBkNFLUdQVTESMBAG | ||
A1UEAwwJbG9jYWxob3N0MR0wGwYJKoZIhvcNAQkBFg5jZS1ncHVAYXJtLmNvbTCC | ||
AiIwDQYJKoZIhvcNAQEBBQAD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r1pkvnTYPNlOz+2HIP+SxZs+k4kQ0wwQOAVcJAlhLLiTbwK47IeV8BHR | ||
ALMzvW3Ahjh6WZhnr86oU7Sm0GAQOT+lCqholRi6RbcXnCux2BST/oiwDe1ajmE2 | ||
EZjq+l4A6CVp0CUfA/pBl+0oPNZWjnvDQeY1mI5bK2o/54IsOFNRl5SBIpBvMtqM | ||
EZTKwM958UyQqOrWUCwBNFJ+jcYR+coKKmbGiYYRCkT4fIjLauzJGnJ+Ni9cA9ty | ||
zBGow461rUeoMDCzIlBrXNbIZoLkmXT1/2+UXWZmLmgK5wSoOFug0CEpSgr3dzlP | ||
4bhMzyxcxEe1in8haFRv35y10dhVTNJ7M/Oxo+r2EqrS9aDkzADIsUta1Huz/V0Z | ||
93rFBhRZBbCeEtZ+G0i3XOsSAPueyf6EJplI+Hpd9Nw/hNjbdbxk8c5WgUR3oT8q | ||
5pZY1waC7qPyPeEyDyribA== | ||
-----END CERTIFICATE----- |
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,31 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIFbDCCA1QCAQEwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCR0IxEzARBgNV | ||
BAcMCk1hbmNoZXN0ZXIxFDASBgNVBAoMC0FSTSBMaW1pdGVkMQ8wDQYDVQQLDAZD | ||
RS1HUFUxEjAQBgNVBAMMCWxvY2FsaG9zdDEdMBsGCSqGSIb3DQEJARYOY2UtZ3B1 | ||
QGFybS5jb20wHhcNMjQxMDI2MTIwNzQ3WhcNMjUxMDI2MTIwNzQ3WjB8MQswCQYD | ||
VQQGEwJHQjETMBEGA1UEBwwKTWFuY2hlc3RlcjEUMBIGA1UECgwLQVJNIExpbWl0 | ||
ZWQxDzANBgNVBAsMBkNFLUdQVTESMBAGA1UEAwwJbG9jYWxob3N0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EItW8IE3TGblBWRuZGpDu/6KIL5li/jC3a+VPLAEQBWZgfDzENV | ||
S0SstPBVGzwjcLXdhw2Okz36sghMVTe0C3kjUamrxmgKBj9y6pmGDsr8vNECCWCL | ||
uKjuUw7KMYORLOSOabbRS+XhjfxzCQUxu0yn+RneykkNipxMHqBJSCM5XBi83iHG | ||
fxr5jYAdYyp7HBvJ/l2iFGYaS5/O/AVmraGsEMzWgGZBG+x9XBQo6CDZbGjjNXUe | ||
bTVB3aVk1tIyeK5rWaJOhZq4YzAvysd0cTR0lLr9dKQuYf0aPDITL0qKbk7JQTrN | ||
yq+dOZ4ipnjiaLI/Fv09TZN/Rin6Hqx9p+41lQQy8cGa2FYLGMvBrthKkOUfTrl9 | ||
hVkujbNSXL09cwWuUgV6KLNXNXX02lp2LG3R+b5BWoNHKZYabAInVfv5M3Z40yec | ||
KgMa4bOE6NAxg5F5DqjGWuwWdKG1hIV6CLqVUzhDP7rrg4LnnpELr0ms56EYAXr5 | ||
-----END CERTIFICATE----- |
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,51 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIIJKAIBAAKCAgEAqN3dy2ZzqIXfVvd+/I1s4pvksF54OuylsNiog9SdwPGN8/Qq | ||
vB3VUq7t0pCgDm3lZHWBqwlFx++z9PehEC5hS5lNTYc55eZjDOFbiDmqc25m3Qzs | ||
HoLaPgKV4NEGmnqbA5GYAJL+V1enEuQfMCOBvlojkR0IGFzreZJB3gOVlHRO1VU0 | ||
YzQifo4PyS8IPbVdbwu/EUoLNU/I6WRjYo4x+FmDuDbVWOqXxkE9kKRbTruFLyjX | ||
YhTIkL/9ZlRYVXSwOEcUS6uDBr9HNSDyyfCGIZD5DoE1N29mDbpfhKPwW7fUtTP1 | ||
bHYdztOq2yY2gOEZjqI+7tPw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FotbCmx4qh | ||
eL3cvDZ+FwJW63hY6Yc0WNcSHvS5LxcDIUiuplQ7ANljWF7cQNwhSFwj7dNcCJKZ | ||
tExUIQKCAQAEfkzbJx2JYP/QSmfGJGQghrJMrsjRsXUKOfqeY+K2kRo3HtZOSPqw | ||
b4KI303MF/QG8KbP1g7sWhZ2uJ3bRdEbAiMUtMRNcg4Rl8r3E81talfduXsbTp5A | ||
1gSWGkRKalWZxtRqjd/f8oGXVdJae78BcIJ7GU5O4jAzu/Vrv92rdeWayzpIjxAV | ||
/3OkCLQnJRhMispPWf63hahhN18p2qetGh+ue6eddkDOxvITKfPOysykw4oiAAiH | ||
gdbOKRU37nUMprgQ7JSqSX/4XzKJ6X6AY4neNS3QPPh6hfVH10d0SYL37WHFoGfW | ||
Uhfcqi646EX5FVmjODY/VrIXsaVKemIXAoIBAGQi35JOilMqHDWuJPq4LyOUxvKp | ||
hnxA38Thx9Pvy2uvlJx6VwjyuBzuY4+qhinnSgKvIzAmS4kjFguuwPIE+WzhWRHu | ||
D2GyeFCPTmMPLC76NIxyB6tZu4RQgKpF9e5+jPrVXLhd8kopPLUD729/c3iyZrcY | ||
SU2tB4gGMPkREOqLn/fOZ/QPxzbOD4Qi2yxqF0Gy2O8T493Ikc9DW5LMZeakwFt7 | ||
e2jp2TkFIdJQ7ju93BRhv1rvum/LCgxxKD5i1zvIONBAoQBgbhC5gKkpx55NVZFG | ||
Y+EnHOzFarlsWKu8akQA7BY1AgTKtBXCuu/W3NEWowPhmjzmdbQ/ener4ik= | ||
-----END RSA PRIVATE KEY----- |
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