http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/TestCallbackHandler.java ---------------------------------------------------------------------- diff --git a/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/TestCallbackHandler.java b/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/TestCallbackHandler.java deleted file mode 100644 index 776b458..0000000 --- a/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/TestCallbackHandler.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * 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 java.io.IOException; - -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import org.apache.cxf.fediz.core.spi.WReqCallback; - -public class TestCallbackHandler implements CallbackHandler { - - static final String TEST_WREQ = - "<RequestSecurityToken xmlns=\"http://docs.oasis-open.org/ws-sx/ws-trust/200512\">" - + "<TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</TokenType>" - + "</RequestSecurityToken>"; - - public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) { - if (callbacks[i] instanceof WReqCallback) { - WReqCallback callback = (WReqCallback) callbacks[i]; - callback.setWreq(TEST_WREQ); - } else { - throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback"); - } - } - } - -} \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/TomcatTest.java ---------------------------------------------------------------------- diff --git a/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/TomcatTest.java b/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/TomcatTest.java deleted file mode 100644 index b5e10c9..0000000 --- a/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/TomcatTest.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * 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 java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; - -import javax.servlet.ServletException; - -import org.apache.catalina.Context; -import org.apache.catalina.LifecycleException; -import org.apache.catalina.LifecycleState; -import org.apache.catalina.connector.Connector; -import org.apache.catalina.startup.Tomcat; -import org.apache.commons.io.IOUtils; -import org.apache.cxf.fediz.tomcat7.FederationAuthenticator; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; - -public class TomcatTest extends AbstractTests { - - static String idpHttpsPort; - static String rpHttpsPort; - - private static Tomcat idpServer; - private static Tomcat rpServer; - - @BeforeClass - public static void init() throws Exception { - 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", "info"); - System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient", "info"); - System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.webflow", "info"); - System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.security.web", "info"); - System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf.fediz", "info"); - System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf", "info"); - - 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); - - idpServer = startServer(true, idpHttpsPort); - rpServer = startServer(false, rpHttpsPort); - } - - private static Tomcat startServer(boolean idp, String port) - throws ServletException, LifecycleException, IOException { - Tomcat server = new Tomcat(); - server.setPort(0); - String currentDir = new File(".").getCanonicalPath(); - String baseDir = currentDir + File.separator + "target"; - server.setBaseDir(baseDir); - - if (idp) { - server.getHost().setAppBase("tomcat/idp/webapps"); - } else { - server.getHost().setAppBase("tomcat/rp/webapps"); - } - server.getHost().setAutoDeploy(true); - server.getHost().setDeployOnStartup(true); - - Connector httpsConnector = new Connector(); - httpsConnector.setPort(Integer.parseInt(port)); - httpsConnector.setSecure(true); - httpsConnector.setScheme("https"); - //httpsConnector.setAttribute("keyAlias", keyAlias); - httpsConnector.setAttribute("keystorePass", "tompass"); - httpsConnector.setAttribute("keystoreFile", "test-classes/server.jks"); - httpsConnector.setAttribute("truststorePass", "tompass"); - httpsConnector.setAttribute("truststoreFile", "test-classes/server.jks"); - httpsConnector.setAttribute("clientAuth", "want"); - // httpsConnector.setAttribute("clientAuth", "false"); - httpsConnector.setAttribute("sslProtocol", "TLS"); - httpsConnector.setAttribute("SSLEnabled", true); - - server.getService().addConnector(httpsConnector); - - if (idp) { - File stsWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp-sts"); - server.addWebapp("/fediz-idp-sts", stsWebapp.getAbsolutePath()); - - File idpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp"); - server.addWebapp("/fediz-idp", idpWebapp.getAbsolutePath()); - } else { - File rpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "simpleWebapp"); - Context cxt = server.addWebapp("/fedizhelloworld", rpWebapp.getAbsolutePath()); - - // Substitute the IDP port. Necessary if running the test in eclipse where port filtering doesn't seem - // to work - File f = new File(currentDir + "/src/test/resources/fediz_config.xml"); - FileInputStream inputStream = new FileInputStream(f); - String content = IOUtils.toString(inputStream, "UTF-8"); - inputStream.close(); - if (content.contains("idp.https.port")) { - content = content.replaceAll("\\$\\{idp.https.port\\}", "" + idpHttpsPort); - - File f2 = new File(baseDir + "/test-classes/fediz_config.xml"); - try (FileOutputStream outputStream = new FileOutputStream(f2)) { - IOUtils.write(content, outputStream, "UTF-8"); - } - } - - FederationAuthenticator fa = new FederationAuthenticator(); - fa.setConfigFile(currentDir + File.separator + "target" + File.separator - + "test-classes" + File.separator + "fediz_config.xml"); - cxt.getPipeline().addValve(fa); - } - - server.start(); - - return server; - } - - @AfterClass - public static void cleanup() { - shutdownServer(idpServer); - shutdownServer(rpServer); - } - - private static void shutdownServer(Tomcat server) { - try { - if (server != null && server.getServer() != null - && server.getServer().getState() != LifecycleState.DESTROYED) { - if (server.getServer().getState() != LifecycleState.STOPPED) { - server.stop(); - } - server.destroy(); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Override - public String getIdpHttpsPort() { - return idpHttpsPort; - } - - @Override - public String getRpHttpsPort() { - return rpHttpsPort; - } - - @Override - public String getServletContextName() { - return "fedizhelloworld"; - } - -} http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/WReqTest.java ---------------------------------------------------------------------- diff --git a/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/WReqTest.java b/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/WReqTest.java deleted file mode 100644 index 95bd271..0000000 --- a/systests/tomcat7/src/test/java/org/apache/cxf/fediz/integrationtests/WReqTest.java +++ /dev/null @@ -1,246 +0,0 @@ -/** - * 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 java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; - -import javax.servlet.ServletException; - -import com.gargoylesoftware.htmlunit.WebClient; -import com.gargoylesoftware.htmlunit.html.DomElement; -import com.gargoylesoftware.htmlunit.html.DomNodeList; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlPage; -import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput; - -import org.apache.catalina.Context; -import org.apache.catalina.LifecycleException; -import org.apache.catalina.LifecycleState; -import org.apache.catalina.connector.Connector; -import org.apache.catalina.startup.Tomcat; -import org.apache.commons.io.IOUtils; -import org.apache.cxf.fediz.core.ClaimTypes; -import org.apache.cxf.fediz.tomcat7.FederationAuthenticator; -import org.apache.http.auth.AuthScope; -import org.apache.http.auth.UsernamePasswordCredentials; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; - -/** - * A test for sending a TokenType request to the IdP via the "wreq" parameter. - */ -public class WReqTest { - - static String idpHttpsPort; - static String rpHttpsPort; - - private static Tomcat idpServer; - private static Tomcat rpServer; - - @BeforeClass - public static void init() throws Exception { - 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", "info"); - System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient", "info"); - System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.webflow", "info"); - System.setProperty("org.apache.commons.logging.simplelog.log.org.springframework.security.web", "info"); - System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf.fediz", "info"); - System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.cxf", "info"); - - 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); - - idpServer = startServer(true, idpHttpsPort); - rpServer = startServer(false, rpHttpsPort); - } - - private static Tomcat startServer(boolean idp, String port) - throws ServletException, LifecycleException, IOException { - Tomcat server = new Tomcat(); - server.setPort(0); - String currentDir = new File(".").getCanonicalPath(); - String baseDir = currentDir + File.separator + "target"; - server.setBaseDir(baseDir); - - if (idp) { - server.getHost().setAppBase("tomcat/idp/webapps"); - } else { - server.getHost().setAppBase("tomcat/rp/webapps"); - } - server.getHost().setAutoDeploy(true); - server.getHost().setDeployOnStartup(true); - - Connector httpsConnector = new Connector(); - httpsConnector.setPort(Integer.parseInt(port)); - httpsConnector.setSecure(true); - httpsConnector.setScheme("https"); - //httpsConnector.setAttribute("keyAlias", keyAlias); - httpsConnector.setAttribute("keystorePass", "tompass"); - httpsConnector.setAttribute("keystoreFile", "test-classes/server.jks"); - httpsConnector.setAttribute("truststorePass", "tompass"); - httpsConnector.setAttribute("truststoreFile", "test-classes/server.jks"); - httpsConnector.setAttribute("clientAuth", "want"); - // httpsConnector.setAttribute("clientAuth", "false"); - httpsConnector.setAttribute("sslProtocol", "TLS"); - httpsConnector.setAttribute("SSLEnabled", true); - - server.getService().addConnector(httpsConnector); - - if (idp) { - File stsWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp-sts"); - server.addWebapp("/fediz-idp-sts", stsWebapp.getAbsolutePath()); - - File idpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "fediz-idp"); - server.addWebapp("/fediz-idp", idpWebapp.getAbsolutePath()); - } else { - File rpWebapp = new File(baseDir + File.separator + server.getHost().getAppBase(), "simpleWebapp"); - Context cxt = server.addWebapp("/fedizhelloworld", rpWebapp.getAbsolutePath()); - - // Substitute the IDP port. Necessary if running the test in eclipse where port filtering doesn't seem - // to work - File f = new File(currentDir + "/src/test/resources/fediz_config_wreq.xml"); - FileInputStream inputStream = new FileInputStream(f); - String content = IOUtils.toString(inputStream, "UTF-8"); - inputStream.close(); - if (content.contains("idp.https.port")) { - content = content.replaceAll("\\$\\{idp.https.port\\}", "" + idpHttpsPort); - - File f2 = new File(baseDir + "/test-classes/fediz_config_wreq.xml"); - try (FileOutputStream outputStream = new FileOutputStream(f2)) { - IOUtils.write(content, outputStream, "UTF-8"); - } - } - - FederationAuthenticator fa = new FederationAuthenticator(); - fa.setConfigFile(currentDir + File.separator + "target" + File.separator - + "test-classes" + File.separator + "fediz_config_wreq.xml"); - cxt.getPipeline().addValve(fa); - } - - server.start(); - - return server; - } - - @AfterClass - public static void cleanup() { - shutdownServer(idpServer); - shutdownServer(rpServer); - } - - private static void shutdownServer(Tomcat server) { - try { - if (server != null && server.getServer() != null - && server.getServer().getState() != LifecycleState.DESTROYED) { - if (server.getServer().getState() != LifecycleState.STOPPED) { - server.stop(); - } - server.destroy(); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - public String getIdpHttpsPort() { - return idpHttpsPort; - } - - public String getRpHttpsPort() { - return rpHttpsPort; - } - - public String getServletContextName() { - return "fedizhelloworld"; - } - - @org.junit.Test - public void testSAML1TokenViaWReq() throws Exception { - String url = "https://localhost:" + getRpHttpsPort() + "/fedizhelloworld/secure/fedservlet"; - String user = "alice"; - String password = "ecila"; - - final String bodyTextContent = login(url, user, password, getIdpHttpsPort()); - - Assert.assertTrue("Principal not " + user, - bodyTextContent.contains("userPrincipal=" + user)); - Assert.assertTrue("User " + user + " does not have role Admin", - bodyTextContent.contains("role:Admin=false")); - Assert.assertTrue("User " + user + " does not have role Manager", - bodyTextContent.contains("role:Manager=false")); - Assert.assertTrue("User " + user + " must have role User", - bodyTextContent.contains("role:User=true")); - - String claim = ClaimTypes.FIRSTNAME.toString(); - Assert.assertTrue("User " + user + " claim " + claim + " is not 'Alice'", - bodyTextContent.contains(claim + "=Alice")); - claim = ClaimTypes.LASTNAME.toString(); - Assert.assertTrue("User " + user + " claim " + claim + " is not 'Smith'", - bodyTextContent.contains(claim + "=Smith")); - claim = ClaimTypes.EMAILADDRESS.toString(); - Assert.assertTrue("User " + user + " claim " + claim + " is not '[email protected]'", - bodyTextContent.contains(claim + "[email protected]")); - - } - - private static String login(String url, String user, String password, String idpPort) throws IOException { - final WebClient webClient = new WebClient(); - webClient.getOptions().setUseInsecureSSL(true); - webClient.getCredentialsProvider().setCredentials( - new AuthScope("localhost", Integer.parseInt(idpPort)), - new UsernamePasswordCredentials(user, password)); - - webClient.getOptions().setJavaScriptEnabled(false); - final HtmlPage idpPage = webClient.getPage(url); - webClient.getOptions().setJavaScriptEnabled(true); - Assert.assertEquals("IDP SignIn Response Form", idpPage.getTitleText()); - - // Test the SAML Version here - DomNodeList<DomElement> results = idpPage.getElementsByTagName("input"); - - String wresult = null; - for (DomElement result : results) { - if ("wresult".equals(result.getAttributeNS(null, "name"))) { - wresult = result.getAttributeNS(null, "value"); - break; - } - } - Assert.assertTrue(wresult != null - && wresult.contains("urn:oasis:names:tc:SAML:1.0:cm:bearer")); - - final HtmlForm form = idpPage.getFormByName("signinresponseform"); - final HtmlSubmitInput button = form.getInputByName("_eventId_submit"); - - final HtmlPage rpPage = button.click(); - Assert.assertEquals("WS Federation Systests Examples", rpPage.getTitleText()); - - webClient.close(); - return rpPage.getBody().getTextContent(); - } - -} http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/tomcat7/src/test/resources/alice.cer ---------------------------------------------------------------------- diff --git a/systests/tomcat7/src/test/resources/alice.cer b/systests/tomcat7/src/test/resources/alice.cer deleted file mode 100644 index 9644a0e..0000000 Binary files a/systests/tomcat7/src/test/resources/alice.cer and /dev/null differ http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/tomcat7/src/test/resources/fediz_config.xml ---------------------------------------------------------------------- diff --git a/systests/tomcat7/src/test/resources/fediz_config.xml b/systests/tomcat7/src/test/resources/fediz_config.xml deleted file mode 100644 index dc30ea6..0000000 --- a/systests/tomcat7/src/test/resources/fediz_config.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<!-- Place in Tomcat conf folder or other location as designated in this sample's webapp/META-INF/context.xml file. - Keystore referenced below must have IDP STS' public cert included in it. This example re-uses the Tomcat SSL - keystore (tomcat-rp.jks) for this task; alternatively you may wish to use a Fediz-specific keystore instead. ---> -<FedizConfig> - <contextConfig name="/fedizhelloworld"> - <audienceUris> - <audienceItem>urn:org:apache:cxf:fediz:fedizhelloworld</audienceItem> - </audienceUris> - <certificateStores> - <trustManager> - <keyStore file="test-classes/clienttrust.jks" - password="storepass" type="JKS" /> - </trustManager> - </certificateStores> - <trustedIssuers> - <issuer certificateValidation="PeerTrust" /> - </trustedIssuers> - <maximumClockSkew>1000</maximumClockSkew> - <signingKey keyAlias="mytomidpkey" keyPassword="tompass"> - <keyStore file="test-classes/server.jks" password="tompass" type="JKS" /> - </signingKey> - <protocol xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:type="federationProtocolType" version="1.0.0"> - <realm>urn:org:apache:cxf:fediz:fedizhelloworld</realm> - <issuer>https://localhost:${idp.https.port}/fediz-idp/federation</issuer> - <roleDelimiter>,</roleDelimiter> - <roleURI>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role</roleURI> - <freshness>10</freshness> - <homeRealm type="String">urn:org:apache:cxf:fediz:idp:realm-A</homeRealm> - <claimTypesRequested> - <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role" optional="false" /> - <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" optional="true" /> - <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" optional="true" /> - <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" optional="true" /> - </claimTypesRequested> - </protocol> - <logoutURL>/secure/logout</logoutURL> - <logoutRedirectTo>/index.html</logoutRedirectTo> - </contextConfig> -</FedizConfig> - http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/tomcat7/src/test/resources/fediz_config_aud_restr.xml ---------------------------------------------------------------------- diff --git a/systests/tomcat7/src/test/resources/fediz_config_aud_restr.xml b/systests/tomcat7/src/test/resources/fediz_config_aud_restr.xml deleted file mode 100644 index 8a663bf..0000000 --- a/systests/tomcat7/src/test/resources/fediz_config_aud_restr.xml +++ /dev/null @@ -1,61 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<!-- Place in Tomcat conf folder or other location as designated in this sample's webapp/META-INF/context.xml file. - Keystore referenced below must have IDP STS' public cert included in it. This example re-uses the Tomcat SSL - keystore (tomcat-rp.jks) for this task; alternatively you may wish to use a Fediz-specific keystore instead. ---> -<FedizConfig> - <contextConfig name="/fedizhelloworld"> - <audienceUris> - <audienceItem>urn:org:apache:cxf:fediz:fedizhelloworld2</audienceItem> - </audienceUris> - <certificateStores> - <trustManager> - <keyStore file="test-classes/clienttrust.jks" - password="storepass" type="JKS" /> - </trustManager> - </certificateStores> - <trustedIssuers> - <issuer certificateValidation="PeerTrust" /> - </trustedIssuers> - <maximumClockSkew>1000</maximumClockSkew> - <signingKey keyAlias="mytomidpkey" keyPassword="tompass"> - <keyStore file="test-classes/server.jks" password="tompass" type="JKS" /> - </signingKey> - <protocol xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:type="federationProtocolType" version="1.0.0"> - <realm>urn:org:apache:cxf:fediz:fedizhelloworld</realm> - <issuer>https://localhost:${idp.https.port}/fediz-idp/federation</issuer> - <roleDelimiter>,</roleDelimiter> - <roleURI>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role</roleURI> - <freshness>10</freshness> - <homeRealm type="String">urn:org:apache:cxf:fediz:idp:realm-A</homeRealm> - <claimTypesRequested> - <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role" optional="false" /> - <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" optional="true" /> - <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" optional="true" /> - <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" optional="true" /> - </claimTypesRequested> - </protocol> - <logoutURL>/secure/logout</logoutURL> - <logoutRedirectTo>/index.html</logoutRedirectTo> - </contextConfig> -</FedizConfig> - http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/tomcat7/src/test/resources/fediz_config_client_cert.xml ---------------------------------------------------------------------- diff --git a/systests/tomcat7/src/test/resources/fediz_config_client_cert.xml b/systests/tomcat7/src/test/resources/fediz_config_client_cert.xml deleted file mode 100644 index 365836a..0000000 --- a/systests/tomcat7/src/test/resources/fediz_config_client_cert.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<!-- Place in Tomcat conf folder or other location as designated in this sample's webapp/META-INF/context.xml file. - Keystore referenced below must have IDP STS' public cert included in it. This example re-uses the Tomcat SSL - keystore (tomcat-rp.jks) for this task; alternatively you may wish to use a Fediz-specific keystore instead. ---> -<FedizConfig> - <contextConfig name="/fedizhelloworld"> - <audienceUris> - <audienceItem>urn:org:apache:cxf:fediz:fedizhelloworld</audienceItem> - </audienceUris> - <certificateStores> - <trustManager> - <keyStore file="test-classes/clienttrust.jks" - password="storepass" type="JKS" /> - </trustManager> - </certificateStores> - <trustedIssuers> - <issuer certificateValidation="PeerTrust" /> - </trustedIssuers> - <maximumClockSkew>1000</maximumClockSkew> - <signingKey keyAlias="mytomidpkey" keyPassword="tompass"> - <keyStore file="test-classes/server.jks" password="tompass" type="JKS" /> - </signingKey> - <protocol xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:type="federationProtocolType" version="1.0.0"> - <realm>urn:org:apache:cxf:fediz:fedizhelloworld</realm> - <issuer>https://localhost:${idp.https.port}/fediz-idp/federation</issuer> - <roleDelimiter>,</roleDelimiter> - <roleURI>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role</roleURI> - <freshness>10</freshness> - <homeRealm type="String">urn:org:apache:cxf:fediz:idp:realm-A</homeRealm> - <claimTypesRequested> - <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role" optional="false" /> - <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" optional="true" /> - <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" optional="true" /> - <claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" optional="true" /> - </claimTypesRequested> - <authenticationType>http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/Ssl</authenticationType> - <request type="Class">org.apache.cxf.fediz.integrationtests.HOKCallbackHandler</request> - </protocol> - <logoutURL>/secure/logout</logoutURL> - <logoutRedirectTo>/index.html</logoutRedirectTo> - </contextConfig> -</FedizConfig> - http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/tomcat7/src/test/resources/fediz_config_hok.xml ---------------------------------------------------------------------- diff --git a/systests/tomcat7/src/test/resources/fediz_config_hok.xml b/systests/tomcat7/src/test/resources/fediz_config_hok.xml deleted file mode 100644 index cd4ad95..0000000 --- a/systests/tomcat7/src/test/resources/fediz_config_hok.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<!-- Place in Tomcat conf folder or other location as designated in this sample's webapp/META-INF/context.xml file. - Keystore referenced below must have IDP STS' public cert included in it. This example re-uses the Tomcat SSL - keystore (tomcat-rp.jks) for this task; alternatively you may wish to use a Fediz-specific keystore instead. ---> -<FedizConfig> - <contextConfig name="/fedizhelloworld"> - <audienceUris> - <audienceItem>urn:org:apache:cxf:fediz:fedizhelloworld</audienceItem> - </audienceUris> - <certificateStores> - <trustManager> - <keyStore file="test-classes/clienttrust.jks" - password="storepass" type="JKS" /> - </trustManager> - </certificateStores> - <trustedIssuers> - <issuer certificateValidation="PeerTrust" /> - </trustedIssuers> - <maximumClockSkew>1000</maximumClockSkew> - <protocol xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:type="federationProtocolType" version="1.0.0"> - <realm>urn:org:apache:cxf:fediz:fedizhelloworld</realm> - <issuer>https://localhost:${idp.https.port}/fediz-idp/federation</issuer> - <roleDelimiter>,</roleDelimiter> - <roleURI>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role</roleURI> - <freshness>10</freshness> - <homeRealm type="String">urn:org:apache:cxf:fediz:idp:realm-A</homeRealm> - <claimTypesRequested> - <claimType type="a particular claim type" - optional="true" /> - </claimTypesRequested> - <request type="Class">org.apache.cxf.fediz.integrationtests.HOKCallbackHandler</request> - </protocol> - <logoutURL>/secure/logout</logoutURL> - <logoutRedirectTo>/index.html</logoutRedirectTo> - </contextConfig> -</FedizConfig> - http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/tomcat7/src/test/resources/fediz_config_wreq.xml ---------------------------------------------------------------------- diff --git a/systests/tomcat7/src/test/resources/fediz_config_wreq.xml b/systests/tomcat7/src/test/resources/fediz_config_wreq.xml deleted file mode 100644 index 2612d98..0000000 --- a/systests/tomcat7/src/test/resources/fediz_config_wreq.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<!-- Place in Tomcat conf folder or other location as designated in this sample's webapp/META-INF/context.xml file. - Keystore referenced below must have IDP STS' public cert included in it. This example re-uses the Tomcat SSL - keystore (tomcat-rp.jks) for this task; alternatively you may wish to use a Fediz-specific keystore instead. ---> -<FedizConfig> - <contextConfig name="/fedizhelloworld"> - <audienceUris> - <audienceItem>urn:org:apache:cxf:fediz:fedizhelloworld</audienceItem> - </audienceUris> - <certificateStores> - <trustManager> - <keyStore file="test-classes/clienttrust.jks" - password="storepass" type="JKS" /> - </trustManager> - </certificateStores> - <trustedIssuers> - <issuer certificateValidation="PeerTrust" /> - </trustedIssuers> - <maximumClockSkew>1000</maximumClockSkew> - <protocol xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:type="federationProtocolType" version="1.0.0"> - <realm>urn:org:apache:cxf:fediz:fedizhelloworld</realm> - <issuer>https://localhost:${idp.https.port}/fediz-idp/federation</issuer> - <roleDelimiter>,</roleDelimiter> - <roleURI>http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role</roleURI> - <freshness>10</freshness> - <homeRealm type="String">urn:org:apache:cxf:fediz:idp:realm-A</homeRealm> - <claimTypesRequested> - <claimType type="a particular claim type" - optional="true" /> - </claimTypesRequested> - <request type="Class">org.apache.cxf.fediz.integrationtests.TestCallbackHandler</request> - </protocol> - <logoutURL>/secure/logout</logoutURL> - <logoutRedirectTo>/index.html</logoutRedirectTo> - </contextConfig> -</FedizConfig> - http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/tomcat7/src/test/resources/logging.properties ---------------------------------------------------------------------- diff --git a/systests/tomcat7/src/test/resources/logging.properties b/systests/tomcat7/src/test/resources/logging.properties deleted file mode 100644 index 0d8d902..0000000 --- a/systests/tomcat7/src/test/resources/logging.properties +++ /dev/null @@ -1,54 +0,0 @@ -############################################################ -# 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= INFO - -############################################################ -# 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 = WARNING -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.ws.security.level = FINEST -org.apache.cxf.fediz.level = FINEST http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/tomcat7/src/test/resources/realma/entities-realma.xml ---------------------------------------------------------------------- diff --git a/systests/tomcat7/src/test/resources/realma/entities-realma.xml b/systests/tomcat7/src/test/resources/realma/entities-realma.xml deleted file mode 100644 index 10565ab..0000000 --- a/systests/tomcat7/src/test/resources/realma/entities-realma.xml +++ /dev/null @@ -1,474 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:util="http://www.springframework.org/schema/util" - xsi:schemaLocation=" - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-4.3.xsd - http://www.springframework.org/schema/util - http://www.springframework.org/schema/util/spring-util-4.3.xsd"> - - <bean id="idp-realmA" class="org.apache.cxf.fediz.service.idp.service.jpa.IdpEntity"> - <property name="realm" value="urn:org:apache:cxf:fediz:idp:realm-A" /> - <property name="uri" value="realma" /> - <property name="provideIdpList" value="true" /> - <property name="useCurrentIdp" value="true" /> - <property name="certificate" value="stsKeystoreA.properties" /> - <property name="certificatePassword" value="realma" /> - <property name="stsUrl" value="https://localhost:${idp.https.port}/fediz-idp-sts/REALMA" /> - <property name="idpUrl" value="https://localhost:${idp.https.port}/fediz-idp/federation" /> - <property name="rpSingleSignOutConfirmation" value="true"/> - <property name="supportedProtocols"> - <util:list> - <value>http://docs.oasis-open.org/wsfed/federation/200706 - </value> - <value>http://docs.oasis-open.org/ws-sx/ws-trust/200512 - </value> - </util:list> - </property> - <property name="tokenTypesOffered"> - <util:list> - <value>urn:oasis:names:tc:SAML:1.0:assertion</value> - <value>urn:oasis:names:tc:SAML:2.0:assertion</value> - </util:list> - </property> - <property name="authenticationURIs"> - <util:map> - <entry key="default" value="federation/up" /> - <entry key="http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/SslAndKey" - value="federation/krb" /> - <entry key="http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/default" - value="federation/up" /> - <entry key="http://docs.oasis-open.org/wsfed/authorization/200706/authntypes/Ssl" - value="federation/clientcert" /> - </util:map> - </property> - <property name="serviceDisplayName" value="REALM A" /> - <property name="serviceDescription" value="IDP of Realm A" /> - <property name="applications"> - <util:list> - <ref bean="srv-fedizhelloworld" /> - </util:list> - </property> - <property name="trustedIdps"> - <util:list> - <ref bean="trusted-idp-realmB" /> - </util:list> - </property> - <property name="claimTypesOffered"> - <util:list> - <ref bean="claim_role" /> - <ref bean="claim_surname" /> - <ref bean="claim_givenname" /> - <ref bean="claim_email" /> - </util:list> - </property> - </bean> - - <bean id="trusted-idp-realmB" - class="org.apache.cxf.fediz.service.idp.service.jpa.TrustedIdpEntity"> - <property name="realm" value="urn:org:apache:cxf:fediz:idp:realm-B" /> - <property name="cacheTokens" value="true" /> - <property name="url" value="https://localhost:12443/fediz-idp-remote/federation" /> - <property name="certificate" value="realmb.cert" /> - <property name="trustType" value="PEER_TRUST" /> - <property name="protocol" value="http://docs.oasis-open.org/wsfed/federation/200706" /> - <property name="federationType" value="FEDERATE_IDENTITY" /> - <property name="name" value="Realm B" /> - <property name="description" value="Realm B description" /> - </bean> - - <bean id="srv-fedizhelloworld" class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationEntity"> - <property name="realm" value="urn:org:apache:cxf:fediz:fedizhelloworld" /> - <property name="protocol" value="http://docs.oasis-open.org/wsfed/federation/200706" /> - <property name="serviceDisplayName" value="Fedizhelloworld" /> - <property name="serviceDescription" value="Web Application to illustrate WS-Federation" /> - <property name="role" value="ApplicationServiceType" /> - <property name="tokenType" value="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0" /> - <property name="lifeTime" value="3600" /> - <property name="passiveRequestorEndpointConstraint" - value="https://localhost:(\d)*/(\w)*helloworld(\w)*/secure/.*" /> - <property name="logoutEndpointConstraint" value="https://localhost:?(\d)*/.*" /> - </bean> - - <bean class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationClaimEntity"> - <property name="application" ref="srv-fedizhelloworld" /> - <property name="claim" ref="claim_role" /> - <property name="optional" value="false" /> - </bean> - <bean class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationClaimEntity"> - <property name="application" ref="srv-fedizhelloworld" /> - <property name="claim" ref="claim_givenname" /> - <property name="optional" value="false" /> - </bean> - <bean class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationClaimEntity"> - <property name="application" ref="srv-fedizhelloworld" /> - <property name="claim" ref="claim_surname" /> - <property name="optional" value="false" /> - </bean> - <bean class="org.apache.cxf.fediz.service.idp.service.jpa.ApplicationClaimEntity"> - <property name="application" ref="srv-fedizhelloworld" /> - <property name="claim" ref="claim_email" /> - <property name="optional" value="false" /> - </bean> - - <bean id="claim_role" - class="org.apache.cxf.fediz.service.idp.service.jpa.ClaimEntity"> - <property name="claimType" - value="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role" /> - <property name="displayName" - value="role" /> - <property name="description" - value="Description for role" /> - </bean> - <bean id="claim_givenname" - class="org.apache.cxf.fediz.service.idp.service.jpa.ClaimEntity"> - <property name="claimType" - value="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" /> - <property name="displayName" - value="firstname" /> - <property name="description" - value="Description for firstname" /> - </bean> - <bean id="claim_surname" - class="org.apache.cxf.fediz.service.idp.service.jpa.ClaimEntity"> - <property name="claimType" - value="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" /> - <property name="displayName" - value="lastname" /> - <property name="description" - value="Description for lastname" /> - </bean> - <bean id="claim_email" - class="org.apache.cxf.fediz.service.idp.service.jpa.ClaimEntity"> - <property name="claimType" - value="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" /> - <property name="displayName" - value="email" /> - <property name="description" - value="Description for email" /> - </bean> - - - <bean id="entitlement_claim_list" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="CLAIM_LIST" /> - <property name="description" - value="Description for CLAIM_LIST" /> - </bean> - <bean id="entitlement_claim_create" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="CLAIM_CREATE" /> - <property name="description" - value="Description for CLAIM_CREATE" /> - </bean> - <bean id="entitlement_claim_read" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="CLAIM_READ" /> - <property name="description" - value="Description for CLAIM_READ" /> - </bean> - <bean id="entitlement_claim_update" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="CLAIM_UPDATE" /> - <property name="description" - value="Description for CLAIM_UPDATE" /> - </bean> - <bean id="entitlement_claim_delete" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="CLAIM_DELETE" /> - <property name="description" - value="Description for CLAIM_DELETE" /> - </bean> - - <bean id="entitlement_application_list" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="APPLICATION_LIST" /> - <property name="description" - value="Description for APPLICATION_LIST" /> - </bean> - <bean id="entitlement_application_create" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="APPLICATION_CREATE" /> - <property name="description" - value="Description for APPLICATION_CREATE" /> - </bean> - <bean id="entitlement_application_read" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="APPLICATION_READ" /> - <property name="description" - value="Description for APPLICATION_READ" /> - </bean> - <bean id="entitlement_application_update" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="APPLICATION_UPDATE" /> - <property name="description" - value="Description for APPLICATION_UPDATE" /> - </bean> - <bean id="entitlement_application_delete" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="APPLICATION_DELETE" /> - <property name="description" - value="Description for APPLICATION_DELETE" /> - </bean> - - <bean id="entitlement_trustedidp_list" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="TRUSTEDIDP_LIST" /> - <property name="description" - value="Description for TRUSTEDIDP_LIST" /> - </bean> - <bean id="entitlement_trustedidp_create" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="TRUSTEDIDP_CREATE" /> - <property name="description" - value="Description for TRUSTEDIDP_CREATE" /> - </bean> - <bean id="entitlement_trustedidp_read" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="TRUSTEDIDP_READ" /> - <property name="description" - value="Description for TRUSTEDIDP_READ" /> - </bean> - <bean id="entitlement_trustedidp_update" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="TRUSTEDIDP_UPDATE" /> - <property name="description" - value="Description for TRUSTEDIDP_UPDATE" /> - </bean> - <bean id="entitlement_trustedidp_delete" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="TRUSTEDIDP_DELETE" /> - <property name="description" - value="Description for TRUSTEDIDP_DELETE" /> - </bean> - - <bean id="entitlement_idp_list" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="IDP_LIST" /> - <property name="description" - value="Description for IDP_LIST" /> - </bean> - <bean id="entitlement_idp_create" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="IDP_CREATE" /> - <property name="description" - value="Description for IDP_CREATE" /> - </bean> - <bean id="entitlement_idp_read" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="IDP_READ" /> - <property name="description" - value="Description for IDP_READ" /> - </bean> - <bean id="entitlement_idp_update" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="IDP_UPDATE" /> - <property name="description" - value="Description for IDP_UPDATE" /> - </bean> - <bean id="entitlement_idp_delete" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="IDP_DELETE" /> - <property name="description" - value="Description for IDP_DELETE" /> - </bean> - - <bean id="entitlement_role_list" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="ROLE_LIST" /> - <property name="description" - value="Description for ROLE_LIST" /> - </bean> - <bean id="entitlement_role_create" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="ROLE_CREATE" /> - <property name="description" - value="Description for ROLE_CREATE" /> - </bean> - <bean id="entitlement_role_read" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="ROLE_READ" /> - <property name="description" - value="Description for ROLE_READ" /> - </bean> - <bean id="entitlement_role_update" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="ROLE_UPDATE" /> - <property name="description" - value="Description for ROLE_UPDATE" /> - </bean> - <bean id="entitlement_role_delete" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="ROLE_DELETE" /> - <property name="description" - value="Description for ROLE_DELETE" /> - </bean> - - <bean id="entitlement_entitlement_list" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="ENTITLEMENT_LIST" /> - <property name="description" - value="Description for ENTITLEMENT_LIST" /> - </bean> - <bean id="entitlement_entitlement_create" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="ENTITLEMENT_CREATE" /> - <property name="description" - value="Description for ENTITLEMENT_CREATE" /> - </bean> - <bean id="entitlement_entitlement_read" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="ENTITLEMENT_READ" /> - <property name="description" - value="Description for ENTITLEMENT_READ" /> - </bean> - <bean id="entitlement_entitlement_update" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="ENTITLEMENT_UPDATE" /> - <property name="description" - value="Description for ENTITLEMENT_UPDATE" /> - </bean> - <bean id="entitlement_entitlement_delete" - class="org.apache.cxf.fediz.service.idp.service.jpa.EntitlementEntity"> - <property name="name" - value="ENTITLEMENT_DELETE" /> - <property name="description" - value="Description for ENTITLEMENT_DELETE" /> - </bean> - - <bean id="role_admin" - class="org.apache.cxf.fediz.service.idp.service.jpa.RoleEntity"> - <property name="name" - value="ADMIN" /> - <property name="description" - value="This is the administrator role with full access" /> - <property name="entitlements"> - <util:list> - <ref bean="entitlement_claim_list" /> - <ref bean="entitlement_claim_create" /> - <ref bean="entitlement_claim_read" /> - <ref bean="entitlement_claim_update" /> - <ref bean="entitlement_claim_delete" /> - <ref bean="entitlement_idp_list" /> - <ref bean="entitlement_idp_create" /> - <ref bean="entitlement_idp_read" /> - <ref bean="entitlement_idp_update" /> - <ref bean="entitlement_idp_delete" /> - <ref bean="entitlement_trustedidp_list" /> - <ref bean="entitlement_trustedidp_create" /> - <ref bean="entitlement_trustedidp_read" /> - <ref bean="entitlement_trustedidp_update" /> - <ref bean="entitlement_trustedidp_delete" /> - <ref bean="entitlement_application_list" /> - <ref bean="entitlement_application_create" /> - <ref bean="entitlement_application_read" /> - <ref bean="entitlement_application_update" /> - <ref bean="entitlement_application_delete" /> - <ref bean="entitlement_role_list" /> - <ref bean="entitlement_role_create" /> - <ref bean="entitlement_role_read" /> - <ref bean="entitlement_role_update" /> - <ref bean="entitlement_role_delete" /> - <ref bean="entitlement_entitlement_list" /> - <ref bean="entitlement_entitlement_create" /> - <ref bean="entitlement_entitlement_read" /> - <ref bean="entitlement_entitlement_update" /> - <ref bean="entitlement_entitlement_delete" /> - </util:list> - </property> - </bean> - <bean id="role_user" - class="org.apache.cxf.fediz.service.idp.service.jpa.RoleEntity"> - <property name="name" - value="USER" /> - <property name="description" - value="This is the user role with read access" /> - <property name="entitlements"> - <util:list> - <ref bean="entitlement_claim_list" /> - <ref bean="entitlement_claim_read" /> - <ref bean="entitlement_idp_list" /> - <ref bean="entitlement_idp_read" /> - <ref bean="entitlement_trustedidp_list" /> - <ref bean="entitlement_trustedidp_read" /> - <ref bean="entitlement_application_list" /> - <ref bean="entitlement_application_read" /> - <ref bean="entitlement_role_list" /> - <ref bean="entitlement_role_read" /> - <ref bean="entitlement_entitlement_list" /> - <ref bean="entitlement_entitlement_read" /> - </util:list> - </property> - </bean> - <bean id="role_idp_login" - class="org.apache.cxf.fediz.service.idp.service.jpa.RoleEntity"> - <property name="name" - value="IDP_LOGIN" /> - <property name="description" - value="This is the IDP login role which is applied to Users during the IDP SSO" /> - <property name="entitlements"> - <util:list> - <ref bean="entitlement_claim_list" /> - <ref bean="entitlement_claim_read" /> - <ref bean="entitlement_idp_list" /> - <ref bean="entitlement_idp_read" /> - <ref bean="entitlement_trustedidp_list" /> - <ref bean="entitlement_trustedidp_read" /> - <ref bean="entitlement_application_list" /> - <ref bean="entitlement_application_read" /> - </util:list> - </property> - </bean> - - - -</beans> - http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/tomcat8/pom.xml ---------------------------------------------------------------------- diff --git a/systests/tomcat8/pom.xml b/systests/tomcat8/pom.xml index fe08dbf..c824443 100644 --- a/systests/tomcat8/pom.xml +++ b/systests/tomcat8/pom.xml @@ -41,12 +41,6 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.eclipse.jdt.core.compiler</groupId> - <artifactId>ecj</artifactId> - <version>${ecj.version}</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> <version>${tomcat8.version}</version> http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/webapps/pom.xml ---------------------------------------------------------------------- diff --git a/systests/webapps/pom.xml b/systests/webapps/pom.xml index b3bd89e..437e788 100644 --- a/systests/webapps/pom.xml +++ b/systests/webapps/pom.xml @@ -34,7 +34,6 @@ <module>simpleWebapp</module> <module>springPreauthWebapp</module> <module>springWebapp</module> - <module>spring2Webapp</module> <module>spring3Webapp</module> <module>cxfWebapp</module> </modules> http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/webapps/spring2Webapp/pom.xml ---------------------------------------------------------------------- diff --git a/systests/webapps/spring2Webapp/pom.xml b/systests/webapps/spring2Webapp/pom.xml deleted file mode 100644 index 536b045..0000000 --- a/systests/webapps/spring2Webapp/pom.xml +++ /dev/null @@ -1,135 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.cxf.fediz.systests</groupId> - <artifactId>fediz-systests-webapps</artifactId> - <version>2.0.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <groupId>org.apache.cxf.fediz.systests.webapps</groupId> - <artifactId>fediz-systests-webapps-spring2</artifactId> - <name>Apache Fediz Systests Spring2 Webapp</name> - <packaging>war</packaging> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <spring.security.version>2.0.8.RELEASE</spring.security.version> - </properties> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-web</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-aop</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>${spring.version}</version> - </dependency> - </dependencies> - </dependencyManagement> - <dependencies> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>${servlet.version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>${slf4j.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf.fediz</groupId> - <artifactId>fediz-spring2</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.springframework.security</groupId> - <artifactId>spring-security-core</artifactId> - <version>${spring.security.version}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-web</artifactId> - <version>${spring.version}</version> - </dependency> - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-lang3</artifactId> - <version>${commons.lang.version}</version> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>${log4j.version}</version> - <exclusions> - <exclusion> - <groupId>javax.mail</groupId> - <artifactId>mail</artifactId> - </exclusion> - <exclusion> - <groupId>javax.jms</groupId> - <artifactId>jms</artifactId> - </exclusion> - <exclusion> - <groupId>com.sun.jdmk</groupId> - <artifactId>jmxtools</artifactId> - </exclusion> - <exclusion> - <groupId>com.sun.jmx</groupId> - <artifactId>jmxri</artifactId> - </exclusion> - </exclusions> - </dependency> - </dependencies> - <build> - <plugins> - <plugin><!--for mvn tomcat:deploy/:undeploy/:redeploy --> - <groupId>org.codehaus.mojo</groupId> - <artifactId>tomcat-maven-plugin</artifactId> - <version>1.1</version> - <configuration> - <server>myTomcat</server> - <url>http://localhost:8080/manager/text</url> - <path>/${project.build.finalName}</path> - </configuration> - </plugin> - </plugins> - <!-- Name of the generated WAR file --> - <finalName>fedizhelloworld</finalName> - </build> - -</project> http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/webapps/spring2Webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java ---------------------------------------------------------------------- diff --git a/systests/webapps/spring2Webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java b/systests/webapps/spring2Webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java deleted file mode 100644 index 3746936..0000000 --- a/systests/webapps/spring2Webapp/src/main/java/org/apache/cxf/fediz/example/FederationServlet.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * 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.core.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("<html>"); - out.println("<head><title>WS Federation Systests Spring Examples</title></head>"); - out.println("<body>"); - out.println("<p>Request url: " + request.getRequestURL().toString() + "</p>"); - - out.print("<p>userPrincipal="); - Principal p = request.getUserPrincipal(); - if (p != null) { - out.print(p.getName()); - } - out.println("</p>"); - - // Access Spring security context - Authentication auth = SecurityContextHolder.getContext().getAuthentication(); - - if (auth instanceof FederationAuthenticationToken) { - FederationAuthenticationToken fedToken = (FederationAuthenticationToken)auth; - List<String> 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("<p>role:" + item + "=" + (found ? "true" : "false") + "</p>"); - } - - ClaimCollection claims = fedToken.getClaims(); - for (Claim c : claims) { - out.println("<p>" + c.getClaimType().toString() + "=" + c.getValue() + "</p>"); - } - - Element el = fedToken.getLoginToken(); - if (el != null) { - out.println("loginToken=FOUND{FedizPrincipal}<p>"); - } - - el = SecurityTokenThreadLocal.getToken(); - if (el != null) { - out.println("loginToken=FOUND{SecurityTokenThreadLocal}<p>"); - } - - } - - out.println("</body>"); - - } - -} http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/webapps/spring2Webapp/src/main/resources/clienttrust.jks ---------------------------------------------------------------------- diff --git a/systests/webapps/spring2Webapp/src/main/resources/clienttrust.jks b/systests/webapps/spring2Webapp/src/main/resources/clienttrust.jks deleted file mode 100644 index c3ad459..0000000 Binary files a/systests/webapps/spring2Webapp/src/main/resources/clienttrust.jks and /dev/null differ http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/webapps/spring2Webapp/src/main/resources/log4j.properties ---------------------------------------------------------------------- diff --git a/systests/webapps/spring2Webapp/src/main/resources/log4j.properties b/systests/webapps/spring2Webapp/src/main/resources/log4j.properties deleted file mode 100644 index 32d28b6..0000000 --- a/systests/webapps/spring2Webapp/src/main/resources/log4j.properties +++ /dev/null @@ -1,16 +0,0 @@ -# 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=INFO -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n - - http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/webapps/spring2Webapp/src/main/resources/logging.properties ---------------------------------------------------------------------- diff --git a/systests/webapps/spring2Webapp/src/main/resources/logging.properties b/systests/webapps/spring2Webapp/src/main/resources/logging.properties deleted file mode 100644 index f4974a3..0000000 --- a/systests/webapps/spring2Webapp/src/main/resources/logging.properties +++ /dev/null @@ -1,53 +0,0 @@ -############################################################ -# 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= INFO - -############################################################ -# 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 = WARNING -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 http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e392e637/systests/webapps/spring2Webapp/src/main/webapp/WEB-INF/applicationContext-security.xml ---------------------------------------------------------------------- diff --git a/systests/webapps/spring2Webapp/src/main/webapp/WEB-INF/applicationContext-security.xml b/systests/webapps/spring2Webapp/src/main/webapp/WEB-INF/applicationContext-security.xml deleted file mode 100644 index 66c133c..0000000 --- a/systests/webapps/spring2Webapp/src/main/webapp/WEB-INF/applicationContext-security.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - 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. ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:sec="http://www.springframework.org/schema/security" - xmlns:p="http://www.springframework.org/schema/p" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd -http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd"> - - - <sec:http entry-point-ref="federationEntryPoint"> -<!-- - <sec:intercept-url pattern="/" access="permitAll"/> - <sec:intercept-url pattern="/fediz" access="permitAll"/> - <sec:intercept-url pattern="/index.html" access="permitAll"/> - <sec:intercept-url pattern="/secure/fedservlet" access="isAuthenticated()"/> ---> - <sec:intercept-url pattern="/FederationMetadata/**" access="IS_AUTHENTICATED_FULLY"/> - <sec:intercept-url pattern="/secure/fedservlet" access="IS_AUTHENTICATED_FULLY"/> - <sec:intercept-url pattern="/secure/manager/**" access="ROLE_MANAGER"/> - <sec:intercept-url pattern="/secure/admin/**" access="ROLE_ADMIN"/> - <sec:intercept-url pattern="/secure/user/**" access="ROLE_USER,ROLE_ADMIN,ROLE_MANAGER"/> - <!--<sec:custom-filter ref="federationFilter" after="BASIC_AUTH_FILTER" />--> - <!--<sec:session-management session-authentication-strategy-ref="sas"/>--> - </sec:http> - - - <sec:authentication-manager alias="authManager"/> - - <bean id="fedizConfig" class="org.apache.cxf.fediz.spring.FederationConfigImpl" init-method="init" - p:configFile="file:./target/test-classes/fediz_config.xml" p:contextName="/fedizhelloworld_spring2" /> - - <bean id="federationEntryPoint" - class="org.apache.cxf.fediz.spring.web.FederationAuthenticationEntryPoint" - p:federationConfig-ref="fedizConfig" /> - -<!-- Works without org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy as well --> -<!-- - <bean id="federationFilter" - class="org.apache.cxf.fediz.spring.web.FederationAuthenticationFilter" - p:authenticationManager-ref="authManager" p:sessionAuthenticationStrategy-ref="sas"> - - <property name="authenticationFailureHandler"> - <bean class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler" /> - </property> - </bean> - --> - - <bean id="federationFilter" - class="org.apache.cxf.fediz.spring.web.FederationAuthenticationFilter" - p:authenticationManager-ref="authManager" p:defaultTargetUrl="/whatever"> - <sec:custom-filter after="BASIC_PROCESSING_FILTER"/> - <!-- - <property name="authenticationFailureHandler"> - <bean class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler" /> - </property> - --> - </bean> - - <bean id="federationAuthProvider" class="org.apache.cxf.fediz.spring.authentication.FederationAuthenticationProvider" - p:federationConfig-ref="fedizConfig"> - <sec:custom-authentication-provider /> - <property name="authenticationUserDetailsService"> - <bean class="org.apache.cxf.fediz.spring.authentication.GrantedAuthoritiesUserDetailsFederationService"/> - </property> - </bean> -<!-- - <bean id="sas" class="org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy" /> ---> -</beans> -
