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

Single Sign-On with X.509 certificates #297

Closed
4marcsap opened this issue Aug 30, 2017 · 9 comments
Closed

Single Sign-On with X.509 certificates #297

4marcsap opened this issue Aug 30, 2017 · 9 comments
Assignees

Comments

@4marcsap
Copy link

Request Type

Feature Request

Hello Team,
we have the request to enable Single Sign-On with X.509 certificates for TheHive.
So this means to enhance the Play SSL Server to accept and read X.509 certificates for configured CAs. By this option users do not have to provide user and password to authenticate but have a convenient and secure way of authenticating to the system.
Play allows to implement a customer SSL Engine -
https://www.playframework.com/documentation/2.6.x/ConfiguringHttps

thank you
marc

@To-om To-om self-assigned this Sep 4, 2017
@To-om
Copy link
Contributor

To-om commented Sep 4, 2017

In order to authenticate user using certificate, TheHive must be able to extract user login from the certificate provided by client. User login can be in subject RDN and in alternative subject name.
In your use case, where is the user login ?

With this kind of authentication you can't use reverse proxy and if you want to use standard port (443/tcp), TheHive must be run with root user, which is not recommended (or add a rule in your local firewall to translate the port).

@crackytsi
Copy link

UserPrincipalName is also a very common attribute of Certificates, where I think this functionallity would make sense ;)

@To-om
Copy link
Contributor

To-om commented Sep 4, 2017

UserPrincipalName is usually in SubjectAlternativeName but I don't know how to extract it. Using Java API, it doesn't seem easy.

Maybe I should have a look at Bouncy Castle library.

@4marcsap
Copy link
Author

4marcsap commented Sep 4, 2017

In our case the user login in name is the X.509 subject Common Name (CN).

@crackytsi
Copy link

@To-om
Copy link
Contributor

To-om commented Sep 4, 2017

Thank you. It uses Bouncy Castle. I prefer not to depends on this library. I'll try to understand how it extracts upn from certificate and implement my own function (if not too complicated).

@crackytsi
Copy link

Any news about this @To-om ?
It seems as you already implemented some parts with bouncy casle... :)

@To-om
Copy link
Contributor

To-om commented Nov 20, 2017

This feature has been implemented but not fully tested. I'll add it in the next release as beta (planned the 5th of December). If changes is need, I'll push hotfix.

@crackytsi
Copy link

I'm happy to test it ;)

@To-om To-om added this to the 3.0.0 (Cerana) milestone Nov 20, 2017
@To-om To-om closed this as completed Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants