Adding JWT verifier.
Still missing:
- Caching of the already checked JWTs (although it could be done at an
upper layer).
- Caching of the jwks_uri to avoid 2 roundtrips for each verification.
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index eb2514f..91f6317 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -524,6 +524,20 @@
],
"headers": [],
"language": "c",
+ "name": "grpc_jwt_verifier_test",
+ "src": [
+ "test/core/security/jwt_verifier_test.c"
+ ]
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "language": "c",
"name": "grpc_print_google_default_creds_token",
"src": [
"test/core/security/print_google_default_creds_token.c"
@@ -566,6 +580,20 @@
],
"headers": [],
"language": "c",
+ "name": "grpc_verify_jwt",
+ "src": [
+ "test/core/security/verify_jwt.c"
+ ]
+ },
+ {
+ "deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc_test_util"
+ ],
+ "headers": [],
+ "language": "c",
"name": "hpack_parser_test",
"src": [
"test/core/transport/chttp2/hpack_parser_test.c"
@@ -8691,6 +8719,7 @@
"src/core/security/base64.h",
"src/core/security/credentials.h",
"src/core/security/json_token.h",
+ "src/core/security/jwt_verifier.h",
"src/core/security/secure_endpoint.h",
"src/core/security/secure_transport_setup.h",
"src/core/security/security_connector.h",
@@ -8872,6 +8901,8 @@
"src/core/security/google_default_credentials.c",
"src/core/security/json_token.c",
"src/core/security/json_token.h",
+ "src/core/security/jwt_verifier.c",
+ "src/core/security/jwt_verifier.h",
"src/core/security/secure_endpoint.c",
"src/core/security/secure_endpoint.h",
"src/core/security/secure_transport_setup.c",