Skip to content

Commit cc1bb75

Browse files
committed
feat: add docs for delegate authenticator
ory/oathkeeper#1153 implements a new authenticator to allow authn/authz delegation to upstream services. Relates to ory/oathkeeper#1152
1 parent 42e3d07 commit cc1bb75

File tree

2 files changed

+55
-5
lines changed

2 files changed

+55
-5
lines changed

code-examples/oathkeeper/oathkeeper/oathkeeper.yml

+3
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ authenticators:
6868
noop:
6969
enabled: true
7070

71+
delegate:
72+
enabled: true
73+
7174
authorizers:
7275
allow:
7376
enabled: true

docs/oathkeeper/pipeline/authn.md

+52-5
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,9 @@ are valid! If a handler encounters invalid credentials, then other handlers will
5454

5555
## `noop`
5656

57-
The `noop` handler tells Ory Oathkeeper to bypass authentication, authorization, and mutation. This implies that no authorization
58-
will be executed and no credentials will be issued. It's basically a pass-all authenticator that allows any request to be
59-
forwarded to the upstream URL.
57+
The `noop` handler always authenticate the user, no questions asked. It applies authorization, and mutation.
6058

61-
> Using this handler is basically an allow-all configuration. It makes sense when the upstream handles access control itself or
62-
> doesn't need any type of access control.
59+
> Using this handler is basically an allow-all configuration.
6360
6461
### `noop` configuration
6562

@@ -215,6 +212,56 @@ The request isn't authorized because credentials have been provided but only the
215212
authenticator is enabled for this URL.
216213
```
217214

215+
## `delegate`
216+
217+
The `delegate` handler tells Ory Oathkeeper to bypass authentication, authorization, and mutation. This implies that no
218+
authorization will be executed and no credentials will be issued. It's basically a pass-all authenticator that allows
219+
any request to be forwarded to the upstream URL.
220+
221+
> Using this handler is basically an allow-all configuration. It makes sense when the upstream handles access control itself or
222+
> doesn't need any type of access control.
223+
224+
### `delegate` configuration
225+
226+
This handler isn't configurable.
227+
228+
To enable this handler, set:
229+
230+
```yaml
231+
# Global configuration file oathkeeper.yml
232+
authenticators:
233+
delegate:
234+
# Set enabled to true if the authenticator should be enabled and false to disable the authenticator. Defaults to false.
235+
enabled: true
236+
```
237+
238+
### `delegate` access rule example
239+
240+
```sh
241+
cat ./rules.json
242+
243+
[{
244+
"id": "some-id",
245+
"upstream": {
246+
"url": "http://my-backend-service"
247+
},
248+
"match": {
249+
"url": "http://my-app/some-route",
250+
"methods": [
251+
"GET"
252+
]
253+
},
254+
"authenticators": [{
255+
"handler": "delegate"
256+
}]
257+
}]
258+
259+
curl -X GET http://my-app/some-route
260+
261+
HTTP/1.0 200 Status OK
262+
The request has been allowed!
263+
```
264+
218265
## `cookie_session`
219266

220267
The `cookie_session` authenticator will forward the request method, path and headers to a session store. If the session store

0 commit comments

Comments
 (0)