Picketlink SVN: r1378 - product/branches/Branch_6_plus/picketlink-core.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2012-02-07 17:37:18 -0500 (Tue, 07 Feb 2012)
New Revision: 1378
Modified:
product/branches/Branch_6_plus/picketlink-core/pom.xml
Log:
change to use JBossWeb version in AS71
Modified: product/branches/Branch_6_plus/picketlink-core/pom.xml
===================================================================
--- product/branches/Branch_6_plus/picketlink-core/pom.xml 2012-02-07 21:18:40 UTC (rev 1377)
+++ product/branches/Branch_6_plus/picketlink-core/pom.xml 2012-02-07 22:37:18 UTC (rev 1378)
@@ -102,18 +102,12 @@
<version>1.0.0.Final</version>
</dependency>
<dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>catalina</artifactId>
- <version>6.0.18</version>
+ <groupId>org.jboss.web</groupId>
+ <artifactId>jbossweb</artifactId>
+ <version>7.0.10.Final</version>
<optional>true</optional>
</dependency>
<dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>coyote</artifactId>
- <version>6.0.18</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
12 years, 10 months
Picketlink SVN: r1377 - product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2012-02-07 16:18:40 -0500 (Tue, 07 Feb 2012)
New Revision: 1377
Modified:
product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java
Log:
local validation fixup
Modified: product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java
===================================================================
--- product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java 2012-02-06 22:37:11 UTC (rev 1376)
+++ product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/bindings/jboss/auth/SAML2STSLoginModule.java 2012-02-07 21:18:40 UTC (rev 1377)
@@ -44,6 +44,7 @@
import javax.xml.ws.Dispatch;
import org.apache.log4j.Logger;
+import org.jboss.security.JSSESecurityDomain;
import org.jboss.security.SecurityConstants;
import org.jboss.security.SimplePrincipal;
import org.jboss.security.auth.callback.ObjectCallback;
@@ -527,27 +528,27 @@
//For unit tests
if (localTestingOnly)
return true;
- throw new RuntimeException(ErrorCodes.NOT_IMPLEMENTED_YET);
- /*
+
try
{
Context ctx = new InitialContext();
- JaasSecurityDomain sd = (JaasSecurityDomain) ctx.lookup(localValidationSecurityDomain);
+ JSSESecurityDomain sd = (JSSESecurityDomain) ctx.lookup(localValidationSecurityDomain + "/jsse");
KeyStore ts = sd.getTrustStore();
if (ts == null)
{
- throw new LoginException(ErrorCodes.NULL_VALUE + "SAML2STSLoginModule: null truststore for " + sd.getName());
+ throw new LoginException(ErrorCodes.NULL_VALUE + "SAML2STSLoginModule: null truststore for " + localValidationSecurityDomain);
}
- String alias = sd.getKeyStoreAlias();
+ String alias = sd.getServerAlias();
if (alias == null)
{
throw new LoginException(ErrorCodes.NULL_VALUE + "SAML2STSLoginModule: null KeyStoreAlias for "
- + sd.getName() + "; set 'KeyStoreAlias' in '" + sd.getName() + "' security domain configuration");
+ + localValidationSecurityDomain + "; set 'KeyStoreAlias' in '" + localValidationSecurityDomain
+ + "' security domain configuration");
}
Certificate cert = ts.getCertificate(alias);
@@ -555,7 +556,7 @@
if (cert == null)
{
throw new LoginException(ErrorCodes.NULL_VALUE + "SAML2STSLoginModule: no certificate found for alias '"
- + alias + "' in the '" + sd.getName() + "' security domain");
+ + alias + "' in the '" + localValidationSecurityDomain + "' security domain");
}
PublicKey publicKey = cert.getPublicKey();
@@ -579,6 +580,6 @@
{
throw new LoginException(e.toString());
}
- return true;*/
+ return true;
}
}
\ No newline at end of file
12 years, 10 months
Picketlink SVN: r1376 - idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper.
by picketlink-commits@lists.jboss.org
Author: mposolda
Date: 2012-02-06 17:37:11 -0500 (Mon, 06 Feb 2012)
New Revision: 1376
Modified:
idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper/Tools.java
Log:
JBEPP-980 little improvement to compile regex Pattern only once
Modified: idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper/Tools.java
===================================================================
--- idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper/Tools.java 2012-02-06 22:27:39 UTC (rev 1375)
+++ idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper/Tools.java 2012-02-06 22:37:11 UTC (rev 1376)
@@ -42,7 +42,7 @@
*/
public class Tools
{
- private static final String DN_REGEX = "([^=,\\\\]*(\\\\.)?)+";
+ private static final Pattern DN_PATTERN = Pattern.compile("([^=,\\\\]*(\\\\.)?)+");
private static Logger log = Logger.getLogger(Tools.class.getName());
@@ -307,8 +307,7 @@
StringBuilder result = new StringBuilder();
int last = 0;
- Pattern pattern = Pattern.compile(DN_REGEX);
- Matcher m = pattern.matcher(inputlc);
+ Matcher m = DN_PATTERN.matcher(inputlc);
while (m.find())
{
if (m.group().length() == 0)
12 years, 10 months
Picketlink SVN: r1375 - idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper.
by picketlink-commits@lists.jboss.org
Author: mposolda
Date: 2012-02-06 17:27:39 -0500 (Mon, 06 Feb 2012)
New Revision: 1375
Modified:
idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper/Tools.java
Log:
JBEPP-980 fix javadoc
Modified: idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper/Tools.java
===================================================================
--- idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper/Tools.java 2012-02-06 22:13:05 UTC (rev 1374)
+++ idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper/Tools.java 2012-02-06 22:27:39 UTC (rev 1375)
@@ -291,11 +291,11 @@
/**
* Format whitespaces in DN records path. It won't affect whitespaces inside some record, but it will affect
- * whitespaces at the beginning or at the end of single path argument.
+ * whitespaces at the beginning or at the end of single path argument. It also lowercase all letters.
*
* Examples:
- * input="uid=root, ou=Organization, o=gatein,dc=example,dc=com " , output="uid=root,ou=Organization,o=gatein,dc=example,dc=com"
- * input="uid=root, ou=My Big Organization Unit,o=gatein org,dc= example ,dc=com " , output="uid=root,ou=My Big Organization Unit,o=gatein org,dc=example,dc=com"
+ * input="uid=root, ou=Organization, o=gatein,dc=example,dc=com " , output="uid=root,ou=organization,o=gatein,dc=example,dc=com"
+ * input="uid=root, ou=My Big Organization Unit,o=gatein org,dc= example ,dc=com " , output="uid=root,ou=my big organization unit,o=gatein org,dc=example,dc=com"
*
* @param inputDn
* @return formatted inputDn
12 years, 10 months
Picketlink SVN: r1374 - in idm/trunk: picketlink-idm-core/src/test/java/org/picketlink/idm/impl and 2 other directories.
by picketlink-commits@lists.jboss.org
Author: mposolda
Date: 2012-02-06 17:13:05 -0500 (Mon, 06 Feb 2012)
New Revision: 1374
Added:
idm/trunk/picketlink-idm-core/src/test/java/org/picketlink/idm/impl/helper/
idm/trunk/picketlink-idm-core/src/test/java/org/picketlink/idm/impl/helper/ToolsTestCase.java
Modified:
idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper/Tools.java
idm/trunk/picketlink-idm-ldap/src/main/java/org/picketlink/idm/impl/store/ldap/LDAPIdentityStoreImpl.java
Log:
JBEPP-980 Possibility to compare DN with whitespaces
Modified: idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper/Tools.java
===================================================================
--- idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper/Tools.java 2012-02-03 21:35:33 UTC (rev 1373)
+++ idm/trunk/picketlink-idm-core/src/main/java/org/picketlink/idm/impl/helper/Tools.java 2012-02-06 22:13:05 UTC (rev 1374)
@@ -33,6 +33,8 @@
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
/**
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw Dawidowicz</a>
@@ -40,7 +42,10 @@
*/
public class Tools
{
+ private static final String DN_REGEX = "([^=,\\\\]*(\\\\.)?)+";
+ private static Logger log = Logger.getLogger(Tools.class.getName());
+
private static MBeanServer instance = null;
public static <E> List<E> toList(Enumeration<E> e)
@@ -258,5 +263,74 @@
throw new IllegalStateException("No 'jboss' MBeanServer found!");
}
+ /**
+ * @param dn1
+ * @param dn2
+ * @return true if first DN ends with second Ldap DN. It will ignore whitespaces in the path. See {@link #dnFormatWhitespaces}
+ */
+ public static boolean dnEndsWith(String dn1, String dn2)
+ {
+ String dn1Formatted = dnFormatWhitespaces(dn1);
+ String dn2Formatted = dnFormatWhitespaces(dn2);
+ return dn1Formatted.endsWith(dn2Formatted);
+ }
+
+ /**
+ * @param dn1
+ * @param dn2
+ * @return true if first DN equals second Ldap DN. It will ignore whitespaces in the path. See {@link #dnFormatWhitespaces}
+ */
+ public static boolean dnEquals(String dn1, String dn2)
+ {
+ String dn1Formatted = dnFormatWhitespaces(dn1);
+ String dn2Formatted = dnFormatWhitespaces(dn2);
+
+ return dn1Formatted.equals(dn2Formatted);
+ }
+
+ /**
+ * Format whitespaces in DN records path. It won't affect whitespaces inside some record, but it will affect
+ * whitespaces at the beginning or at the end of single path argument.
+ *
+ * Examples:
+ * input="uid=root, ou=Organization, o=gatein,dc=example,dc=com " , output="uid=root,ou=Organization,o=gatein,dc=example,dc=com"
+ * input="uid=root, ou=My Big Organization Unit,o=gatein org,dc= example ,dc=com " , output="uid=root,ou=My Big Organization Unit,o=gatein org,dc=example,dc=com"
+ *
+ * @param inputDn
+ * @return formatted inputDn
+ */
+ public static String dnFormatWhitespaces(String inputDn)
+ {
+ String inputlc = inputDn.toLowerCase();
+
+ StringBuilder result = new StringBuilder();
+ int last = 0;
+
+ Pattern pattern = Pattern.compile(DN_REGEX);
+ Matcher m = pattern.matcher(inputlc);
+ while (m.find())
+ {
+ if (m.group().length() == 0)
+ {
+ continue;
+ }
+
+ last++;
+ if (last > 1)
+ {
+ result.append(last%2 == 0 ? '=' : ',');
+ }
+ result.append(m.group().trim());
+ }
+
+ if (log.isLoggable(Level.FINER))
+ {
+ log.log(Level.FINER, "Input to format=\"" + inputDn + "\", Output from format=\"" + result.toString() + "\"");
+ }
+
+ return result.toString();
+ }
+
+
}
Added: idm/trunk/picketlink-idm-core/src/test/java/org/picketlink/idm/impl/helper/ToolsTestCase.java
===================================================================
--- idm/trunk/picketlink-idm-core/src/test/java/org/picketlink/idm/impl/helper/ToolsTestCase.java (rev 0)
+++ idm/trunk/picketlink-idm-core/src/test/java/org/picketlink/idm/impl/helper/ToolsTestCase.java 2012-02-06 22:13:05 UTC (rev 1374)
@@ -0,0 +1,55 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2012, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.picketlink.idm.impl.helper;
+
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:mposolda@redhat.com">Marek Posolda</a>
+ */
+public class ToolsTestCase extends TestCase
+{
+
+ public void testDnComparison()
+ {
+ String root = "uid=root, ou=Organization, o=gatein,dc=example,dc=com ";
+ String john = "uid=john, ou=My Big Organization Unit,o=gatein org,dc= example ,dc=com ";
+ String mary = "uid=mary,ou=OrganizationUnit,o=gatein,dc=example,dc=com";
+ String organization1 = " ou=Organization,o=gatein, dc=example ,dc=com";
+ String organization2 = "ou=My Big Organization Unit,o=gatein org,dc= example ,dc=com";
+ String organization3 = "uid=mary,ou=OrganizationUnit,o=gatein,dc=example,dc=com";
+
+ String escapeCharsDn = "cn= some\\,\\,thin\\=g , ou= pl\\ at\\.form ,o=gr\\=oup\\=,o=gatein ";
+
+ assertEquals("uid=root,ou=organization,o=gatein,dc=example,dc=com", Tools.dnFormatWhitespaces(root));
+ assertEquals("uid=john,ou=my big organization unit,o=gatein org,dc=example,dc=com", Tools.dnFormatWhitespaces(john));
+ assertEquals("uid=mary,ou=organizationunit,o=gatein,dc=example,dc=com", Tools.dnFormatWhitespaces(mary));
+ assertTrue(Tools.dnEndsWith(root, organization1));
+ assertTrue(Tools.dnEndsWith(john, organization2));
+ assertTrue(Tools.dnEndsWith(mary, organization3));
+ assertFalse(Tools.dnEndsWith(root, organization3));
+
+ assertEquals("cn=some\\,\\,thin\\=g,ou=pl\\ at\\.form,o=gr\\=oup\\=,o=gatein", Tools.dnFormatWhitespaces(escapeCharsDn));
+ }
+
+}
Modified: idm/trunk/picketlink-idm-ldap/src/main/java/org/picketlink/idm/impl/store/ldap/LDAPIdentityStoreImpl.java
===================================================================
--- idm/trunk/picketlink-idm-ldap/src/main/java/org/picketlink/idm/impl/store/ldap/LDAPIdentityStoreImpl.java 2012-02-03 21:35:33 UTC (rev 1373)
+++ idm/trunk/picketlink-idm-ldap/src/main/java/org/picketlink/idm/impl/store/ldap/LDAPIdentityStoreImpl.java 2012-02-06 22:13:05 UTC (rev 1374)
@@ -22,7 +22,6 @@
package org.picketlink.idm.impl.store.ldap;
-import org.picketlink.idm.api.cfg.IdentityConfigurationRegistry;
import org.picketlink.idm.common.exception.IdentityException;
import org.picketlink.idm.impl.NotYetImplementedException;
import org.picketlink.idm.impl.api.SimpleAttribute;
@@ -54,7 +53,6 @@
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -811,7 +809,7 @@
for (String typeCtx : typeCtxs)
{
- if (dn.toLowerCase().endsWith(typeCtx.toLowerCase()))
+ if (Tools.dnEndsWith(dn, typeCtx))
{
matches.add(possibleType);
break;
@@ -833,7 +831,7 @@
for (IdentityObjectType match : matches)
{
LDAPIdentityObjectImpl entry = (LDAPIdentityObjectImpl)this.findIdentityObject(ctx, name, match);
- if (entry != null && entry.getDn().equalsIgnoreCase(dn))
+ if (entry != null && Tools.dnEquals(entry.getDn(), dn))
{
type = match;
break;
@@ -2297,8 +2295,8 @@
{
String memberRef = memberValues.nextElement().toString();
- if ((fromTypeConfig.isParentMembershipAttributeDN() && memberRef.equals(ldapToIO.getDn())) ||
- (!fromTypeConfig.isParentMembershipAttributeDN() && memberRef.equals(ldapToIO.getName())))
+ if ((fromTypeConfig.isParentMembershipAttributeDN() && Tools.dnEquals(memberRef, ldapToIO.getDn())) ||
+ (!fromTypeConfig.isParentMembershipAttributeDN() && Tools.dnEquals(memberRef, ldapToIO.getName())))
{
//TODO: impl lacks support for rel type
relationships.add(new LDAPIdentityObjectRelationshipImpl(MEMBERSHIP_TYPE, ldapFromIO, ldapToIO));
@@ -2317,8 +2315,8 @@
{
String memberRef = memberValues.nextElement().toString();
- if ((toTypeConfig.isChildMembershipAttributeDN() && memberRef.equals(ldapFromIO.getDn())) ||
- (!toTypeConfig.isChildMembershipAttributeDN() && memberRef.equals(ldapFromIO.getName())))
+ if ((toTypeConfig.isChildMembershipAttributeDN() && Tools.dnEquals(memberRef, ldapToIO.getDn())) ||
+ (!toTypeConfig.isChildMembershipAttributeDN() && Tools.dnEquals(memberRef, ldapToIO.getName())))
{
//TODO: impl lacks support for rel type
relationships.add(new LDAPIdentityObjectRelationshipImpl(MEMBERSHIP_TYPE, ldapFromIO, ldapToIO));
12 years, 10 months
Picketlink SVN: r1373 - in product/branches/Branch_6_plus: parent and 5 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2012-02-03 16:35:33 -0500 (Fri, 03 Feb 2012)
New Revision: 1373
Modified:
product/branches/Branch_6_plus/parent/pom.xml
product/branches/Branch_6_plus/picketlink-core/pom.xml
product/branches/Branch_6_plus/picketlink-webapps/idp/pom.xml
product/branches/Branch_6_plus/picketlink-webapps/pdp/pom.xml
product/branches/Branch_6_plus/picketlink-webapps/picketlink-sts/pom.xml
product/branches/Branch_6_plus/picketlink-webapps/pom.xml
product/branches/Branch_6_plus/pom.xml
Log:
move to snapshot
Modified: product/branches/Branch_6_plus/parent/pom.xml
===================================================================
--- product/branches/Branch_6_plus/parent/pom.xml 2012-02-03 19:05:45 UTC (rev 1372)
+++ product/branches/Branch_6_plus/parent/pom.xml 2012-02-03 21:35:33 UTC (rev 1373)
@@ -8,7 +8,7 @@
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-fed-parent</artifactId>
<packaging>pom</packaging>
- <version>2.0.3</version>
+ <version>2.0.3-SNAPSHOT</version>
<name>PicketLink Federation- Parent</name>
<url>http://labs.jboss.org/portal/picketlink/</url>
<description>PicketLink is a cross-cutting project that handles identity needs for the JEMS projects</description>
@@ -23,8 +23,8 @@
<url>http://www.jboss.org</url>
</organization>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/picketlink/product/tags/2.0.3</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/picketlink/product/tags/2.0.3</developerConnection>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/picketlink/product/tags/2.0.3-SNAP...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/picketlink/product/tags/2.0.3-SNAPSHOT</developerConnection>
</scm>
<build>
@@ -102,7 +102,7 @@
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
- <version>2.0.3</version>
+ <version>2.0.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Modified: product/branches/Branch_6_plus/picketlink-core/pom.xml
===================================================================
--- product/branches/Branch_6_plus/picketlink-core/pom.xml 2012-02-03 19:05:45 UTC (rev 1372)
+++ product/branches/Branch_6_plus/picketlink-core/pom.xml 2012-02-03 21:35:33 UTC (rev 1373)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-fed-parent</artifactId>
- <version>2.0.3</version>
+ <version>2.0.3-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: product/branches/Branch_6_plus/picketlink-webapps/idp/pom.xml
===================================================================
--- product/branches/Branch_6_plus/picketlink-webapps/idp/pom.xml 2012-02-03 19:05:45 UTC (rev 1372)
+++ product/branches/Branch_6_plus/picketlink-webapps/idp/pom.xml 2012-02-03 21:35:33 UTC (rev 1373)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-federation-webapps</artifactId>
- <version>2.0.3</version>
+ <version>2.0.3-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
Modified: product/branches/Branch_6_plus/picketlink-webapps/pdp/pom.xml
===================================================================
--- product/branches/Branch_6_plus/picketlink-webapps/pdp/pom.xml 2012-02-03 19:05:45 UTC (rev 1372)
+++ product/branches/Branch_6_plus/picketlink-webapps/pdp/pom.xml 2012-02-03 21:35:33 UTC (rev 1373)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-federation-webapps</artifactId>
- <version>2.0.3</version>
+ <version>2.0.3-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
Modified: product/branches/Branch_6_plus/picketlink-webapps/picketlink-sts/pom.xml
===================================================================
--- product/branches/Branch_6_plus/picketlink-webapps/picketlink-sts/pom.xml 2012-02-03 19:05:45 UTC (rev 1372)
+++ product/branches/Branch_6_plus/picketlink-webapps/picketlink-sts/pom.xml 2012-02-03 21:35:33 UTC (rev 1373)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-federation-webapps</artifactId>
- <version>2.0.3</version>
+ <version>2.0.3-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
Modified: product/branches/Branch_6_plus/picketlink-webapps/pom.xml
===================================================================
--- product/branches/Branch_6_plus/picketlink-webapps/pom.xml 2012-02-03 19:05:45 UTC (rev 1372)
+++ product/branches/Branch_6_plus/picketlink-webapps/pom.xml 2012-02-03 21:35:33 UTC (rev 1373)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-fed-parent</artifactId>
- <version>2.0.3</version>
+ <version>2.0.3-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: product/branches/Branch_6_plus/pom.xml
===================================================================
--- product/branches/Branch_6_plus/pom.xml 2012-02-03 19:05:45 UTC (rev 1372)
+++ product/branches/Branch_6_plus/pom.xml 2012-02-03 21:35:33 UTC (rev 1373)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-fed-parent</artifactId>
- <version>2.0.3</version>
+ <version>2.0.3-SNAPSHOT</version>
<relativePath>parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
12 years, 10 months
Picketlink SVN: r1372 - product/tags.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2012-02-03 14:05:45 -0500 (Fri, 03 Feb 2012)
New Revision: 1372
Added:
product/tags/picketlink-eap6-2.0.3/
Log:
tag for eap6 builds
12 years, 10 months
Picketlink SVN: r1371 - in product/branches/Branch_6_plus: parent and 5 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2012-02-03 14:04:42 -0500 (Fri, 03 Feb 2012)
New Revision: 1371
Modified:
product/branches/Branch_6_plus/parent/pom.xml
product/branches/Branch_6_plus/picketlink-core/pom.xml
product/branches/Branch_6_plus/picketlink-webapps/idp/pom.xml
product/branches/Branch_6_plus/picketlink-webapps/pdp/pom.xml
product/branches/Branch_6_plus/picketlink-webapps/picketlink-sts/pom.xml
product/branches/Branch_6_plus/picketlink-webapps/pom.xml
product/branches/Branch_6_plus/pom.xml
Log:
tag 2.0.3 for eap6 build
Modified: product/branches/Branch_6_plus/parent/pom.xml
===================================================================
--- product/branches/Branch_6_plus/parent/pom.xml 2012-02-03 19:03:00 UTC (rev 1370)
+++ product/branches/Branch_6_plus/parent/pom.xml 2012-02-03 19:04:42 UTC (rev 1371)
@@ -8,7 +8,7 @@
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-fed-parent</artifactId>
<packaging>pom</packaging>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3</version>
<name>PicketLink Federation- Parent</name>
<url>http://labs.jboss.org/portal/picketlink/</url>
<description>PicketLink is a cross-cutting project that handles identity needs for the JEMS projects</description>
@@ -23,8 +23,8 @@
<url>http://www.jboss.org</url>
</organization>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/picketlink/product/tags/2.0.3-SNAP...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/picketlink/product/tags/2.0.3-SNAPSHOT</developerConnection>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/picketlink/product/tags/2.0.3</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/picketlink/product/tags/2.0.3</developerConnection>
</scm>
<build>
@@ -102,7 +102,7 @@
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Modified: product/branches/Branch_6_plus/picketlink-core/pom.xml
===================================================================
--- product/branches/Branch_6_plus/picketlink-core/pom.xml 2012-02-03 19:03:00 UTC (rev 1370)
+++ product/branches/Branch_6_plus/picketlink-core/pom.xml 2012-02-03 19:04:42 UTC (rev 1371)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-fed-parent</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: product/branches/Branch_6_plus/picketlink-webapps/idp/pom.xml
===================================================================
--- product/branches/Branch_6_plus/picketlink-webapps/idp/pom.xml 2012-02-03 19:03:00 UTC (rev 1370)
+++ product/branches/Branch_6_plus/picketlink-webapps/idp/pom.xml 2012-02-03 19:04:42 UTC (rev 1371)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-federation-webapps</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3</version>
<relativePath>../</relativePath>
</parent>
Modified: product/branches/Branch_6_plus/picketlink-webapps/pdp/pom.xml
===================================================================
--- product/branches/Branch_6_plus/picketlink-webapps/pdp/pom.xml 2012-02-03 19:03:00 UTC (rev 1370)
+++ product/branches/Branch_6_plus/picketlink-webapps/pdp/pom.xml 2012-02-03 19:04:42 UTC (rev 1371)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-federation-webapps</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3</version>
<relativePath>../</relativePath>
</parent>
Modified: product/branches/Branch_6_plus/picketlink-webapps/picketlink-sts/pom.xml
===================================================================
--- product/branches/Branch_6_plus/picketlink-webapps/picketlink-sts/pom.xml 2012-02-03 19:03:00 UTC (rev 1370)
+++ product/branches/Branch_6_plus/picketlink-webapps/picketlink-sts/pom.xml 2012-02-03 19:04:42 UTC (rev 1371)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-federation-webapps</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3</version>
<relativePath>../</relativePath>
</parent>
Modified: product/branches/Branch_6_plus/picketlink-webapps/pom.xml
===================================================================
--- product/branches/Branch_6_plus/picketlink-webapps/pom.xml 2012-02-03 19:03:00 UTC (rev 1370)
+++ product/branches/Branch_6_plus/picketlink-webapps/pom.xml 2012-02-03 19:04:42 UTC (rev 1371)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-fed-parent</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3</version>
<relativePath>../parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: product/branches/Branch_6_plus/pom.xml
===================================================================
--- product/branches/Branch_6_plus/pom.xml 2012-02-03 19:03:00 UTC (rev 1370)
+++ product/branches/Branch_6_plus/pom.xml 2012-02-03 19:04:42 UTC (rev 1371)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.picketlink.product.eap</groupId>
<artifactId>picketlink-fed-parent</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>2.0.3</version>
<relativePath>parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
12 years, 10 months
Picketlink SVN: r1370 - in product/branches/Branch_6_plus: picketlink-core/src/main/java/org/picketlink/identity/federation/web/constants and 4 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2012-02-03 14:03:00 -0500 (Fri, 03 Feb 2012)
New Revision: 1370
Added:
product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/listeners/
product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/listeners/IDPHttpSessionListener.java
Removed:
product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/listeners/IDPHttpSessionListener.java
Modified:
product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/
product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java
product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/
product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java
product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2InResponseToVerificationHandler.java
product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/util/
product/branches/Branch_6_plus/picketlink-webapps/idp/src/main/webapp/WEB-INF/web.xml
Log:
PLFED-249
Property changes on: product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web
___________________________________________________________________
Modified: svn:mergeinfo
- /federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/web:1159-1173,1192-1228
/federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/web:1159-1173,1192-1228
/federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/web:1152-1154,1159-1173,1192-1228
/federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/web:1152-1173,1192-1228
/federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/web:1152-1154,1159-1173
/federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web:1152-1173,1329-1348
+ /federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/web:1159-1173,1192-1228
/federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/web:1159-1173,1192-1228
/federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/web:1152-1154,1159-1173,1192-1228
/federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/web:1152-1173,1192-1228
/federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/web:1152-1154,1159-1173
/federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web:1152-1173,1329-1348,1361-1369
Property changes on: product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java
___________________________________________________________________
Modified: svn:mergeinfo
- /federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java:1159-1173,1192-1228
/federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java:1159-1173,1192-1228
/federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java:1152-1154,1159-1173,1192-1228
/federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java:1152-1173,1192-1228
/federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java:1152-1154,1159-1173
/federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java:1138-1141,1152-1173,1329-1348
+ /federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java:1159-1173,1192-1228
/federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java:1159-1173,1192-1228
/federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java:1152-1154,1159-1173,1192-1228
/federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java:1152-1173,1192-1228
/federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java:1152-1154,1159-1173
/federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/constants/GeneralConstants.java:1138-1141,1152-1173,1329-1348,1361-1369
Property changes on: product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/handlers/saml2
___________________________________________________________________
Modified: svn:mergeinfo
- /federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/web/handlers/saml2:1159-1173,1192-1228
/federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/web/handlers/saml2:1159-1173,1192-1228
/federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/web/handlers/saml2:1152-1154,1159-1173,1192-1228
/federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/web/handlers/saml2:1152-1173,1192-1228
/federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/web/handlers/saml2:1152-1154,1159-1173
/federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/handlers/saml2:1144-1147,1152-1173,1329-1348
+ /federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/web/handlers/saml2:1159-1173,1192-1228
/federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/web/handlers/saml2:1159-1173,1192-1228
/federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/web/handlers/saml2:1152-1154,1159-1173,1192-1228
/federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/web/handlers/saml2:1152-1173,1192-1228
/federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/web/handlers/saml2:1152-1154,1159-1173
/federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/handlers/saml2:1144-1147,1152-1173,1329-1348,1361-1369
Property changes on: product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java
___________________________________________________________________
Modified: svn:mergeinfo
- /federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java:1159-1173,1192-1228
/federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java:1159-1173,1192-1228
/federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java:1152-1154,1159-1173,1192-1228
/federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java:1152-1173,1192-1228
/federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java:1152-1154,1159-1173
/federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java:1144-1147,1152-1173,1295-1298,1329-1348
+ /federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java:1159-1173,1192-1228
/federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java:1159-1173,1192-1228
/federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java:1152-1154,1159-1173,1192-1228
/federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java:1152-1173,1192-1228
/federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java:1152-1154,1159-1173
/federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2AuthenticationHandler.java:1144-1147,1152-1173,1295-1298,1329-1348,1361-1369
Modified: product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2InResponseToVerificationHandler.java
===================================================================
--- product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2InResponseToVerificationHandler.java 2012-02-03 18:20:23 UTC (rev 1369)
+++ product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/handlers/saml2/SAML2InResponseToVerificationHandler.java 2012-02-03 19:03:00 UTC (rev 1370)
@@ -23,6 +23,8 @@
package org.picketlink.identity.federation.web.handlers.saml2;
+import javax.servlet.http.HttpSession;
+
import org.apache.log4j.Logger;
import org.picketlink.identity.federation.core.ErrorCodes;
import org.picketlink.identity.federation.core.exceptions.ProcessingException;
@@ -31,8 +33,6 @@
import org.picketlink.identity.federation.saml.v2.protocol.ResponseType;
import org.picketlink.identity.federation.web.constants.GeneralConstants;
-import javax.servlet.http.HttpSession;
-
/**
* Handler is useful on SP side. It's used for verification that InResponseId from SAML Authentication Response is same
* as ID of previously sent SAML Authentication request
@@ -44,7 +44,7 @@
private static Logger log = Logger.getLogger(SAML2InResponseToVerificationHandler.class);
private final boolean trace = log.isTraceEnabled();
-
+
@Override
public void generateSAMLRequest(SAML2HandlerRequest request, SAML2HandlerResponse response)
throws ProcessingException
@@ -56,7 +56,7 @@
return;
// Determine Id of of request, which is saved into session thanks to SAML2AuthenticationHandler
- String authnRequestId = (String)request.getOptions().get(GeneralConstants.AUTH_REQUEST_ID);
+ String authnRequestId = (String) request.getOptions().get(GeneralConstants.AUTH_REQUEST_ID);
// Save it into session for later use
HttpSession session = BaseSAML2Handler.getHttpSession(request);
@@ -67,15 +67,15 @@
log.trace("ID of authentication request " + authnRequestId + " saved into HTTP session.");
}
}
-
- @Override
+
public void handleRequestType(SAML2HandlerRequest request, SAML2HandlerResponse response) throws ProcessingException
- {
+ {
}
@Override
- public void handleStatusResponseType(SAML2HandlerRequest request, SAML2HandlerResponse response) throws ProcessingException
- {
+ public void handleStatusResponseType(SAML2HandlerRequest request, SAML2HandlerResponse response)
+ throws ProcessingException
+ {
if (request.getSAML2Object() instanceof ResponseType == false)
return;
@@ -85,14 +85,14 @@
// Obtain inResponseTo ID from Authentication response
ResponseType responseType = (ResponseType) request.getSAML2Object();
String inResponseTo = responseType.getInResponseTo();
-
+
// Obtain ID from session, which was saved before sending AuthnRequest
HttpSession session = BaseSAML2Handler.getHttpSession(request);
- String authnRequestId = (String)session.getAttribute(GeneralConstants.AUTH_REQUEST_ID);
-
+ String authnRequestId = (String) session.getAttribute(GeneralConstants.AUTH_REQUEST_ID);
+
// Remove it from session now
session.removeAttribute(GeneralConstants.AUTH_REQUEST_ID);
-
+
// Compare both ID
if (inResponseTo != null && inResponseTo.equals(authnRequestId))
{
@@ -103,7 +103,8 @@
}
else
{
- log.error("Verification of InResponseTo failed. InResponseTo from SAML response is " + inResponseTo + ". Value of request Id from HTTP session is " + authnRequestId);
+ log.error("Verification of InResponseTo failed. InResponseTo from SAML response is " + inResponseTo
+ + ". Value of request Id from HTTP session is " + authnRequestId);
throw new ProcessingException(ErrorCodes.AUTHN_REQUEST_ID_VERIFICATION_FAILED);
}
}
Deleted: product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/listeners/IDPHttpSessionListener.java
===================================================================
--- federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/listeners/IDPHttpSessionListener.java 2012-02-03 18:20:23 UTC (rev 1369)
+++ product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/listeners/IDPHttpSessionListener.java 2012-02-03 19:03:00 UTC (rev 1370)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.picketlink.identity.federation.web.listeners;
-
-import javax.servlet.http.HttpSession;
-import javax.servlet.http.HttpSessionEvent;
-import javax.servlet.http.HttpSessionListener;
-
-import org.apache.log4j.Logger;
-import org.picketlink.identity.federation.core.ErrorCodes;
-import org.picketlink.identity.federation.core.exceptions.ProcessingException;
-import org.picketlink.identity.federation.core.saml.v2.common.SAMLProtocolContext;
-import org.picketlink.identity.federation.core.sts.PicketLinkCoreSTS;
-import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
-import org.picketlink.identity.federation.web.constants.GeneralConstants;
-
-/**
- * An instance of {@link HttpSessionListener} at the IDP
- * that performs actions when an {@link HttpSession} is created or destroyed.
- *
- * @author Anil.Saldhana(a)redhat.com
- * @since Feb 3, 2012
- */
-public class IDPHttpSessionListener implements HttpSessionListener
-{
- private static Logger log = Logger.getLogger(IDPHttpSessionListener.class);
-
- private final boolean trace = log.isTraceEnabled();
-
- public void sessionCreated(HttpSessionEvent se)
- {
- }
-
- public void sessionDestroyed(HttpSessionEvent se)
- {
- HttpSession httpSession = se.getSession();
- if (httpSession == null)
- throw new RuntimeException(ErrorCodes.NULL_ARGUMENT + ":session");
- AssertionType assertion = (AssertionType) httpSession.getAttribute(GeneralConstants.ASSERTION);
-
- //If the user had logged out, then the assertion would not be available in the session.
- //The case when the user closes the browser and does not logout, the session will time out on the
- //server. So we know that the token has not been canceled by the STS.
- if (assertion != null)
- {
- if (trace)
- {
- log.trace("User has closed the browser. So we proceed to cancel the STS issued token.");
- }
- PicketLinkCoreSTS sts = PicketLinkCoreSTS.instance();
- SAMLProtocolContext samlProtocolContext = new SAMLProtocolContext();
- samlProtocolContext.setIssuedAssertion(assertion);
- try
- {
- sts.cancelToken(samlProtocolContext);
- }
- catch (ProcessingException e)
- {
- log.error(ErrorCodes.PROCESSING_EXCEPTION, e);
- }
- httpSession.removeAttribute(GeneralConstants.ASSERTION);
- }
- }
-}
\ No newline at end of file
Copied: product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/listeners/IDPHttpSessionListener.java (from rev 1369, federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/listeners/IDPHttpSessionListener.java)
===================================================================
--- product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/listeners/IDPHttpSessionListener.java (rev 0)
+++ product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/listeners/IDPHttpSessionListener.java 2012-02-03 19:03:00 UTC (rev 1370)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.web.listeners;
+
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
+
+import org.apache.log4j.Logger;
+import org.picketlink.identity.federation.core.ErrorCodes;
+import org.picketlink.identity.federation.core.exceptions.ProcessingException;
+import org.picketlink.identity.federation.core.saml.v2.common.SAMLProtocolContext;
+import org.picketlink.identity.federation.core.sts.PicketLinkCoreSTS;
+import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
+import org.picketlink.identity.federation.web.constants.GeneralConstants;
+
+/**
+ * An instance of {@link HttpSessionListener} at the IDP
+ * that performs actions when an {@link HttpSession} is created or destroyed.
+ *
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Feb 3, 2012
+ */
+public class IDPHttpSessionListener implements HttpSessionListener
+{
+ private static Logger log = Logger.getLogger(IDPHttpSessionListener.class);
+
+ private final boolean trace = log.isTraceEnabled();
+
+ public void sessionCreated(HttpSessionEvent se)
+ {
+ }
+
+ public void sessionDestroyed(HttpSessionEvent se)
+ {
+ HttpSession httpSession = se.getSession();
+ if (httpSession == null)
+ throw new RuntimeException(ErrorCodes.NULL_ARGUMENT + ":session");
+ AssertionType assertion = (AssertionType) httpSession.getAttribute(GeneralConstants.ASSERTION);
+
+ //If the user had logged out, then the assertion would not be available in the session.
+ //The case when the user closes the browser and does not logout, the session will time out on the
+ //server. So we know that the token has not been canceled by the STS.
+ if (assertion != null)
+ {
+ if (trace)
+ {
+ log.trace("User has closed the browser. So we proceed to cancel the STS issued token.");
+ }
+ PicketLinkCoreSTS sts = PicketLinkCoreSTS.instance();
+ SAMLProtocolContext samlProtocolContext = new SAMLProtocolContext();
+ samlProtocolContext.setIssuedAssertion(assertion);
+ try
+ {
+ sts.cancelToken(samlProtocolContext);
+ }
+ catch (ProcessingException e)
+ {
+ log.error(ErrorCodes.PROCESSING_EXCEPTION, e);
+ }
+ httpSession.removeAttribute(GeneralConstants.ASSERTION);
+ }
+ }
+}
\ No newline at end of file
Property changes on: product/branches/Branch_6_plus/picketlink-core/src/main/java/org/picketlink/identity/federation/web/util
___________________________________________________________________
Modified: svn:mergeinfo
- /federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/web/util:1159-1173,1192-1228
/federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/web/util:1159-1173,1192-1228
/federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/web/util:1152-1154,1159-1173,1192-1228
/federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/web/util:1152-1173,1192-1228
/federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/web/util:1152-1154,1159-1173
/federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util:1152-1173,1302-1320,1329-1348
+ /federation/trunk/picketlink-bindings/src/main/java/org/picketlink/identity/federation/web/util:1159-1173,1192-1228
/federation/trunk/picketlink-bindings-jboss/src/main/java/org/picketlink/identity/federation/web/util:1159-1173,1192-1228
/federation/trunk/picketlink-fed-api/src/main/java/org/picketlink/identity/federation/web/util:1152-1154,1159-1173,1192-1228
/federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/web/util:1152-1173,1192-1228
/federation/trunk/picketlink-fed-model/src/main/java/org/picketlink/identity/federation/web/util:1152-1154,1159-1173
/federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/util:1152-1173,1302-1320,1329-1348,1361-1369
Modified: product/branches/Branch_6_plus/picketlink-webapps/idp/src/main/webapp/WEB-INF/web.xml
===================================================================
--- product/branches/Branch_6_plus/picketlink-webapps/idp/src/main/webapp/WEB-INF/web.xml 2012-02-03 18:20:23 UTC (rev 1369)
+++ product/branches/Branch_6_plus/picketlink-webapps/idp/src/main/webapp/WEB-INF/web.xml 2012-02-03 19:03:00 UTC (rev 1370)
@@ -9,6 +9,10 @@
IDP Web Application for the PicketLink project
</description>
+ <listener>
+ <listener-class>org.picketlink.identity.federation.web.listeners.IDPHttpSessionListener</listener-class>
+ </listener>
+
<!-- Define a security constraint that gives unlimted access to images -->
<security-constraint>
<web-resource-collection>
12 years, 10 months
Picketlink SVN: r1369 - in federation/trunk: picketlink-web/src/main/java/org/picketlink/identity/federation/web/listeners and 4 other directories.
by picketlink-commits@lists.jboss.org
Author: anil.saldhana(a)jboss.com
Date: 2012-02-03 13:20:23 -0500 (Fri, 03 Feb 2012)
New Revision: 1369
Added:
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/listeners/
federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/listeners/IDPHttpSessionListener.java
Modified:
federation/trunk/picketlink-webapps/idp-sig-no-val/src/main/webapp/WEB-INF/web.xml
federation/trunk/picketlink-webapps/idp-sig/src/main/webapp/WEB-INF/web.xml
federation/trunk/picketlink-webapps/idp-standalone/src/main/webapp/WEB-INF/web.xml
federation/trunk/picketlink-webapps/idp/src/main/webapp/WEB-INF/web.xml
Log:
PLFED-249: create a IDP http session listener that calls on the sts to expire the token
Added: federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/listeners/IDPHttpSessionListener.java
===================================================================
--- federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/listeners/IDPHttpSessionListener.java (rev 0)
+++ federation/trunk/picketlink-web/src/main/java/org/picketlink/identity/federation/web/listeners/IDPHttpSessionListener.java 2012-02-03 18:20:23 UTC (rev 1369)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.picketlink.identity.federation.web.listeners;
+
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
+
+import org.apache.log4j.Logger;
+import org.picketlink.identity.federation.core.ErrorCodes;
+import org.picketlink.identity.federation.core.exceptions.ProcessingException;
+import org.picketlink.identity.federation.core.saml.v2.common.SAMLProtocolContext;
+import org.picketlink.identity.federation.core.sts.PicketLinkCoreSTS;
+import org.picketlink.identity.federation.saml.v2.assertion.AssertionType;
+import org.picketlink.identity.federation.web.constants.GeneralConstants;
+
+/**
+ * An instance of {@link HttpSessionListener} at the IDP
+ * that performs actions when an {@link HttpSession} is created or destroyed.
+ *
+ * @author Anil.Saldhana(a)redhat.com
+ * @since Feb 3, 2012
+ */
+public class IDPHttpSessionListener implements HttpSessionListener
+{
+ private static Logger log = Logger.getLogger(IDPHttpSessionListener.class);
+
+ private final boolean trace = log.isTraceEnabled();
+
+ public void sessionCreated(HttpSessionEvent se)
+ {
+ }
+
+ public void sessionDestroyed(HttpSessionEvent se)
+ {
+ HttpSession httpSession = se.getSession();
+ if (httpSession == null)
+ throw new RuntimeException(ErrorCodes.NULL_ARGUMENT + ":session");
+ AssertionType assertion = (AssertionType) httpSession.getAttribute(GeneralConstants.ASSERTION);
+
+ //If the user had logged out, then the assertion would not be available in the session.
+ //The case when the user closes the browser and does not logout, the session will time out on the
+ //server. So we know that the token has not been canceled by the STS.
+ if (assertion != null)
+ {
+ if (trace)
+ {
+ log.trace("User has closed the browser. So we proceed to cancel the STS issued token.");
+ }
+ PicketLinkCoreSTS sts = PicketLinkCoreSTS.instance();
+ SAMLProtocolContext samlProtocolContext = new SAMLProtocolContext();
+ samlProtocolContext.setIssuedAssertion(assertion);
+ try
+ {
+ sts.cancelToken(samlProtocolContext);
+ }
+ catch (ProcessingException e)
+ {
+ log.error(ErrorCodes.PROCESSING_EXCEPTION, e);
+ }
+ httpSession.removeAttribute(GeneralConstants.ASSERTION);
+ }
+ }
+}
\ No newline at end of file
Modified: federation/trunk/picketlink-webapps/idp/src/main/webapp/WEB-INF/web.xml
===================================================================
--- federation/trunk/picketlink-webapps/idp/src/main/webapp/WEB-INF/web.xml 2012-02-03 16:47:37 UTC (rev 1368)
+++ federation/trunk/picketlink-webapps/idp/src/main/webapp/WEB-INF/web.xml 2012-02-03 18:20:23 UTC (rev 1369)
@@ -9,6 +9,10 @@
IDP Web Application for the PicketLink project
</description>
+ <listener>
+ <listener-class>org.picketlink.identity.federation.web.listeners.IDPHttpSessionListener</listener-class>
+ </listener>
+
<!-- Define a security constraint that gives unlimted access to images -->
<security-constraint>
<web-resource-collection>
Modified: federation/trunk/picketlink-webapps/idp-sig/src/main/webapp/WEB-INF/web.xml
===================================================================
--- federation/trunk/picketlink-webapps/idp-sig/src/main/webapp/WEB-INF/web.xml 2012-02-03 16:47:37 UTC (rev 1368)
+++ federation/trunk/picketlink-webapps/idp-sig/src/main/webapp/WEB-INF/web.xml 2012-02-03 18:20:23 UTC (rev 1369)
@@ -4,6 +4,11 @@
version="2.5">
<display-name>IDP</display-name>
<description> IDP Web Application for the PicketLink project</description>
+
+ <listener>
+ <listener-class>org.picketlink.identity.federation.web.listeners.IDPHttpSessionListener</listener-class>
+ </listener>
+
<!--
Define a security constraint that gives unlimted access to images
-->
Modified: federation/trunk/picketlink-webapps/idp-sig-no-val/src/main/webapp/WEB-INF/web.xml
===================================================================
--- federation/trunk/picketlink-webapps/idp-sig-no-val/src/main/webapp/WEB-INF/web.xml 2012-02-03 16:47:37 UTC (rev 1368)
+++ federation/trunk/picketlink-webapps/idp-sig-no-val/src/main/webapp/WEB-INF/web.xml 2012-02-03 18:20:23 UTC (rev 1369)
@@ -4,6 +4,11 @@
version="2.5">
<display-name>IDP</display-name>
<description> IDP Web Application for the PicketLink project</description>
+
+ <listener>
+ <listener-class>org.picketlink.identity.federation.web.listeners.IDPHttpSessionListener</listener-class>
+ </listener>
+
<!--
Define a security constraint that gives unlimted access to images
-->
Modified: federation/trunk/picketlink-webapps/idp-standalone/src/main/webapp/WEB-INF/web.xml
===================================================================
--- federation/trunk/picketlink-webapps/idp-standalone/src/main/webapp/WEB-INF/web.xml 2012-02-03 16:47:37 UTC (rev 1368)
+++ federation/trunk/picketlink-webapps/idp-standalone/src/main/webapp/WEB-INF/web.xml 2012-02-03 18:20:23 UTC (rev 1369)
@@ -12,6 +12,10 @@
<!-- Listeners -->
<listener>
<listener-class>org.picketlink.identity.federation.web.core.IdentityServer</listener-class>
+ </listener>
+
+ <listener>
+ <listener-class>org.picketlink.identity.federation.web.listeners.IDPHttpSessionListener</listener-class>
</listener>
12 years, 10 months