cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <>
Subject [jira] [Commented] (CXF-5118) Create CXF interceptor which will use HTTPS client certificates to create JAAS SecurityContext
Date Wed, 06 Aug 2014 08:57:12 GMT


Christian Schneider commented on CXF-5118:

I am not sure about the current solution from Priotr. The good thing is that it avoids having
to tweak the LdapLoginModule but it basically means that we have no existing solution for
retrieving the roles. My main goal was to have a solution that works out of the box with karaf
and that can reuse the existing jaas modules to retrieve roles. I am also not sure if using
JAAS without any login modules makes too much sense as it basically works around most of the
JAAS code. Does any of you know any JAAS expert that could help us decide which solution would
be more in the line of how JAAS is meant to be used?

About the code from me. I only saw your comment about it now. So sorry for the late answer.
I think having password based login to retrieve the certificates is a bad idea so I would
like to defer this until someone really needs it. Are you sure this is needed at the start
or could we add it in a second step? My plan was to support other kinds of logins using the
CallbackHandlerProvider and add this in a second step.

About reauthentication. When doing JAAS with only username it is no real authentication. The
JAAS login then would only instantiate the JAAS subject and retrieve the roles. The reason
why I propose to do this using JAAS is that there are existing well tested JAAS modules for
e.g. LDAP that handle the role retrieval. Doing that separately would mean a lot of effort
to do it right. 

> Create CXF interceptor which will use HTTPS client certificates to create JAAS SecurityContext

> -----------------------------------------------------------------------------------------------
>                 Key: CXF-5118
>                 URL:
>             Project: CXF
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Sergey Beryozkin
>            Assignee: Christian Schneider
> Use case:
> The user authenticates against the webservice using an X509 client certificate. In case
of successful authentication the JAAS security context should be populated with a Subject
that stores the user name and the roles of the user. This is necessary to support Authorization
at a later stage.
> Design ideas
> The SSL transport will be configured to only accept certain client certificates. So we
can assume that the interceptor does not have to do a real authentication. Instead it has
to map from the subjectDN of the certificate to the user name and then lookup the roles of
that user. Both then has to be stored in the subject's principles.
> The mapping could be done inside a JAASLoginModule or before. Inside will give the user
more flexibility.
> The next step to retrieve the roles should be done in one of the standard JAASLoginModules
as the source of the roles can be quite diverse. So for example the LdapLoginModule allows
to retrieve the roles from Ldap. At the moment these modules require the password of the user
though which is not available when doing a cert based auth.
> So I see two variants to retrieve the roles:
> 1. Change the loginmodules like the LDAP one to be configureable to use a fixed ldap
user for the ldap connect and not require the user password. So the module would have two
modes: a) normal authentication and group gathering b) use a fixed user to just retrieve roles
for a given user
> 2. Store the user password somewhere (e.g. in the mapping file). In this case the existing
LDAPLoginModule could be used but the user password would be openly in a text file
> 3. Create new LoginModules with the desired behaviour (fixed user and only lookup of

This message was sent by Atlassian JIRA

View raw message