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 02B3A6C8B for ; Thu, 4 Aug 2011 06:20:06 +0000 (UTC) Received: (qmail 47919 invoked by uid 500); 4 Aug 2011 06:20:05 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 47769 invoked by uid 500); 4 Aug 2011 06:20:04 -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 46864 invoked by uid 99); 4 Aug 2011 06:19:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2011 06:19:54 +0000 X-ASF-Spam-Status: No, hits=-2000.7 required=5.0 tests=ALL_TRUSTED,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, 04 Aug 2011 06:19:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 49ED7A7025 for ; Thu, 4 Aug 2011 06:19:32 +0000 (UTC) Date: Thu, 4 Aug 2011 06:19:32 +0000 (UTC) From: "Sergey Zhemzhitsky (JIRA)" To: issues@cxf.apache.org Message-ID: <455135734.7268.1312438772299.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (CXF-3705) It's impossible to extend org.apache.cxf.ws.security.policy.model.AlgorithmSuite with a custom non-standad algorithms. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 It's impossible to extend org.apache.cxf.ws.security.policy.model.AlgorithmSuite with a custom non-standad algorithms. ---------------------------------------------------------------------------------------------------------------------- Key: CXF-3705 URL: https://issues.apache.org/jira/browse/CXF-3705 Project: CXF Issue Type: Improvement Components: WS-* Components Affects Versions: 2.4.1 Reporter: Sergey Zhemzhitsky It's impossible to extend org.apache.cxf.ws.security.policy.model.AlgorithmSuite with a custom non-standad algorithms. Sometimes it's needed to support non-standard algorithm suite. Now it's hardly possible to do. The possible solution is to refactor org.apache.cxf.ws.security.policy.builders.AlgorithmSuiteBuilder to get all algorithm suites using cxf extension mechanism, for example, public class AlgorithmSuiteBuilder implements AssertionBuilder { private Bus bus; public AlgorithmSuiteBuilder(Bus bus) { this.bus = bus; } public Assertion build(Element element, AssertionBuilderFactory factory) throws IllegalArgumentException { SPConstants consts = SP11Constants.SP_NS.equals(element.getNamespaceURI()) ? SP11Constants.INSTANCE : SP12Constants.INSTANCE; Element policyElem = DOMUtils.getFirstElement(element); String algoSuiteName = DOMUtils.getFirstElement(policyElem).getLocalName(); AlgorithmSuiteLoader loader = bus.getExtension(AlgorithmSuiteLoader.class); AlgorithmSuite suite = loader.getAlgorithmSuite(algoSuiteName, consts); if(suite == null) { throw new IllegalArgumentException("Algorithm suite \"" + algoSuiteName + "\" is not registered"); } return suite; } public QName[] getKnownElements() { return new QName[]{SP11Constants.ALGORITHM_SUITE, SP12Constants.ALGORITHM_SUITE}; } } -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira