I have a simple KrakenD pod running in kubernetes cluster (version 2.4.3). I have enabled JWT authentication for one endpoint, and used the jwk_local_path key to mention the jwk public keys kept inside the pod in /etc/krakend/jwks.json. After port-forwarding the KrakenD service to 8000, when I'm trying to hit the protected endpoint (http://localhost:8000/api/activity) with correct JWT token, I see the below error logs:
KRAKEND ERROR: [ENDPOINT: /api/activity][JWTValidator] Unable to validate the token: Get "": unsupported protocol scheme "" [GIN] 2024/02/29 - 12:07:26 | 401 | 244.663µs | 10.177.118.250 | GET "/api/activity"** Attaching my krakend.json config file below.
{
"version": 3,
"$schema": "https://www.krakend.io/schema/v2.4/krakend.json",
"debug_endpoint": true,
"extra_config": {
"security/cors": {
"allow_origins": ["*"],
"expose_headers": ["Content-Length"],
"max_age": "12h",
"allow_methods": ["GET", "HEAD", "POST"]
},
"telemetry/logging": {
"level": "DEBUG",
"prefix": "[KRAKEND]",
"syslog": true,
"stdout": true,
"format": "default",
"syslog_facility": "local3"
}
},
"endpoints": [
{
"endpoint": "/api/activity",
"method": "GET",
"input_headers": ["*"],
"output_encoding": "json",
"extra_config": {
"auth/validator": {
"alg": "RS512",
"jwk_local_path": "/etc/krakend/jwks.json",
"cache": false,
"disable_jwk_security": true,
"operation_debug": true
}
},
"backend": [
{
"url_pattern": "/api/activity",
"extra_config": {
"backend/http": {
"return_error_details": "backend_alias"
}
},
"method": "GET",
"host": ["https://www.boredapi.com"]
}
]
}
]
}
I think it's not reaching upto the validation step and throwing protocol scheme error before that. KrakenD __health endpoint still works fine. Any help where I might be wrong in the setup?