Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth/validator need to be configured all end points #830

Closed
SunilDev2023 opened this issue Dec 15, 2023 · 2 comments
Closed

auth/validator need to be configured all end points #830

SunilDev2023 opened this issue Dec 15, 2023 · 2 comments

Comments

@SunilDev2023
Copy link

SunilDev2023 commented Dec 15, 2023

Environment info:

  • KrakenD version: Version 3
  • System info: Darwin 23.0.0 x86_64
  • Hardware specs: 2.9 GHz 6-Core Intel Core i9, 16GB
  • Backend technology: Node

Describe what are you trying to do:
Auth Validtor for multiple end points in the global.

Your configuration file:
{
"version": 3,
"name": "Api Gateway",
"port": 8081,
"extra_config": {
"auth/validator": {
"disable": false,
"alg": "RS256",
"jwk_url": "https://keyclock/auth/realms/master/protocol/openid-connect/certs",
"disable_jwk_security": false
}
},
"cache_ttl": "3600s",
"timeout": "2000s",
"endpoints": [
{
"endpoint": "XYZ/Stag/v1/user",
"method": "POST",
"backend": [
{
"url_pattern": "/api/v1/app/user",
"host": ["http://192.168.0.105:8000"]
}
]
}
]
}

krakend run -d -c krakend.json

Globally If I give the validator it is not working. If I give it in each endpoint it works. I have thousands of APIs. I don't want to give in to each endpoint.

[00] 2023/12/15 13:59:53 KRAKEND DEBUG: [ENDPOINT: /XYZ/Stag/v1/login] Building the proxy pipe
[00] 2023/12/15 13:59:53 KRAKEND DEBUG: [BACKEND: /api/v1/app/login] Building the backend pipe
[00] 2023/12/15 13:59:53 KRAKEND DEBUG: [ENDPOINT: /XYZ/Stag/v1/login] Building the http handler
[00] 2023/12/15 13:59:53 KRAKEND DEBUG: [ENDPOINT: /XYZ/Stag/v1/login][JWTSigner] Signer disabled
[00] 2023/12/15 13:59:53 KRAKEND INFO: [ENDPOINT: /XYZ/Stag/v1/login][JWTValidator] Validator disabled for this endpoint

@alombarte
Copy link
Member

alombarte commented Dec 15, 2023

Hi @SunilDev2023, the purpose of the flexible configuration is for you to not worry about duplicating code: https://www.krakend.io/docs/configuration/flexible-config/

It is fine in loading a configuration with thousands of endpoints.

You cannot write the components configuration in the level that better suits you, but where they have been created for

Copy link

This issue was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants