Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4F1BCE425 for ; Tue, 12 Mar 2013 21:07:54 +0000 (UTC) Received: (qmail 29148 invoked by uid 500); 12 Mar 2013 21:07:54 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 29095 invoked by uid 500); 12 Mar 2013 21:07:54 -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 29088 invoked by uid 99); 12 Mar 2013 21:07:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Mar 2013 21:07:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Mar 2013 21:07:47 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9EA2C2388A9C; Tue, 12 Mar 2013 21:07:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1455711 [2/2] - in /cxf/fediz/trunk: examples/spring2Webapp/ examples/spring2Webapp/src/ examples/spring2Webapp/src/main/ examples/spring2Webapp/src/main/config/ examples/spring2Webapp/src/main/java/ examples/spring2Webapp/src/main/java/or... Date: Tue, 12 Mar 2013 21:07:23 -0000 To: commits@cxf.apache.org From: owulff@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130312210725.9EA2C2388A9C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java?rev=1455711&view=auto ============================================================================== --- cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java (added) +++ cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java Tue Mar 12 21:07:21 2013 @@ -0,0 +1,167 @@ +/** + * 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.spring.web; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.cxf.fediz.core.FederationProcessor; +import org.apache.cxf.fediz.core.FederationProcessorImpl; +import org.apache.cxf.fediz.core.config.FederationContext; +import org.apache.cxf.fediz.core.exception.ProcessingException; +import org.apache.cxf.fediz.spring.FederationConfig; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.security.AuthenticationException; +import org.springframework.security.ui.AuthenticationEntryPoint; +import org.springframework.util.Assert; + + +/** + * Used by the ExceptionTranslationFilter to commence authentication via the + * WS-Federation protocol. + *

+ * The user's browser will be redirected to the IDP. + * + */ +public class FederationAuthenticationEntryPoint implements AuthenticationEntryPoint, + InitializingBean, ApplicationContextAware { + + private static final Logger LOG = LoggerFactory.getLogger(FederationAuthenticationEntryPoint.class); + + private ApplicationContext appContext; + private FederationConfig federationConfig; + //private String servletContext; + + public FederationConfig getFederationConfig() { + return federationConfig; + } + + public void setFederationConfig(FederationConfig federationConfig) { + this.federationConfig = federationConfig; + } + + public void afterPropertiesSet() throws Exception { + Assert.notNull(this.appContext, "ApplicationContext cannot be null."); + Assert.notNull(this.federationConfig, "FederationConfig cannot be null."); + } + + public final void commence(final HttpServletRequest servletRequest, final HttpServletResponse response, + final AuthenticationException authenticationException) throws IOException, ServletException { + + String redirectUrl = null; + FederationContext fedContext = federationConfig.getFederationContext(); + if (LOG.isDebugEnabled()) { + LOG.debug("Federation context: " + fedContext); + } + try { + FederationProcessor wfProc = new FederationProcessorImpl(); + redirectUrl = wfProc.createSignInRequest(servletRequest, fedContext); + if (redirectUrl == null) { + LOG.warn("Failed to create SignInRequest."); + response.sendError( + HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Failed to create SignInRequest."); + } + } catch (ProcessingException ex) { + System.err.println("Failed to create SignInRequest: " + ex.getMessage()); + LOG.warn("Failed to create SignInRequest: " + ex.getMessage()); + response.sendError( + HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Failed to create SignInRequest."); + } + + preCommence(servletRequest, response); + if (LOG.isInfoEnabled()) { + LOG.info("Redirecting to IDP: " + redirectUrl); + } + response.sendRedirect(redirectUrl); + } + + + /** + * Template method for you to do your own pre-processing before the redirect occurs. + * + * @param request the HttpServletRequest + * @param response the HttpServletResponse + */ + protected void preCommence(final HttpServletRequest request, final HttpServletResponse response) { + + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.appContext = applicationContext; + } + + @Override + public void commence(ServletRequest request, ServletResponse response, + AuthenticationException authException) throws IOException, ServletException { + + HttpServletRequest hrequest = (HttpServletRequest)request; + HttpServletResponse hresponse = (HttpServletResponse)response; + String redirectUrl = null; + FederationContext fedContext = federationConfig.getFederationContext(); + if (LOG.isDebugEnabled()) { + LOG.debug("Federation context: " + fedContext); + } + try { + FederationProcessor wfProc = new FederationProcessorImpl(); + redirectUrl = wfProc.createSignInRequest(hrequest, fedContext); + if (redirectUrl == null) { + LOG.warn("Failed to create SignInRequest."); + hresponse.sendError( + HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Failed to create SignInRequest."); + } + } catch (ProcessingException ex) { + System.err.println("Failed to create SignInRequest: " + ex.getMessage()); + LOG.warn("Failed to create SignInRequest: " + ex.getMessage()); + hresponse.sendError( + HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Failed to create SignInRequest."); + } + + preCommence(hrequest, hresponse); + if (LOG.isInfoEnabled()) { + LOG.info("Redirecting to IDP: " + redirectUrl); + } + hresponse.sendRedirect(redirectUrl); + + } + + /* + public void setServletContext(String servletContext) { + this.servletContext = servletContext; + } + + public String getServletContext() { + return servletContext; + } + */ + +} Added: cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java?rev=1455711&view=auto ============================================================================== --- cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java (added) +++ cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java Tue Mar 12 21:07:21 2013 @@ -0,0 +1,81 @@ +/** + * 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.spring.web; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.cxf.fediz.core.FederationRequest; + +import org.springframework.security.Authentication; +import org.springframework.security.AuthenticationException; +import org.springframework.security.providers.UsernamePasswordAuthenticationToken; +import org.springframework.security.ui.AbstractProcessingFilter; +import org.springframework.security.ui.FilterChainOrder; +//import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler; + + +public class FederationAuthenticationFilter extends AbstractProcessingFilter { + + public FederationAuthenticationFilter() { + super(); + //setAuthenticationFailureHandler(new SimpleUrlAuthenticationFailureHandler()); + } + + /** + * + */ + @Override + protected boolean requiresAuthentication(final HttpServletRequest request, final HttpServletResponse response) { + final boolean result = request.getRequestURI().contains(getFilterProcessesUrl()); + + if (logger.isDebugEnabled()) { + logger.debug("requiresAuthentication = " + result); + } + return result; + } + + @Override + public int getOrder() { + return FilterChainOrder.BASIC_PROCESSING_FILTER; + } + + @Override + public Authentication attemptAuthentication(HttpServletRequest request) throws AuthenticationException { + String wa = request.getParameter("wa"); + String wresult = request.getParameter("wresult"); + FederationRequest wfReq = new FederationRequest(); + wfReq.setWa(wa); + wfReq.setWresult(wresult); + + final UsernamePasswordAuthenticationToken authRequest = new UsernamePasswordAuthenticationToken(null, wfReq); + + authRequest.setDetails(authenticationDetailsSource.buildDetails(request)); + + return this.getAuthenticationManager().authenticate(authRequest); + } + + @Override + public String getDefaultFilterProcessesUrl() { + return "/j_spring_fediz_security_check"; + } + + +} \ No newline at end of file Added: cxf/fediz/trunk/plugins/spring2/src/main/resources/org/apache/cxf/fediz/spring/messages.properties URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/spring2/src/main/resources/org/apache/cxf/fediz/spring/messages.properties?rev=1455711&view=auto ============================================================================== --- cxf/fediz/trunk/plugins/spring2/src/main/resources/org/apache/cxf/fediz/spring/messages.properties (added) +++ cxf/fediz/trunk/plugins/spring2/src/main/resources/org/apache/cxf/fediz/spring/messages.properties Tue Mar 12 21:07:21 2013 @@ -0,0 +1,2 @@ +FederationAuthenticationProvider.incorrectKey=The presented FederationAuthenticationToken does not contain the expected key +FederationAuthenticationProvider.noSignInRequest=Failed to get SignIn request Modified: cxf/fediz/trunk/systests/pom.xml URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/pom.xml?rev=1455711&r1=1455710&r2=1455711&view=diff ============================================================================== --- cxf/fediz/trunk/systests/pom.xml (original) +++ cxf/fediz/trunk/systests/pom.xml Tue Mar 12 21:07:21 2013 @@ -34,6 +34,7 @@ simpleWebapp springPreauthWebapp springWebapp + spring2Webapp jetty8 tomcat7 spring Modified: cxf/fediz/trunk/systests/spring/pom.xml URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/spring/pom.xml?rev=1455711&r1=1455710&r2=1455711&view=diff ============================================================================== --- cxf/fediz/trunk/systests/spring/pom.xml (original) +++ cxf/fediz/trunk/systests/spring/pom.xml Tue Mar 12 21:07:21 2013 @@ -151,7 +151,14 @@ ${project.version} war true - + + + org.apache.cxf.fediz.systests + systests-spring2Webapp + ${project.version} + war + true + true target Added: cxf/fediz/trunk/systests/spring/src/test/java/org/apache/cxf/fediz/integrationtests/Spring2Test.java URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/spring/src/test/java/org/apache/cxf/fediz/integrationtests/Spring2Test.java?rev=1455711&view=auto ============================================================================== --- cxf/fediz/trunk/systests/spring/src/test/java/org/apache/cxf/fediz/integrationtests/Spring2Test.java (added) +++ cxf/fediz/trunk/systests/spring/src/test/java/org/apache/cxf/fediz/integrationtests/Spring2Test.java Tue Mar 12 21:07:21 2013 @@ -0,0 +1,76 @@ +/** + * 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.integrationtests; + + +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; + + +public class Spring2Test extends AbstractTests { + + static String idpHttpsPort; + static String rpHttpsPort; + + @BeforeClass + public static void init() { + System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog"); + + System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true"); + + System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire", "debug"); + + System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient", "debug"); + + idpHttpsPort = System.getProperty("idp.https.port"); + Assert.assertNotNull("Property 'idp.https.port' null", idpHttpsPort); + rpHttpsPort = System.getProperty("rp.https.port"); + Assert.assertNotNull("Property 'rp.https.port' null", rpHttpsPort); + + JettyUtils.initIdpServer(); + JettyUtils.startIdpServer(); + JettyUtils.initRpServer(); + JettyUtils.startRpServer(); + } + + @AfterClass + public static void cleanup() { + JettyUtils.stopIdpServer(); + JettyUtils.stopRpServer(); + } + + @Override + public String getIdpHttpsPort() { + return idpHttpsPort; + } + + @Override + public String getRpHttpsPort() { + return rpHttpsPort; + } + + @Override + public String getServletContextName() { + return "fedizhelloworld_spring2"; + } + + +} Modified: cxf/fediz/trunk/systests/spring/src/test/resources/fediz_config.xml URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/spring/src/test/resources/fediz_config.xml?rev=1455711&r1=1455710&r2=1455711&view=diff ============================================================================== --- cxf/fediz/trunk/systests/spring/src/test/resources/fediz_config.xml (original) +++ cxf/fediz/trunk/systests/spring/src/test/resources/fediz_config.xml Tue Mar 12 21:07:21 2013 @@ -35,5 +35,36 @@ + + + urn:org:apache:cxf:fediz:fedizhelloworld + + + + + + + + + + 1000 + + urn:org:apache:cxf:fediz:fedizhelloworld + https://localhost:${idp.https.port}/fediz-idp/ + , + http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role + /j_spring_fediz_security_check + + + + + + + + + + Modified: cxf/fediz/trunk/systests/spring/src/test/resources/rp-server.xml URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/spring/src/test/resources/rp-server.xml?rev=1455711&r1=1455710&r2=1455711&view=diff ============================================================================== --- cxf/fediz/trunk/systests/spring/src/test/resources/rp-server.xml (original) +++ cxf/fediz/trunk/systests/spring/src/test/resources/rp-server.xml Tue Mar 12 21:07:21 2013 @@ -35,7 +35,14 @@ ./target/systests-springWebapp.war true - + + + + /fedizhelloworld_spring2 + ./target/systests-spring2Webapp.war + true + + Added: cxf/fediz/trunk/systests/spring2Webapp/pom.xml URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/spring2Webapp/pom.xml?rev=1455711&view=auto ============================================================================== --- cxf/fediz/trunk/systests/spring2Webapp/pom.xml (added) +++ cxf/fediz/trunk/systests/spring2Webapp/pom.xml Tue Mar 12 21:07:21 2013 @@ -0,0 +1,109 @@ + + + + + 4.0.0 + + org.apache.cxf.fediz + systests + 1.1.0-SNAPSHOT + ../pom.xml + + + org.apache.cxf.fediz.systests + systests-spring2Webapp + Apache Fediz Systests Spring2 Webapp + war + + + UTF-8 + 2.0.8 + + + + + javax.servlet + servlet-api + ${servlet.version} + provided + + + org.apache.cxf.fediz + fediz-cxf + ${project.version} + + + org.slf4j + slf4j-log4j12 + ${slf4j.version} + + + org.apache.cxf.fediz + fediz-spring2 + ${project.version} + + + org.apache.commons + commons-lang3 + ${commons.lang.version} + + + log4j + log4j + ${log4j.version} + + + javax.mail + mail + + + javax.jms + jms + + + com.sun.jdmk + jmxtools + + + com.sun.jmx + jmxri + + + + + + + + + org.codehaus.mojo + tomcat-maven-plugin + 1.1 + + myTomcat + http://localhost:8080/manager/text + /${project.build.finalName} + + + + + fedizhelloworld + + + Added: cxf/fediz/trunk/systests/spring2Webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/spring2Webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java?rev=1455711&view=auto ============================================================================== --- cxf/fediz/trunk/systests/spring2Webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java (added) +++ cxf/fediz/trunk/systests/spring2Webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java Tue Mar 12 21:07:21 2013 @@ -0,0 +1,108 @@ +/** + * 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.example; + +import java.io.IOException; +import java.io.PrintWriter; +import java.security.Principal; +import java.util.Arrays; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.w3c.dom.Element; + +import org.apache.cxf.fediz.core.Claim; +import org.apache.cxf.fediz.core.ClaimCollection; +import org.apache.cxf.fediz.cxf.web.SecurityTokenThreadLocal; +import org.apache.cxf.fediz.spring.authentication.FederationAuthenticationToken; + +import org.springframework.security.Authentication; +import org.springframework.security.GrantedAuthority; +import org.springframework.security.context.SecurityContextHolder; + +public class FederationServlet extends HttpServlet { + + /** + * + */ + private static final long serialVersionUID = -9019993850246851112L; + + public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, + IOException { + + response.setContentType("text/html"); + PrintWriter out = response.getWriter(); + + out.println(""); + out.println("WS Federation Systests Spring Examples"); + out.println(""); + out.println("

Request url: " + request.getRequestURL().toString() + "

"); + + out.print("

userPrincipal="); + Principal p = request.getUserPrincipal(); + if (p != null) { + out.print(p.getName()); + } + out.println("

"); + + // Access Spring security context + Authentication auth = SecurityContextHolder.getContext().getAuthentication(); + + if (auth instanceof FederationAuthenticationToken) { + FederationAuthenticationToken fedToken = (FederationAuthenticationToken)auth; + List roleListToCheck = Arrays.asList("Admin", "Manager", "User", "Authenticated"); + + for (String item : roleListToCheck) { + boolean found = false; + for (GrantedAuthority ga : fedToken.getAuthorities()) { + if (ga.getAuthority().toLowerCase().indexOf(item.toLowerCase()) > -1) { + found = true; + break; + } + } + out.println("

role:" + item + "=" + (found ? "true" : "false") + "

"); + } + + ClaimCollection claims = fedToken.getClaims(); + for (Claim c : claims) { + out.println("

" + c.getClaimType().toString() + "=" + c.getValue() + "

"); + } + + Element el = fedToken.getLoginToken(); + if (el != null) { + out.println("loginToken=FOUND{FederationPrincipal}

"); + } + + el = SecurityTokenThreadLocal.getToken(); + if (el != null) { + out.println("loginToken=FOUND{SecurityTokenThreadLocal}

"); + } + + } + + out.println(""); + + } + +} Added: cxf/fediz/trunk/systests/spring2Webapp/src/main/resources/log4j.properties URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/spring2Webapp/src/main/resources/log4j.properties?rev=1455711&view=auto ============================================================================== --- cxf/fediz/trunk/systests/spring2Webapp/src/main/resources/log4j.properties (added) +++ cxf/fediz/trunk/systests/spring2Webapp/src/main/resources/log4j.properties Tue Mar 12 21:07:21 2013 @@ -0,0 +1,16 @@ +# Set root category priority to INFO and its only appender to CONSOLE. +log4j.rootLogger=INFO, CONSOLE +log4j.logger.org.springframework=INFO, CONSOLE +log4j.additivity.org.springframework=false +log4j.logger.org.springframework.security=DEBUG, CONSOLE +log4j.additivity.org.springframework.security=false +log4j.logger.org.apache.cxf.fediz=DEBUG, CONSOLE +log4j.additivity.org.apache.cxf.fediz=false + +# CONSOLE is set to be a ConsoleAppender using a PatternLayout. +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.Threshold=DEBUG +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n + + Added: cxf/fediz/trunk/systests/spring2Webapp/src/main/resources/logging.properties URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/spring2Webapp/src/main/resources/logging.properties?rev=1455711&view=auto ============================================================================== --- cxf/fediz/trunk/systests/spring2Webapp/src/main/resources/logging.properties (added) +++ cxf/fediz/trunk/systests/spring2Webapp/src/main/resources/logging.properties Tue Mar 12 21:07:21 2013 @@ -0,0 +1,53 @@ +############################################################ +# Default Logging Configuration File +# +# You can use a different file by specifying a filename +# with the java.util.logging.config.file system property. +# For example java -Djava.util.logging.config.file=myfile +############################################################ + +############################################################ +# Global properties +############################################################ + +# "handlers" specifies a comma separated list of log Handler +# classes. These handlers will be installed during VM startup. +# Note that these classes must be on the system classpath. +# By default we only configure a ConsoleHandler, which will only +# show messages at the WARNING and above levels. +handlers= java.util.logging.ConsoleHandler +#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler + +# Default global logging level. +# This specifies which kinds of events are logged across +# all loggers. For any given facility this global level +# can be overridden by a facility specific level +# Note that the ConsoleHandler also has a separate level +# setting to limit messages printed to the console. +.level= FINEST + +############################################################ +# Handler specific properties. +# Describes specific configuration info for Handlers. +############################################################ + +# default file output is in user's home directory. +java.util.logging.FileHandler.pattern = %h/java%u.log +java.util.logging.FileHandler.limit = 50000 +java.util.logging.FileHandler.count = 1 +java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter + +# Limit the message that are printed on the console to WARNING and above. +java.util.logging.ConsoleHandler.level = FINEST +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter + + +############################################################ +# Facility specific properties. +# Provides extra control for each logger. +############################################################ + +# For example, set the com.xyz.foo logger to only log SEVERE +# messages: +#com.xyz.foo.level = SEVERE +#org.apache.cxf.fediz.level = FINEST Added: cxf/fediz/trunk/systests/spring2Webapp/src/main/resources/stsstore.jks URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/spring2Webapp/src/main/resources/stsstore.jks?rev=1455711&view=auto ============================================================================== Files cxf/fediz/trunk/systests/spring2Webapp/src/main/resources/stsstore.jks (added) and cxf/fediz/trunk/systests/spring2Webapp/src/main/resources/stsstore.jks Tue Mar 12 21:07:21 2013 differ Propchange: cxf/fediz/trunk/systests/spring2Webapp/src/main/resources/stsstore.jks ------------------------------------------------------------------------------ svn:executable = * Added: cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/WEB-INF/applicationContext-security.xml URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/WEB-INF/applicationContext-security.xml?rev=1455711&view=auto ============================================================================== --- cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/WEB-INF/applicationContext-security.xml (added) +++ cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/WEB-INF/applicationContext-security.xml Tue Mar 12 21:07:21 2013 @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/WEB-INF/web.xml?rev=1455711&view=auto ============================================================================== --- cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/WEB-INF/web.xml (added) +++ cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/WEB-INF/web.xml Tue Mar 12 21:07:21 2013 @@ -0,0 +1,76 @@ + + + WS Federation Spring Example + WS Federation Spring Example + + + springSecurityFilterChain + org.springframework.web.filter.DelegatingFilterProxy + + + + + FederationFilter + org.apache.cxf.fediz.cxf.web.FederationFilter + + + + springSecurityFilterChain + /* + + + + FederationFilter + /secure/* + + + + + + contextConfigLocation + + /WEB-INF/applicationContext-security.xml + + + + + + org.springframework.web.context.ContextLoaderListener + + + + FederationServlet + org.apache.cxf.fediz.example.FederationServlet + + + + FederationServlet + /secure/fedservlet + + + + FederationServlet + /secure/admin/fedservlet + + + + FederationServlet + /secure/user/fedservlet + + + + FederationServlet + /secure/manager/fedservlet + + + Added: cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/index.html URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/index.html?rev=1455711&view=auto ============================================================================== --- cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/index.html (added) +++ cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/index.html Tue Mar 12 21:07:21 2013 @@ -0,0 +1,25 @@ + + +WS Federation Tomcat Examples + + + +

+

Hello World

+

+ Added: cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/secure/test.html URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/secure/test.html?rev=1455711&view=auto ============================================================================== --- cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/secure/test.html (added) +++ cxf/fediz/trunk/systests/spring2Webapp/src/main/webapp/secure/test.html Tue Mar 12 21:07:21 2013 @@ -0,0 +1,25 @@ + + +WS Federation Tomcat Examples + + + +

+

Secure Test

+

+