Picketlink SVN: r1128 - in integration-tests/trunk: picketlink-int-webapps and 5 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-07-26 12:37:51 -0400 (Tue, 26 Jul 2011)
New Revision: 1128
Added:
integration-tests/trunk/picketlink-int-webapps/
integration-tests/trunk/picketlink-int-webapps/claims/
integration-tests/trunk/picketlink-int-webapps/claims/pom.xml
integration-tests/trunk/picketlink-int-webapps/claims/src/
integration-tests/trunk/picketlink-int-webapps/claims/src/main/
integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/
integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/WEB-INF/
integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/WEB-INF/web.xml
integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/claimsprocess.jsp
integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/saml2-response-adfs-claims.xml
integration-tests/trunk/picketlink-int-webapps/pom.xml
Modified:
integration-tests/trunk/pom.xml
Log:
add webapps module
Added: integration-tests/trunk/picketlink-int-webapps/claims/pom.xml
===================================================================
--- integration-tests/trunk/picketlink-int-webapps/claims/pom.xml (rev 0)
+++ integration-tests/trunk/picketlink-int-webapps/claims/pom.xml 2011-07-26 16:37:51 UTC (rev 1128)
@@ -0,0 +1,38 @@
+<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">
+ <parent>
+ <groupId>org.picketlink</groupId>
+ <artifactId>picketlink-integration-tests-parent</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>claims</artifactId>
+ <packaging>war</packaging>
+ <name>PicketLink Federation Claims</name>
+ <url>http://labs.jboss.org/portal/picketlink/</url>
+ <description>PicketLink Samples contains the samples for Federated Identity Needs.</description>
+ <licenses>
+ <license>
+ <name>lgpl</name>
+ <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+ <organization>
+ <name>JBoss Inc.</name>
+ <url>http://www.jboss.org</url>
+ </organization>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <warName>claims</warName>
+ <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Property changes on: integration-tests/trunk/picketlink-int-webapps/claims/pom.xml
___________________________________________________________________
Added: svn:executable
+ *
Added: integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/WEB-INF/web.xml
===================================================================
--- integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/WEB-INF/web.xml 2011-07-26 16:37:51 UTC (rev 1128)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+
+
+</web-app>
Added: integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/claimsprocess.jsp
===================================================================
--- integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/claimsprocess.jsp (rev 0)
+++ integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/claimsprocess.jsp 2011-07-26 16:37:51 UTC (rev 1128)
@@ -0,0 +1,12 @@
+<%@ page import="java.io.*,org.picketlink.identity.federation.api.saml.v2.response.SAML2Response,org.picketlink.identity.federation.saml.v2.SAML2Object" %>
+
+<%
+InputStream configStream = application.getResourceAsStream("/saml2-response-adfs-claims.xml");
+SAML2Response samlResponse = new SAML2Response();
+SAML2Object samlObject = samlResponse.getSAML2ObjectFromStream(configStream);
+
+if(samlObject == null)
+ throw new RuntimeException("SAML Object is null");
+
+out.println("OK");
+%>
Added: integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/saml2-response-adfs-claims.xml
===================================================================
--- integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/saml2-response-adfs-claims.xml (rev 0)
+++ integration-tests/trunk/picketlink-int-webapps/claims/src/main/webapp/saml2-response-adfs-claims.xml 2011-07-26 16:37:51 UTC (rev 1128)
@@ -0,0 +1,66 @@
+<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
+ Consent="urn:oasis:names:tc:SAML:2.0:consent:unspecified"
+ Destination="https://something"
+ ID="_48db7f2f-a2d2-4e45-94bc-bb680a47d073" InResponseTo="CPSID_47811a63-caf3-4e4e-84cb-fa872cafff05"
+ IssueInstant="2011-07-19T21:23:42.077Z" Version="2.0">
+ <Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">urn:adfs:services:trust
+ </Issuer>
+ <samlp:Status>
+ <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success" />
+ </samlp:Status>
+ <Assertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion" ID="_334b1e3d-8783-4ea6-b5a9-0dd6317999d2"
+ IssueInstant="2011-07-19T21:23:42.077Z" Version="2.0">
+ <Issuer>urn:adfs:services:trust</Issuer>
+ <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+ <ds:SignedInfo>
+ <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
+ <ds:SignatureMethod
+ Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
+ <ds:Reference URI="#_334b1e3d-8783-4ea6-b5a9-0dd6317999d2">
+ <ds:Transforms>
+ <ds:Transform
+ Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
+ <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
+ </ds:Transforms>
+ <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
+ <ds:DigestValue>6UvO3uhEz2ErtcrijZ4WfvhrPGEoP+fdmiMOg0mOeMQ=
+ </ds:DigestValue>
+ </ds:Reference>
+ </ds:SignedInfo>
+ <ds:SignatureValue>JGR4KOgUKksRKGn0c2OvyVhCIbOX5rafDiaXezTyGPsQJnVhbYUa6xDnDEb1kMXefL3IxAWL2o1PgYlnrrGfuP3QgAeF1B+w9JlO4/H7DTeumMWz7ZvpsmUMARrcFBJjsOXgIZxDU3UY1yzn6IMZonQRz2CO6kVo2q3zemlb8TAssZttj71Wl/fceRDlkV/+suQChaaXeDWVW2T+ITnt2JSJY2GL6PpT8K+hHAyfS0PgC9o3RedAwIZT73ZiCQugZYxBgjQbZXT72x6arh8phWVtENCr6JEcXFUrAGnYzOn3/48M6w9MQ2GhHB4XqgWAQrrpcG6nw47q+Z4zn+9Wig==
+ </ds:SignatureValue>
+ <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
+ <ds:X509Data>
+ <ds:X509Certificate>MIIC7jCCAdagAwIBAgIQXp/JPRE5SaJCiQcYG8wqBzANBgkqhkiG9w0BAQsFADAzMTEwLwYDVQQDEyhBREZTIFNpZ25pbmcgLSBDUFMtRVhULUZTLmV4dC5zdy5yaW0ubmV0MB4XDTExMDUwODIyMDQ1OVoXDTEyMDUwNzIyMDQ1OVowMzExMC8GA1UEAxMoQURGUyBTaWduaW5nIC0gQ1BTLUVYVC1GUy5leHQuc3cucmltLm5ldDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANN57C+4eyqeB44BiUB4xmyTcUMhJR55yjnJWWse8KllXJYnFzZzJPvVC1SPlACz2EzuATT5gWFhHyhqolgqAR5a0pke1wXVN4aHKOkUzmDhdd2JfOGFoJRIV9wgkX1bbA2FS+kJMl0ewdgxKdjOlKM+LXNmFteqRYZq2+0ss7vtZJ8/ls9t6cRNd2qI+7zJvPqvs1Beaiia9P45oXn7YPK4TJKIR3aq4vmI1q2cSFK1a1b76YDvzYYAASCpeGJ+20lh3j81/5D408MrjaDb1pMXWhK01okcypQeNwaGoEQwlFm8M5eQCRgnJbHzASE8NMdV+2NW2vn+GNbp327gOk0CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAkYq2FmFTkP9NRXJn/J3XU+9Idv4h76vNdIT4hvfnzhlKGqVZANgIVgXk6aIzSv22x3vxkjSvMDQkhINHLEcKzabWdpAtwUUiqBUykwg+MvzolLkuG6yNT59KrUPbteqxQrhK5O+VCsDIaxjWjvSW0O7ACuPgQFPcnDZDcVXJWOCy6sUmnMSuD1kMmCJ6ubu72IrlnPKWp1obfVl1EV1GOWwx6LSn/WyZ0+ca4bkOLhMku5v+7myQLMWxS5sqb9578ZG51qrfJRde3wCOGAfRBCUa/8H/6xvkp7T6j0Fx4uH!
j8XBn8wjL8epgWSyH381owGepLRJ+evRIjtbYVEAs7w==
+ </ds:X509Certificate>
+ </ds:X509Data>
+ </KeyInfo>
+ </ds:Signature>
+ <Subject>
+ <SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
+ <SubjectConfirmationData
+ InResponseTo="CPSID_47811a63-caf3-4e4e-84cb-fa872cafff05"
+ NotOnOrAfter="2011-07-19T21:28:42.077Z" Recipient="https://somebody" />
+ </SubjectConfirmation>
+ </Subject>
+ <Conditions NotBefore="2011-07-19T21:23:42.077Z"
+ NotOnOrAfter="2011-07-19T22:23:42.077Z">
+ <AudienceRestriction>
+ <Audience>https://somebody</Audience>
+ </AudienceRestriction>
+ </Conditions>
+ <AttributeStatement>
+ <Attribute Name="http://schemas.xmlsoap.org/claims/EmailAddress">
+ <AttributeValue>admin(a)test.net</AttributeValue>
+ </Attribute>
+ <Attribute Name="http://schemas.xmlsoap.org/claims/PUID">
+ <AttributeValue>1004567899</AttributeValue>
+ </Attribute>
+ </AttributeStatement>
+ <AuthnStatement AuthnInstant="2011-07-19T21:10:57.923Z">
+ <AuthnContext>
+ <AuthnContextClassRef>urn:federation:authentication:windows</AuthnContextClassRef>
+ </AuthnContext>
+ </AuthnStatement>
+ </Assertion>
+</samlp:Response>
\ No newline at end of file
Added: integration-tests/trunk/picketlink-int-webapps/pom.xml
===================================================================
--- integration-tests/trunk/picketlink-int-webapps/pom.xml (rev 0)
+++ integration-tests/trunk/picketlink-int-webapps/pom.xml 2011-07-26 16:37:51 UTC (rev 1128)
@@ -0,0 +1,28 @@
+<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">
+ <parent>
+ <groupId>org.picketlink</groupId>
+ <artifactId>picketlink-integration-tests-parent</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>picketlink-int-webapps</artifactId>
+ <packaging>pom</packaging>
+ <name>PicketLink Federation Web Applications</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>PicketLink Web Applications contains the web
+ applications for Federated Identity Needs.</description>
+ <licenses>
+ <license>
+ <name>lgpl</name>
+ <url>http://repository.jboss.com/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+ <organization>
+ <name>JBoss Inc.</name>
+ <url>http://www.jboss.org</url>
+ </organization>
+ <modules>
+ <module>claims</module>
+ </modules>
+</project>
Property changes on: integration-tests/trunk/picketlink-int-webapps/pom.xml
___________________________________________________________________
Added: svn:executable
+ *
Modified: integration-tests/trunk/pom.xml
===================================================================
--- integration-tests/trunk/pom.xml 2011-07-26 15:21:12 UTC (rev 1127)
+++ integration-tests/trunk/pom.xml 2011-07-26 16:37:51 UTC (rev 1128)
@@ -15,6 +15,7 @@
<modules>
<module>parent</module>
+ <module>picketlink-int-webapps</module>
<module>picketlink-saml-tests</module>
<module>picketlink-saml-jbas51</module>
<module>picketlink-saml-jbas6</module>
@@ -25,5 +26,6 @@
<module>picketlink-sts-jbas6-cxf</module>
<!-- <module>picketlink-openid-tests</module> -->
<module>picketlink-pdp-tests</module>
+
</modules>
</project>
13 years, 5 months
Picketlink SVN: r1127 - integration-tests/trunk/picketlink-sts-tests.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-07-26 11:21:12 -0400 (Tue, 26 Jul 2011)
New Revision: 1127
Modified:
integration-tests/trunk/picketlink-sts-tests/pom.xml
Log:
remove commented out
Modified: integration-tests/trunk/picketlink-sts-tests/pom.xml
===================================================================
--- integration-tests/trunk/picketlink-sts-tests/pom.xml 2011-07-25 19:48:44 UTC (rev 1126)
+++ integration-tests/trunk/picketlink-sts-tests/pom.xml 2011-07-26 15:21:12 UTC (rev 1127)
@@ -42,106 +42,6 @@
</configuration>
</plugin>
-<!--
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4.3</version>
- <configuration>
- <phase>test</phase>
- <includes>
- <include>**/**TestCase.java</include>
- </includes>
- <forkMode>pertest</forkMode>
- <trimStackTrace>false</trimStackTrace>
- <reportsDirectory>${project.build.directory}/surefire-reports-native</reportsDirectory>
- </configuration>
- <executions>
- <execution>
- <id>surefire-it-metro</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skip>true</skip>
- <reportsDirectory>${project.build.directory}/surefire-reports-metro</reportsDirectory>
- </configuration>
- </execution>
- <execution>
- <id>surefire-it-cxf</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skip>false</skip>
- <reportsDirectory>${project.build.directory}/surefire-reports-cxf</reportsDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>phase-1</id>
- <phase>compile</phase>
- <configuration>
- <tasks>
- <property name="version" value="${project.version}"/>
- <property name="depclasspath" refid="maven.dependency.classpath"/>
- <property name="localRepository" value="${user.home}/.m2/repository"/>
- <ant antfile="${basedir}/ant-build.xml" target="install-jboss" />
- <ant antfile="${basedir}/ant-build.xml" target="start-jboss" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>phase-2</id>
- <phase>test</phase>
- <configuration>
- <tasks>
- <ant antfile="${basedir}/ant-build.xml" target="stop-jboss" />
- <ant antfile="${basedir}/ant-build.xml" target="install-jbws-metro"/>
- <ant antfile="${basedir}/ant-build.xml" target="start-jboss" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>phase-3</id>
- <phase>pre-integration-test</phase>
- <configuration>
- <tasks>
- <ant antfile="${basedir}/ant-build.xml" target="stop-jboss" />
- <ant antfile="${basedir}/ant-build.xml" target="install-jbws-cxf"/>
- <ant antfile="${basedir}/ant-build.xml" target="start-jboss" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>phase-4</id>
- <phase>post-integration-test</phase>
- <configuration>
- <tasks>
- <ant antfile="${basedir}/ant-build.xml" target="stop-jboss" />
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
--->
</plugins>
</build>
13 years, 5 months
Picketlink SVN: r1126 - in product/trunk/picketlink-core/src: main/java/org/picketlink/identity/federation/core/util and 2 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-07-25 15:48:44 -0400 (Mon, 25 Jul 2011)
New Revision: 1126
Modified:
product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util/
product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util/DocumentUtil.java
product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/util/
product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/util/StaxUtil.java
product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/util/TransformerUtil.java
product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml/
product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml/SAML20TokenProvider.java
product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml/SAMLUtil.java
product/trunk/picketlink-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml/
Log:
merge in r1110 and r1111
Property changes on: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util
___________________________________________________________________
Added: svn:mergeinfo
+ /federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util:1098-1110
Modified: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util/DocumentUtil.java
===================================================================
--- product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util/DocumentUtil.java 2011-07-25 19:33:16 UTC (rev 1125)
+++ product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/util/DocumentUtil.java 2011-07-25 19:48:44 UTC (rev 1126)
@@ -50,6 +50,7 @@
import org.picketlink.identity.federation.core.exceptions.ProcessingException;
import org.picketlink.identity.federation.core.util.TransformerUtil;
import org.w3c.dom.DOMConfiguration;
+import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -109,6 +110,31 @@
}
/**
+ * Create a document with the root element of the form <someElement xmlns="customNamespace"
+ * @param baseNamespace
+ * @return
+ * @throws ProcessingException
+ */
+ public static Document createDocumentWithBaseNamespace(String baseNamespace, String localPart)
+ throws ProcessingException
+ {
+ try
+ {
+ DocumentBuilderFactory factory = getDocumentBuilderFactory();
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ return builder.getDOMImplementation().createDocument(baseNamespace, localPart, null);
+ }
+ catch (DOMException e)
+ {
+ throw new ProcessingException(e);
+ }
+ catch (ParserConfigurationException e)
+ {
+ throw new ProcessingException(e);
+ }
+ }
+
+ /**
* Parse a document from the string
* @param docString
* @return
Property changes on: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/util
___________________________________________________________________
Added: svn:mergeinfo
+ /federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util:1098-1111
Modified: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/util/StaxUtil.java
===================================================================
--- product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/util/StaxUtil.java 2011-07-25 19:33:16 UTC (rev 1125)
+++ product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/util/StaxUtil.java 2011-07-25 19:48:44 UTC (rev 1126)
@@ -373,6 +373,10 @@
// writeNameSpace(writer, domElementPrefix, domElementNS );
registeredNSStack.get().push(domElementNS);
}
+ else if (domElementPrefix == "" && domElementNS != null)
+ {
+ writeNameSpace(writer, "xmlns", domElementNS);
+ }
// Deal with Attributes
NamedNodeMap attrs = domElement.getAttributes();
@@ -385,12 +389,8 @@
if (attributePrefix == null || attributePrefix.length() == 0)
{
- if ("xmlns".equals(attribLocalName))
+ if (!("xmlns".equals(attribLocalName)))
{
- writeDefaultNameSpace(writer, attribValue);
- }
- else
- {
writeAttribute(writer, attribLocalName, attribValue);
}
}
Modified: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/util/TransformerUtil.java
===================================================================
--- product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/util/TransformerUtil.java 2011-07-25 19:33:16 UTC (rev 1125)
+++ product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/util/TransformerUtil.java 2011-07-25 19:48:44 UTC (rev 1126)
@@ -54,7 +54,9 @@
import org.apache.log4j.Logger;
import org.picketlink.identity.federation.core.exceptions.ConfigurationException;
import org.picketlink.identity.federation.core.exceptions.ParsingException;
+import org.picketlink.identity.federation.core.exceptions.ProcessingException;
import org.picketlink.identity.federation.core.parsers.util.StaxParserUtil;
+import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -226,7 +228,7 @@
}
}
}
- catch (ParsingException e)
+ catch (Exception e)
{
throw new TransformerException(e);
}
@@ -293,7 +295,7 @@
}
private Element handleStartElement(XMLEventReader xmlEventReader, StartElement startElement, CustomHolder holder)
- throws ParsingException
+ throws ParsingException, ProcessingException
{
Document doc = holder.doc;
@@ -303,8 +305,15 @@
String localPart = elementName.getLocalPart();
String qual = prefix != null && prefix != "" ? prefix + ":" + localPart : localPart;
+
Element el = doc.createElementNS(ns, qual);
+ String containsBaseNamespace = containsBaseNamespace(startElement);
+ if (StringUtil.isNotNull(containsBaseNamespace))
+ {
+ el = DocumentUtil.createDocumentWithBaseNamespace(containsBaseNamespace, localPart).getDocumentElement();
+ el = (Element) doc.importNode(el, true);
+ }
if (StringUtil.isNotNull(prefix))
{
el.setPrefix(prefix);
@@ -342,11 +351,17 @@
if (prefix != null && prefix != "")
qual = (localPart != null && localPart != "") ? prefix + ":" + localPart : prefix;
+ if (qual.equals("xmlns"))
+ continue;
if (trace)
{
- log.trace("Set Attribute Namespace=" + name.getNamespaceURI() + ":" + qual);
+ log.trace("Set Attribute Namespace=" + name.getNamespaceURI() + "::Qual=:" + qual + "::Value="
+ + namespace.getNamespaceURI());
}
- el.setAttributeNS(name.getNamespaceURI(), qual, namespace.getNamespaceURI());
+ if (qual != null && qual.startsWith("xmlns"))
+ {
+ el.setAttributeNS(name.getNamespaceURI(), qual, namespace.getNamespaceURI());
+ }
}
XMLEvent nextEvent = StaxParserUtil.peek(xmlEventReader);
@@ -383,6 +398,27 @@
return el;
}
+ @SuppressWarnings("unchecked")
+ private String containsBaseNamespace(StartElement startElement)
+ {
+ String localPart, prefix, qual = null;
+
+ Iterator<Namespace> namespaces = startElement.getNamespaces();
+ while (namespaces != null && namespaces.hasNext())
+ {
+ Namespace namespace = namespaces.next();
+ QName name = namespace.getName();
+ localPart = name.getLocalPart();
+ prefix = name.getPrefix();
+ if (prefix != null && prefix != "")
+ qual = (localPart != null && localPart != "") ? prefix + ":" + localPart : prefix;
+
+ if (qual != null && qual.equals("xmlns"))
+ return namespace.getNamespaceURI();
+ }
+ return null;
+ }
+
private class CustomHolder
{
public Document doc;
Property changes on: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml
___________________________________________________________________
Added: svn:mergeinfo
+ /federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml:1098-1110
Modified: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml/SAML20TokenProvider.java
===================================================================
--- product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml/SAML20TokenProvider.java 2011-07-25 19:33:16 UTC (rev 1125)
+++ product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml/SAML20TokenProvider.java 2011-07-25 19:48:44 UTC (rev 1126)
@@ -33,6 +33,7 @@
import org.picketlink.identity.federation.core.saml.v2.constants.JBossSAMLConstants;
import org.picketlink.identity.federation.core.saml.v2.factories.SAMLAssertionFactory;
import org.picketlink.identity.federation.core.saml.v2.util.AssertionUtil;
+import org.picketlink.identity.federation.core.saml.v2.util.DocumentUtil;
import org.picketlink.identity.federation.core.saml.v2.util.StatementUtil;
import org.picketlink.identity.federation.core.sts.AbstractSecurityTokenProvider;
import org.picketlink.identity.federation.core.wstrust.SecurityToken;
@@ -67,6 +68,8 @@
{
protected static Logger logger = Logger.getLogger(SAML20TokenProvider.class);
+ protected boolean trace = logger.isTraceEnabled();
+
private SAML20TokenAttributeProvider attributeProvider;
/*
@@ -340,6 +343,10 @@
{
try
{
+ if (trace)
+ {
+ logger.trace("Assertion Element=" + DocumentUtil.getNodeAsString(assertionElement));
+ }
assertion = SAMLUtil.fromElement(assertionElement);
}
catch (Exception e)
Modified: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml/SAMLUtil.java
===================================================================
--- product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml/SAMLUtil.java 2011-07-25 19:33:16 UTC (rev 1125)
+++ product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/wstrust/plugins/saml/SAMLUtil.java 2011-07-25 19:48:44 UTC (rev 1126)
@@ -25,6 +25,7 @@
import java.io.ByteArrayOutputStream;
import java.security.GeneralSecurityException;
+import org.apache.log4j.Logger;
import org.picketlink.identity.federation.core.exceptions.ConfigurationException;
import org.picketlink.identity.federation.core.exceptions.ParsingException;
import org.picketlink.identity.federation.core.exceptions.ProcessingException;
@@ -48,7 +49,10 @@
*/
public class SAMLUtil
{
+ protected static Logger log = Logger.getLogger(SAMLUtil.class);
+ protected static boolean trace = log.isTraceEnabled();
+
public static final String SAML11_BEARER_URI = "urn:oasis:names:tc:SAML:1.0:cm:bearer";
public static final String SAML11_HOLDER_OF_KEY_URI = "urn:oasis:names:tc:SAML:1.0:cm:holder-of-key";
@@ -89,6 +93,11 @@
ByteArrayInputStream bis = new ByteArrayInputStream(baos.toByteArray());
Document document = DocumentUtil.getDocument(bis);
+ if (trace)
+ {
+ log.trace("Written Assertion=" + DocumentUtil.asString(document));
+ }
+
return document.getDocumentElement();
}
Property changes on: product/trunk/picketlink-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml
___________________________________________________________________
Added: svn:mergeinfo
+ /federation/trunk/picketlink-fed-core/src/test/java/org/picketlink/test/identity/federation/core/parser/saml:1098-1110
13 years, 5 months
Picketlink SVN: r1125 - product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-07-25 15:33:16 -0400 (Mon, 25 Jul 2011)
New Revision: 1125
Modified:
product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLAssertionWriter.java
product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLRequestWriter.java
product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLResponseWriter.java
Log:
merge in r1109
Modified: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLAssertionWriter.java
===================================================================
--- product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLAssertionWriter.java 2011-07-25 19:24:06 UTC (rev 1124)
+++ product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLAssertionWriter.java 2011-07-25 19:33:16 UTC (rev 1125)
@@ -90,7 +90,7 @@
NameIDType issuer = assertion.getIssuer();
if (issuer != null)
- write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get()));
+ write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX));
Element sig = assertion.getSignature();
if (sig != null)
Property changes on: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLAssertionWriter.java
___________________________________________________________________
Added: svn:mergeinfo
+ /federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLAssertionWriter.java:1095-1109
Modified: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLRequestWriter.java
===================================================================
--- product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLRequestWriter.java 2011-07-25 19:24:06 UTC (rev 1124)
+++ product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLRequestWriter.java 2011-07-25 19:33:16 UTC (rev 1125)
@@ -138,7 +138,7 @@
NameIDType issuer = request.getIssuer();
if (issuer != null)
{
- write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get()));
+ write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX));
}
Element sig = request.getSignature();
@@ -186,7 +186,7 @@
StaxUtil.writeAttribute(writer, JBossSAMLConstants.CONSENT.get(), consent);
NameIDType issuer = logOutRequest.getIssuer();
- write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get()));
+ write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX));
NameIDType nameID = logOutRequest.getNameID();
if (nameID != null)
@@ -254,7 +254,7 @@
NameIDType issuer = request.getIssuer();
if (issuer != null)
{
- write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get()));
+ write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX));
}
Element sig = request.getSignature();
if (sig != null)
@@ -296,7 +296,7 @@
NameIDType issuer = request.getIssuer();
if (issuer != null)
{
- write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get()));
+ write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX));
}
Element sig = request.getSignature();
if (sig != null)
@@ -355,7 +355,7 @@
NameIDType issuer = xacmlQuery.getIssuer();
if (issuer != null)
{
- write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get()));
+ write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX));
}
RequestType xacmlRequest = xacmlQuery.getRequest();
Property changes on: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLRequestWriter.java
___________________________________________________________________
Added: svn:mergeinfo
+ /federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLRequestWriter.java:1098-1109
Modified: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLResponseWriter.java
===================================================================
--- product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLResponseWriter.java 2011-07-25 19:24:06 UTC (rev 1124)
+++ product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLResponseWriter.java 2011-07-25 19:33:16 UTC (rev 1125)
@@ -74,14 +74,14 @@
StaxUtil.writeNameSpace(writer, PROTOCOL_PREFIX, PROTOCOL_NSURI.get());
StaxUtil.writeNameSpace(writer, ASSERTION_PREFIX, ASSERTION_NSURI.get());
- StaxUtil.writeDefaultNameSpace(writer, ASSERTION_NSURI.get());
+ //StaxUtil.writeDefaultNameSpace(writer, ASSERTION_NSURI.get());
writeBaseAttributes(response);
NameIDType issuer = response.getIssuer();
if (issuer != null)
{
- write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get()));
+ write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX));
}
Element sig = response.getSignature();
@@ -130,7 +130,7 @@
NameIDType issuer = response.getIssuer();
if (issuer != null)
{
- write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get()));
+ write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX));
}
Element sig = response.getSignature();
@@ -186,7 +186,7 @@
writeBaseAttributes(response);
NameIDType issuer = response.getIssuer();
- write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get()));
+ write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX));
StatusType status = response.getStatus();
write(status);
Property changes on: product/trunk/picketlink-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLResponseWriter.java
___________________________________________________________________
Added: svn:mergeinfo
+ /federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/saml/v2/writers/SAMLResponseWriter.java:1098-1109
13 years, 5 months
Picketlink SVN: r1123 - in product/trunk: picketlink-core and 1 other directory.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-07-25 15:06:43 -0400 (Mon, 25 Jul 2011)
New Revision: 1123
Modified:
product/trunk/parent/pom.xml
product/trunk/picketlink-core/pom.xml
Log:
PLINK-47: PLINK-48: fix mvn deps
Modified: product/trunk/parent/pom.xml
===================================================================
--- product/trunk/parent/pom.xml 2011-07-25 15:03:43 UTC (rev 1122)
+++ product/trunk/parent/pom.xml 2011-07-25 19:06:43 UTC (rev 1123)
@@ -106,7 +106,7 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>apache-log4j</groupId>
+ <groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<optional>true</optional>
@@ -118,7 +118,7 @@
<optional>true</optional>
</dependency>
<dependency>
- <groupId>apache-logging</groupId>
+ <groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>1.0.3</version>
<optional>true</optional>
Modified: product/trunk/picketlink-core/pom.xml
===================================================================
--- product/trunk/picketlink-core/pom.xml 2011-07-25 15:03:43 UTC (rev 1122)
+++ product/trunk/picketlink-core/pom.xml 2011-07-25 19:06:43 UTC (rev 1123)
@@ -53,7 +53,7 @@
<version>2.1.0.GA</version>
</dependency>
<dependency>
- <groupId>apache-log4j</groupId>
+ <groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
@@ -61,7 +61,7 @@
<artifactId>xmlsec</artifactId>
</dependency>
<dependency>
- <groupId>apache-logging</groupId>
+ <groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
</dependency>
<dependency>
13 years, 5 months
Picketlink SVN: r1122 - federation/trunk/picketlink-bindings-jboss.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-07-25 11:03:43 -0400 (Mon, 25 Jul 2011)
New Revision: 1122
Modified:
federation/trunk/picketlink-bindings-jboss/pom.xml
Log:
PLINK-48: mvn deps
Modified: federation/trunk/picketlink-bindings-jboss/pom.xml
===================================================================
--- federation/trunk/picketlink-bindings-jboss/pom.xml 2011-07-25 14:59:33 UTC (rev 1121)
+++ federation/trunk/picketlink-bindings-jboss/pom.xml 2011-07-25 15:03:43 UTC (rev 1122)
@@ -87,19 +87,18 @@
<artifactId>trove</artifactId>
</exclusion>
</exclusions>
-
</dependency>
<dependency>
+ <groupId>trove</groupId>
+ <artifactId>trove</artifactId>
+ <version>1.0.2</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jacc-api</artifactId>
- <version>1.1.0.GA</version>
- <scope>provided</scope>
- </dependency>
</dependencies>
<reporting>
13 years, 5 months
Picketlink SVN: r1121 - federation/trunk/picketlink-bindings.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-07-25 10:59:33 -0400 (Mon, 25 Jul 2011)
New Revision: 1121
Modified:
federation/trunk/picketlink-bindings/pom.xml
Log:
PLINK-48: mvn deps
Modified: federation/trunk/picketlink-bindings/pom.xml
===================================================================
--- federation/trunk/picketlink-bindings/pom.xml 2011-07-25 14:55:56 UTC (rev 1120)
+++ federation/trunk/picketlink-bindings/pom.xml 2011-07-25 14:59:33 UTC (rev 1121)
@@ -124,6 +124,17 @@
<optional>true</optional>
</dependency>
<dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbossxacml</artifactId>
+ <version>2.0.4</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>catalina</artifactId>
<version>6.0.18</version>
@@ -131,6 +142,12 @@
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
+ <artifactId>juli</artifactId>
+ <version>6.0.18</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
<artifactId>coyote</artifactId>
<version>6.0.18</version>
<scope>test</scope>
13 years, 5 months
Picketlink SVN: r1120 - federation/trunk/picketlink-web.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-07-25 10:55:56 -0400 (Mon, 25 Jul 2011)
New Revision: 1120
Modified:
federation/trunk/picketlink-web/pom.xml
Log:
PLINK-48: mvn deps
Modified: federation/trunk/picketlink-web/pom.xml
===================================================================
--- federation/trunk/picketlink-web/pom.xml 2011-07-25 14:53:22 UTC (rev 1119)
+++ federation/trunk/picketlink-web/pom.xml 2011-07-25 14:55:56 UTC (rev 1120)
@@ -126,10 +126,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.openid4java</groupId>
- <artifactId>openid4java-nodeps</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache</groupId>
<artifactId>xmlsec</artifactId>
</dependency>
13 years, 5 months
Picketlink SVN: r1119 - federation/trunk/picketlink-web.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-07-25 10:53:22 -0400 (Mon, 25 Jul 2011)
New Revision: 1119
Modified:
federation/trunk/picketlink-web/pom.xml
Log:
PLINK-48: mvn deps
Modified: federation/trunk/picketlink-web/pom.xml
===================================================================
--- federation/trunk/picketlink-web/pom.xml 2011-07-25 14:50:08 UTC (rev 1118)
+++ federation/trunk/picketlink-web/pom.xml 2011-07-25 14:53:22 UTC (rev 1119)
@@ -153,12 +153,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>jasper</artifactId>
- <version>6.0.29</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
@@ -175,6 +169,12 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>1.3.04</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<reporting>
13 years, 5 months
Picketlink SVN: r1118 - federation/trunk/picketlink-web.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2011-07-25 10:50:08 -0400 (Mon, 25 Jul 2011)
New Revision: 1118
Modified:
federation/trunk/picketlink-web/pom.xml
Log:
PLINK-48: mvn deps
Modified: federation/trunk/picketlink-web/pom.xml
===================================================================
--- federation/trunk/picketlink-web/pom.xml 2011-07-25 14:48:50 UTC (rev 1117)
+++ federation/trunk/picketlink-web/pom.xml 2011-07-25 14:50:08 UTC (rev 1118)
@@ -158,20 +158,7 @@
<version>6.0.29</version>
<scope>test</scope>
</dependency>
-
<dependency>
- <groupId>httpunit</groupId>
- <artifactId>httpunit</artifactId>
- <version>1.5.4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>nekohtml</groupId>
- <artifactId>nekohtml</artifactId>
- <version>1.9.12</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
13 years, 5 months