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

#632 User authentication #773

Merged
merged 3 commits into from
Apr 12, 2017
Merged

#632 User authentication #773

merged 3 commits into from
Apr 12, 2017

Conversation

vincent-zurczak
Copy link
Member

In case of successful review, thanks for squashing these commits into a single one during the merge operation.

This PR adds the possibility to enable authentication on Karaf's web server for our REST API and web socket. The authentication is delegated to Karaf's realms (JAAS features). It means our authentication can be backed up by properties files, databases or even LDAP. Authentication enablement, the used realm as well as the validity period for sessions can be configured in a dedicated file.

Although it works with HTTP, this is not safe anough.
This feature should be used with HTTPS activated.

For the moment, we only authenticate users, we do not manage roles (which are the focus of another issue).

The hardest part is done, integrate with Karaf's JAAS implementation.
Next step: implement a servlet filter that uses it
@vincent-zurczak vincent-zurczak requested a review from gibello April 6, 2017 18:45
@gibello
Copy link
Member

gibello commented Apr 12, 2017

Wondering why a filter-based authentication is necessary for servlets ? The native JAAS support provided by Jetty might be more flexible ??

@vincent-zurczak
Copy link
Member Author

Authentication is a first step. We also need audit (#642) and permissions check (#643), although this last one may be delayed. A single servlet filter can manage everything.

Last, but not least, this servlet allows us to rely on Karaf's JAAS. Which means we can configure it the same way we configure authentication for the CLI. We would have to use different configuration files if we had to rely on Jetty's JAAS modules. And such configurations are much more complicated than what I chose.

@gibello gibello merged commit c8d4a2a into roboconf:master Apr 12, 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

Successfully merging this pull request may close these issues.

2 participants