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 63A1A9876 for ; Thu, 15 Mar 2012 15:30:02 +0000 (UTC) Received: (qmail 89184 invoked by uid 500); 15 Mar 2012 15:30:02 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 89162 invoked by uid 500); 15 Mar 2012 15:30:02 -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 88922 invoked by uid 99); 15 Mar 2012 15:30:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 15:30:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Mar 2012 15:29:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 1647421CE9 for ; Thu, 15 Mar 2012 15:29:38 +0000 (UTC) Date: Thu, 15 Mar 2012 15:29:38 +0000 (UTC) From: "Colm O hEigeartaigh (Commented) (JIRA)" To: issues@cxf.apache.org Message-ID: <1444887687.19357.1331825378092.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <673490365.76091.1327483242073.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CXF-4062) Enabling custom claim parser MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-4062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230244#comment-13230244 ] Colm O hEigeartaigh commented on CXF-4062: ------------------------------------------ Looks ok to me. Why not just use a DefaultClaimsParser implementation to handle the current logic? Colm. > Enabling custom claim parser > ---------------------------- > > Key: CXF-4062 > URL: https://issues.apache.org/jira/browse/CXF-4062 > Project: CXF > Issue Type: Improvement > Affects Versions: 2.5.2 > Reporter: Jan Bernhardt > Labels: Claims, STS > Attachments: claimParer.patch, cxf-sts-claims.patch > > > STS-core: > Currently there is now way to use a custom dialect in requested claims. Even http://schemas.xmlsoap.org/ws/2005/05/identity/claims is not fully supported (only ClaimType element). > Therefore I introduced a new Interface ClaimParser, and a DefaultClaimParser with the current parsing logic. This parser is called by default within RequestParser, so that the normal cxf behavior has not changed. But to make this process more flexible it is possible (with this patch) to register any kind of ClaimParser supporting a specific dialect. I implemented a IdentityClaimParser which is currently able to parser CustomType and CustomValueType elements within the wst:claims element. Since the current RequestClaim does not support any claim values, except of the Uri attribute, I created a SubClass ClaimValueType to also pass the claim value to the claim handler. > This patch is just a starting point. I think there should be a more complex redesign of the current claim handling implementation, because it is currently focused on only one Use-Case. The following improvements should be made: > * The RequestClaim class should be replaced by a more flexible interface supporting any kind of parsing and handling custom dialects. > * It should be possible to include/configure custom claimparser via spring config > * A fully supported implementation of http://schemas.xmlsoap.org/ws/2005/05/identity/claims dialect would be great > Here is an example of a claims STS request which is supported by applying this patch: > > admin > > Thank you for this great product!! I hope this patch can help to further improve CXF. > Best regards > Jan -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira