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

Implement server acceptable certificate auths #332

Closed
wants to merge 1 commit into from

Conversation

reynir
Copy link
Contributor

@reynir reynir commented Sep 25, 2016

The code for accepted certificate authorities in a client certificate
request was already implemented, but handshake_server.ml had hardcoded
an empty list of CAs. This commit adds a configuration option for this.

Note that this requires a change to ocaml-x509: mirleft/ocaml-x509#87

@reynir
Copy link
Contributor Author

reynir commented Sep 25, 2016

I should mention that I haven't tested this thoroughly. I have tested with openssl s_client. As mentioned, the TLS-part seem to have been implemented and it was just a matter of passing CAs and extracting the issuer DN (hence the ocaml-x509 change). It seems to work - I have tested with one and two certificates in config.accepted_cas.

The TODO in lib/handshake_server.ml mentions extracting "DN from authenticator", but since authenticator is a function it wouldn't be possible so I opted for adding Yet Another Configuration Option accepted_cas. It's not the best user experience since you have to repeat the CAs, once in the authenticator and once in the server config. Furthermore, the list of CAs will be static - there might be some use case for a dynamic list of CAs(?)

@hannesm
Copy link
Member

hannesm commented Sep 26, 2016

thanks. indeed, I'd prefer to have the authenticator and accepted_cas unified. given that authenticator might as well be a set of fingerprints, this is certainly not easily doable atm, but we'll for sure find a way. I'm currently travelling..

The code for accepted certificate authorities in a client certificate
request was already implemented, but handshake_server.ml had hardcoded
an empty list of CAs. This commit adds a configuration option for this.
@reynir
Copy link
Contributor Author

reynir commented Sep 27, 2016

Done. Have a nice nap+trip! :-)

Edit: oops, this was supposed to go to mirleft/ocaml-x509#87

@cfcs
Copy link
Contributor

cfcs commented Apr 11, 2017

Did this ever get merged?

@reynir
Copy link
Contributor Author

reynir commented Apr 11, 2017

@cfcs No, it's not been merged.

@hannesm
Copy link
Member

hannesm commented Dec 17, 2017

thanks, superseeded by #374 (please let me know if you disagree with the changes in 374, I amended your commit, i.e. you're still the author :)

@hannesm hannesm closed this Dec 17, 2017
@reynir
Copy link
Contributor Author

reynir commented Dec 17, 2017

Thanks!

The logic seems to be the same modulo naming and DN-unwrapping, so no complaints from me.

I look forward to play with client certificates again!

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

Successfully merging this pull request may close these issues.

None yet

3 participants