davecheney / httpstat

It's like curl -v, with colours.
MIT License
6.95k stars 382 forks source link

support for client certificate tls authentication #94

Closed husobee closed 7 years ago

husobee commented 7 years ago

I use tls client certificates for authentication to several web services I develop/debug. I am wondering if it would be helpful to add client certificate support to httpstat. This feature would be easy to implement. I would suggest we load a client certificate keypair and signing ca certificate from files that would be specified as command line flags into the http client's tls.Config. I have this implemented if this feature is of interest. Thanks!

davecheney commented 7 years ago

@husobee thank you for raising this issue.

As I'm preparing to release the stable version of this tool on Sunday I'm cautious about adding extra features, and especially adding extra flags.

Can I ask, why do you want to use this tool rather than curl? httstat is not aiming to be a replacement for curl, just a replacement for httpstat.py for Go programmers.

husobee commented 7 years ago

I completely understand wanting to get to stable and not wanting to introduce new features. I like this tool over curl for it's simplicity and clear representation of basic statistics and colorized header information. My particular use case might be a corner case, but I run into it quite a bit everywhere I use client TLS certificates. If this request is clearly outside of the scope of this application, that is OK.

davecheney commented 7 years ago

Do you reckon you could add this with a single flag? This would have to be the last feature we add for the stable release.

On Thu, 29 Sep 2016, 09:16 husobee notifications@github.com wrote:

I completely understand wanting to get to stable and not wanting to introduce new features. I like this tool over curl for it's simplicity and clear representation of basic statistics and colorized header information. My particular use case might be a corner case, but I run into it quite a bit everywhere I use client TLS certificates. If this request is clearly outside of the scope of this application, that is OK.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/davecheney/httpstat/issues/94#issuecomment-250329062, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAcA6vzdb_kOtTP5OCdpQhXQrqMk1PWks5quvVOgaJpZM4KJNCK .

husobee commented 7 years ago

Yes, I feel like we can have a single flag. Here is my fork showing the single flag implemented: https://github.com/husobee/httpstat/blob/master/main.go where I added a function to deal with reading and loading of the client certificate. Would love to hear your thoughts.

davecheney commented 7 years ago

LGTM, some minor style issues but we can deal with those in the PR.