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 44E63200BD5 for ; Thu, 8 Dec 2016 11:26:45 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 43795160B1F; Thu, 8 Dec 2016 10:26:45 +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 66E7A160B1E for ; Thu, 8 Dec 2016 11:26:44 +0100 (CET) Received: (qmail 91997 invoked by uid 500); 8 Dec 2016 10:26:43 -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 91988 invoked by uid 99); 8 Dec 2016 10:26:43 -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; Thu, 08 Dec 2016 10:26:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 65A10E7DE3; Thu, 8 Dec 2016 10:26:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: coheigea@apache.org To: commits@cxf.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: cxf-fediz git commit: Fixing support for SAML SSO protocol in configuration Date: Thu, 8 Dec 2016 10:26:43 +0000 (UTC) archived-at: Thu, 08 Dec 2016 10:26:45 -0000 Repository: cxf-fediz Updated Branches: refs/heads/master 76e9fee79 -> d4f862d93 Fixing support for SAML SSO protocol in configuration Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/d4f862d9 Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/d4f862d9 Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/d4f862d9 Branch: refs/heads/master Commit: d4f862d9397dea6e50d689f685d27640527673eb Parents: 76e9fee Author: Colm O hEigeartaigh Authored: Thu Dec 8 10:12:15 2016 +0000 Committer: Colm O hEigeartaigh Committed: Thu Dec 8 10:12:15 2016 +0000 ---------------------------------------------------------------------- .../service/idp/beans/STSClientAction.java | 5 -- .../ApplicationSAMLSSOProtocolHandler.java | 57 ++++++++++++++++++++ .../test/resources/realma/entities-realma.xml | 6 +-- 3 files changed, 60 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/d4f862d9/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java ---------------------------------------------------------------------- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java index 0c01352..0d6c37d 100644 --- a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/beans/STSClientAction.java @@ -272,11 +272,6 @@ public class STSClientAction { sts.setEnableAppliesTo(serviceConfig.isEnableAppliesTo()); sts.setOnBehalfOf(idpToken.getToken()); - if (!(serviceConfig.getProtocol() == null - || FederationConstants.WS_FEDERATION_NS.equals(serviceConfig.getProtocol()))) { - LOG.error("Protocol {} not supported for realm {} ", serviceConfig.getProtocol(), realm); - throw new ProcessingException(TYPE.BAD_REQUEST); - } if (properties != null) { sts.setProperties(properties); http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/d4f862d9/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/ApplicationSAMLSSOProtocolHandler.java ---------------------------------------------------------------------- diff --git a/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/ApplicationSAMLSSOProtocolHandler.java b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/ApplicationSAMLSSOProtocolHandler.java new file mode 100644 index 0000000..ebab362 --- /dev/null +++ b/services/idp/src/main/java/org/apache/cxf/fediz/service/idp/protocols/ApplicationSAMLSSOProtocolHandler.java @@ -0,0 +1,57 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.cxf.fediz.service.idp.protocols; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.cxf.fediz.service.idp.spi.ApplicationProtocolHandler; + +import org.springframework.stereotype.Component; +import org.springframework.webflow.execution.RequestContext; + +@Component +public class ApplicationSAMLSSOProtocolHandler implements ApplicationProtocolHandler { + + public static final String PROTOCOL = "urn:oasis:names:tc:SAML:2.0:profiles:SSO:browser"; + + //private static final Logger LOG = LoggerFactory.getLogger(ApplicationWSFedProtocolHandler.class); + + @Override + public boolean canHandleRequest(HttpServletRequest request) { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getProtocol() { + return PROTOCOL; + } + + @Override + public void mapSignInRequest(RequestContext context) { + // TODO Auto-generated method stub + } + + @Override + public void mapSignInResponse(RequestContext context) { + // TODO Auto-generated method stub + } + +} http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/d4f862d9/systests/federation/samlsso/src/test/resources/realma/entities-realma.xml ---------------------------------------------------------------------- diff --git a/systests/federation/samlsso/src/test/resources/realma/entities-realma.xml b/systests/federation/samlsso/src/test/resources/realma/entities-realma.xml index 6e840f5..714dbd4 100644 --- a/systests/federation/samlsso/src/test/resources/realma/entities-realma.xml +++ b/systests/federation/samlsso/src/test/resources/realma/entities-realma.xml @@ -137,7 +137,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -163,7 +163,7 @@ - +