You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Way of going from server::Request to the SSL connection #1241
I'm still learning my way around the tokio ecosystem, but for my application just being able to filter before my application isn't enough, I need the actual contents of the client certificates in the app itself.
Yup. (https://github.com/alex/ct-tools is the application, it's an app specifically geared to help people interact with their client certs + certificate transparency)
So, we're considering that Request and Response gain a typemap-like thing that can contain extensions. The original thought is that it would be able to contain HTTP2 extensions, but it could be used to store anything. Perhaps a wrapper can set req.extensions_mut().set(some_cert), and users' services can check for the req.extensions().get::<Cert>() (or whatever the type is).
I'm not very familiar with the internals of hyper -- is the hyper 0.10 approach of exposing the ssl<T>() method no longer technically possible, or just not consistent with the API you're trying to offer?
Another alternative is that since the Service is constructed at the start of the connection and used to serve all requests on it, the certificate could be grabbed in a NewService implementation and stored on the Service.
Activity
seanmonstar commentedon Jul 3, 2017
One could currently implement a
ServerProtothat is able to check the transport for anything before saying it is OK to be used with aService.alex commentedon Jul 3, 2017
I'm still learning my way around the tokio ecosystem, but for my application just being able to filter before my application isn't enough, I need the actual contents of the client certificates in the app itself.
seanmonstar commentedon Jul 3, 2017
A
Serviceserves a connection. Would you need the certificate within the context of each request made on the same connection?alex commentedon Jul 3, 2017
Yup. (https://github.com/alex/ct-tools is the application, it's an app specifically geared to help people interact with their client certs + certificate transparency)
seanmonstar commentedon Jul 3, 2017
So, we're considering that
RequestandResponsegain a typemap-like thing that can contain extensions. The original thought is that it would be able to contain HTTP2 extensions, but it could be used to store anything. Perhaps a wrapper can setreq.extensions_mut().set(some_cert), and users' services can check for thereq.extensions().get::<Cert>()(or whatever the type is).alex commentedon Jul 3, 2017
I'm not very familiar with the internals of hyper -- is the hyper 0.10 approach of exposing the
ssl<T>()method no longer technically possible, or just not consistent with the API you're trying to offer?seanmonstar commentedon Jul 3, 2017
The
RequestandResponsehave no concept of the underlying transport by design. So that previous method can't really work.alex commentedon Jul 3, 2017
I suppose the extensions dealio makes as much sense as anything, given that constraint.
seanmonstar commentedon Jul 13, 2017
Another alternative is that since the
Serviceis constructed at the start of the connection and used to serve all requests on it, the certificate could be grabbed in aNewServiceimplementation and stored on theService.This would require
NewServiceto gain a way to inspect the transport...alex commentedon Jul 13, 2017
Hmmm, that makes a fair bit of sense to me.