Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3932C11868 for ; Tue, 5 Aug 2014 15:18:13 +0000 (UTC) Received: (qmail 32113 invoked by uid 500); 5 Aug 2014 15:18:13 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 32074 invoked by uid 500); 5 Aug 2014 15:18:13 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 32062 invoked by uid 99); 5 Aug 2014 15:18:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Aug 2014 15:18:13 +0000 Date: Tue, 5 Aug 2014 15:18:13 +0000 (UTC) From: "Piotr Klimczak (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-5118) Create CXF interceptor which will use HTTPS client certificates to create JAAS SecurityContext MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-5118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14086363#comment-14086363 ] Piotr Klimczak commented on CXF-5118: ------------------------------------- When user adds both TLSAuthenticationInterceptor and JAASLoginInterceptor, then JAASLoginInterceptor may override TLSAuthenticationInterceptor's securityContext which is expected in my opinion. That is because JAASLoginInterceptor would handle AuthorizationPolicy and SecurityToken, which were created because user explicitly has provided additional credentials which are more important in my opinion. A simple scenario for this might be when certificate is used for technical/security reason (being not personalized) and application passes additional user credentials. If we want to avoid this situation, then we should add a flag to JAASLoginInterceptor that will tell TO or NOT TO overwrite already supplied SecurityContext. Waiting for instructions what we do with this functionality (new issue?). Thanks Piotr Klimczak > Create CXF interceptor which will use HTTPS client certificates to create JAAS SecurityContext > ----------------------------------------------------------------------------------------------- > > Key: CXF-5118 > URL: https://issues.apache.org/jira/browse/CXF-5118 > 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 roles) -- This message was sent by Atlassian JIRA (v6.2#6252)