curved-ram-6189
07/11/2023, 12:05 PMcredentials: no suitable key could be found
. Is there something more I need to do in hydra to make my jwks valid, or is this an oathkeeper problem? Unfortunately I can't seem to turn on debug logging to get more information.
oathkeeper logs:
time=2023-07-10T17:38:49Z level=info msg=started handling request http_request=map[headers:map[accept:*/* accept-encoding:gzip, deflate, br authorization:Value is sensitive and has been redacted. To see the value set config key "log.leak_sensitive_values = true" or environment variable "LOG_LEAK_SENSITIVE_VALUES=true". postman-token:5a109834-0ed8-41e9-8dba-9063d00fa750 user-agent:PostmanRuntime/7.32.3 x-forwarded-for:10.42.1.1 x-forwarded-host:localhost x-forwarded-port:80 x-forwarded-proto:http x-forwarded-scheme:http x-real-ip:10.42.1.1 x-request-id:2478b72d750e4591880a5b011241a0c5 x-scheme:http] host:localhost method:GET path:/decisions/kratos/admin/ query:<nil> remote:10.42.1.7:55866 scheme:http]
time=2023-07-10T17:38:49Z level=warning msg=The mutation handler encountered an error audience=application error=map[message:credentials: no suitable key could be found] granted=false http_host=localhost http_method=GET http_url=<http://localhost/kratos/admin/> http_user_agent=PostmanRuntime/7.32.3 mutation_handler=id_token reason_id=mutation_handler_error rule_id=some-id service_name=ORY Oathkeeper service_version=v0.40.3 subject=6b667dcb-06d9-49c2-9882-4b4f7bfe72d6
time=2023-07-10T17:38:49Z level=info msg=Access request denied audience=application error=map[message:credentials: no suitable key could be found] granted=false http_host=localhost http_method=GET http_url=<http://localhost/kratos/admin/> http_user_agent=PostmanRuntime/7.32.3 service_name=ORY Oathkeeper service_version=v0.40.3
time=2023-07-10T17:38:49Z level=error msg=An error occurred while handling a request audience=application error=map[message:credentials: no suitable key could be found] http_request=map[headers:map[accept:*/* accept-encoding:gzip, deflate, br authorization:Value is sensitive and has been redacted. To see the value set config key "log.leak_sensitive_values = true" or environment variable "LOG_LEAK_SENSITIVE_VALUES=true". postman-token:5a109834-0ed8-41e9-8dba-9063d00fa750 user-agent:PostmanRuntime/7.32.3 x-forwarded-for:10.42.1.1 x-forwarded-host:localhost x-forwarded-port:80 x-forwarded-proto:http x-forwarded-scheme:http x-real-ip:10.42.1.1 x-request-id:2478b72d750e4591880a5b011241a0c5 x-scheme:http] host:localhost method:GET path:/kratos/admin/ query:<nil> remote:10.42.1.7:55866 scheme:http] http_response=map[status_code:500] service_name=ORY Oathkeeper service_version=v0.40.3
time=2023-07-10T17:38:49Z level=info msg=completed handling request http_request=map[headers:map[accept:*/* accept-encoding:gzip, deflate, br authorization:Value is sensitive and has been redacted. To see the value set config key "log.leak_sensitive_values = true" or environment variable "LOG_LEAK_SENSITIVE_VALUES=true". postman-token:5a109834-0ed8-41e9-8dba-9063d00fa750 user-agent:PostmanRuntime/7.32.3 x-forwarded-for:10.42.1.1 x-forwarded-host:localhost x-forwarded-port:80 x-forwarded-proto:http x-forwarded-scheme:http x-real-ip:10.42.1.1 x-request-id:2478b72d750e4591880a5b011241a0c5 x-scheme:http] host:localhost method:GET path:/kratos/admin/ query:<nil> remote:10.42.1.7:55866 scheme:http] http_response=map[headers:map[content-type:application/json] size:157 status:500 text_status:Internal Server Error took:7.975344ms]
I've got a rule that looks like this:
- id: some-id
version: v0.36.0-beta.4
upstream:
url: <http://kratos-admin>
match:
url: <http://localhost/kratos/admin/><.*>
methods:
- GET
- POST
- PATCH
authenticators:
- handler: oauth2_introspection
config:
introspection_url: <http://hydra-admin:4445/admin/oauth2/introspect>
scope_strategy: exact
required_scope:
- admin
authorizer:
handler: allow
mutators:
- handler: id_token
errors:
- handler: json
And my config looks like:
authenticators:
noop:
enabled: true
oauth2_introspection:
enabled: true
config:
introspection_url: <http://hydra-admin:4445/admin/oauth2/introspect>
scope_strategy: exact
pre_authorization:
enabled: false
token_from:
header: Authorization
introspection_request_headers:
x-forwarded-proto: http
cache:
enabled: false
access_rules:
repositories:
- <file://rules/rules.yaml>
mutators:
id_token:
enabled: true
config:
issuer_url: <http://localhost/hydra/public/>
jwks_url: <http://hydra-public:4444/.well-known/jwks.json>
icy-manchester-83109
07/11/2023, 4:45 PMcurved-ram-6189
07/11/2023, 4:46 PMicy-manchester-83109
07/11/2023, 5:01 PMcurved-ram-6189
07/11/2023, 5:07 PMicy-manchester-83109
07/12/2023, 2:13 PMcurved-ram-6189
07/13/2023, 11:55 AM