Skip to content

Commit 6a36b93

Browse files
committed
Update Alternatives section to refer to new External AuthFilter doc (to be added)
1 parent 1b1665a commit 6a36b93

File tree

1 file changed

+2
-61
lines changed

1 file changed

+2
-61
lines changed

docs/proposals/authentication-filter.md

Lines changed: 2 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -207,69 +207,10 @@ If we chose to go forward with creation of our own `AuthenticationFilter`, it is
207207
All fields in the `AuthenticationFilter` will be validated with Open API Schema.
208208
We should also include [CEL](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-rules) validation where required.
209209

210-
211210
## Alternatives
212211

213-
The Gatewy API currently has an `implementable` HTTP Auth mechanism exposed using the `ExternalAuth` filter in the `HTTPRoute` resource using the [HTTPExternalAuthFilter](https://gateway-api.sigs.k8s.io/reference/spec/?h=externalauth#httpexternalauthfilter). This uses Envoy's `ext_authz` protocol to reach out to an External Service to both `Authenticate` and `Authorize` requests.
214-
215-
See https://gateway-api.sigs.k8s.io/geps/gep-1494/ for more details
216-
217-
This GEP also describes a [two phased approach](https://gateway-api.sigs.k8s.io/geps/gep-1494/#why-two-phases), which includes starting first with a Filter at the `rule` level, and then providing a top level Policy attachment that can be overridden by lower level Auth Filters.
218-
219-
From initial discussion, we decided to go forward with exposing our own authentication filter.
220-
221-
This was decided for the following reasons:
222-
- Given the timeline of `ExternalAuth` eventually being supported and implented by all other Gateway API implementations, it may be many months before this enchancement is available on the main channel within the Gateway API
223-
- Exposing our own form of authentication through an authenticaiton filter does not exclude the possibility of eventually supporting the `ExternalAuth` field
224-
- Given the expressed complexity of the [two phased approach](https://gateway-api.sigs.k8s.io/geps/gep-1494/#why-two-phases), `ExternalAuth` has the potential to go through may iterations before becoming stable
225-
- Recent conversations with the Gateway API maintainers suggest that implementation of `ExternalAuth` is still speculative
226-
227-
Example HTTPRoute using [HTTPExternalAuthFilter](https://gateway-api.sigs.k8s.io/reference/spec/?h=externalauth#httpexternalauthfilter)
228-
229-
```yaml
230-
apiVersion: gateway.networking.k8s.io/v1
231-
kind: HTTPRoute
232-
metadata:
233-
name: api-with-external-auth
234-
namespace: default
235-
spec:
236-
parentRefs:
237-
- name: gateway
238-
hostnames:
239-
- api.example.com
240-
rules:
241-
- matches:
242-
- path:
243-
type: PathPrefix
244-
value: /api
245-
filters:
246-
- type: ExternalAuth
247-
externalAuth:
248-
protocol: HTTP
249-
backendRef:
250-
# BackendObjectReference: defaults to core group and kind=Service if omitted
251-
name: ext-authz-svc
252-
port: 8080
253-
http:
254-
# Prepend a prefix when forwarding the client path to the auth server
255-
path: /authorize
256-
# Additional request headers to send to the auth server (core headers are always sent)
257-
allowedHeaders:
258-
- X-Request-Id
259-
- X-User-Agent
260-
- X-Correlation-Id
261-
# Headers from the auth server response to copy into the backend request
262-
allowedResponseHeaders:
263-
- X-Authz-Trace
264-
- WWW-Authenticate
265-
- Set-Cookie
266-
forwardBody:
267-
# Buffer and forward up to 16 KiB of the client request body to the auth server
268-
maxSize: 16384
269-
backendRefs:
270-
- name: backend-svc
271-
port: 80
272-
```
212+
The [External AuthFilter](docs/proposals/external-auth-filter.md) document proposes a means to integrate with the expermintal feature [HTTPExternalAuthFilter](https://gateway-api.sigs.k8s.io/reference/spec/#httpexternalauthfilter) available in the HTTPRoute specification.
213+
Please refer to that proposal for details on how that approach may be implemented.
273214

274215
## Additional considerations
275216

0 commit comments

Comments
 (0)