Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 16381200B6A for ; Mon, 8 Aug 2016 03:50:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 15067160AB9; Mon, 8 Aug 2016 01:50:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1F6D3160AB5 for ; Mon, 8 Aug 2016 03:50:23 +0200 (CEST) Received: (qmail 66138 invoked by uid 500); 8 Aug 2016 01:50:22 -0000 Mailing-List: contact commits-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 commits@cxf.apache.org Received: (qmail 65117 invoked by uid 99); 8 Aug 2016 01:50:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2016 01:50:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DBABBE2C1A; Mon, 8 Aug 2016 01:50:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: reta@apache.org To: commits@cxf.apache.org Date: Mon, 08 Aug 2016 01:50:33 -0000 Message-Id: In-Reply-To: <102427ab420b4332b7b7f282dcf92e09@git.apache.org> References: <102427ab420b4332b7b7f282dcf92e09@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [13/27] cxf git commit: Splitting STSProperties into a separate file archived-at: Mon, 08 Aug 2016 01:50:25 -0000 Splitting STSProperties into a separate file Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4d76ebba Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4d76ebba Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4d76ebba Branch: refs/heads/master-jaxrs-2.1 Commit: 4d76ebba427b0c7e1b3a014fd7c1cf7ff92c8138 Parents: a392864 Author: Colm O hEigeartaigh Authored: Thu Aug 4 16:11:39 2016 +0100 Committer: Colm O hEigeartaigh Committed: Thu Aug 4 18:03:54 2016 +0100 ---------------------------------------------------------------------- .../sts/token/validator/SAMLTokenValidator.java | 8 +++- .../cxf/systest/sts/deployment/cxf-x509.xml | 2 +- .../systest/sts/deployment/stax-cxf-x509.xml | 2 +- .../cxf/systest/sts/deployment/sts/cxf-sts.xml | 46 +++----------------- .../cxf/systest/sts/deployment/sts/realms.xml | 17 ++++++++ .../sts/deployment/sts/sts-properties.xml | 45 +++++++++++++++++++ 6 files changed, 75 insertions(+), 45 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/4d76ebba/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java ---------------------------------------------------------------------- diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java index 7ac6650..59edca2 100644 --- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java +++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/validator/SAMLTokenValidator.java @@ -231,8 +231,12 @@ public class SAMLTokenValidator implements TokenValidator { // Get the realm of the SAML token String tokenRealm = null; - if (samlRealmCodec != null) { - tokenRealm = samlRealmCodec.getRealmFromToken(assertion); + SAMLRealmCodec codec = samlRealmCodec; + if (codec == null) { + codec = stsProperties.getSamlRealmCodec(); + } + if (codec != null) { + tokenRealm = codec.getRealmFromToken(assertion); // verify the realm against the cached token if (secToken != null) { Map props = secToken.getProperties(); http://git-wip-us.apache.org/repos/asf/cxf/blob/4d76ebba/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml index bf00fdb..2790c80 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml @@ -29,7 +29,7 @@ - + http://git-wip-us.apache.org/repos/asf/cxf/blob/4d76ebba/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml index b38e515..26fe7a8 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml @@ -29,7 +29,7 @@ - + http://git-wip-us.apache.org/repos/asf/cxf/blob/4d76ebba/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml index 7c54d26..cb737f9 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/cxf-sts.xml @@ -26,13 +26,11 @@ - - - + - - + + @@ -47,18 +45,13 @@ - - - - + + - - - @@ -72,35 +65,6 @@ http(s)?://localhost:(\d)*/doubleit/services/doubleit.* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/cxf/blob/4d76ebba/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml index 4aee41d..9fb8462 100644 --- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/realms.xml @@ -18,16 +18,33 @@ under the License. --> + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/cxf/blob/4d76ebba/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/sts-properties.xml ---------------------------------------------------------------------- diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/sts-properties.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/sts-properties.xml new file mode 100644 index 0000000..648446f --- /dev/null +++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/sts/sts-properties.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +