Skip to content
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

Support client certificates for GitHub Enterprise #1494

Open
brandur opened this issue Jun 15, 2017 · 2 comments
Open

Support client certificates for GitHub Enterprise #1494

brandur opened this issue Jun 15, 2017 · 2 comments
Labels

Comments

@brandur
Copy link

brandur commented Jun 15, 2017

This is a bit of a special snowflake situation, but our GitHub Enterprise has been configured with an additional layer of security whereby a client certificate needs to be sent along with all requests to it.

I've built support for this and am wondering if I could possibly send it upstream. Would you be open to a patch that allows hub to support this through either something like a configuration option or an environmental variable?

My proposed interface would be a little like how client certificates are sent in cURL, probably requiring that a certificate and private key are stacked into a single PEM-encoded file (with possible PKCS#12 support through golang.org/x/crypto/pkcs12). It might be better as environmental variable given how few people are going to ever need this (a little like configuring a proxy).

Any thoughts? Thanks!

@mislav
Copy link
Owner

mislav commented Jun 26, 2017

Thanks for addressing this. I think a configuration option would be the best. Something like this in ~/.config/hub:

example.com:
- user: mislav
  oauth_token: PERSONAL_ACCESS_TOKEN
  protocol: https
  client_certificate: /path/to/cert.pem

A PR for this would be most welcome!

@mislav mislav added the feature label Jun 26, 2017
@brandur
Copy link
Author

brandur commented Jun 28, 2017

Thanks for the response and guidance @mislav! I still need to clean up my diff into something patch-worthy, but I wanted to acknowledge that I still plan to do this.

brandur added a commit to brandur/hub that referenced this issue Aug 30, 2017
Adds support for sending a client certificate to a GitHub Enterprise
server.

The client certificate should be encoded with PKCS12 and its path should
be set with the configuration option `client_certificate`.

Fixes mislav#1494.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants