Hi @hackerman,
I integrated oathkeepr with spring boot and the integration works fine. But when I tried to use “oauth2_introspection” using ory hydra introspection URL i’m getting this error. Could you please help me on this.
This is my oathkeeper config file:
serve:
proxy:
port: 4455 # run the proxy at port 4455
api:
port: 4456 # run the api at port 4456
access_rules:
repositories:
- file:///rules.json
mutators:
header:
enabled: true
noop:
enabled: true
id_token:
enabled: true
issuer_url: http://localhost:4455/
authorizers:
allow:
enabled: true
deny:
enabled: true
authenticators:
oauth2_introspection:
# Set enabled to true if the authenticator should be enabled and false to disable the authenticator. Defaults to false.
enabled: true
# REQUIRED IF ENABLED - The OAuth 2.0 Token Introspection endpoint.
introspection_url: https:<my introspect url>
# Sets the strategy to be used to validate/match the token scope. Supports "hierarchic", "exact", "wildcard", "none". Defaults
# to "none".
scope_strategy: exact
pre_authorization:
# Enable pre-authorization. Defaults to false.
enabled: true
# REQUIRED IF ENABLED - The OAuth 2.0 Client ID to be used for the OAuth 2.0 Client Credentials Grant.
client_id: sampleClient9
# REQUIRED IF ENABLED - The OAuth 2.0 Client Secret to be used for the OAuth 2.0 Client Credentials Grant.
client_secret: sampleClient9
This is my rules.json file
[
{
“id”: “allow-anonymous-with-header-x”,
“upstream”: {
“url”: “https://httpbin.org/anything/header”
},
“match”: {
“url”: “http://<127.0.0.1|localhost>:4455/test/a”,
“methods”: [
“GET”
]
},
“authenticators”: [
{
“handler”: “oauth2_introspection”
}
],
“authorizer”: {
“handler”: “allow”
},
“mutator”: {
“handler”: “id_token”,
“config”: {
“headers”: {
“X-User”: “{{ print .Subject }}”
}
}
}
}
]
Error receiving in oathkeeper side
net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)" granted=false reason_id=authentication_handler_error
time=“2019-07-01T01:48:56Z” level=warning msg=“Access request denied”
I have put only a part of error because the forum post is failing saying only two links can be published in a post.