cxf-issues mailing list archives

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


Piotr Klimczak commented on CXF-5118:

I guess I wasn't clear enough about reauthentication which in fact could be misleading. Additional
problem is my English which is not perfect :)
Sorry for that.

So when using TLS Authenticated Handshake, then 1st authentication is provided by HTTP server
(for example jetty).
Once authenticated (for example by Jetty), CXF message is created with TLSSessionInfo.
So this is 1st authentication.
Next CXF message is created and and CXF's interceptor chain starts.
When it reach JAASLoginInterceptor, it will try to do 2nd authentication with JAAS wheter
with empty password or user supplied.

So by avoid reauthentication I meant avoiding doing JAAS Login at all as this message is already
authenticated by HTTP Server by certificates exchange (both: client and server).

So with the code you've seen today from me, you do not need to supply any password, because
you can avoid JAAS authentication at all. Instead you can just provide roles from LDAP, DB,
properties file or whatever.
So nobody from HIGH Security guys will find any password protection problem, because using
password or password-less login is avoided at all by avoiding authentication at all.

Peter Klimczak

> 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