jetstack / kube-oidc-proxy

Reverse proxy to authenticate to managed Kubernetes API servers via OIDC.
https://jetstack.io
Apache License 2.0
477 stars 91 forks source link

Handler based chaining for proxy #136

Closed JoshVanL closed 4 years ago

JoshVanL commented 4 years ago

Currently, the proxy holds all of the business logic in the RoundTrip func. This has become quite unwieldy, and difficult to test. This PR moves each stage of the proxy into http.Handler which makes things a bit more cleaner and idiomatic. This is also a prerequisite for the audit work.

This PR makes use of context in the request to hold state of user information, impersonate etc.

This PR is branched out of #133 and should be merged first.

/assign @simonswine /hold

jetstack-bot commented 4 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JoshVanL

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/jetstack/kube-oidc-proxy/blob/master/OWNERS)~~ [JoshVanL] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
JoshVanL commented 4 years ago

/retest

munnerz commented 4 years ago

/cc

JoshVanL commented 4 years ago

/unassign @simonswine /assign @munnerz

munnerz commented 4 years ago

This PR needs a rebase, and will probably need more once #133 merges - this lgtm though :)

/lgtm /hold

JoshVanL commented 4 years ago

/retry

munnerz commented 4 years ago

/lgtm

munnerz commented 4 years ago

I'll leave /unholding to you @JoshVanL!

/unassign /assign @JoshVanL

JoshVanL commented 4 years ago

/hold cancel