[jboss-cvs] JBossAS SVN: r87617 - in projects/security/security-negotiation/trunk: assembly and 20 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Apr 21 06:16:31 EDT 2009
Author: darran.lofthouse at jboss.com
Date: 2009-04-21 06:16:30 -0400 (Tue, 21 Apr 2009)
New Revision: 87617
Added:
projects/security/security-negotiation/trunk/assembly/
projects/security/security-negotiation/trunk/assembly/.project
projects/security/security-negotiation/trunk/assembly/pom.xml
projects/security/security-negotiation/trunk/assembly/src/
projects/security/security-negotiation/trunk/assembly/src/assembly/
projects/security/security-negotiation/trunk/assembly/src/assembly/bin.xml
projects/security/security-negotiation/trunk/assembly/src/assembly/sources.xml
projects/security/security-negotiation/trunk/jboss-negotiation-extras/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/.classpath
projects/security/security-negotiation/trunk/jboss-negotiation-extras/.project
projects/security/security-negotiation/trunk/jboss-negotiation-extras/pom.xml
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/OidNameUtil.java
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/prototype/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/prototype/DecodeAction.java
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/AdvancedLdapLoginModule.java
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/IdentityLoginModule.java
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/resources/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/jboss/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/jboss/security/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/jboss/security/negotiation/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/jboss/security/negotiation/spnego/
Removed:
projects/security/security-negotiation/trunk/assembly/.project
projects/security/security-negotiation/trunk/assembly/pom.xml
projects/security/security-negotiation/trunk/assembly/src/
projects/security/security-negotiation/trunk/assembly/src/assembly/
projects/security/security-negotiation/trunk/assembly/src/assembly/bin.xml
projects/security/security-negotiation/trunk/assembly/src/assembly/sources.xml
projects/security/security-negotiation/trunk/jboss-negotiation-extras/.classpath
projects/security/security-negotiation/trunk/jboss-negotiation-extras/.project
projects/security/security-negotiation/trunk/jboss-negotiation-extras/pom.xml
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/OidNameUtil.java
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/prototype/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/prototype/DecodeAction.java
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/AdvancedLdapLoginModule.java
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/IdentityLoginModule.java
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/resources/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/jboss/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/jboss/security/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/jboss/security/negotiation/
projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/jboss/security/negotiation/spnego/
projects/security/security-negotiation/trunk/jboss-negotiation/
Modified:
projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/.classpath
projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/pom.xml
projects/security/security-negotiation/trunk/parent/pom.xml
projects/security/security-negotiation/trunk/pom.xml
Log:
[SECURITY-411] Change build to use maven assembly to create a JBAS jar.
Copied: projects/security/security-negotiation/trunk/assembly (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/assembly)
Property changes on: projects/security/security-negotiation/trunk/assembly
___________________________________________________________________
Name: svn:ignore
+ target
Deleted: projects/security/security-negotiation/trunk/assembly/.project
===================================================================
--- projects/security/security-negotiation/branches/SECURITY-411/assembly/.project 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/assembly/.project 2009-04-21 10:16:30 UTC (rev 87617)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>assembly</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
Copied: projects/security/security-negotiation/trunk/assembly/.project (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/assembly/.project)
===================================================================
--- projects/security/security-negotiation/trunk/assembly/.project (rev 0)
+++ projects/security/security-negotiation/trunk/assembly/.project 2009-04-21 10:16:30 UTC (rev 87617)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>assembly</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Deleted: projects/security/security-negotiation/trunk/assembly/pom.xml
===================================================================
--- projects/security/security-negotiation/branches/SECURITY-411/assembly/pom.xml 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/assembly/pom.xml 2009-04-21 10:16:30 UTC (rev 87617)
@@ -1,63 +0,0 @@
-<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.jboss.security</groupId>
- <artifactId>jboss-negotiation-project</artifactId>
- <version>2.0.3.GA</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-negotiation</artifactId>
- <packaging>pom</packaging>
- <name>JBoss Negotiation - JBAS Assembly</name>
- <url>http://labs.jboss.org/portal/jbosssecurity/</url>
- <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</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-assembly-plugin</artifactId>
- <version>2.1</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <archive>
- <manifestEntries>
- <Specification-Title>JBoss Security Implementation for the JBAS</Specification-Title>
- <Specification-Version>${project.version}</Specification-Version>
- <Specification-Vendor>Red Hat Middleware LLC</Specification-Vendor>
- <Implementation-Title>JBoss Negotiation Implementation for the JBAS</Implementation-Title>
- <Implementation-Version>${project.version}</Implementation-Version>
- <Implementation-VendorId>org.jboss.security</Implementation-VendorId>
- <Implementation-Vendor>Red Hat Middleware LLC</Implementation-Vendor>
- <Implementation-URL>http://labs.jboss.org/portal/jbosssecurity/</Implementation-URL>
- </manifestEntries>
- </archive>
- <descriptors>
- <descriptor>src/assembly/bin.xml</descriptor>
- <descriptor>src/assembly/sources.xml</descriptor>
- </descriptors>
- </configuration>
- <inherited>false</inherited>
- </plugin>
- </plugins>
- </build>
-
-</project>
\ No newline at end of file
Copied: projects/security/security-negotiation/trunk/assembly/pom.xml (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/assembly/pom.xml)
===================================================================
--- projects/security/security-negotiation/trunk/assembly/pom.xml (rev 0)
+++ projects/security/security-negotiation/trunk/assembly/pom.xml 2009-04-21 10:16:30 UTC (rev 87617)
@@ -0,0 +1,63 @@
+<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.jboss.security</groupId>
+ <artifactId>jboss-negotiation-project</artifactId>
+ <version>2.0.3.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-negotiation</artifactId>
+ <packaging>pom</packaging>
+ <name>JBoss Negotiation - JBAS Assembly</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>JBoss Security is a cross cutting project that handles security for the JEMS projects</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-assembly-plugin</artifactId>
+ <version>2.1</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Specification-Title>JBoss Security Implementation for the JBAS</Specification-Title>
+ <Specification-Version>${project.version}</Specification-Version>
+ <Specification-Vendor>Red Hat Middleware LLC</Specification-Vendor>
+ <Implementation-Title>JBoss Negotiation Implementation for the JBAS</Implementation-Title>
+ <Implementation-Version>${project.version}</Implementation-Version>
+ <Implementation-VendorId>org.jboss.security</Implementation-VendorId>
+ <Implementation-Vendor>Red Hat Middleware LLC</Implementation-Vendor>
+ <Implementation-URL>http://labs.jboss.org/portal/jbosssecurity/</Implementation-URL>
+ </manifestEntries>
+ </archive>
+ <descriptors>
+ <descriptor>src/assembly/bin.xml</descriptor>
+ <descriptor>src/assembly/sources.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <inherited>false</inherited>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
\ No newline at end of file
Copied: projects/security/security-negotiation/trunk/assembly/src (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/assembly/src)
Copied: projects/security/security-negotiation/trunk/assembly/src/assembly (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/assembly/src/assembly)
Deleted: projects/security/security-negotiation/trunk/assembly/src/assembly/bin.xml
===================================================================
--- projects/security/security-negotiation/branches/SECURITY-411/assembly/src/assembly/bin.xml 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/assembly/src/assembly/bin.xml 2009-04-21 10:16:30 UTC (rev 87617)
@@ -1,24 +0,0 @@
-<assembly>
- <formats>
- <format>jar</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>../jboss-negotiation-common/target/classes</directory>
- <outputDirectory>/</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>../jboss-negotiation-extras/target/classes</directory>
- <outputDirectory>/</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>../jboss-negotiation-ntlm/target/classes</directory>
- <outputDirectory>/</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>../jboss-negotiation-spnego/target/classes</directory>
- <outputDirectory>/</outputDirectory>
- </fileSet>
- </fileSets>
-</assembly>
Copied: projects/security/security-negotiation/trunk/assembly/src/assembly/bin.xml (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/assembly/src/assembly/bin.xml)
===================================================================
--- projects/security/security-negotiation/trunk/assembly/src/assembly/bin.xml (rev 0)
+++ projects/security/security-negotiation/trunk/assembly/src/assembly/bin.xml 2009-04-21 10:16:30 UTC (rev 87617)
@@ -0,0 +1,24 @@
+<assembly>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>../jboss-negotiation-common/target/classes</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>../jboss-negotiation-extras/target/classes</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>../jboss-negotiation-ntlm/target/classes</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>../jboss-negotiation-spnego/target/classes</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
Deleted: projects/security/security-negotiation/trunk/assembly/src/assembly/sources.xml
===================================================================
--- projects/security/security-negotiation/branches/SECURITY-411/assembly/src/assembly/sources.xml 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/assembly/src/assembly/sources.xml 2009-04-21 10:16:30 UTC (rev 87617)
@@ -1,25 +0,0 @@
-<assembly>
- <id>sources</id>
- <formats>
- <format>jar</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
- <directory>../jboss-negotiation-common/src/main/java</directory>
- <outputDirectory>/</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>../jboss-negotiation-extras/src/main/java</directory>
- <outputDirectory>/</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>../jboss-negotiation-ntlm/src/main/java</directory>
- <outputDirectory>/</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>../jboss-negotiation-spnego/src/main/java</directory>
- <outputDirectory>/</outputDirectory>
- </fileSet>
- </fileSets>
-</assembly>
Copied: projects/security/security-negotiation/trunk/assembly/src/assembly/sources.xml (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/assembly/src/assembly/sources.xml)
===================================================================
--- projects/security/security-negotiation/trunk/assembly/src/assembly/sources.xml (rev 0)
+++ projects/security/security-negotiation/trunk/assembly/src/assembly/sources.xml 2009-04-21 10:16:30 UTC (rev 87617)
@@ -0,0 +1,25 @@
+<assembly>
+ <id>sources</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>../jboss-negotiation-common/src/main/java</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>../jboss-negotiation-extras/src/main/java</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>../jboss-negotiation-ntlm/src/main/java</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>../jboss-negotiation-spnego/src/main/java</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras)
Property changes on: projects/security/security-negotiation/trunk/jboss-negotiation-extras
___________________________________________________________________
Name: svn:ignore
+ target
.settings
Deleted: projects/security/security-negotiation/trunk/jboss-negotiation-extras/.classpath
===================================================================
--- projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/.classpath 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/.classpath 2009-04-21 10:16:30 UTC (rev 87617)
@@ -1,18 +0,0 @@
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="src" path="src/resources"/>
- <classpathentry kind="src" path="src/tests/java" output="target/test-classes"/>
- <classpathentry kind="output" path="target/classes"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jboss-common/4.2.2.GA/jboss-common-4.2.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jboss-jmx/4.2.2.GA/jboss-jmx-4.2.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jboss-system/4.2.2.GA/jboss-system-4.2.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jbosssx/4.2.2.GA/jbosssx-4.2.2.GA.jar"/>
- <classpathentry kind="src" path="/jboss-negotiation-common"/>
- <classpathentry kind="var" path="M2_REPO/jboss/web/jbossweb/2.1.0.GA/jbossweb-2.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/web/servlet-api/2.1.0.GA/servlet-api-2.1.0.GA.jar"/>
- <classpathentry kind="src" path="/jboss-negotiation-ntlm"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
- <classpathentry kind="src" path="/jboss-negotiation-spnego"/>
-</classpath>
\ No newline at end of file
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/.classpath (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/.classpath)
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-extras/.classpath (rev 0)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/.classpath 2009-04-21 10:16:30 UTC (rev 87617)
@@ -0,0 +1,18 @@
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/resources"/>
+ <classpathentry kind="src" path="src/tests/java" output="target/test-classes"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-common/4.2.2.GA/jboss-common-4.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-jmx/4.2.2.GA/jboss-jmx-4.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-system/4.2.2.GA/jboss-system-4.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jbosssx/4.2.2.GA/jbosssx-4.2.2.GA.jar"/>
+ <classpathentry kind="src" path="/jboss-negotiation-common"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/web/jbossweb/2.1.0.GA/jbossweb-2.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/web/servlet-api/2.1.0.GA/servlet-api-2.1.0.GA.jar"/>
+ <classpathentry kind="src" path="/jboss-negotiation-ntlm"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
+ <classpathentry kind="src" path="/jboss-negotiation-spnego"/>
+</classpath>
\ No newline at end of file
Deleted: projects/security/security-negotiation/trunk/jboss-negotiation-extras/.project
===================================================================
--- projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/.project 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/.project 2009-04-21 10:16:30 UTC (rev 87617)
@@ -1,18 +0,0 @@
-<projectDescription>
- <name>jboss-negotiation-extras</name>
- <comment>JBoss Negotiation Library</comment>
- <projects>
- <project>jboss-negotiation-common</project>
- <project>jboss-negotiation-ntlm</project>
- <project>jboss-negotiation-spnego</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments/>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
\ No newline at end of file
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/.project (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/.project)
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-extras/.project (rev 0)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/.project 2009-04-21 10:16:30 UTC (rev 87617)
@@ -0,0 +1,18 @@
+<projectDescription>
+ <name>jboss-negotiation-extras</name>
+ <comment>JBoss Negotiation Library</comment>
+ <projects>
+ <project>jboss-negotiation-common</project>
+ <project>jboss-negotiation-ntlm</project>
+ <project>jboss-negotiation-spnego</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments/>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Deleted: projects/security/security-negotiation/trunk/jboss-negotiation-extras/pom.xml
===================================================================
--- projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/pom.xml 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/pom.xml 2009-04-21 10:16:30 UTC (rev 87617)
@@ -1,72 +0,0 @@
-<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.jboss.security</groupId>
- <artifactId>jboss-negotiation-project</artifactId>
- <version>2.0.3.GA</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>jboss-negotiation-extras</artifactId>
- <packaging>jar</packaging>
- <name>JBoss Negotiation</name>
- <url>http://www.jboss.org</url>
- <description>JBoss Negotiation Library</description>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <printSummary>true</printSummary>
- <disableXmlReport>false</disableXmlReport>
- <testFailureIgnore>true</testFailureIgnore>
- <includes>
- <include>**/**TestCase.java</include>
- </includes>
- <forkMode>pertest</forkMode>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <!-- Do not add version information here, use ../parent/pom.xml instead -->
- <dependencies>
- <!-- Local Dependencies -->
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-negotiation-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-negotiation-ntlm</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-negotiation-spnego</artifactId>
- </dependency>
-
- <!-- Global dependencies -->
- <dependency>
- <groupId>apache-log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-common</artifactId>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-jmx</artifactId>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jbosssx</artifactId>
- </dependency>
- <dependency>
- <groupId>jboss</groupId>
- <artifactId>jboss-system</artifactId>
- </dependency>
-
-
- </dependencies>
-
-</project>
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/pom.xml (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/pom.xml)
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-extras/pom.xml (rev 0)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/pom.xml 2009-04-21 10:16:30 UTC (rev 87617)
@@ -0,0 +1,72 @@
+<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.jboss.security</groupId>
+ <artifactId>jboss-negotiation-project</artifactId>
+ <version>2.0.3.GA</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jboss-negotiation-extras</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Negotiation</name>
+ <url>http://www.jboss.org</url>
+ <description>JBoss Negotiation Library</description>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <printSummary>true</printSummary>
+ <disableXmlReport>false</disableXmlReport>
+ <testFailureIgnore>true</testFailureIgnore>
+ <includes>
+ <include>**/**TestCase.java</include>
+ </includes>
+ <forkMode>pertest</forkMode>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!-- Do not add version information here, use ../parent/pom.xml instead -->
+ <dependencies>
+ <!-- Local Dependencies -->
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-negotiation-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-negotiation-ntlm</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-negotiation-spnego</artifactId>
+ </dependency>
+
+ <!-- Global dependencies -->
+ <dependency>
+ <groupId>apache-log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-jmx</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jbosssx</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-system</artifactId>
+ </dependency>
+
+
+ </dependencies>
+
+</project>
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src)
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main)
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java)
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org)
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss)
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security)
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation)
Deleted: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
===================================================================
--- projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java 2009-04-21 10:16:30 UTC (rev 87617)
@@ -1,744 +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.jboss.security.negotiation;
-
-import java.security.Principal;
-import java.security.PrivilegedAction;
-import java.security.acl.Group;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.Map.Entry;
-
-import javax.management.ObjectName;
-import javax.naming.Context;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.SearchControls;
-import javax.naming.directory.SearchResult;
-import javax.naming.ldap.InitialLdapContext;
-import javax.naming.ldap.LdapContext;
-import javax.security.auth.Subject;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.login.LoginContext;
-import javax.security.auth.login.LoginException;
-
-import org.jboss.security.SimpleGroup;
-import org.jboss.security.auth.spi.AbstractServerLoginModule;
-import org.jboss.security.negotiation.prototype.DecodeAction;
-
-/**
- * Another LDAP LoginModule to take into account requirements
- * for different authentication mechanisms and full support
- * for password-stacking set to useFirstPass.
- *
- * This is essentially a complete refactoring of the LdapExtLoginModule
- * but with enough restructuring to separate out the three login steps: -
- * -1 Find the user
- * -2 Authenticate as the user
- * -3 Find the users roles
- * Configuration should allow for any of the three actions to be
- * skipped based on the requirements for the environment making
- * use of this login module.
- *
- *
- * @author darran.lofthouse at jboss.com
- * @since 3rd July 2008
- */
-public class AdvancedLdapLoginModule extends AbstractServerLoginModule
-{
-
- /*
- * Configuration Option Constants
- */
-
- // Search Context Settings
- private static final String BIND_AUTHENTICATION = "bindAuthentication";
-
- private static final String BIND_DN = "bindDN";
-
- private static final String BIND_CREDENTIAL = "bindCredential";
-
- private static final String SECURITY_DOMAIN = "jaasSecurityDomain";
-
- // User Search Settings
- private static final String BASE_CTX_DN = "baseCtxDN";
-
- private static final String BASE_FILTER = "baseFilter";
-
- private static final String SEARCH_TIME_LIMIT = "searchTimeLimit";
-
- // Role Search Settings
- private static final String ROLES_CTS_DN = "rolesCtxDN";
-
- private static final String ROLE_FILTER = "roleFilter";
-
- private static final String RECURSE_ROLES = "recurseRoles";
-
- private static final String ROLE_ATTRIBUTE_ID = "roleAttributeID";
-
- private static final String ROLE_ATTRIBUTE_IS_DN = "roleAttributeIsDN";
-
- private static final String ROLE_NAME_ATTRIBUTE_ID = "roleNameAttributeID";
-
- private static final String ROLE_SEARCH_SCOPE = "searchScope";
-
- // Authentication Settings
- private static final String ALLOW_EMPTY_PASSWORD = "allowEmptyPassword";
-
- /*
- * Other Constants
- */
-
- private static final String AUTH_TYPE_GSSAPI = "GSSAPI";
-
- private static final String AUTH_TYPE_SIMPLE = "simple";
-
- private static final String DEFAULT_LDAP_CTX_FACTORY = "com.sun.jndi.ldap.LdapCtxFactory";
-
- private static final String DEFAULT_URL = "ldap://localhost:389";
-
- private static final String DEFAULT_SSL_URL = "ldap://localhost:686";
-
- private static final String PROTOCOL_SSL = "SSL";
-
- private static final String OBJECT_SCOPE = "OBJECT_SCOPE";
-
- private static final String ONELEVEL_SCOPE = "ONELEVEL_SCOPE";
-
- private static final String SUBTREE_SCOPE = "SUBTREE_SCOPE";
-
- /*
- * Configuration Options
- */
- // Search Context Settings
- protected String bindAuthentication;
-
- protected String bindDn;
-
- protected String bindCredential;
-
- protected String jaasSecurityDomain;
-
- // User Search Settings
- protected String baseCtxDN;
-
- protected String baseFilter;
-
- protected int searchTimeLimit = 10000;
-
- protected SearchControls userSearchControls;
-
- // Role Search Settings
- protected String rolesCtxDN;
-
- protected String roleFilter;
-
- protected boolean recurseRoles;
-
- protected SearchControls roleSearchControls;
-
- protected String roleAttributeID;
-
- protected boolean roleAttributeIsDN;
-
- protected String roleNameAttributeID;
-
- // Authentication Settings
- protected boolean allowEmptyPassword;
-
- /*
- * Module State
- */
- /** The login identity */
- private Principal identity;
-
- /** The proof of login identity */
- private char[] credential;
-
- private SimpleGroup userRoles = new SimpleGroup("Roles");
-
- private Set<String> processedRoleDNs = new HashSet<String>();
-
- @Override
- public void initialize(Subject subject, CallbackHandler handler, Map sharedState, Map options)
- {
- super.initialize(subject, handler, sharedState, options);
-
- // Search Context Settings
- bindAuthentication = (String) options.get(BIND_AUTHENTICATION);
- bindDn = (String) options.get(BIND_DN);
- bindCredential = (String) options.get(BIND_CREDENTIAL);
- jaasSecurityDomain = (String) options.get(SECURITY_DOMAIN);
-
- // User Search Settings
- baseCtxDN = (String) options.get(BASE_CTX_DN);
- baseFilter = (String) options.get(BASE_FILTER);
-
- String temp = (String) options.get(SEARCH_TIME_LIMIT);
- if (temp != null)
- {
- try
- {
- searchTimeLimit = Integer.parseInt(temp);
- }
- catch (NumberFormatException e)
- {
- log.warn("Failed to parse: " + temp + ", using searchTimeLimit=" + searchTimeLimit);
- }
- }
-
- userSearchControls = new SearchControls();
- userSearchControls.setSearchScope(SearchControls.SUBTREE_SCOPE);
- userSearchControls.setReturningAttributes(new String[0]);
- userSearchControls.setTimeLimit(searchTimeLimit);
-
- rolesCtxDN = (String) options.get(ROLES_CTS_DN);
- roleFilter = (String) options.get(ROLE_FILTER);
-
- temp = (String) options.get(RECURSE_ROLES);
- recurseRoles = Boolean.parseBoolean(temp);
-
- int searchScope = SearchControls.SUBTREE_SCOPE;
- temp = (String) options.get(ROLE_SEARCH_SCOPE);
- if (OBJECT_SCOPE.equalsIgnoreCase(temp))
- {
- searchScope = SearchControls.OBJECT_SCOPE;
- }
- else if (ONELEVEL_SCOPE.equalsIgnoreCase(temp))
- {
- searchScope = SearchControls.ONELEVEL_SCOPE;
- }
- if (SUBTREE_SCOPE.equalsIgnoreCase(temp))
- {
- searchScope = SearchControls.SUBTREE_SCOPE;
- }
-
- roleSearchControls = new SearchControls();
- roleSearchControls.setSearchScope(searchScope);
- roleSearchControls.setReturningAttributes(new String[0]);
- roleSearchControls.setTimeLimit(searchTimeLimit);
-
- roleAttributeID = (String) options.get(ROLE_ATTRIBUTE_ID);
-
- temp = (String) options.get(ROLE_ATTRIBUTE_IS_DN);
- roleAttributeIsDN = Boolean.parseBoolean(temp);
-
- roleNameAttributeID = (String) options.get(ROLE_NAME_ATTRIBUTE_ID);
-
- temp = (String) options.get(ALLOW_EMPTY_PASSWORD);
- allowEmptyPassword = Boolean.parseBoolean(temp);
-
- }
-
- @Override
- public boolean login() throws LoginException
- {
- Object result = null;
-
- AuthorizeAction action = new AuthorizeAction();
- if (AUTH_TYPE_GSSAPI.equals(bindAuthentication))
- {
- log.trace("Using GSSAPI to connect to LDAP");
- LoginContext lc = new LoginContext(jaasSecurityDomain);
- lc.login();
- Subject serverSubject = lc.getSubject();
-
- if (log.isDebugEnabled())
- {
- log.debug("Subject = " + serverSubject);
- log.debug("Logged in '" + lc + "' LoginContext");
- }
-
- result = Subject.doAs(serverSubject, action);
- lc.logout();
- }
- else
- {
- result = action.run();
- }
-
- if (result instanceof LoginException)
- {
- throw (LoginException) result;
- }
-
- return ((Boolean) result).booleanValue();
- }
-
- @Override
- protected Principal getIdentity()
- {
- return identity;
- }
-
- @Override
- protected Group[] getRoleSets() throws LoginException
- {
- Group[] roleSets =
- {userRoles};
- return roleSets;
- }
-
- protected Boolean innerLogin() throws LoginException
- {
- // Obtain the username and password
- processIdentityAndCredential();
- log.trace("Identity - " + getIdentity().getName());
- // Initialise search ctx
- String bindCredential = this.bindCredential;
- if (AUTH_TYPE_GSSAPI.equals(bindAuthentication) == false)
- {
- if (jaasSecurityDomain != null && jaasSecurityDomain.length() > 0)
- {
- try
- {
- ObjectName serviceName = new ObjectName(jaasSecurityDomain);
- char[] tmp = DecodeAction.decode(bindCredential, serviceName);
- bindCredential = new String(tmp);
- }
- catch (Exception e)
- {
- LoginException le = new LoginException("Unabe to decode bindCredential");
- le.initCause(e);
- throw le;
- }
- }
- }
-
- LdapContext searchContext = null;
-
- try
- {
- searchContext = constructLdapContext(bindDn, bindCredential, bindAuthentication);
- log.debug("Obtained LdapContext");
-
- // Search for user in LDAP
- String userDN = findUserDN(searchContext);
-
- // If authentication required authenticate as user
- if (super.loginOk == false)
- {
- authenticate(userDN);
- }
-
- if (super.loginOk)
- {
- // Search for roles in LDAP
- rolesSearch(searchContext, userDN);
- }
- }
- finally
- {
- if (searchContext != null)
- {
- try
- {
- searchContext.close();
- }
- catch (NamingException e)
- {
- log.warn("Error closing context", e);
- }
- }
- }
-
- return Boolean.valueOf(super.loginOk);
- }
-
- /**
- * Either retrieve existing values based on useFirstPass or use
- * CallBackHandler to obtain the values.
- */
- protected void processIdentityAndCredential() throws LoginException
- {
- if (super.login() == true)
- {
- Object username = sharedState.get("javax.security.auth.login.name");
- if (username instanceof Principal)
- identity = (Principal) username;
- else
- {
- String name = username.toString();
- try
- {
- identity = createIdentity(name);
- }
- catch (Exception e)
- {
- log.debug("Failed to create principal", e);
- throw new LoginException("Failed to create principal: " + e.getMessage());
- }
- }
- // We have no further use for a credential so no need to retrieve it.
- }
- else
- {
- try
- {
- NameCallback nc = new NameCallback("User name: ", "guest");
- PasswordCallback pc = new PasswordCallback("Password: ", false);
- Callback[] callbacks =
- {nc, pc};
-
- callbackHandler.handle(callbacks);
- String username = nc.getName();
- identity = createIdentity(username);
- credential = pc.getPassword();
- pc.clearPassword();
- }
- catch (Exception e)
- {
- LoginException le = new LoginException("Unable to obtain username/credential");
- le.initCause(e);
- throw le;
- }
-
- }
- }
-
- protected LdapContext constructLdapContext(String dn, Object credential, String authentication)
- throws LoginException
- {
- Properties env = new Properties();
- Iterator iter = options.entrySet().iterator();
- while (iter.hasNext())
- {
- Entry entry = (Entry) iter.next();
- env.put(entry.getKey(), entry.getValue());
- }
-
- // Set defaults for key values if they are missing
- String factoryName = env.getProperty(Context.INITIAL_CONTEXT_FACTORY);
- if (factoryName == null)
- {
- factoryName = DEFAULT_LDAP_CTX_FACTORY;
- env.setProperty(Context.INITIAL_CONTEXT_FACTORY, factoryName);
- }
-
- // If this method is called with an authentication type then use that.
- if (authentication != null && authentication.length() > 0)
- {
- env.setProperty(Context.SECURITY_AUTHENTICATION, authentication);
- }
- else
- {
- String authType = env.getProperty(Context.SECURITY_AUTHENTICATION);
- if (authType == null)
- env.setProperty(Context.SECURITY_AUTHENTICATION, AUTH_TYPE_SIMPLE);
- }
-
- String protocol = env.getProperty(Context.SECURITY_PROTOCOL);
- String providerURL = (String) options.get(Context.PROVIDER_URL);
- if (providerURL == null)
- {
- if (PROTOCOL_SSL.equals(protocol))
- {
- providerURL = DEFAULT_SSL_URL;
- }
- else
- {
- providerURL = DEFAULT_URL;
- }
- env.setProperty(Context.PROVIDER_URL, providerURL);
- }
-
- // Assume the caller of this method has checked the requirements for the principal and
- // credentials.
- if (dn != null)
- env.setProperty(Context.SECURITY_PRINCIPAL, dn);
- if (credential != null)
- env.put(Context.SECURITY_CREDENTIALS, credential);
- traceLdapEnv(env);
- try
- {
- return new InitialLdapContext(env, null);
- }
- catch (NamingException e)
- {
- LoginException le = new LoginException("Unable to create new InitialLdapContext");
- le.initCause(e);
- throw le;
- }
- }
-
- protected String findUserDN(LdapContext ctx) throws LoginException
- {
-
- if (baseCtxDN == null)
- {
- return getIdentity().getName();
- }
-
- try
- {
- NamingEnumeration results = null;
-
- Object[] filterArgs =
- {getIdentity().getName()};
- results = ctx.search(baseCtxDN, baseFilter, filterArgs, userSearchControls);
- if (results.hasMore() == false)
- {
- results.close();
- throw new LoginException("Search of baseDN(" + baseCtxDN + ") found no matches");
- }
-
- SearchResult sr = (SearchResult) results.next();
- String name = sr.getName();
- String userDN = null;
- if (sr.isRelative() == true)
- userDN = name + "," + baseCtxDN;
- else
- throw new LoginException("Can't follow referal for authentication: " + name);
-
- results.close();
- results = null;
-
- log.trace("findUserDN - " + userDN);
- return userDN;
- }
- catch (NamingException e)
- {
- LoginException le = new LoginException("Unable to find user DN");
- le.initCause(e);
- throw le;
- }
- }
-
- protected void authenticate(String userDN) throws LoginException
- {
- if (credential.length == 0)
- {
- if (allowEmptyPassword == false)
- {
- log.trace("Rejecting empty password.");
- return;
- }
- }
-
- try
- {
- LdapContext authContext = constructLdapContext(userDN, credential, null);
- authContext.close();
- }
- catch (NamingException ne)
- {
- log.debug("Authentication failed - " + ne.getMessage());
- LoginException le = new LoginException("Authentication failed");
- le.initCause(ne);
- throw le;
- }
-
- super.loginOk = true;
- if (getUseFirstPass() == true)
- { // Add the username and password to the shared state map
- sharedState.put("javax.security.auth.login.name", getIdentity().getName());
- sharedState.put("javax.security.auth.login.password", credential);
- }
-
- }
-
- protected void rolesSearch(LdapContext searchContext, String dn) throws LoginException
- {
- Object[] filterArgs =
- {getIdentity().getName(), dn};
-
- NamingEnumeration results = null;
- try
- {
- log.trace("rolesCtxDN=" + rolesCtxDN + " roleFilter=" + roleFilter + " filterArgs[0]=" + filterArgs[0]
- + " filterArgs[1]=" + filterArgs[1]);
-
- if (roleFilter != null && roleFilter.length() > 0)
- {
- results = searchContext.search(rolesCtxDN, roleFilter, filterArgs, roleSearchControls);
- while (results.hasMore())
- {
- SearchResult sr = (SearchResult) results.next();
- String resultDN = canonicalize(sr.getName());
-
- obtainRole(searchContext, resultDN);
- }
- }
- else
- {
- obtainRole(searchContext, dn);
- }
-
- }
- catch (NamingException e)
- {
- LoginException le = new LoginException("Error finding roles");
- le.initCause(e);
- throw le;
- }
- finally
- {
- if (results != null)
- {
- try
- {
- results.close();
- }
- catch (NamingException e)
- {
- log.warn("Problem closing results", e);
- }
- }
- }
-
- }
-
- protected void obtainRole(LdapContext searchContext, String dn) throws NamingException, LoginException
- {
- log.trace("rolesSearch resultDN = " + dn);
-
- String[] attrNames =
- {roleAttributeID};
-
- Attributes result = searchContext.getAttributes(dn, attrNames);
- if (result != null && result.size() > 0)
- {
- Attribute roles = result.get(roleAttributeID);
- for (int n = 0; n < roles.size(); n++)
- {
- String roleName = (String) roles.get(n);
- if (roleAttributeIsDN)
- {
- // Query the roleDN location for the value of roleNameAttributeID
- String roleDN = roleName;
- String[] returnAttribute =
- {roleNameAttributeID};
- log.trace("Using roleDN: " + roleDN);
- try
- {
- Attributes result2 = searchContext.getAttributes(roleDN, returnAttribute);
- Attribute roles2 = result2.get(roleNameAttributeID);
- if (roles2 != null)
- {
- for (int m = 0; m < roles2.size(); m++)
- {
- roleName = (String) roles2.get(m);
- addRole(roleName);
- }
- }
- }
- catch (NamingException e)
- {
- log.trace("Failed to query roleNameAttrName", e);
- }
-
- if (recurseRoles)
- {
- if (processedRoleDNs.contains(roleDN) == false)
- {
- processedRoleDNs.add(roleDN);
- log.trace("Recursive search for '" + roleDN + "'");
- rolesSearch(searchContext, roleDN);
- }
- else
- {
- log.trace("Already visited role '" + roleDN + "' ending recursion.");
- }
- }
- }
- else
- {
- // The role attribute value is the role name
- addRole(roleName);
- }
- }
- }
- }
-
- protected void traceLdapEnv(Properties env)
- {
- if (log.isTraceEnabled())
- {
- Properties tmp = new Properties();
- tmp.putAll(env);
- String credentials = tmp.getProperty(Context.SECURITY_CREDENTIALS);
- if (credentials != null && credentials.length() > 0)
- tmp.setProperty(Context.SECURITY_CREDENTIALS, "***");
- log.trace("Logging into LDAP server, env=" + tmp.toString());
- }
- }
-
- private String canonicalize(String searchResult)
- {
- String result = searchResult;
- int len = searchResult.length();
-
- if (searchResult.endsWith("\""))
- {
- result = searchResult.substring(0, len - 1) + "," + rolesCtxDN + "\"";
- }
- else
- {
- result = searchResult + "," + rolesCtxDN;
- }
- return result;
- }
-
- private void addRole(String roleName)
- {
- if (roleName != null)
- {
- try
- {
- Principal p = super.createIdentity(roleName);
- if (log.isTraceEnabled())
- log.trace("Assign user '" + getIdentity().getName() + "' to role " + roleName);
- userRoles.addMember(p);
- }
- catch (Exception e)
- {
- log.debug("Failed to create principal: " + roleName, e);
- }
- }
- }
-
- private class AuthorizeAction implements PrivilegedAction<Object>
- {
-
- public Object run()
- {
- try
- {
- return innerLogin();
- }
- catch (LoginException e)
- {
- return e;
- }
- }
-
- }
-
-}
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java)
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java (rev 0)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java 2009-04-21 10:16:30 UTC (rev 87617)
@@ -0,0 +1,744 @@
+/*
+ * 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.jboss.security.negotiation;
+
+import java.security.Principal;
+import java.security.PrivilegedAction;
+import java.security.acl.Group;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.Map.Entry;
+
+import javax.management.ObjectName;
+import javax.naming.Context;
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.SearchControls;
+import javax.naming.directory.SearchResult;
+import javax.naming.ldap.InitialLdapContext;
+import javax.naming.ldap.LdapContext;
+import javax.security.auth.Subject;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
+
+import org.jboss.security.SimpleGroup;
+import org.jboss.security.auth.spi.AbstractServerLoginModule;
+import org.jboss.security.negotiation.prototype.DecodeAction;
+
+/**
+ * Another LDAP LoginModule to take into account requirements
+ * for different authentication mechanisms and full support
+ * for password-stacking set to useFirstPass.
+ *
+ * This is essentially a complete refactoring of the LdapExtLoginModule
+ * but with enough restructuring to separate out the three login steps: -
+ * -1 Find the user
+ * -2 Authenticate as the user
+ * -3 Find the users roles
+ * Configuration should allow for any of the three actions to be
+ * skipped based on the requirements for the environment making
+ * use of this login module.
+ *
+ *
+ * @author darran.lofthouse at jboss.com
+ * @since 3rd July 2008
+ */
+public class AdvancedLdapLoginModule extends AbstractServerLoginModule
+{
+
+ /*
+ * Configuration Option Constants
+ */
+
+ // Search Context Settings
+ private static final String BIND_AUTHENTICATION = "bindAuthentication";
+
+ private static final String BIND_DN = "bindDN";
+
+ private static final String BIND_CREDENTIAL = "bindCredential";
+
+ private static final String SECURITY_DOMAIN = "jaasSecurityDomain";
+
+ // User Search Settings
+ private static final String BASE_CTX_DN = "baseCtxDN";
+
+ private static final String BASE_FILTER = "baseFilter";
+
+ private static final String SEARCH_TIME_LIMIT = "searchTimeLimit";
+
+ // Role Search Settings
+ private static final String ROLES_CTS_DN = "rolesCtxDN";
+
+ private static final String ROLE_FILTER = "roleFilter";
+
+ private static final String RECURSE_ROLES = "recurseRoles";
+
+ private static final String ROLE_ATTRIBUTE_ID = "roleAttributeID";
+
+ private static final String ROLE_ATTRIBUTE_IS_DN = "roleAttributeIsDN";
+
+ private static final String ROLE_NAME_ATTRIBUTE_ID = "roleNameAttributeID";
+
+ private static final String ROLE_SEARCH_SCOPE = "searchScope";
+
+ // Authentication Settings
+ private static final String ALLOW_EMPTY_PASSWORD = "allowEmptyPassword";
+
+ /*
+ * Other Constants
+ */
+
+ private static final String AUTH_TYPE_GSSAPI = "GSSAPI";
+
+ private static final String AUTH_TYPE_SIMPLE = "simple";
+
+ private static final String DEFAULT_LDAP_CTX_FACTORY = "com.sun.jndi.ldap.LdapCtxFactory";
+
+ private static final String DEFAULT_URL = "ldap://localhost:389";
+
+ private static final String DEFAULT_SSL_URL = "ldap://localhost:686";
+
+ private static final String PROTOCOL_SSL = "SSL";
+
+ private static final String OBJECT_SCOPE = "OBJECT_SCOPE";
+
+ private static final String ONELEVEL_SCOPE = "ONELEVEL_SCOPE";
+
+ private static final String SUBTREE_SCOPE = "SUBTREE_SCOPE";
+
+ /*
+ * Configuration Options
+ */
+ // Search Context Settings
+ protected String bindAuthentication;
+
+ protected String bindDn;
+
+ protected String bindCredential;
+
+ protected String jaasSecurityDomain;
+
+ // User Search Settings
+ protected String baseCtxDN;
+
+ protected String baseFilter;
+
+ protected int searchTimeLimit = 10000;
+
+ protected SearchControls userSearchControls;
+
+ // Role Search Settings
+ protected String rolesCtxDN;
+
+ protected String roleFilter;
+
+ protected boolean recurseRoles;
+
+ protected SearchControls roleSearchControls;
+
+ protected String roleAttributeID;
+
+ protected boolean roleAttributeIsDN;
+
+ protected String roleNameAttributeID;
+
+ // Authentication Settings
+ protected boolean allowEmptyPassword;
+
+ /*
+ * Module State
+ */
+ /** The login identity */
+ private Principal identity;
+
+ /** The proof of login identity */
+ private char[] credential;
+
+ private SimpleGroup userRoles = new SimpleGroup("Roles");
+
+ private Set<String> processedRoleDNs = new HashSet<String>();
+
+ @Override
+ public void initialize(Subject subject, CallbackHandler handler, Map sharedState, Map options)
+ {
+ super.initialize(subject, handler, sharedState, options);
+
+ // Search Context Settings
+ bindAuthentication = (String) options.get(BIND_AUTHENTICATION);
+ bindDn = (String) options.get(BIND_DN);
+ bindCredential = (String) options.get(BIND_CREDENTIAL);
+ jaasSecurityDomain = (String) options.get(SECURITY_DOMAIN);
+
+ // User Search Settings
+ baseCtxDN = (String) options.get(BASE_CTX_DN);
+ baseFilter = (String) options.get(BASE_FILTER);
+
+ String temp = (String) options.get(SEARCH_TIME_LIMIT);
+ if (temp != null)
+ {
+ try
+ {
+ searchTimeLimit = Integer.parseInt(temp);
+ }
+ catch (NumberFormatException e)
+ {
+ log.warn("Failed to parse: " + temp + ", using searchTimeLimit=" + searchTimeLimit);
+ }
+ }
+
+ userSearchControls = new SearchControls();
+ userSearchControls.setSearchScope(SearchControls.SUBTREE_SCOPE);
+ userSearchControls.setReturningAttributes(new String[0]);
+ userSearchControls.setTimeLimit(searchTimeLimit);
+
+ rolesCtxDN = (String) options.get(ROLES_CTS_DN);
+ roleFilter = (String) options.get(ROLE_FILTER);
+
+ temp = (String) options.get(RECURSE_ROLES);
+ recurseRoles = Boolean.parseBoolean(temp);
+
+ int searchScope = SearchControls.SUBTREE_SCOPE;
+ temp = (String) options.get(ROLE_SEARCH_SCOPE);
+ if (OBJECT_SCOPE.equalsIgnoreCase(temp))
+ {
+ searchScope = SearchControls.OBJECT_SCOPE;
+ }
+ else if (ONELEVEL_SCOPE.equalsIgnoreCase(temp))
+ {
+ searchScope = SearchControls.ONELEVEL_SCOPE;
+ }
+ if (SUBTREE_SCOPE.equalsIgnoreCase(temp))
+ {
+ searchScope = SearchControls.SUBTREE_SCOPE;
+ }
+
+ roleSearchControls = new SearchControls();
+ roleSearchControls.setSearchScope(searchScope);
+ roleSearchControls.setReturningAttributes(new String[0]);
+ roleSearchControls.setTimeLimit(searchTimeLimit);
+
+ roleAttributeID = (String) options.get(ROLE_ATTRIBUTE_ID);
+
+ temp = (String) options.get(ROLE_ATTRIBUTE_IS_DN);
+ roleAttributeIsDN = Boolean.parseBoolean(temp);
+
+ roleNameAttributeID = (String) options.get(ROLE_NAME_ATTRIBUTE_ID);
+
+ temp = (String) options.get(ALLOW_EMPTY_PASSWORD);
+ allowEmptyPassword = Boolean.parseBoolean(temp);
+
+ }
+
+ @Override
+ public boolean login() throws LoginException
+ {
+ Object result = null;
+
+ AuthorizeAction action = new AuthorizeAction();
+ if (AUTH_TYPE_GSSAPI.equals(bindAuthentication))
+ {
+ log.trace("Using GSSAPI to connect to LDAP");
+ LoginContext lc = new LoginContext(jaasSecurityDomain);
+ lc.login();
+ Subject serverSubject = lc.getSubject();
+
+ if (log.isDebugEnabled())
+ {
+ log.debug("Subject = " + serverSubject);
+ log.debug("Logged in '" + lc + "' LoginContext");
+ }
+
+ result = Subject.doAs(serverSubject, action);
+ lc.logout();
+ }
+ else
+ {
+ result = action.run();
+ }
+
+ if (result instanceof LoginException)
+ {
+ throw (LoginException) result;
+ }
+
+ return ((Boolean) result).booleanValue();
+ }
+
+ @Override
+ protected Principal getIdentity()
+ {
+ return identity;
+ }
+
+ @Override
+ protected Group[] getRoleSets() throws LoginException
+ {
+ Group[] roleSets =
+ {userRoles};
+ return roleSets;
+ }
+
+ protected Boolean innerLogin() throws LoginException
+ {
+ // Obtain the username and password
+ processIdentityAndCredential();
+ log.trace("Identity - " + getIdentity().getName());
+ // Initialise search ctx
+ String bindCredential = this.bindCredential;
+ if (AUTH_TYPE_GSSAPI.equals(bindAuthentication) == false)
+ {
+ if (jaasSecurityDomain != null && jaasSecurityDomain.length() > 0)
+ {
+ try
+ {
+ ObjectName serviceName = new ObjectName(jaasSecurityDomain);
+ char[] tmp = DecodeAction.decode(bindCredential, serviceName);
+ bindCredential = new String(tmp);
+ }
+ catch (Exception e)
+ {
+ LoginException le = new LoginException("Unabe to decode bindCredential");
+ le.initCause(e);
+ throw le;
+ }
+ }
+ }
+
+ LdapContext searchContext = null;
+
+ try
+ {
+ searchContext = constructLdapContext(bindDn, bindCredential, bindAuthentication);
+ log.debug("Obtained LdapContext");
+
+ // Search for user in LDAP
+ String userDN = findUserDN(searchContext);
+
+ // If authentication required authenticate as user
+ if (super.loginOk == false)
+ {
+ authenticate(userDN);
+ }
+
+ if (super.loginOk)
+ {
+ // Search for roles in LDAP
+ rolesSearch(searchContext, userDN);
+ }
+ }
+ finally
+ {
+ if (searchContext != null)
+ {
+ try
+ {
+ searchContext.close();
+ }
+ catch (NamingException e)
+ {
+ log.warn("Error closing context", e);
+ }
+ }
+ }
+
+ return Boolean.valueOf(super.loginOk);
+ }
+
+ /**
+ * Either retrieve existing values based on useFirstPass or use
+ * CallBackHandler to obtain the values.
+ */
+ protected void processIdentityAndCredential() throws LoginException
+ {
+ if (super.login() == true)
+ {
+ Object username = sharedState.get("javax.security.auth.login.name");
+ if (username instanceof Principal)
+ identity = (Principal) username;
+ else
+ {
+ String name = username.toString();
+ try
+ {
+ identity = createIdentity(name);
+ }
+ catch (Exception e)
+ {
+ log.debug("Failed to create principal", e);
+ throw new LoginException("Failed to create principal: " + e.getMessage());
+ }
+ }
+ // We have no further use for a credential so no need to retrieve it.
+ }
+ else
+ {
+ try
+ {
+ NameCallback nc = new NameCallback("User name: ", "guest");
+ PasswordCallback pc = new PasswordCallback("Password: ", false);
+ Callback[] callbacks =
+ {nc, pc};
+
+ callbackHandler.handle(callbacks);
+ String username = nc.getName();
+ identity = createIdentity(username);
+ credential = pc.getPassword();
+ pc.clearPassword();
+ }
+ catch (Exception e)
+ {
+ LoginException le = new LoginException("Unable to obtain username/credential");
+ le.initCause(e);
+ throw le;
+ }
+
+ }
+ }
+
+ protected LdapContext constructLdapContext(String dn, Object credential, String authentication)
+ throws LoginException
+ {
+ Properties env = new Properties();
+ Iterator iter = options.entrySet().iterator();
+ while (iter.hasNext())
+ {
+ Entry entry = (Entry) iter.next();
+ env.put(entry.getKey(), entry.getValue());
+ }
+
+ // Set defaults for key values if they are missing
+ String factoryName = env.getProperty(Context.INITIAL_CONTEXT_FACTORY);
+ if (factoryName == null)
+ {
+ factoryName = DEFAULT_LDAP_CTX_FACTORY;
+ env.setProperty(Context.INITIAL_CONTEXT_FACTORY, factoryName);
+ }
+
+ // If this method is called with an authentication type then use that.
+ if (authentication != null && authentication.length() > 0)
+ {
+ env.setProperty(Context.SECURITY_AUTHENTICATION, authentication);
+ }
+ else
+ {
+ String authType = env.getProperty(Context.SECURITY_AUTHENTICATION);
+ if (authType == null)
+ env.setProperty(Context.SECURITY_AUTHENTICATION, AUTH_TYPE_SIMPLE);
+ }
+
+ String protocol = env.getProperty(Context.SECURITY_PROTOCOL);
+ String providerURL = (String) options.get(Context.PROVIDER_URL);
+ if (providerURL == null)
+ {
+ if (PROTOCOL_SSL.equals(protocol))
+ {
+ providerURL = DEFAULT_SSL_URL;
+ }
+ else
+ {
+ providerURL = DEFAULT_URL;
+ }
+ env.setProperty(Context.PROVIDER_URL, providerURL);
+ }
+
+ // Assume the caller of this method has checked the requirements for the principal and
+ // credentials.
+ if (dn != null)
+ env.setProperty(Context.SECURITY_PRINCIPAL, dn);
+ if (credential != null)
+ env.put(Context.SECURITY_CREDENTIALS, credential);
+ traceLdapEnv(env);
+ try
+ {
+ return new InitialLdapContext(env, null);
+ }
+ catch (NamingException e)
+ {
+ LoginException le = new LoginException("Unable to create new InitialLdapContext");
+ le.initCause(e);
+ throw le;
+ }
+ }
+
+ protected String findUserDN(LdapContext ctx) throws LoginException
+ {
+
+ if (baseCtxDN == null)
+ {
+ return getIdentity().getName();
+ }
+
+ try
+ {
+ NamingEnumeration results = null;
+
+ Object[] filterArgs =
+ {getIdentity().getName()};
+ results = ctx.search(baseCtxDN, baseFilter, filterArgs, userSearchControls);
+ if (results.hasMore() == false)
+ {
+ results.close();
+ throw new LoginException("Search of baseDN(" + baseCtxDN + ") found no matches");
+ }
+
+ SearchResult sr = (SearchResult) results.next();
+ String name = sr.getName();
+ String userDN = null;
+ if (sr.isRelative() == true)
+ userDN = name + "," + baseCtxDN;
+ else
+ throw new LoginException("Can't follow referal for authentication: " + name);
+
+ results.close();
+ results = null;
+
+ log.trace("findUserDN - " + userDN);
+ return userDN;
+ }
+ catch (NamingException e)
+ {
+ LoginException le = new LoginException("Unable to find user DN");
+ le.initCause(e);
+ throw le;
+ }
+ }
+
+ protected void authenticate(String userDN) throws LoginException
+ {
+ if (credential.length == 0)
+ {
+ if (allowEmptyPassword == false)
+ {
+ log.trace("Rejecting empty password.");
+ return;
+ }
+ }
+
+ try
+ {
+ LdapContext authContext = constructLdapContext(userDN, credential, null);
+ authContext.close();
+ }
+ catch (NamingException ne)
+ {
+ log.debug("Authentication failed - " + ne.getMessage());
+ LoginException le = new LoginException("Authentication failed");
+ le.initCause(ne);
+ throw le;
+ }
+
+ super.loginOk = true;
+ if (getUseFirstPass() == true)
+ { // Add the username and password to the shared state map
+ sharedState.put("javax.security.auth.login.name", getIdentity().getName());
+ sharedState.put("javax.security.auth.login.password", credential);
+ }
+
+ }
+
+ protected void rolesSearch(LdapContext searchContext, String dn) throws LoginException
+ {
+ Object[] filterArgs =
+ {getIdentity().getName(), dn};
+
+ NamingEnumeration results = null;
+ try
+ {
+ log.trace("rolesCtxDN=" + rolesCtxDN + " roleFilter=" + roleFilter + " filterArgs[0]=" + filterArgs[0]
+ + " filterArgs[1]=" + filterArgs[1]);
+
+ if (roleFilter != null && roleFilter.length() > 0)
+ {
+ results = searchContext.search(rolesCtxDN, roleFilter, filterArgs, roleSearchControls);
+ while (results.hasMore())
+ {
+ SearchResult sr = (SearchResult) results.next();
+ String resultDN = canonicalize(sr.getName());
+
+ obtainRole(searchContext, resultDN);
+ }
+ }
+ else
+ {
+ obtainRole(searchContext, dn);
+ }
+
+ }
+ catch (NamingException e)
+ {
+ LoginException le = new LoginException("Error finding roles");
+ le.initCause(e);
+ throw le;
+ }
+ finally
+ {
+ if (results != null)
+ {
+ try
+ {
+ results.close();
+ }
+ catch (NamingException e)
+ {
+ log.warn("Problem closing results", e);
+ }
+ }
+ }
+
+ }
+
+ protected void obtainRole(LdapContext searchContext, String dn) throws NamingException, LoginException
+ {
+ log.trace("rolesSearch resultDN = " + dn);
+
+ String[] attrNames =
+ {roleAttributeID};
+
+ Attributes result = searchContext.getAttributes(dn, attrNames);
+ if (result != null && result.size() > 0)
+ {
+ Attribute roles = result.get(roleAttributeID);
+ for (int n = 0; n < roles.size(); n++)
+ {
+ String roleName = (String) roles.get(n);
+ if (roleAttributeIsDN)
+ {
+ // Query the roleDN location for the value of roleNameAttributeID
+ String roleDN = roleName;
+ String[] returnAttribute =
+ {roleNameAttributeID};
+ log.trace("Using roleDN: " + roleDN);
+ try
+ {
+ Attributes result2 = searchContext.getAttributes(roleDN, returnAttribute);
+ Attribute roles2 = result2.get(roleNameAttributeID);
+ if (roles2 != null)
+ {
+ for (int m = 0; m < roles2.size(); m++)
+ {
+ roleName = (String) roles2.get(m);
+ addRole(roleName);
+ }
+ }
+ }
+ catch (NamingException e)
+ {
+ log.trace("Failed to query roleNameAttrName", e);
+ }
+
+ if (recurseRoles)
+ {
+ if (processedRoleDNs.contains(roleDN) == false)
+ {
+ processedRoleDNs.add(roleDN);
+ log.trace("Recursive search for '" + roleDN + "'");
+ rolesSearch(searchContext, roleDN);
+ }
+ else
+ {
+ log.trace("Already visited role '" + roleDN + "' ending recursion.");
+ }
+ }
+ }
+ else
+ {
+ // The role attribute value is the role name
+ addRole(roleName);
+ }
+ }
+ }
+ }
+
+ protected void traceLdapEnv(Properties env)
+ {
+ if (log.isTraceEnabled())
+ {
+ Properties tmp = new Properties();
+ tmp.putAll(env);
+ String credentials = tmp.getProperty(Context.SECURITY_CREDENTIALS);
+ if (credentials != null && credentials.length() > 0)
+ tmp.setProperty(Context.SECURITY_CREDENTIALS, "***");
+ log.trace("Logging into LDAP server, env=" + tmp.toString());
+ }
+ }
+
+ private String canonicalize(String searchResult)
+ {
+ String result = searchResult;
+ int len = searchResult.length();
+
+ if (searchResult.endsWith("\""))
+ {
+ result = searchResult.substring(0, len - 1) + "," + rolesCtxDN + "\"";
+ }
+ else
+ {
+ result = searchResult + "," + rolesCtxDN;
+ }
+ return result;
+ }
+
+ private void addRole(String roleName)
+ {
+ if (roleName != null)
+ {
+ try
+ {
+ Principal p = super.createIdentity(roleName);
+ if (log.isTraceEnabled())
+ log.trace("Assign user '" + getIdentity().getName() + "' to role " + roleName);
+ userRoles.addMember(p);
+ }
+ catch (Exception e)
+ {
+ log.debug("Failed to create principal: " + roleName, e);
+ }
+ }
+ }
+
+ private class AuthorizeAction implements PrivilegedAction<Object>
+ {
+
+ public Object run()
+ {
+ try
+ {
+ return innerLogin();
+ }
+ catch (LoginException e)
+ {
+ return e;
+ }
+ }
+
+ }
+
+}
Deleted: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/OidNameUtil.java
===================================================================
--- projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/OidNameUtil.java 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/OidNameUtil.java 2009-04-21 10:16:30 UTC (rev 87617)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- *
- * Copyright 2007, 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.jboss.security.negotiation;
-
-import org.ietf.jgss.GSSException;
-import org.ietf.jgss.Oid;
-
-/**
- * Utility to convert Oid to a meaningful name.
- *
- * @author darran.lofthouse at jboss.com
- * @version $Revision$
- */
-public class OidNameUtil
-{
-
- private static final Oid KERBEROS_V5;
-
- private static final Oid KERBEROS_V5_LEGACY;
-
- private static final Oid NTLM;
-
- private static final Oid SPNEGO;
-
- static
- {
- try
- {
- KERBEROS_V5 = new Oid("1.2.840.113554.1.2.2");
- KERBEROS_V5_LEGACY = new Oid("1.2.840.48018.1.2.2");
- SPNEGO = new Oid("1.3.6.1.5.5.2");
- NTLM = new Oid("1.3.6.1.4.1.311.2.2.10");
- }
- catch (GSSException e)
- {
- throw new RuntimeException("Unable to initialise Oid", e);
- }
- }
-
- /**
- * Return the name of the passed in Oid, if this is not available
- * return the identifier.
- *
- * @param oid
- * @return
- */
- public static String getName(final Oid oid)
- {
- if (KERBEROS_V5.equals(oid))
- {
- return "Kerberos V5";
- }
- else if (KERBEROS_V5_LEGACY.equals(oid))
- {
- return "Kerberos V5 Legacy";
- }
- else if (NTLM.equals(oid))
- {
- return "NTLM";
- }
- else if (SPNEGO.equals(oid))
- {
- return "SPNEGO";
- }
- else
- {
- return String.valueOf(oid);
- }
- }
-}
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/OidNameUtil.java (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/OidNameUtil.java)
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/OidNameUtil.java (rev 0)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/OidNameUtil.java 2009-04-21 10:16:30 UTC (rev 87617)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ *
+ * Copyright 2007, 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.jboss.security.negotiation;
+
+import org.ietf.jgss.GSSException;
+import org.ietf.jgss.Oid;
+
+/**
+ * Utility to convert Oid to a meaningful name.
+ *
+ * @author darran.lofthouse at jboss.com
+ * @version $Revision$
+ */
+public class OidNameUtil
+{
+
+ private static final Oid KERBEROS_V5;
+
+ private static final Oid KERBEROS_V5_LEGACY;
+
+ private static final Oid NTLM;
+
+ private static final Oid SPNEGO;
+
+ static
+ {
+ try
+ {
+ KERBEROS_V5 = new Oid("1.2.840.113554.1.2.2");
+ KERBEROS_V5_LEGACY = new Oid("1.2.840.48018.1.2.2");
+ SPNEGO = new Oid("1.3.6.1.5.5.2");
+ NTLM = new Oid("1.3.6.1.4.1.311.2.2.10");
+ }
+ catch (GSSException e)
+ {
+ throw new RuntimeException("Unable to initialise Oid", e);
+ }
+ }
+
+ /**
+ * Return the name of the passed in Oid, if this is not available
+ * return the identifier.
+ *
+ * @param oid
+ * @return
+ */
+ public static String getName(final Oid oid)
+ {
+ if (KERBEROS_V5.equals(oid))
+ {
+ return "Kerberos V5";
+ }
+ else if (KERBEROS_V5_LEGACY.equals(oid))
+ {
+ return "Kerberos V5 Legacy";
+ }
+ else if (NTLM.equals(oid))
+ {
+ return "NTLM";
+ }
+ else if (SPNEGO.equals(oid))
+ {
+ return "SPNEGO";
+ }
+ else
+ {
+ return String.valueOf(oid);
+ }
+ }
+}
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/prototype (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/prototype)
Deleted: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/prototype/DecodeAction.java
===================================================================
--- projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/prototype/DecodeAction.java 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/prototype/DecodeAction.java 2009-04-21 10:16:30 UTC (rev 87617)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.jboss.security.negotiation.prototype;
-
-import java.security.PrivilegedExceptionAction;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import javax.management.ObjectName;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerInvocationHandler;
-
-import org.jboss.security.plugins.JaasSecurityDomainMBean;
-import org.jboss.mx.util.MBeanServerLocator;
-
-/**
- * PriviledgedActions used by login modules for decoding passwords
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision$
- */
-public class DecodeAction implements PrivilegedExceptionAction
-{
- String password;
- ObjectName serviceName;
-
- DecodeAction(String password, ObjectName serviceName)
- {
- this.password = password;
- this.serviceName = serviceName;
- }
-
- /**
- *
- * @return
- * @throws Exception
- */
- public Object run() throws Exception
- {
- MBeanServer server = MBeanServerLocator.locateJBoss();
- JaasSecurityDomainMBean securityDomain = (JaasSecurityDomainMBean)
- MBeanServerInvocationHandler.newProxyInstance(server, serviceName,
- JaasSecurityDomainMBean.class, false);
-
- // Invoke the jaasSecurityDomain.decodeb64 op
- byte[] secret = securityDomain.decode64(password);
- // Convert to UTF-8 base char array
- String secretPassword = new String(secret, "UTF-8");
- return secretPassword.toCharArray();
- }
- public static char[] decode(String password, ObjectName serviceName)
- throws Exception
- {
- DecodeAction action = new DecodeAction(password, serviceName);
- try
- {
- char[] decode = (char[]) AccessController.doPrivileged(action);
- return decode;
- }
- catch(PrivilegedActionException e)
- {
- throw e.getException();
- }
- }
-}
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/prototype/DecodeAction.java (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/prototype/DecodeAction.java)
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/prototype/DecodeAction.java (rev 0)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/prototype/DecodeAction.java 2009-04-21 10:16:30 UTC (rev 87617)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.jboss.security.negotiation.prototype;
+
+import java.security.PrivilegedExceptionAction;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import javax.management.ObjectName;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerInvocationHandler;
+
+import org.jboss.security.plugins.JaasSecurityDomainMBean;
+import org.jboss.mx.util.MBeanServerLocator;
+
+/**
+ * PriviledgedActions used by login modules for decoding passwords
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
+ */
+public class DecodeAction implements PrivilegedExceptionAction
+{
+ String password;
+ ObjectName serviceName;
+
+ DecodeAction(String password, ObjectName serviceName)
+ {
+ this.password = password;
+ this.serviceName = serviceName;
+ }
+
+ /**
+ *
+ * @return
+ * @throws Exception
+ */
+ public Object run() throws Exception
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ JaasSecurityDomainMBean securityDomain = (JaasSecurityDomainMBean)
+ MBeanServerInvocationHandler.newProxyInstance(server, serviceName,
+ JaasSecurityDomainMBean.class, false);
+
+ // Invoke the jaasSecurityDomain.decodeb64 op
+ byte[] secret = securityDomain.decode64(password);
+ // Convert to UTF-8 base char array
+ String secretPassword = new String(secret, "UTF-8");
+ return secretPassword.toCharArray();
+ }
+ public static char[] decode(String password, ObjectName serviceName)
+ throws Exception
+ {
+ DecodeAction action = new DecodeAction(password, serviceName);
+ try
+ {
+ char[] decode = (char[]) AccessController.doPrivileged(action);
+ return decode;
+ }
+ catch(PrivilegedActionException e)
+ {
+ throw e.getException();
+ }
+ }
+}
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego)
Deleted: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/AdvancedLdapLoginModule.java
===================================================================
--- projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/AdvancedLdapLoginModule.java 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/AdvancedLdapLoginModule.java 2009-04-21 10:16:30 UTC (rev 87617)
@@ -1,57 +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.jboss.security.negotiation.spnego;
-
-import java.util.Map;
-
-import javax.security.auth.Subject;
-import javax.security.auth.callback.CallbackHandler;
-
-/**
- * This login module has now been moved to the 'org.jboss.security.negotiation' package,
- * this class remains for backwards compatibility.
- *
- *
- * @author darran.lofthouse at jboss.com
- * @since 3rd July 2008
- */
- at Deprecated
-public class AdvancedLdapLoginModule extends org.jboss.security.negotiation.AdvancedLdapLoginModule
-{
-
- private static boolean warned = false;
-
- @Override
- public void initialize(Subject subject, CallbackHandler handler, Map sharedState, Map options)
- {
- super.initialize(subject, handler, sharedState, options);
-
- if (warned == false)
- {
- warned = true;
- String thisClass = this.getClass().getName();
- String superClass = org.jboss.security.negotiation.AdvancedLdapLoginModule.class.getName();
- log.warn("'" + thisClass + "' is deprecated, use '" + superClass + "' instead.");
- }
- }
-
-}
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/AdvancedLdapLoginModule.java (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/AdvancedLdapLoginModule.java)
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/AdvancedLdapLoginModule.java (rev 0)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/AdvancedLdapLoginModule.java 2009-04-21 10:16:30 UTC (rev 87617)
@@ -0,0 +1,57 @@
+/*
+ * 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.jboss.security.negotiation.spnego;
+
+import java.util.Map;
+
+import javax.security.auth.Subject;
+import javax.security.auth.callback.CallbackHandler;
+
+/**
+ * This login module has now been moved to the 'org.jboss.security.negotiation' package,
+ * this class remains for backwards compatibility.
+ *
+ *
+ * @author darran.lofthouse at jboss.com
+ * @since 3rd July 2008
+ */
+ at Deprecated
+public class AdvancedLdapLoginModule extends org.jboss.security.negotiation.AdvancedLdapLoginModule
+{
+
+ private static boolean warned = false;
+
+ @Override
+ public void initialize(Subject subject, CallbackHandler handler, Map sharedState, Map options)
+ {
+ super.initialize(subject, handler, sharedState, options);
+
+ if (warned == false)
+ {
+ warned = true;
+ String thisClass = this.getClass().getName();
+ String superClass = org.jboss.security.negotiation.AdvancedLdapLoginModule.class.getName();
+ log.warn("'" + thisClass + "' is deprecated, use '" + superClass + "' instead.");
+ }
+ }
+
+}
Deleted: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/IdentityLoginModule.java
===================================================================
--- projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/IdentityLoginModule.java 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/IdentityLoginModule.java 2009-04-21 10:16:30 UTC (rev 87617)
@@ -1,45 +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.jboss.security.negotiation.spnego;
-
-import javax.security.auth.login.LoginException;
-
-/**
- *
- * @author darran.lofthouse at jboss.com
- */
-public class IdentityLoginModule extends org.jboss.security.auth.spi.IdentityLoginModule
-{
-
- @Override
- public boolean login() throws LoginException
- {
- if (super.login() == true)
- {
- sharedState.put("javax.security.auth.login.password", new Object());
- return true;
- }
- return false;
- }
-
-}
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/IdentityLoginModule.java (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/IdentityLoginModule.java)
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/IdentityLoginModule.java (rev 0)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/spnego/IdentityLoginModule.java 2009-04-21 10:16:30 UTC (rev 87617)
@@ -0,0 +1,45 @@
+/*
+ * 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.jboss.security.negotiation.spnego;
+
+import javax.security.auth.login.LoginException;
+
+/**
+ *
+ * @author darran.lofthouse at jboss.com
+ */
+public class IdentityLoginModule extends org.jboss.security.auth.spi.IdentityLoginModule
+{
+
+ @Override
+ public boolean login() throws LoginException
+ {
+ if (super.login() == true)
+ {
+ sharedState.put("javax.security.auth.login.password", new Object());
+ return true;
+ }
+ return false;
+ }
+
+}
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/resources (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/resources)
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/tests)
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/tests/java)
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/tests/java/org)
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/jboss (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/tests/java/org/jboss)
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/jboss/security (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/tests/java/org/jboss/security)
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/jboss/security/negotiation (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/tests/java/org/jboss/security/negotiation)
Copied: projects/security/security-negotiation/trunk/jboss-negotiation-extras/src/tests/java/org/jboss/security/negotiation/spnego (from rev 87616, projects/security/security-negotiation/branches/SECURITY-411/jboss-negotiation-extras/src/tests/java/org/jboss/security/negotiation/spnego)
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/.classpath
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/.classpath 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/.classpath 2009-04-21 10:16:30 UTC (rev 87617)
@@ -1,17 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="output" path="target/classes"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jboss-common/4.2.2.GA/jboss-common-4.2.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jbosssx/4.2.2.GA/jbosssx-4.2.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/web/servlet-api/2.1.0.GA/servlet-api-2.1.0.GA.jar"/>
- <classpathentry kind="src" path="/jboss-negotiation"/>
- <classpathentry kind="src" path="/jboss-negotiation-common"/>
- <classpathentry kind="var" path="M2_REPO/jboss/web/jbossweb/2.1.0.GA/jbossweb-2.1.0.GA.jar"/>
- <classpathentry kind="src" path="/jboss-negotiation-ntlm"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
- <classpathentry kind="src" path="/jboss-negotiation-spnego"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jboss-jmx/4.2.2.GA/jboss-jmx-4.2.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jboss-system/4.2.2.GA/jboss-system-4.2.2.GA.jar"/>
-</classpath>
\ No newline at end of file
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-common/4.2.2.GA/jboss-common-4.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jbosssx/4.2.2.GA/jbosssx-4.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/web/servlet-api/2.1.0.GA/servlet-api-2.1.0.GA.jar"/>
+ <classpathentry kind="src" path="/jboss-negotiation-common"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/web/jbossweb/2.1.0.GA/jbossweb-2.1.0.GA.jar"/>
+ <classpathentry kind="src" path="/jboss-negotiation-ntlm"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
+ <classpathentry kind="src" path="/jboss-negotiation-spnego"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-jmx/4.2.2.GA/jboss-jmx-4.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-system/4.2.2.GA/jboss-system-4.2.2.GA.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/jboss-negotiation-extras"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Modified: projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/pom.xml
===================================================================
--- projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/pom.xml 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/jboss-negotiation-toolkit/pom.xml 2009-04-21 10:16:30 UTC (rev 87617)
@@ -33,7 +33,7 @@
<!-- Local Dependencies -->
<dependency>
<groupId>org.jboss.security</groupId>
- <artifactId>jboss-negotiation</artifactId>
+ <artifactId>jboss-negotiation-extras</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Modified: projects/security/security-negotiation/trunk/parent/pom.xml
===================================================================
--- projects/security/security-negotiation/trunk/parent/pom.xml 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/parent/pom.xml 2009-04-21 10:16:30 UTC (rev 87617)
@@ -98,7 +98,7 @@
<!-- Local Dependencies -->
<dependency>
<groupId>org.jboss.security</groupId>
- <artifactId>jboss-negotiation</artifactId>
+ <artifactId>jboss-negotiation-extras</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Modified: projects/security/security-negotiation/trunk/pom.xml
===================================================================
--- projects/security/security-negotiation/trunk/pom.xml 2009-04-21 10:04:18 UTC (rev 87616)
+++ projects/security/security-negotiation/trunk/pom.xml 2009-04-21 10:16:30 UTC (rev 87617)
@@ -15,11 +15,12 @@
<description>JBoss Security is a cross cutting project that handles security for the JEMS projects</description>
<modules>
<module>parent</module>
- <module>jboss-negotiation</module>
<module>jboss-negotiation-common</module>
+ <module>jboss-negotiation-extras</module>
<module>jboss-negotiation-ntlm</module>
<module>jboss-negotiation-spnego</module>
<module>jboss-negotiation-toolkit</module>
+ <module>assembly</module>
</modules>
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-negotiation/trunk</connection>
More information about the jboss-cvs-commits
mailing list