Replies: 6 comments 4 replies
-
Interesting approach! Would there be an option to forward cryptographic information as well which could be validated to prevent misconfiguration from failing to strip |
Beta Was this translation helpful? Give feedback.
-
Very good point, Hydra must verify the authenticity of the load-balancer's appended http headers either by:
Effort
Option 1 looks better in my opinion. What do you think? |
Beta Was this translation helpful? Give feedback.
-
It is basically m2m authentication. which lays also the ground when implementing tls termination in oauth server(hydra). Other options are using HTTP methods:
Given the wide support for mTLS authentication with backend/upstream, that seems the best option. |
Beta Was this translation helpful? Give feedback.
-
I started to craft something in ory/fosite to get a better feeling :) |
Beta Was this translation helpful? Give feedback.
-
Hello, people. I'm looking for a way to authenticate using client certificates, which I think is something related to this effort, right? But, at least for my needs, the user could use the certificate just to authenticate and it wouldn't be needed anymore (you may think of the certificate as the username/password combination). After this process, I would expect that the backend could give the user a JWT/cookie as usual (with the same identity as the user would get if using username/password, for instance). This scenario is covered somehow today or by this last stated test/commit presented in Jan/2021? I would like to evaluate Ory platform, because the security and "lightweightness" interests me a lot, but I need to achieve this requirement somehow. Do you see any possibilities here? Even creating an external service or something that can ensure that the client certificate is valid, or something more customized (if needed). Thanks in advance! Great job in this libraries, btw! Best regards! |
Beta Was this translation helpful? Give feedback.
-
After reading the RFC 8705, and based on the issue #1084, the following is my proposal for a minimalistic first version of mTLS authentication in Hydra.
Excluded features are meant to be discussed and added incrementally in further versions:
Included
mTLS termination at Load Balancer
Certificate info is forwarded to Hydra using HTTP Headers. A trusted relationship between Hydra and Load balancer MUST be establish. Load Balancer MUST strip those headers if presented in client requests to prevent spoofing. Headers' names should be configurable
DN
orSAN
entries in certificate are forwarded as http header with a known prefix e.g.X-SSL-Client-*
in HAPRoxyX-Forwarded-Client-Cert
as in Cloud FoundryVerify
tls_client_auth
param in token end-point to trigger mTLS authenticationClient must provide at registration one of the following client certificates params with its expected value to be checked for authentication, see RFC Section 2.1.2
tls_client_auth_subject_dn
tls_client_auth_san_dns
tls_client_auth_san_uri
tls_client_auth_san_ip
tls_client_auth_san_email
Use mTLS endpoints aliases Section 5: This makes load balancer configuration easier because mTLS is enforced in those endpoints and it prevents unintended impact on the TLS behavior of existing endpoints, see RFC Implementation Considerations.
Certificates Revocation should be configured in the Load Balancer
Excluded
Please let me know if this feature is wanted in Hydra and your feedback on the described approach for the first version.
Beta Was this translation helpful? Give feedback.
All reactions