Closed BaloMueller closed 4 years ago
I think I've seen something similar.
Out of interest, does it work for other javascript based clients?
Here's an example of a node version, just input your token and url.
`var https = require('follow-redirects').https; var fs = require('fs');
var options = { 'method': 'GET', 'hostname': 'XXXXXX', 'path': '/XXXX', 'headers': { 'Content-Type': 'application/json', 'Authorization': 'Bearer TOKEN' }, 'maxRedirects': 20 };
var req = https.request(options, function (res) { var chunks = [];
res.on("data", function (chunk) { chunks.push(chunk); });
res.on("end", function (chunk) { var body = Buffer.concat(chunks); console.log(body.toString()); });
res.on("error", function (error) { console.error(error); }); });
var postData = JSON.stringify({});
req.write(postData);
req.end();`
We were able to fix the problem. The issue was, that the introspection endpoint wasn't set correct. I was expecting, that the value for introspect was taken from the .well_known configuration, which it does not.
@BaloMueller I am facing the same problem, would be possible you detail the solution ?, how can I set correctly the introspection_endpoint
?.
I mapped the introspection_endpoint
from .well_known to kong-oidc properties bu it is still not working.
I set the following properties:
introspection_endpoint: https://
Hello,
we are running a Kong 1.5 with this kong-oidc plugin. For Auth we are running a Keycloak Service.
Normal requests with a browser are working perfectly. The first time to an Ingress the user gets redirected to the login page, after login the user can use the service.
Now we want to be able to send Requests using an API/cUrl. Therefore I retrieve a JWT and send it using the following command:
curl -H 'Accept: application/json' -H "Authorization: Bearer $TOKEN" https://api.host.com/echo/ -i -L
As a result, I get redirected to the auth endpoint, which in turn asks me to login:
We defined the
introspection_endpoint
which is was expecting to solve the problem, though nothing changed.Can you help me? What am I doing wrong?
Thanks a lot!