-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Route based on Client Side Certificates #425
Comments
As in validating the client cert as it's received from the client? You should already be able to do that with the existing server APIs, or with the client cert auth provider. https://microsoft.github.io/reverse-proxy/articles/authn-authz.html |
@Tratcher thanks for the quick response; I'm not sure if I fully understand how that is achieved with the reverse-proxy. use case: I have multiple services which require to be secured with client side certificates (different per-service/client) prior to routing the request I'd like the reverse proxy to valid client certificate and/or confirm the certificate-chain as part of the route selection i.e. |
Start with this: Then you add two authorization policies, authpolicy1 or authpolicy2, that require the user be authenticated with certauth1 or certauth2 respectively. Then you specify those auth policy names on your route definitions. |
Triage: Looks like answered, closing. If there are ore concerns, or we missed anything, feel free to reopen. |
@Tratcher @karelz I'm not quite sure I've explained my use case clearly; I wish to validate client certificate at the reverse proxy and have the proxy block or route differently based on the configuration and client certificate detected; for example I have a load-balanced group for a service where
hope this better describes the use case for routing based on the client certificate |
Thanks, that description makes more sense. Support for that would have to be wired directly into routing like we're adding for headers: #448. It could be done by us or via the extensibility proposed in #328. Note optional client certificates are problematic in TLS, you probably need to use a different host name or port for that route anyways. See https://docs.microsoft.com/en-us/aspnet/core/security/authentication/certauth?view=aspnetcore-3.1#optional-client-certificates. |
Hmm, I guess you could also do this with a custom affinity provider, it might be easier. https://microsoft.github.io/reverse-proxy/articles/session-affinity.html |
Triage: We want to wait for more requests and feedback how useful this may be ... |
This feels like something that claims should be used for. I don't know if we want to start going to the level of having claims on individual destinations, but the scenario above of changing the destination list based on the cert would be possible as middleware filtering the destination list. |
Please consider validation of client side certificates for cluster/routes as a enhanced security/authorisation mechanisms prior to offloading ssl/routing request to target/destination
The text was updated successfully, but these errors were encountered: