[jboss-cvs] JBossAS SVN: r73928 - in projects/security/security-standalone/trunk: assembly and 51 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jun 2 10:36:03 EDT 2008
Author: anil.saldhana at jboss.com
Date: 2008-06-02 10:36:02 -0400 (Mon, 02 Jun 2008)
New Revision: 73928
Added:
projects/security/security-standalone/trunk/JBossORG-EULA.txt
projects/security/security-standalone/trunk/assembly/
projects/security/security-standalone/trunk/assembly/bin.xml
projects/security/security-standalone/trunk/assembly/pom.xml
projects/security/security-standalone/trunk/assembly/sources.xml
projects/security/security-standalone/trunk/idtrust-api/
projects/security/security-standalone/trunk/idtrust-api/.classpath
projects/security/security-standalone/trunk/idtrust-api/.project
projects/security/security-standalone/trunk/idtrust-api/pom.xml
projects/security/security-standalone/trunk/idtrust-api/src/
projects/security/security-standalone/trunk/idtrust-api/src/main/
projects/security/security-standalone/trunk/idtrust-api/src/main/java/
projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/
projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/
projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/
projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/
projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/
projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/factories/
projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/factories/SecurityFactory.java
projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/handlers/
projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/handlers/HandlerContract.java
projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/plugins/
projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/plugins/IDTrustCallbackHandler.java
projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/plugins/IDTrustSecurityManagement.java
projects/security/security-standalone/trunk/idtrust-api/src/main/resources/
projects/security/security-standalone/trunk/idtrust-api/src/test/
projects/security/security-standalone/trunk/idtrust-api/src/test/java/
projects/security/security-standalone/trunk/idtrust-api/src/test/java/org/
projects/security/security-standalone/trunk/idtrust-api/src/test/java/org/jboss/
projects/security/security-standalone/trunk/idtrust-api/src/test/java/org/jboss/security/
projects/security/security-standalone/trunk/idtrust-api/src/test/java/org/jboss/security/idtrust/
projects/security/security-standalone/trunk/idtrust-api/src/test/java/org/jboss/security/idtrust/test/
projects/security/security-standalone/trunk/idtrust-api/src/test/java/org/jboss/security/idtrust/test/factories/
projects/security/security-standalone/trunk/idtrust-api/src/test/java/org/jboss/security/idtrust/test/factories/SecurityFactoryUnitTestCase.java
projects/security/security-standalone/trunk/idtrust-api/src/test/resources/
projects/security/security-standalone/trunk/idtrust-config/
projects/security/security-standalone/trunk/idtrust-config/.classpath
projects/security/security-standalone/trunk/idtrust-config/.project
projects/security/security-standalone/trunk/idtrust-config/pom.xml
projects/security/security-standalone/trunk/idtrust-config/src/
projects/security/security-standalone/trunk/idtrust-config/src/main/
projects/security/security-standalone/trunk/idtrust-config/src/main/java/
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/IDTrustConfiguration.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/JBossSXConfigBridge.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/SecurityActions.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ApplicationPolicy.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuditInfo.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthModuleInfo.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthenticationInfo.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthenticationJaspiInfo.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthorizationInfo.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/IdentityTrustInfo.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/LoginModuleInfo.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/LoginModuleStack.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/MappingModule.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ModuleOption.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ModuleOptionFlag.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ObjectFactory.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/PolicyConfig.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/PolicyModule.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ProviderModule.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/RoleMappingInfo.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/TrustModule.java
projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/package-info.java
projects/security/security-standalone/trunk/idtrust-config/src/main/resources/
projects/security/security-standalone/trunk/idtrust-config/src/test/
projects/security/security-standalone/trunk/idtrust-config/src/test/java/
projects/security/security-standalone/trunk/idtrust-config/src/test/resources/
projects/security/security-standalone/trunk/idtrust-impl/
projects/security/security-standalone/trunk/idtrust-impl/.classpath
projects/security/security-standalone/trunk/idtrust-impl/.project
projects/security/security-standalone/trunk/idtrust-impl/pom.xml
projects/security/security-standalone/trunk/idtrust-impl/src/
projects/security/security-standalone/trunk/idtrust-impl/src/main/
projects/security/security-standalone/trunk/idtrust-impl/src/main/java/
projects/security/security-standalone/trunk/idtrust-impl/src/main/java/org/
projects/security/security-standalone/trunk/idtrust-impl/src/main/java/org/jboss/
projects/security/security-standalone/trunk/idtrust-impl/src/main/java/org/jboss/security/
projects/security/security-standalone/trunk/idtrust-impl/src/main/java/org/jboss/security/idtrust/
projects/security/security-standalone/trunk/idtrust-impl/src/main/java/org/jboss/security/idtrust/impl/
projects/security/security-standalone/trunk/idtrust-impl/src/main/java/org/jboss/security/idtrust/impl/plugins/
projects/security/security-standalone/trunk/idtrust-impl/src/main/java/org/jboss/security/idtrust/impl/plugins/authorization/
projects/security/security-standalone/trunk/idtrust-impl/src/main/java/org/jboss/security/idtrust/impl/plugins/authorization/IDTrustAuthorizationModule.java
projects/security/security-standalone/trunk/idtrust-impl/src/main/resources/
projects/security/security-standalone/trunk/idtrust-impl/src/test/
projects/security/security-standalone/trunk/idtrust-impl/src/test/java/
projects/security/security-standalone/trunk/idtrust-impl/src/test/java/org/
projects/security/security-standalone/trunk/idtrust-impl/src/test/java/org/jboss/
projects/security/security-standalone/trunk/idtrust-impl/src/test/java/org/jboss/security/
projects/security/security-standalone/trunk/idtrust-impl/src/test/java/org/jboss/security/idtrust/
projects/security/security-standalone/trunk/idtrust-impl/src/test/java/org/jboss/security/idtrust/test/
projects/security/security-standalone/trunk/idtrust-impl/src/test/java/org/jboss/security/idtrust/test/AuthenticationUnitTestCase.java
projects/security/security-standalone/trunk/idtrust-impl/src/test/java/org/jboss/security/idtrust/test/AuthorizationUnitTestCase.java
projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/
projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/config/
projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/config/authentication.conf
projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/config/authorization.conf
projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/defaultRoles.properties
projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/defaultUsers.properties
projects/security/security-standalone/trunk/parent/
projects/security/security-standalone/trunk/parent/pom.xml
projects/security/security-standalone/trunk/pom.xml
Log:
SECURITY-222: svn workspace and code
Added: projects/security/security-standalone/trunk/JBossORG-EULA.txt
===================================================================
--- projects/security/security-standalone/trunk/JBossORG-EULA.txt (rev 0)
+++ projects/security/security-standalone/trunk/JBossORG-EULA.txt 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,106 @@
+LICENSE AGREEMENT
+JBOSS(r)
+
+This License Agreement governs the use of the Software Packages and any updates to the Software
+Packages, regardless of the delivery mechanism. Each Software Package is a collective work
+under U.S. Copyright Law. Subject to the following terms, Red Hat, Inc. ("Red Hat") grants to
+the user ("Client") a license to the applicable collective work(s) pursuant to the
+GNU Lesser General Public License v. 2.1 except for the following Software Packages:
+(a) JBoss Portal Forums and JBoss Transactions JTS, each of which is licensed pursuant to the
+GNU General Public License v.2;
+
+(b) JBoss Rules, which is licensed pursuant to the Apache License v.2.0;
+
+(c) an optional download for JBoss Cache for the Berkeley DB for Java database, which is licensed under the
+(open source) Sleepycat License (if Client does not wish to use the open source version of this database,
+it may purchase a license from Sleepycat Software);
+
+and (d) the BPEL extension for JBoss jBPM, which is licensed under the Common Public License v.1,
+and, pursuant to the OASIS BPEL4WS standard, requires parties wishing to redistribute to enter various
+royalty-free patent licenses.
+
+Each of the foregoing licenses is available at http://www.opensource.org/licenses/index.php.
+
+1. The Software. "Software Packages" refer to the various software modules that are created and made available
+for distribution by the JBoss.org open source community at http://www.jboss.org. Each of the Software Packages
+may be comprised of hundreds of software components. The end user license agreement for each component is located in
+the component's source code. With the exception of certain image files identified in Section 2 below,
+the license terms for the components permit Client to copy, modify, and redistribute the component,
+in both source code and binary code forms. This agreement does not limit Client's rights under,
+or grant Client rights that supersede, the license terms of any particular component.
+
+2. Intellectual Property Rights. The Software Packages are owned by Red Hat and others and are protected under copyright
+and other laws. Title to the Software Packages and any component, or to any copy, modification, or merged portion shall
+remain with the aforementioned, subject to the applicable license. The "JBoss" trademark, "Red Hat" trademark, the
+individual Software Package trademarks, and the "Shadowman" logo are registered trademarks of Red Hat and its affiliates
+in the U.S. and other countries. This agreement permits Client to distribute unmodified copies of the Software Packages
+using the Red Hat trademarks that Red Hat has inserted in the Software Packages on the condition that Client follows Red Hat's
+trademark guidelines for those trademarks located at http://www.redhat.com/about/corporate/trademark/. Client must abide by
+these trademark guidelines when distributing the Software Packages, regardless of whether the Software Packages have been modified.
+If Client modifies the Software Packages, then Client must replace all Red Hat trademarks and logos identified at
+http://www.jboss.com/company/logos, unless a separate agreement with Red Hat is executed or other permission granted.
+Merely deleting the files containing the Red Hat trademarks may corrupt the Software Packages.
+
+3. Limited Warranty. Except as specifically stated in this Paragraph 3 or a license for a particular
+component, to the maximum extent permitted under applicable law, the Software Packages and the
+components are provided and licensed "as is" without warranty of any kind, expressed or implied,
+including the implied warranties of merchantability, non-infringement or fitness for a particular purpose.
+Red Hat warrants that the media on which Software Packages may be furnished will be free from defects in
+materials and manufacture under normal use for a period of 30 days from the date of delivery to Client.
+Red Hat does not warrant that the functions contained in the Software Packages will meet Client's requirements
+or that the operation of the Software Packages will be entirely error free or appear precisely as described
+in the accompanying documentation. This warranty extends only to the party that purchases the Services
+pertaining to the Software Packages from Red Hat or a Red Hat authorized distributor.
+
+4. Limitation of Remedies and Liability. To the maximum extent permitted by applicable law, the remedies
+described below are accepted by Client as its only remedies. Red Hat's entire liability, and Client's
+exclusive remedies, shall be: If the Software media is defective, Client may return it within 30 days of
+delivery along with a copy of Client's payment receipt and Red Hat, at its option, will replace it or
+refund the money paid by Client for the Software. To the maximum extent permitted by applicable law,
+Red Hat or any Red Hat authorized dealer will not be liable to Client for any incidental or consequential
+damages, including lost profits or lost savings arising out of the use or inability to use the Software,
+even if Red Hat or such dealer has been advised of the possibility of such damages. In no event shall
+Red Hat's liability under this agreement exceed the amount that Client paid to Red Hat under this
+Agreement during the twelve months preceding the action.
+
+5. Export Control. As required by U.S. law, Client represents and warrants that it:
+(a) understands that the Software Packages are subject to export controls under the
+U.S. Commerce Department's Export Administration Regulations ("EAR");
+
+(b) is not located in a prohibited destination country under the EAR or U.S. sanctions regulations
+(currently Cuba, Iran, Iraq, Libya, North Korea, Sudan and Syria);
+
+(c) will not export, re-export, or transfer the Software Packages to any prohibited destination, entity,
+or individual without the necessary export license(s) or authorizations(s) from the U.S. Government;
+
+(d) will not use or transfer the Software Packages for use in any sensitive nuclear, chemical or
+biological weapons, or missile technology end-uses unless authorized by the U.S. Government by
+regulation or specific license;
+
+(e) understands and agrees that if it is in the United States and exports or transfers the Software
+Packages to eligible end users, it will, as required by EAR Section 740.17(e), submit semi-annual
+reports to the Commerce Department's Bureau of Industry & Security (BIS), which include the name and
+address (including country) of each transferee;
+
+and (f) understands that countries other than the United States may restrict the import, use, or
+export of encryption products and that it shall be solely responsible for compliance with any such
+import, use, or export restrictions.
+
+6. Third Party Programs. Red Hat may distribute third party software programs with the Software Packages
+that are not part of the Software Packages and which Client must install separately. These third party
+programs are subject to their own license terms. The license terms either accompany the programs or
+can be viewed at http://www.redhat.com/licenses/. If Client does not agree to abide by the applicable
+license terms for such programs, then Client may not install them. If Client wishes to install the programs
+on more than one system or transfer the programs to another party, then Client must contact the licensor
+of the programs.
+
+7. General. If any provision of this agreement is held to be unenforceable, that shall not affect the
+enforceability of the remaining provisions. This License Agreement shall be governed by the laws of the
+State of North Carolina and of the United States, without regard to any conflict of laws provisions,
+except that the United Nations Convention on the International Sale of Goods shall not apply.
+
+Copyright 2006 Red Hat, Inc. All rights reserved.
+"JBoss" and the JBoss logo are registered trademarks of Red Hat, Inc.
+All other trademarks are the property of their respective owners.
+
+ Page 1 of 1 18 October 2006
Added: projects/security/security-standalone/trunk/assembly/bin.xml
===================================================================
--- projects/security/security-standalone/trunk/assembly/bin.xml (rev 0)
+++ projects/security/security-standalone/trunk/assembly/bin.xml 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,12 @@
+<assembly>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/../idtrust-config/target/classes</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
Added: projects/security/security-standalone/trunk/assembly/pom.xml
===================================================================
--- projects/security/security-standalone/trunk/assembly/pom.xml (rev 0)
+++ projects/security/security-standalone/trunk/assembly/pom.xml 2008-06-02 14:36:02 UTC (rev 73928)
@@ -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-idtrust-parent</artifactId>
+ <version>2.0.2-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-idtrust</artifactId>
+ <packaging>pom</packaging>
+ <name>JBoss Security IDTrust - 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 Security 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>bin.xml</descriptor>
+ <descriptor>sources.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <inherited>false</inherited>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: projects/security/security-standalone/trunk/assembly/sources.xml
===================================================================
--- projects/security/security-standalone/trunk/assembly/sources.xml (rev 0)
+++ projects/security/security-standalone/trunk/assembly/sources.xml 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,13 @@
+<assembly>
+ <id>sources</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/../idtrust-config/src/main</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ </fileSets>
+</assembly>
Added: projects/security/security-standalone/trunk/idtrust-api/.classpath
===================================================================
--- projects/security/security-standalone/trunk/idtrust-api/.classpath (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-api/.classpath 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry excluding="**/*.java" including="JBossORG-EULA.txt" kind="src" path=""/>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry excluding="**/*.java" including="**/*.dtd|**/*.xsd" kind="src" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jboss-security-spi-bare/2.0.2-SNAPSHOT/jboss-security-spi-bare-2.0.2-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/authorization-spi/2.0.2-SNAPSHOT/authorization-spi-2.0.2-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/acl-spi/2.0.2-SNAPSHOT/acl-spi-2.0.2-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbosssx-bare/2.0.2-SNAPSHOT/jbosssx-bare-2.0.2-SNAPSHOT.jar" sourcepath="/M2_REPO/org/jboss/security/jbosssx-bare/2.0.2-SNAPSHOT/jbosssx-bare-2.0.2-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.5.GA/jboss-common-core-2.2.5.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/identity-spi/2.0.2-SNAPSHOT/identity-spi-2.0.2-SNAPSHOT.jar"/>
+ <classpathentry kind="output" path="target/eclipse-classes"/>
+</classpath>
Added: projects/security/security-standalone/trunk/idtrust-api/.project
===================================================================
--- projects/security/security-standalone/trunk/idtrust-api/.project (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-api/.project 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,13 @@
+<projectDescription>
+ <name>jboss-idtrust-api</name>
+ <comment>JBoss Security is a cross cutting project that handles security for the JEMS projects</comment>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: projects/security/security-standalone/trunk/idtrust-api/pom.xml
===================================================================
--- projects/security/security-standalone/trunk/idtrust-api/pom.xml (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-api/pom.xml 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,48 @@
+<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-idtrust-parent</artifactId>
+ <version>2.0.2-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jboss-idtrust-api</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Security IDTrust API</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>JBoss Security is a cross cutting project that handles security for the JEMS projects. The IDTrust API contains the api needed by standalone projects to use IDTrust.</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>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security-standalone/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security-standalone/trunk/</developerConnection>
+ <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/security-standalone/trunk/</url>
+ </scm>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>identity-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>authorization-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-bare</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/factories/SecurityFactory.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/factories/SecurityFactory.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/factories/SecurityFactory.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,72 @@
+/*
+ * 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.idtrust.api.factories;
+
+import org.jboss.security.AuthenticationManager;
+import org.jboss.security.AuthorizationManager;
+import org.jboss.security.ISecurityManagement;
+import org.jboss.security.audit.AuditManager;
+import org.jboss.security.idtrust.api.plugins.IDTrustSecurityManagement;
+
+/**
+ * Security Factory
+ * This is the main factory for IDtrust
+ * <a href="mailto:anil.saldhana at redhat.com>Anil Saldhana</a>
+ */
+public class SecurityFactory
+{
+ private static ISecurityManagement securityManagement =
+ new IDTrustSecurityManagement();
+
+ public static AuthenticationManager getAuthenticationManager(String securityDomain)
+ {
+ validate();
+ return securityManagement.getAuthenticationManager(securityDomain);
+ }
+
+ public static AuthorizationManager getAuthorizationManager(String securityDomain)
+ {
+ validate();
+ return securityManagement.getAuthorizationManager(securityDomain);
+ }
+
+ public static AuditManager getAuditManager(String securityDomain)
+ {
+ validate();
+ return securityManagement.getAuditManager(securityDomain);
+ }
+
+ public static ISecurityManagement getSecurityManagement()
+ {
+ return securityManagement;
+ }
+
+ public static void setSecurityManagement(ISecurityManagement iSecurityManagement)
+ {
+ securityManagement = iSecurityManagement;
+ }
+
+ private static void validate()
+ {
+ assert(securityManagement != null);
+ }
+}
\ No newline at end of file
Added: projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/handlers/HandlerContract.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/handlers/HandlerContract.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/handlers/HandlerContract.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,33 @@
+/*
+ * 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.idtrust.api.handlers;
+
+import java.security.Principal;
+
+/**
+ * Basic contract expected of callback handlers
+ * <a href="mailto:anil.saldhana at redhat.com>Anil Saldhana</a>
+ */
+public interface HandlerContract
+{
+ void setSecurityInfo(Principal principal, Object credential);
+}
\ No newline at end of file
Added: projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/plugins/IDTrustCallbackHandler.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/plugins/IDTrustCallbackHandler.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/plugins/IDTrustCallbackHandler.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,90 @@
+/*
+ * 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.idtrust.api.plugins;
+
+import java.io.IOException;
+import java.security.Principal;
+
+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.callback.UnsupportedCallbackException;
+
+import org.jboss.security.auth.callback.ObjectCallback;
+import org.jboss.security.idtrust.api.handlers.HandlerContract;
+
+/**
+ * Default Callbackhandler that primarily uses the {@link}HandlerContract
+ * for the Principal/Credential combination
+ * <a href="mailto:anil.saldhana at redhat.com>Anil Saldhana</a>
+ */
+public class IDTrustCallbackHandler implements CallbackHandler, HandlerContract
+{
+ private Principal principal = null;
+ private Object credential = null;
+
+ public void handle(Callback[] callbacks)
+ throws IOException, UnsupportedCallbackException
+ {
+ int len = callbacks.length;
+ if(len > 0)
+ {
+ for(Callback cb: callbacks)
+ {
+ if(cb instanceof NameCallback)
+ {
+ NameCallback nameCallback = (NameCallback) cb;
+ nameCallback.setName(principal.getName());
+ }
+ else
+ if(cb instanceof ObjectCallback)
+ {
+ ((ObjectCallback)cb).setCredential(credential);
+ }
+ else
+ if(cb instanceof PasswordCallback)
+ {
+ char[] passwd = null;
+ if(credential instanceof String)
+ {
+ passwd = ((String)credential).toCharArray();
+ }
+ else if(credential instanceof char[])
+ {
+ passwd = (char[]) credential;
+ }
+ ((PasswordCallback)cb).setPassword(passwd);
+ }
+ else
+ throw new RuntimeException(getClass().getName() + " does not handle a callback of type " +
+ cb.getClass().getCanonicalName());
+ }
+ }
+ }
+
+ public void setSecurityInfo(Principal principal, Object credential)
+ {
+ this.principal = principal;
+ this.credential = credential;
+ }
+}
\ No newline at end of file
Added: projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/plugins/IDTrustSecurityManagement.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/plugins/IDTrustSecurityManagement.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-api/src/main/java/org/jboss/security/idtrust/api/plugins/IDTrustSecurityManagement.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,71 @@
+/*
+ * 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.idtrust.api.plugins;
+
+import org.jboss.security.AuthenticationManager;
+import org.jboss.security.AuthorizationManager;
+import org.jboss.security.ISecurityManagement;
+import org.jboss.security.audit.AuditManager;
+import org.jboss.security.identitytrust.IdentityTrustManager;
+import org.jboss.security.mapping.MappingManager;
+import org.jboss.security.plugins.JBossAuthenticationManager;
+import org.jboss.security.plugins.JBossAuthorizationManager;
+import org.jboss.security.plugins.audit.JBossAuditManager;
+import org.jboss.security.plugins.identitytrust.JBossIdentityTrustManager;
+import org.jboss.security.plugins.mapping.JBossMappingManager;
+
+/**
+ * Default Implementation of the ISecurityManagement interface
+ * <a href="mailto:anil.saldhana at redhat.com>Anil Saldhana</a>
+ * @since May 29, 2008
+ */
+public class IDTrustSecurityManagement implements ISecurityManagement
+{
+ /** */
+ private static final long serialVersionUID = 1L;
+
+ public AuditManager getAuditManager(String securityDomain)
+ {
+ return new JBossAuditManager(securityDomain);
+ }
+
+ public AuthenticationManager getAuthenticationManager(String securityDomain)
+ {
+ return new JBossAuthenticationManager(securityDomain,
+ new IDTrustCallbackHandler());
+ }
+
+ public AuthorizationManager getAuthorizationManager(String securityDomain)
+ {
+ return new JBossAuthorizationManager(securityDomain);
+ }
+
+ public IdentityTrustManager getIdentityTrustManager(String securityDomain)
+ {
+ return new JBossIdentityTrustManager(securityDomain);
+ }
+
+ public MappingManager getMappingManager(String securityDomain)
+ {
+ return new JBossMappingManager(securityDomain);
+ }
+}
\ No newline at end of file
Added: projects/security/security-standalone/trunk/idtrust-api/src/test/java/org/jboss/security/idtrust/test/factories/SecurityFactoryUnitTestCase.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-api/src/test/java/org/jboss/security/idtrust/test/factories/SecurityFactoryUnitTestCase.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-api/src/test/java/org/jboss/security/idtrust/test/factories/SecurityFactoryUnitTestCase.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,42 @@
+/*
+ * 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.idtrust.test.factories;
+
+import org.jboss.security.idtrust.api.factories.SecurityFactory;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit Tests for the SecurityFactory
+ * <a href="mailto:anil.saldhana at redhat.com>Anil Saldhana</a>
+ */
+public class SecurityFactoryUnitTestCase extends TestCase
+{
+ private final String SECURITY_DOMAIN = "test";
+
+ public void testSecurityManagers()
+ {
+ assertNotNull(SecurityFactory.getAuthenticationManager(SECURITY_DOMAIN));
+ assertNotNull(SecurityFactory.getAuthorizationManager(SECURITY_DOMAIN));
+ assertNotNull(SecurityFactory.getAuditManager(SECURITY_DOMAIN));
+ }
+}
\ No newline at end of file
Added: projects/security/security-standalone/trunk/idtrust-config/.classpath
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/.classpath (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/.classpath 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.1.4/jaxb-api-2.1.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-impl/2.1.4/jaxb-impl-2.1.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbosssx-bare/2.0.2-SNAPSHOT/jbosssx-bare-2.0.2-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/authorization-spi/2.0.2-SNAPSHOT/authorization-spi-2.0.2-SNAPSHOT.jar" sourcepath="/M2_REPO/org/jboss/security/authorization-spi/2.0.2-SNAPSHOT/authorization-spi-2.0.2-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="output" path="target/eclipse-classes"/>
+</classpath>
Added: projects/security/security-standalone/trunk/idtrust-config/.project
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/.project (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/.project 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,13 @@
+<projectDescription>
+ <name>jboss-idtrust-config</name>
+ <comment>JBoss Security is a cross cutting project that handles security for the JEMS projects</comment>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: projects/security/security-standalone/trunk/idtrust-config/pom.xml
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/pom.xml (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/pom.xml 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,62 @@
+<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-idtrust-parent</artifactId>
+ <version>2.0.2-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jboss-idtrust-config</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Security IDTrust Config</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>JBoss Security is a cross cutting project that handles security for the JEMS projects. The IDTrust API contains the api needed by standalone projects to use IDTrust.</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>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security-standalone/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security-standalone/trunk/</developerConnection>
+ <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/security-standalone/trunk/</url>
+ </scm>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>identity-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>authorization-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-bare</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>sun-jaxb</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <version>2.1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>sun-jaxb</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ <version>2.1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/IDTrustConfiguration.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/IDTrustConfiguration.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/IDTrustConfiguration.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,79 @@
+/*
+ * 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.config;
+
+import java.io.InputStream;
+import java.util.List;
+
+import javax.security.auth.login.Configuration;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
+
+import org.jboss.security.auth.login.XMLLoginConfigImpl;
+import org.jboss.security.config.jaxb.ApplicationPolicy;
+import org.jboss.security.config.jaxb.PolicyConfig;
+
+/**
+ * IDTrust Configuration
+ * <a href="mailto:anil.saldhana at redhat.com>Anil Saldhana</a>
+ */
+public class IDTrustConfiguration
+{
+ private static XMLLoginConfigImpl xmlConfig = XMLLoginConfigImpl.getInstance();
+ private JBossSXConfigBridge bridge = new JBossSXConfigBridge();
+
+ public IDTrustConfiguration()
+ {
+ Configuration config = null;
+ try
+ {
+ config = Configuration.getConfiguration();
+ }
+ catch(Exception ignore) {}
+ if(config == null || !(config instanceof XMLLoginConfigImpl))
+ Configuration.setConfiguration(xmlConfig);
+ }
+
+ @SuppressWarnings("unchecked")
+ public void config(String configFile) throws Exception
+ {
+ ClassLoader tcl = Thread.currentThread().getContextClassLoader();
+ InputStream is = tcl.getResourceAsStream(configFile);
+ JAXBContext jaxbContext = JAXBContext.newInstance("org.jboss.security.config.jaxb");
+ Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
+ JAXBElement<PolicyConfig> jaxbElement = (JAXBElement<PolicyConfig>) unmarshaller.unmarshal(is);
+ PolicyConfig policyConfig = jaxbElement.getValue();
+ if(policyConfig == null)
+ throw new IllegalStateException("policy Config is null");
+ this.addApplicationPolicies(policyConfig.getApplicationPolicy());
+ }
+
+ public void addApplicationPolicies(List<ApplicationPolicy> appPoliciesList)
+ {
+ for(ApplicationPolicy aPolicy: appPoliciesList)
+ {
+ xmlConfig.addApplicationPolicy(aPolicy.getName(),
+ bridge.map(aPolicy));
+ }
+ }
+}
\ No newline at end of file
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/JBossSXConfigBridge.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/JBossSXConfigBridge.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/JBossSXConfigBridge.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,154 @@
+/*
+ * 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.config;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.security.auth.login.AppConfigurationEntry;
+import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag;
+
+import org.jboss.security.auth.login.AuthenticationInfo;
+import org.jboss.security.auth.login.BaseAuthenticationInfo;
+import org.jboss.security.authorization.config.AuthorizationModuleEntry;
+import org.jboss.security.config.jaxb.LoginModuleInfo;
+import org.jboss.security.config.jaxb.ModuleOption;
+import org.jboss.security.config.jaxb.ModuleOptionFlag;
+import org.jboss.security.config.jaxb.PolicyModule;
+
+/**
+ * Bridges the JAXB Configuration to the JBossSX one
+ * <a href="mailto:anil.saldhana at redhat.com>Anil Saldhana</a>
+ * @since May 30, 2008
+ */
+public class JBossSXConfigBridge
+{
+ public ApplicationPolicy map(org.jboss.security.config.jaxb.ApplicationPolicy appPolicy)
+ {
+ String appName = appPolicy.getName();
+ ApplicationPolicy result = new ApplicationPolicy(appName);
+ result.setAuthenticationInfo(map(appName, appPolicy.getAuthentication()));
+ result.setAuthorizationInfo(map(appName, appPolicy.getAuthorization()));
+ return result;
+ }
+
+ public BaseAuthenticationInfo map(String name,
+ org.jboss.security.config.jaxb.AuthenticationInfo authenticationInfo)
+ {
+ AuthenticationInfo baseInfo = new AuthenticationInfo(name);
+ baseInfo.setAppConfigurationEntry(map(authenticationInfo.getLoginModule()));
+ return baseInfo;
+ }
+
+ public AuthorizationInfo map(String name,
+ org.jboss.security.config.jaxb.AuthorizationInfo authorizationInfo)
+ {
+ if(authorizationInfo == null)
+ return null;
+ AuthorizationInfo authzInfo = new AuthorizationInfo(name);
+ List<PolicyModule> policyModuleList = authorizationInfo.getPolicyModule();
+ int lenOfPolicyModules = policyModuleList != null ? policyModuleList.size() : 0;
+ if(lenOfPolicyModules > 0)
+ {
+ for(PolicyModule policyModule : policyModuleList)
+ {
+ AuthorizationModuleEntry authzEntry = new AuthorizationModuleEntry(policyModule.getCode());
+ authzInfo.add(authzEntry);
+ authzEntry.setControlFlag(getControlFlag(policyModule.getFlag()));
+ authzEntry.getOptions().putAll(map(policyModule.getModuleOption()));
+ }
+ }
+ return authzInfo;
+ }
+
+ public AppConfigurationEntry[]
+ map(List<org.jboss.security.config.jaxb.LoginModuleInfo> loginModuleInfoList)
+ {
+ int index = 0;
+ AppConfigurationEntry[] entries = new AppConfigurationEntry[loginModuleInfoList.size()];
+
+ for(LoginModuleInfo loginModuleInfo : loginModuleInfoList)
+ {
+ entries[index++] = map(loginModuleInfo);
+ }
+ return entries;
+ }
+
+ public AppConfigurationEntry map(org.jboss.security.config.jaxb.LoginModuleInfo loginModuleInfo)
+ {
+ String moduleName = loginModuleInfo.getCode();
+ ModuleOptionFlag flag = loginModuleInfo.getFlag();
+ List<ModuleOption> moduleOptionList = loginModuleInfo.getModuleOption();
+ return new AppConfigurationEntry(moduleName, map(flag), map(moduleOptionList));
+ }
+
+ public Map<String,Object> map(List<ModuleOption> moduleOptionList)
+ {
+ if(moduleOptionList == null)
+ return null;
+ Map<String,Object> moduleOptions = new HashMap<String,Object>();
+ for(ModuleOption moduleOption: moduleOptionList)
+ {
+ String name = moduleOption.getName();
+ List<Object> objectList = moduleOption.getContent();
+ moduleOptions.put(name, objectList.get(0)); //Just get the first object
+ }
+ return moduleOptions;
+ }
+
+ public LoginModuleControlFlag map(ModuleOptionFlag flag)
+ {
+ if(flag != null)
+ {
+ if(flag.compareTo(ModuleOptionFlag.OPTIONAL) == 0)
+ return LoginModuleControlFlag.OPTIONAL;
+ else
+ if(flag.compareTo(ModuleOptionFlag.SUFFICIENT) == 0)
+ return LoginModuleControlFlag.SUFFICIENT;
+ else
+ if(flag.compareTo(ModuleOptionFlag.REQUISITE) == 0)
+ return LoginModuleControlFlag.REQUISITE;
+ }
+
+ //Get the default option
+ return LoginModuleControlFlag.REQUIRED;
+ }
+
+ public ControlFlag getControlFlag(ModuleOptionFlag flag)
+ {
+ if(flag != null)
+ {
+ if(flag.compareTo(ModuleOptionFlag.OPTIONAL) == 0)
+ return ControlFlag.OPTIONAL;
+ else
+ if(flag.compareTo(ModuleOptionFlag.SUFFICIENT) == 0)
+ return ControlFlag.SUFFICIENT;
+ else
+ if(flag.compareTo(ModuleOptionFlag.REQUISITE) == 0)
+ return ControlFlag.REQUISITE;
+ }
+
+ //Get the default option
+ return ControlFlag.REQUIRED;
+ }
+}
\ No newline at end of file
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/SecurityActions.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/SecurityActions.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/SecurityActions.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,45 @@
+/*
+ * 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.config;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * Privileged Blocks
+ * <a href="mailto:anil.saldhana at redhat.com>Anil Saldhana</a>
+ * @since May 30, 2008
+ */
+
+class SecurityActions
+{
+ static ClassLoader getContextClassLoader()
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ApplicationPolicy.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ApplicationPolicy.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ApplicationPolicy.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,264 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <choice>
+ * <element ref="{urn:jboss:security-config:5.0}authentication"/>
+ * <element ref="{urn:jboss:security-config:5.0}authentication-jaspi"/>
+ * </choice>
+ * <element ref="{urn:jboss:security-config:5.0}authorization" minOccurs="0"/>
+ * <element ref="{urn:jboss:security-config:5.0}rolemapping" minOccurs="0"/>
+ * <element ref="{urn:jboss:security-config:5.0}audit" minOccurs="0"/>
+ * <element ref="{urn:jboss:security-config:5.0}identity-trust" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="extends" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "", propOrder = {
+ "authentication",
+ "authenticationJaspi",
+ "authorization",
+ "rolemapping",
+ "audit",
+ "identityTrust"
+})
+ at XmlRootElement(name = "application-policy")
+public class ApplicationPolicy {
+
+ protected AuthenticationInfo authentication;
+ @XmlElement(name = "authentication-jaspi")
+ protected AuthenticationJaspiInfo authenticationJaspi;
+ protected AuthorizationInfo authorization;
+ protected RoleMappingInfo rolemapping;
+ protected AuditInfo audit;
+ @XmlElement(name = "identity-trust")
+ protected IdentityTrustInfo identityTrust;
+ @XmlAttribute(required = true)
+ protected String name;
+ @XmlAttribute(name = "extends")
+ protected String _extends;
+
+ /**
+ * Gets the value of the authentication property.
+ *
+ * @return
+ * possible object is
+ * {@link AuthenticationInfo }
+ *
+ */
+ public AuthenticationInfo getAuthentication() {
+ return authentication;
+ }
+
+ /**
+ * Sets the value of the authentication property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AuthenticationInfo }
+ *
+ */
+ public void setAuthentication(AuthenticationInfo value) {
+ this.authentication = value;
+ }
+
+ /**
+ * Gets the value of the authenticationJaspi property.
+ *
+ * @return
+ * possible object is
+ * {@link AuthenticationJaspiInfo }
+ *
+ */
+ public AuthenticationJaspiInfo getAuthenticationJaspi() {
+ return authenticationJaspi;
+ }
+
+ /**
+ * Sets the value of the authenticationJaspi property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AuthenticationJaspiInfo }
+ *
+ */
+ public void setAuthenticationJaspi(AuthenticationJaspiInfo value) {
+ this.authenticationJaspi = value;
+ }
+
+ /**
+ * Gets the value of the authorization property.
+ *
+ * @return
+ * possible object is
+ * {@link AuthorizationInfo }
+ *
+ */
+ public AuthorizationInfo getAuthorization() {
+ return authorization;
+ }
+
+ /**
+ * Sets the value of the authorization property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AuthorizationInfo }
+ *
+ */
+ public void setAuthorization(AuthorizationInfo value) {
+ this.authorization = value;
+ }
+
+ /**
+ * Gets the value of the rolemapping property.
+ *
+ * @return
+ * possible object is
+ * {@link RoleMappingInfo }
+ *
+ */
+ public RoleMappingInfo getRolemapping() {
+ return rolemapping;
+ }
+
+ /**
+ * Sets the value of the rolemapping property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RoleMappingInfo }
+ *
+ */
+ public void setRolemapping(RoleMappingInfo value) {
+ this.rolemapping = value;
+ }
+
+ /**
+ * Gets the value of the audit property.
+ *
+ * @return
+ * possible object is
+ * {@link AuditInfo }
+ *
+ */
+ public AuditInfo getAudit() {
+ return audit;
+ }
+
+ /**
+ * Sets the value of the audit property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AuditInfo }
+ *
+ */
+ public void setAudit(AuditInfo value) {
+ this.audit = value;
+ }
+
+ /**
+ * Gets the value of the identityTrust property.
+ *
+ * @return
+ * possible object is
+ * {@link IdentityTrustInfo }
+ *
+ */
+ public IdentityTrustInfo getIdentityTrust() {
+ return identityTrust;
+ }
+
+ /**
+ * Sets the value of the identityTrust property.
+ *
+ * @param value
+ * allowed object is
+ * {@link IdentityTrustInfo }
+ *
+ */
+ public void setIdentityTrust(IdentityTrustInfo value) {
+ this.identityTrust = value;
+ }
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value) {
+ this.name = value;
+ }
+
+ /**
+ * Gets the value of the extends property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getExtends() {
+ return _extends;
+ }
+
+ /**
+ * Sets the value of the extends property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setExtends(String value) {
+ this._extends = value;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuditInfo.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuditInfo.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuditInfo.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for auditInfo complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="auditInfo">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}provider-module" maxOccurs="unbounded"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "auditInfo", propOrder = {
+ "providerModule"
+})
+public class AuditInfo {
+
+ @XmlElement(name = "provider-module", required = true)
+ protected List<ProviderModule> providerModule;
+
+ /**
+ * Gets the value of the providerModule property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the providerModule property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getProviderModule().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ProviderModule }
+ *
+ *
+ */
+ public List<ProviderModule> getProviderModule() {
+ if (providerModule == null) {
+ providerModule = new ArrayList<ProviderModule>();
+ }
+ return this.providerModule;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthModuleInfo.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthModuleInfo.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthModuleInfo.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,131 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for authModuleInfo complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="authModuleInfo">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}module-option" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="code" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="login-module-stack-ref" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "authModuleInfo", propOrder = {
+ "moduleOption"
+})
+public class AuthModuleInfo {
+
+ @XmlElement(name = "module-option")
+ protected List<ModuleOption> moduleOption;
+ @XmlAttribute(required = true)
+ protected String code;
+ @XmlAttribute(name = "login-module-stack-ref")
+ protected String loginModuleStackRef;
+
+ /**
+ * Gets the value of the moduleOption property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the moduleOption property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getModuleOption().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ModuleOption }
+ *
+ *
+ */
+ public List<ModuleOption> getModuleOption() {
+ if (moduleOption == null) {
+ moduleOption = new ArrayList<ModuleOption>();
+ }
+ return this.moduleOption;
+ }
+
+ /**
+ * Gets the value of the code property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * Sets the value of the code property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCode(String value) {
+ this.code = value;
+ }
+
+ /**
+ * Gets the value of the loginModuleStackRef property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLoginModuleStackRef() {
+ return loginModuleStackRef;
+ }
+
+ /**
+ * Sets the value of the loginModuleStackRef property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLoginModuleStackRef(String value) {
+ this.loginModuleStackRef = value;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthenticationInfo.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthenticationInfo.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthenticationInfo.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for authenticationInfo complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="authenticationInfo">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}login-module" maxOccurs="unbounded"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "authenticationInfo", propOrder = {
+ "loginModule"
+})
+public class AuthenticationInfo {
+
+ @XmlElement(name = "login-module", required = true)
+ protected List<LoginModuleInfo> loginModule;
+
+ /**
+ * Gets the value of the loginModule property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the loginModule property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getLoginModule().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link LoginModuleInfo }
+ *
+ *
+ */
+ public List<LoginModuleInfo> getLoginModule() {
+ if (loginModule == null) {
+ loginModule = new ArrayList<LoginModuleInfo>();
+ }
+ return this.loginModule;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthenticationJaspiInfo.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthenticationJaspiInfo.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthenticationJaspiInfo.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,109 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for authenticationJaspiInfo complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="authenticationJaspiInfo">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}login-module-stack" maxOccurs="unbounded"/>
+ * <element ref="{urn:jboss:security-config:5.0}auth-module" maxOccurs="unbounded"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "authenticationJaspiInfo", propOrder = {
+ "loginModuleStack",
+ "authModule"
+})
+public class AuthenticationJaspiInfo {
+
+ @XmlElement(name = "login-module-stack", required = true)
+ protected List<LoginModuleStack> loginModuleStack;
+ @XmlElement(name = "auth-module", required = true)
+ protected List<AuthModuleInfo> authModule;
+
+ /**
+ * Gets the value of the loginModuleStack property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the loginModuleStack property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getLoginModuleStack().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link LoginModuleStack }
+ *
+ *
+ */
+ public List<LoginModuleStack> getLoginModuleStack() {
+ if (loginModuleStack == null) {
+ loginModuleStack = new ArrayList<LoginModuleStack>();
+ }
+ return this.loginModuleStack;
+ }
+
+ /**
+ * Gets the value of the authModule property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the authModule property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAuthModule().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link AuthModuleInfo }
+ *
+ *
+ */
+ public List<AuthModuleInfo> getAuthModule() {
+ if (authModule == null) {
+ authModule = new ArrayList<AuthModuleInfo>();
+ }
+ return this.authModule;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthorizationInfo.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthorizationInfo.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/AuthorizationInfo.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for authorizationInfo complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="authorizationInfo">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}policy-module" maxOccurs="unbounded"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "authorizationInfo", propOrder = {
+ "policyModule"
+})
+public class AuthorizationInfo {
+
+ @XmlElement(name = "policy-module", required = true)
+ protected List<PolicyModule> policyModule;
+
+ /**
+ * Gets the value of the policyModule property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the policyModule property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getPolicyModule().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link PolicyModule }
+ *
+ *
+ */
+ public List<PolicyModule> getPolicyModule() {
+ if (policyModule == null) {
+ policyModule = new ArrayList<PolicyModule>();
+ }
+ return this.policyModule;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/IdentityTrustInfo.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/IdentityTrustInfo.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/IdentityTrustInfo.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for identityTrustInfo complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="identityTrustInfo">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}trust-module" maxOccurs="unbounded"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "identityTrustInfo", propOrder = {
+ "trustModule"
+})
+public class IdentityTrustInfo {
+
+ @XmlElement(name = "trust-module", required = true)
+ protected List<TrustModule> trustModule;
+
+ /**
+ * Gets the value of the trustModule property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the trustModule property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getTrustModule().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link TrustModule }
+ *
+ *
+ */
+ public List<TrustModule> getTrustModule() {
+ if (trustModule == null) {
+ trustModule = new ArrayList<TrustModule>();
+ }
+ return this.trustModule;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/LoginModuleInfo.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/LoginModuleInfo.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/LoginModuleInfo.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,131 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for loginModuleInfo complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="loginModuleInfo">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}module-option" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="code" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="flag" use="required" type="{urn:jboss:security-config:5.0}module-option-flag" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "loginModuleInfo", propOrder = {
+ "moduleOption"
+})
+public class LoginModuleInfo {
+
+ @XmlElement(name = "module-option")
+ protected List<ModuleOption> moduleOption;
+ @XmlAttribute(required = true)
+ protected String code;
+ @XmlAttribute(required = true)
+ protected ModuleOptionFlag flag;
+
+ /**
+ * Gets the value of the moduleOption property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the moduleOption property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getModuleOption().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ModuleOption }
+ *
+ *
+ */
+ public List<ModuleOption> getModuleOption() {
+ if (moduleOption == null) {
+ moduleOption = new ArrayList<ModuleOption>();
+ }
+ return this.moduleOption;
+ }
+
+ /**
+ * Gets the value of the code property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * Sets the value of the code property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCode(String value) {
+ this.code = value;
+ }
+
+ /**
+ * Gets the value of the flag property.
+ *
+ * @return
+ * possible object is
+ * {@link ModuleOptionFlag }
+ *
+ */
+ public ModuleOptionFlag getFlag() {
+ return flag;
+ }
+
+ /**
+ * Sets the value of the flag property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ModuleOptionFlag }
+ *
+ */
+ public void setFlag(ModuleOptionFlag value) {
+ this.flag = value;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/LoginModuleStack.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/LoginModuleStack.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/LoginModuleStack.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,106 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}login-module" maxOccurs="unbounded"/>
+ * </sequence>
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "", propOrder = {
+ "loginModule"
+})
+ at XmlRootElement(name = "login-module-stack")
+public class LoginModuleStack {
+
+ @XmlElement(name = "login-module", required = true)
+ protected List<LoginModuleInfo> loginModule;
+ @XmlAttribute(required = true)
+ protected String name;
+
+ /**
+ * Gets the value of the loginModule property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the loginModule property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getLoginModule().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link LoginModuleInfo }
+ *
+ *
+ */
+ public List<LoginModuleInfo> getLoginModule() {
+ if (loginModule == null) {
+ loginModule = new ArrayList<LoginModuleInfo>();
+ }
+ return this.loginModule;
+ }
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value) {
+ this.name = value;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/MappingModule.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/MappingModule.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/MappingModule.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,106 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}module-option" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="code" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "", propOrder = {
+ "moduleOption"
+})
+ at XmlRootElement(name = "mapping-module")
+public class MappingModule {
+
+ @XmlElement(name = "module-option")
+ protected List<ModuleOption> moduleOption;
+ @XmlAttribute(required = true)
+ protected String code;
+
+ /**
+ * Gets the value of the moduleOption property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the moduleOption property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getModuleOption().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ModuleOption }
+ *
+ *
+ */
+ public List<ModuleOption> getModuleOption() {
+ if (moduleOption == null) {
+ moduleOption = new ArrayList<ModuleOption>();
+ }
+ return this.moduleOption;
+ }
+
+ /**
+ * Gets the value of the code property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * Sets the value of the code property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCode(String value) {
+ this.code = value;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ModuleOption.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ModuleOption.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ModuleOption.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,109 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlMixed;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <any/>
+ * </sequence>
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "", propOrder = {
+ "content"
+})
+ at XmlRootElement(name = "module-option")
+public class ModuleOption {
+
+ @XmlMixed
+ @XmlAnyElement(lax = true)
+ protected List<Object> content;
+ @XmlAttribute(required = true)
+ protected String name;
+
+ /**
+ * Gets the value of the content property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the content property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getContent().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ * {@link Object }
+ *
+ *
+ */
+ public List<Object> getContent() {
+ if (content == null) {
+ content = new ArrayList<Object>();
+ }
+ return this.content;
+ }
+
+ /**
+ * Gets the value of the name property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the name property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setName(String value) {
+ this.name = value;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ModuleOptionFlag.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ModuleOptionFlag.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ModuleOptionFlag.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,64 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for module-option-flag.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * <simpleType name="module-option-flag">
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * <enumeration value="required"/>
+ * <enumeration value="requisite"/>
+ * <enumeration value="sufficient"/>
+ * <enumeration value="optional"/>
+ * </restriction>
+ * </simpleType>
+ * </pre>
+ *
+ */
+ at XmlType(name = "module-option-flag")
+ at XmlEnum
+public enum ModuleOptionFlag {
+
+ @XmlEnumValue("required")
+ REQUIRED("required"),
+ @XmlEnumValue("requisite")
+ REQUISITE("requisite"),
+ @XmlEnumValue("sufficient")
+ SUFFICIENT("sufficient"),
+ @XmlEnumValue("optional")
+ OPTIONAL("optional");
+ private final String value;
+
+ ModuleOptionFlag(String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static ModuleOptionFlag fromValue(String v) {
+ for (ModuleOptionFlag c: ModuleOptionFlag.values()) {
+ if (c.value.equals(v)) {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ObjectFactory.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ObjectFactory.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ObjectFactory.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,260 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.security.config.jaxb package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+ at XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _Rolemapping_QNAME = new QName("urn:jboss:security-config:5.0", "rolemapping");
+ private final static QName _AuthModule_QNAME = new QName("urn:jboss:security-config:5.0", "auth-module");
+ private final static QName _AuthenticationJaspi_QNAME = new QName("urn:jboss:security-config:5.0", "authentication-jaspi");
+ private final static QName _Audit_QNAME = new QName("urn:jboss:security-config:5.0", "audit");
+ private final static QName _Policy_QNAME = new QName("urn:jboss:security-config:5.0", "policy");
+ private final static QName _Authorization_QNAME = new QName("urn:jboss:security-config:5.0", "authorization");
+ private final static QName _IdentityTrust_QNAME = new QName("urn:jboss:security-config:5.0", "identity-trust");
+ private final static QName _Authentication_QNAME = new QName("urn:jboss:security-config:5.0", "authentication");
+ private final static QName _LoginModule_QNAME = new QName("urn:jboss:security-config:5.0", "login-module");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.security.config.jaxb
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link AuthorizationInfo }
+ *
+ */
+ public AuthorizationInfo createAuthorizationInfo() {
+ return new AuthorizationInfo();
+ }
+
+ /**
+ * Create an instance of {@link PolicyModule }
+ *
+ */
+ public PolicyModule createPolicyModule() {
+ return new PolicyModule();
+ }
+
+ /**
+ * Create an instance of {@link AuditInfo }
+ *
+ */
+ public AuditInfo createAuditInfo() {
+ return new AuditInfo();
+ }
+
+ /**
+ * Create an instance of {@link ModuleOption }
+ *
+ */
+ public ModuleOption createModuleOption() {
+ return new ModuleOption();
+ }
+
+ /**
+ * Create an instance of {@link ApplicationPolicy }
+ *
+ */
+ public ApplicationPolicy createApplicationPolicy() {
+ return new ApplicationPolicy();
+ }
+
+ /**
+ * Create an instance of {@link IdentityTrustInfo }
+ *
+ */
+ public IdentityTrustInfo createIdentityTrustInfo() {
+ return new IdentityTrustInfo();
+ }
+
+ /**
+ * Create an instance of {@link ProviderModule }
+ *
+ */
+ public ProviderModule createProviderModule() {
+ return new ProviderModule();
+ }
+
+ /**
+ * Create an instance of {@link AuthenticationInfo }
+ *
+ */
+ public AuthenticationInfo createAuthenticationInfo() {
+ return new AuthenticationInfo();
+ }
+
+ /**
+ * Create an instance of {@link AuthModuleInfo }
+ *
+ */
+ public AuthModuleInfo createAuthModuleInfo() {
+ return new AuthModuleInfo();
+ }
+
+ /**
+ * Create an instance of {@link PolicyConfig }
+ *
+ */
+ public PolicyConfig createPolicyConfig() {
+ return new PolicyConfig();
+ }
+
+ /**
+ * Create an instance of {@link LoginModuleStack }
+ *
+ */
+ public LoginModuleStack createLoginModuleStack() {
+ return new LoginModuleStack();
+ }
+
+ /**
+ * Create an instance of {@link AuthenticationJaspiInfo }
+ *
+ */
+ public AuthenticationJaspiInfo createAuthenticationJaspiInfo() {
+ return new AuthenticationJaspiInfo();
+ }
+
+ /**
+ * Create an instance of {@link RoleMappingInfo }
+ *
+ */
+ public RoleMappingInfo createRoleMappingInfo() {
+ return new RoleMappingInfo();
+ }
+
+ /**
+ * Create an instance of {@link MappingModule }
+ *
+ */
+ public MappingModule createMappingModule() {
+ return new MappingModule();
+ }
+
+ /**
+ * Create an instance of {@link LoginModuleInfo }
+ *
+ */
+ public LoginModuleInfo createLoginModuleInfo() {
+ return new LoginModuleInfo();
+ }
+
+ /**
+ * Create an instance of {@link TrustModule }
+ *
+ */
+ public TrustModule createTrustModule() {
+ return new TrustModule();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link RoleMappingInfo }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "urn:jboss:security-config:5.0", name = "rolemapping")
+ public JAXBElement<RoleMappingInfo> createRolemapping(RoleMappingInfo value) {
+ return new JAXBElement<RoleMappingInfo>(_Rolemapping_QNAME, RoleMappingInfo.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AuthModuleInfo }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "urn:jboss:security-config:5.0", name = "auth-module")
+ public JAXBElement<AuthModuleInfo> createAuthModule(AuthModuleInfo value) {
+ return new JAXBElement<AuthModuleInfo>(_AuthModule_QNAME, AuthModuleInfo.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AuthenticationJaspiInfo }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "urn:jboss:security-config:5.0", name = "authentication-jaspi")
+ public JAXBElement<AuthenticationJaspiInfo> createAuthenticationJaspi(AuthenticationJaspiInfo value) {
+ return new JAXBElement<AuthenticationJaspiInfo>(_AuthenticationJaspi_QNAME, AuthenticationJaspiInfo.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AuditInfo }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "urn:jboss:security-config:5.0", name = "audit")
+ public JAXBElement<AuditInfo> createAudit(AuditInfo value) {
+ return new JAXBElement<AuditInfo>(_Audit_QNAME, AuditInfo.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link PolicyConfig }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "urn:jboss:security-config:5.0", name = "policy")
+ public JAXBElement<PolicyConfig> createPolicy(PolicyConfig value) {
+ return new JAXBElement<PolicyConfig>(_Policy_QNAME, PolicyConfig.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AuthorizationInfo }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "urn:jboss:security-config:5.0", name = "authorization")
+ public JAXBElement<AuthorizationInfo> createAuthorization(AuthorizationInfo value) {
+ return new JAXBElement<AuthorizationInfo>(_Authorization_QNAME, AuthorizationInfo.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link IdentityTrustInfo }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "urn:jboss:security-config:5.0", name = "identity-trust")
+ public JAXBElement<IdentityTrustInfo> createIdentityTrust(IdentityTrustInfo value) {
+ return new JAXBElement<IdentityTrustInfo>(_IdentityTrust_QNAME, IdentityTrustInfo.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link AuthenticationInfo }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "urn:jboss:security-config:5.0", name = "authentication")
+ public JAXBElement<AuthenticationInfo> createAuthentication(AuthenticationInfo value) {
+ return new JAXBElement<AuthenticationInfo>(_Authentication_QNAME, AuthenticationInfo.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link LoginModuleInfo }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "urn:jboss:security-config:5.0", name = "login-module")
+ public JAXBElement<LoginModuleInfo> createLoginModule(LoginModuleInfo value) {
+ return new JAXBElement<LoginModuleInfo>(_LoginModule_QNAME, LoginModuleInfo.class, null, value);
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/PolicyConfig.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/PolicyConfig.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/PolicyConfig.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for PolicyConfig complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="PolicyConfig">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}application-policy" maxOccurs="unbounded"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "PolicyConfig", propOrder = {
+ "applicationPolicy"
+})
+public class PolicyConfig {
+
+ @XmlElement(name = "application-policy", required = true)
+ protected List<ApplicationPolicy> applicationPolicy;
+
+ /**
+ * Gets the value of the applicationPolicy property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the applicationPolicy property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getApplicationPolicy().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ApplicationPolicy }
+ *
+ *
+ */
+ public List<ApplicationPolicy> getApplicationPolicy() {
+ if (applicationPolicy == null) {
+ applicationPolicy = new ArrayList<ApplicationPolicy>();
+ }
+ return this.applicationPolicy;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/PolicyModule.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/PolicyModule.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/PolicyModule.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,133 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}module-option" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="code" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="flag" use="required" type="{urn:jboss:security-config:5.0}module-option-flag" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "", propOrder = {
+ "moduleOption"
+})
+ at XmlRootElement(name = "policy-module")
+public class PolicyModule {
+
+ @XmlElement(name = "module-option")
+ protected List<ModuleOption> moduleOption;
+ @XmlAttribute(required = true)
+ protected String code;
+ @XmlAttribute(required = true)
+ protected ModuleOptionFlag flag;
+
+ /**
+ * Gets the value of the moduleOption property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the moduleOption property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getModuleOption().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ModuleOption }
+ *
+ *
+ */
+ public List<ModuleOption> getModuleOption() {
+ if (moduleOption == null) {
+ moduleOption = new ArrayList<ModuleOption>();
+ }
+ return this.moduleOption;
+ }
+
+ /**
+ * Gets the value of the code property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * Sets the value of the code property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCode(String value) {
+ this.code = value;
+ }
+
+ /**
+ * Gets the value of the flag property.
+ *
+ * @return
+ * possible object is
+ * {@link ModuleOptionFlag }
+ *
+ */
+ public ModuleOptionFlag getFlag() {
+ return flag;
+ }
+
+ /**
+ * Sets the value of the flag property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ModuleOptionFlag }
+ *
+ */
+ public void setFlag(ModuleOptionFlag value) {
+ this.flag = value;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ProviderModule.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ProviderModule.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/ProviderModule.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,106 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}module-option" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="code" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "", propOrder = {
+ "moduleOption"
+})
+ at XmlRootElement(name = "provider-module")
+public class ProviderModule {
+
+ @XmlElement(name = "module-option")
+ protected List<ModuleOption> moduleOption;
+ @XmlAttribute(required = true)
+ protected String code;
+
+ /**
+ * Gets the value of the moduleOption property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the moduleOption property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getModuleOption().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ModuleOption }
+ *
+ *
+ */
+ public List<ModuleOption> getModuleOption() {
+ if (moduleOption == null) {
+ moduleOption = new ArrayList<ModuleOption>();
+ }
+ return this.moduleOption;
+ }
+
+ /**
+ * Gets the value of the code property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * Sets the value of the code property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCode(String value) {
+ this.code = value;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/RoleMappingInfo.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/RoleMappingInfo.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/RoleMappingInfo.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,76 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for roleMappingInfo complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="roleMappingInfo">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}mapping-module" maxOccurs="unbounded"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "roleMappingInfo", propOrder = {
+ "mappingModule"
+})
+public class RoleMappingInfo {
+
+ @XmlElement(name = "mapping-module", required = true)
+ protected List<MappingModule> mappingModule;
+
+ /**
+ * Gets the value of the mappingModule property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the mappingModule property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getMappingModule().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link MappingModule }
+ *
+ *
+ */
+ public List<MappingModule> getMappingModule() {
+ if (mappingModule == null) {
+ mappingModule = new ArrayList<MappingModule>();
+ }
+ return this.mappingModule;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/TrustModule.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/TrustModule.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/TrustModule.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,133 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+
+package org.jboss.security.config.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType>
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element ref="{urn:jboss:security-config:5.0}module-option" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="code" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="flag" use="required" type="{urn:jboss:security-config:5.0}module-option-flag" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "", propOrder = {
+ "moduleOption"
+})
+ at XmlRootElement(name = "trust-module")
+public class TrustModule {
+
+ @XmlElement(name = "module-option")
+ protected List<ModuleOption> moduleOption;
+ @XmlAttribute(required = true)
+ protected String code;
+ @XmlAttribute(required = true)
+ protected ModuleOptionFlag flag;
+
+ /**
+ * Gets the value of the moduleOption property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the moduleOption property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getModuleOption().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ModuleOption }
+ *
+ *
+ */
+ public List<ModuleOption> getModuleOption() {
+ if (moduleOption == null) {
+ moduleOption = new ArrayList<ModuleOption>();
+ }
+ return this.moduleOption;
+ }
+
+ /**
+ * Gets the value of the code property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * Sets the value of the code property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCode(String value) {
+ this.code = value;
+ }
+
+ /**
+ * Gets the value of the flag property.
+ *
+ * @return
+ * possible object is
+ * {@link ModuleOptionFlag }
+ *
+ */
+ public ModuleOptionFlag getFlag() {
+ return flag;
+ }
+
+ /**
+ * Sets the value of the flag property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ModuleOptionFlag }
+ *
+ */
+ public void setFlag(ModuleOptionFlag value) {
+ this.flag = value;
+ }
+
+}
Added: projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/package-info.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/package-info.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-config/src/main/java/org/jboss/security/config/jaxb/package-info.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,9 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2008.05.31 at 09:44:23 PM CDT
+//
+
+ at javax.xml.bind.annotation.XmlSchema(namespace = "urn:jboss:security-config:5.0", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.jboss.security.config.jaxb;
Added: projects/security/security-standalone/trunk/idtrust-impl/.classpath
===================================================================
--- projects/security/security-standalone/trunk/idtrust-impl/.classpath (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-impl/.classpath 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/resources"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/jboss-idtrust-api"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/jboss-idtrust-config"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jboss-security-spi-bare/2.0.2-SNAPSHOT/jboss-security-spi-bare-2.0.2-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/authorization-spi/2.0.2-SNAPSHOT/authorization-spi-2.0.2-SNAPSHOT.jar" sourcepath="/M2_REPO/org/jboss/security/authorization-spi/2.0.2-SNAPSHOT/authorization-spi-2.0.2-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/sun-jaf/activation/1.1/activation-1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0/stax-api-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/identity-spi/2.0.2-SNAPSHOT/identity-spi-2.0.2-SNAPSHOT.jar"/>
+ <classpathentry kind="output" path="target/eclipse-classes"/>
+</classpath>
Added: projects/security/security-standalone/trunk/idtrust-impl/.project
===================================================================
--- projects/security/security-standalone/trunk/idtrust-impl/.project (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-impl/.project 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,13 @@
+<projectDescription>
+ <name>jboss-idtrust-impl</name>
+ <comment>JBoss Security is a cross cutting project that handles security for the JEMS projects</comment>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: projects/security/security-standalone/trunk/idtrust-impl/pom.xml
===================================================================
--- projects/security/security-standalone/trunk/idtrust-impl/pom.xml (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-impl/pom.xml 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,66 @@
+<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-idtrust-parent</artifactId>
+ <version>2.0.2-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jboss-idtrust-impl</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Security IDTrust Implementation</name>
+ <url>http://labs.jboss.org/portal/jbosssecurity/</url>
+ <description>JBoss Security is a cross cutting project that handles security for the JEMS projects. The IDTrust Impl contains the implementation needed by standalone projects to use IDTrust.</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>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security-standalone/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security-standalone/trunk/</developerConnection>
+ <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/security-standalone/trunk/</url>
+ </scm>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>identity-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>authorization-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi-bare</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-bare</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-idtrust-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-idtrust-config</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: projects/security/security-standalone/trunk/idtrust-impl/src/main/java/org/jboss/security/idtrust/impl/plugins/authorization/IDTrustAuthorizationModule.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-impl/src/main/java/org/jboss/security/idtrust/impl/plugins/authorization/IDTrustAuthorizationModule.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-impl/src/main/java/org/jboss/security/idtrust/impl/plugins/authorization/IDTrustAuthorizationModule.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,120 @@
+/*
+ * 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.idtrust.impl.plugins.authorization;
+
+import java.security.Principal;
+import java.security.acl.Group;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import javax.security.auth.Subject;
+import javax.security.auth.callback.CallbackHandler;
+
+import org.jboss.security.authorization.AuthorizationContext;
+import org.jboss.security.authorization.AuthorizationException;
+import org.jboss.security.authorization.AuthorizationModule;
+import org.jboss.security.authorization.Resource;
+import org.jboss.security.identity.RoleGroup;
+
+/**
+ * Simple Authorization Module that authorizes users with
+ * the configured roles
+ * <a href="mailto:anil.saldhana at redhat.com>Anil Saldhana</a>
+ */
+public class IDTrustAuthorizationModule implements AuthorizationModule
+{
+ private Set<String> rolesSet = new HashSet<String>();
+ private Subject subject = null;
+
+ public boolean abort() throws AuthorizationException
+ {
+ return true;
+ }
+
+ public int authorize(Resource resource)
+ {
+ Set<Principal> principals = subject.getPrincipals();
+ for(Principal p: principals)
+ {
+ if(p instanceof Group)
+ {
+ Group group = (Group) p;
+ if(group.getName().equalsIgnoreCase("Roles"))
+ {
+ Enumeration<? extends Principal> roles = group.members();
+ while(roles.hasMoreElements())
+ {
+ Principal role = roles.nextElement();
+ if(rolesSet.contains(role.getName()))
+ return AuthorizationContext.PERMIT;
+ }
+ }
+ }
+ }
+ return AuthorizationContext.DENY;
+ }
+
+ public boolean commit() throws AuthorizationException
+ {
+ return true;
+ }
+
+ public boolean destroy()
+ {
+ return true;
+ }
+
+
+ /**
+ * Initialize the module
+ *
+ * @param subject the authenticated subject
+ * @param handler CallbackHandler
+ * @param sharedState state shared with other configured modules
+ * @param options options specified in the Configuration
+ * for this particular module
+ * @param roles Roles of the subject
+ */
+ public void initialize(Subject subject, CallbackHandler handler,
+ Map<String,Object> sharedState, Map<String,Object> options, RoleGroup roles)
+ {
+ String configuredRoles = (String) options.get("roles");
+ getRoles(configuredRoles);
+ this.subject = subject;
+ }
+
+ /**
+ * Get the role names from the comma separated list of role names
+ * @param commaStr
+ */
+ private void getRoles(String commaStr)
+ {
+ StringTokenizer st = new StringTokenizer(commaStr, ",");
+ while(st.hasMoreTokens())
+ {
+ this.rolesSet.add(st.nextToken());
+ }
+ }
+}
\ No newline at end of file
Added: projects/security/security-standalone/trunk/idtrust-impl/src/test/java/org/jboss/security/idtrust/test/AuthenticationUnitTestCase.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-impl/src/test/java/org/jboss/security/idtrust/test/AuthenticationUnitTestCase.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-impl/src/test/java/org/jboss/security/idtrust/test/AuthenticationUnitTestCase.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,89 @@
+/*
+ * 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.idtrust.test;
+
+import java.security.Principal;
+
+import javax.security.auth.Subject;
+
+import junit.framework.TestCase;
+
+import org.jboss.security.AuthenticationManager;
+import org.jboss.security.config.IDTrustConfiguration;
+import org.jboss.security.idtrust.api.factories.SecurityFactory;
+
+/**
+ * Authentication Unit Tests
+ * <a href="mailto:anil.saldhana at redhat.com>Anil Saldhana</a>
+ * @since May 30, 2008
+ */
+public class AuthenticationUnitTestCase extends TestCase
+{
+ private final String securityDomainName = "test";
+
+ public void testValidAuthentication() throws Exception
+ {
+ String configFile = "config/authentication.conf";
+ IDTrustConfiguration idtrustConfig = new IDTrustConfiguration();
+ idtrustConfig.config(configFile);
+
+ AuthenticationManager am = SecurityFactory.getAuthenticationManager(securityDomainName);
+ assertNotNull(am);
+
+ Subject subject = new Subject();
+ Principal principal = getPrincipal("anil");
+ Object credential = new String("pass");
+
+ boolean result = am.isValid(principal, credential);
+ assertTrue("Valid Auth", result);
+ result = am.isValid(principal, credential, subject);
+ assertTrue("Valid Auth", result);
+ assertTrue("Subject has principals", subject.getPrincipals().size() > 0);
+ }
+
+ public void testInvalidAuthentication() throws Exception
+ {
+ String configFile = "config/authentication.conf";
+ IDTrustConfiguration idtrustConfig = new IDTrustConfiguration();
+ idtrustConfig.config(configFile);
+
+ AuthenticationManager am = SecurityFactory.getAuthenticationManager(securityDomainName);
+ assertNotNull(am);
+
+ Principal principal = getPrincipal("anil");
+ Object credential = new String("BADGUY");
+
+ boolean result = am.isValid(principal, credential);
+ assertFalse("Valid Auth", result);
+ }
+
+ private Principal getPrincipal(final String name)
+ {
+ return new Principal()
+ {
+ public String getName()
+ {
+ return name;
+ }
+ };
+ }
+}
\ No newline at end of file
Added: projects/security/security-standalone/trunk/idtrust-impl/src/test/java/org/jboss/security/idtrust/test/AuthorizationUnitTestCase.java
===================================================================
--- projects/security/security-standalone/trunk/idtrust-impl/src/test/java/org/jboss/security/idtrust/test/AuthorizationUnitTestCase.java (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-impl/src/test/java/org/jboss/security/idtrust/test/AuthorizationUnitTestCase.java 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,123 @@
+/*
+ * 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.idtrust.test;
+
+import java.security.Principal;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.security.auth.Subject;
+
+import org.jboss.security.AuthenticationManager;
+import org.jboss.security.AuthorizationManager;
+import org.jboss.security.authorization.AuthorizationContext;
+import org.jboss.security.authorization.Resource;
+import org.jboss.security.authorization.ResourceType;
+import org.jboss.security.config.IDTrustConfiguration;
+import org.jboss.security.identity.RoleGroup;
+import org.jboss.security.idtrust.api.factories.SecurityFactory;
+
+import junit.framework.TestCase;
+
+/**
+ * Authorization Unit Tests
+ * <a href="mailto:anil.saldhana at redhat.com>Anil Saldhana</a>
+ * @since May 31, 2008
+ */
+public class AuthorizationUnitTestCase extends TestCase
+{
+ private final String securityDomainName = "test";
+ private final String configFile = "config/authorization.conf";
+
+ public void testValidAuthorization() throws Exception
+ {
+ IDTrustConfiguration idtrustConfig = new IDTrustConfiguration();
+ idtrustConfig.config(configFile);
+
+ AuthenticationManager am = SecurityFactory.getAuthenticationManager(securityDomainName);
+ assertNotNull(am);
+
+ Subject subject = new Subject();
+ Principal principal = getPrincipal("anil");
+ Object credential = new String("pass");
+
+ boolean result = am.isValid(principal, credential, subject);
+ assertTrue("Valid Auth", result);
+ assertTrue("Subject has principals", subject.getPrincipals().size() > 0);
+
+ AuthorizationManager authzM = SecurityFactory.getAuthorizationManager(securityDomainName);
+ assertNotNull(authzM);
+ Resource resource = getResource();
+ int decision = authzM.authorize(resource, subject, (RoleGroup)null);
+ assertTrue(decision == AuthorizationContext.PERMIT);
+ }
+
+ public void testInvalidAuthorization() throws Exception
+ {
+ IDTrustConfiguration idtrustConfig = new IDTrustConfiguration();
+ idtrustConfig.config(configFile);
+
+ AuthenticationManager am = SecurityFactory.getAuthenticationManager(securityDomainName);
+ assertNotNull(am);
+
+ Subject subject = new Subject();
+ Principal principal = getPrincipal("anil");
+ Object credential = new String("pass");
+
+ boolean result = am.isValid(principal, credential, subject);
+ assertTrue("Valid Auth", result);
+ assertTrue("Subject has principals", subject.getPrincipals().size() > 0);
+
+ AuthorizationManager authzM = SecurityFactory.getAuthorizationManager(securityDomainName);
+ assertNotNull(authzM);
+ Resource resource = getResource();
+ int decision = authzM.authorize(resource, subject, (RoleGroup)null);
+ assertTrue(decision == AuthorizationContext.PERMIT);
+ }
+
+ private Principal getPrincipal(final String name)
+ {
+ return new Principal()
+ {
+ public String getName()
+ {
+ return name;
+ }
+ };
+ }
+
+ private Resource getResource()
+ {
+ return new Resource()
+ {
+ public ResourceType getLayer()
+ {
+ return ResourceType.IDTRUST;
+ }
+
+ public Map<String, Object> getMap()
+ {
+ return new HashMap<String,Object>();
+ }
+ };
+ }
+}
\ No newline at end of file
Added: projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/config/authentication.conf
===================================================================
--- projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/config/authentication.conf (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/config/authentication.conf 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,14 @@
+<?xml version='1.0'?>
+
+<policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:security-config:5.0"
+ xmlns="urn:jboss:security-config:5.0"
+ xmlns:jbxb="urn:jboss:security-config:5.0">
+ <application-policy name = "test">
+ <authentication>
+ <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag = "required">
+ </login-module>
+ </authentication>
+ </application-policy>
+</policy>
\ No newline at end of file
Added: projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/config/authorization.conf
===================================================================
--- projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/config/authorization.conf (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/config/authorization.conf 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,23 @@
+<?xml version='1.0'?>
+
+<policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:security-config:5.0"
+ xmlns="urn:jboss:security-config:5.0"
+ xmlns:jbxb="urn:jboss:security-config:5.0">
+ <application-policy name = "test">
+ <authentication>
+ <login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag = "required">
+ <module-option name = "name">1.1</module-option>
+ <module-option name = "succeed">true</module-option>
+ <module-option name = "throwEx">false</module-option>
+ </login-module>
+ </authentication>
+ <authorization>
+ <policy-module
+ code="org.jboss.security.idtrust.impl.plugins.authorization.IDTrustAuthorizationModule">
+ <module-option name="roles">validuser</module-option>
+ </policy-module>
+ </authorization>
+ </application-policy>
+</policy>
\ No newline at end of file
Added: projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/defaultRoles.properties
===================================================================
--- projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/defaultRoles.properties (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/defaultRoles.properties 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1 @@
+anil=validuser
\ No newline at end of file
Added: projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/defaultUsers.properties
===================================================================
--- projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/defaultUsers.properties (rev 0)
+++ projects/security/security-standalone/trunk/idtrust-impl/src/test/resources/defaultUsers.properties 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1 @@
+anil=pass
\ No newline at end of file
Added: projects/security/security-standalone/trunk/parent/pom.xml
===================================================================
--- projects/security/security-standalone/trunk/parent/pom.xml (rev 0)
+++ projects/security/security-standalone/trunk/parent/pom.xml 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,140 @@
+<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</groupId>
+ <artifactId>jboss-parent</artifactId>
+ <version>3</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-idtrust-parent</artifactId>
+ <packaging>pom</packaging>
+ <version>2.0.2-SNAPSHOT</version>
+ <name>JBoss Security IDTrust - Parent</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>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/security/security-spi/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/security/security-spi/trunk</developerConnection>
+ </scm>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jboss-deploy-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>jboss-deploy</id>
+ <goals>
+ <goal>jboss-deploy</goal>
+ </goals>
+ <phase>deploy</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <groupId>jboss</groupId>
+ <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
+ <removeArtifactVersion>true</removeArtifactVersion>
+ </configuration>
+ <inherited>true</inherited>
+ </plugin>
+ <plugin>
+ <artifactId>maven-release-plugin</artifactId>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/jbossas/projects/security/security-spi/tags</tagBase>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <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>
+ <argLine>${surefire.jvm.args}</argLine>
+ <useFile>false</useFile>
+ <trimStackTrace>false</trimStackTrace>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Repository</name>
+ <layout>default</layout>
+ <url>http://repository.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+
+ <repository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshots Repository</name>
+ <layout>default</layout>
+ <url>http://snapshots.jboss.org/maven2/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>identity-spi</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>authorization-spi</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi-bare</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-bare</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>stax</groupId>
+ <artifactId>stax-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
Added: projects/security/security-standalone/trunk/pom.xml
===================================================================
--- projects/security/security-standalone/trunk/pom.xml (rev 0)
+++ projects/security/security-standalone/trunk/pom.xml 2008-06-02 14:36:02 UTC (rev 73928)
@@ -0,0 +1,23 @@
+<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-idtrust-parent</artifactId>
+ <version>2.0.2-SNAPSHOT</version>
+ <relativePath>parent</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-idtrust-pom</artifactId>
+ <packaging>pom</packaging>
+ <name>JBoss Security IDTrust - Aggregator</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>
+
+ <modules>
+ <module>parent</module>
+ <module>idtrust-config</module>
+ <module>idtrust-api</module>
+ <module>idtrust-impl</module>
+ <module>assembly</module>
+ </modules>
+</project>
More information about the jboss-cvs-commits
mailing list