[jboss-cvs] JBossAS SVN: r109904 - in branches/JBPAPP_5_1: component-matrix and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Dec 14 12:31:02 EST 2010
Author: alessio.soldano at jboss.com
Date: 2010-12-14 12:31:01 -0500 (Tue, 14 Dec 2010)
New Revision: 109904
Added:
branches/JBPAPP_5_1/webservices/src/main/org/jboss/wsf/container/jboss50/security/
branches/JBPAPP_5_1/webservices/src/main/org/jboss/wsf/container/jboss50/security/JaasSecurityDomainAdaptorImpl.java
branches/JBPAPP_5_1/webservices/src/main/org/jboss/wsf/container/jboss50/security/JaasSecurityDomainAdaptorResolverImpl.java
branches/JBPAPP_5_1/webservices/src/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.security.JAASSecurityDomainAdaptorResolver
Modified:
branches/JBPAPP_5_1/build/pom.xml
branches/JBPAPP_5_1/component-matrix/pom.xml
branches/JBPAPP_5_1/webservices/build.xml
branches/JBPAPP_5_1/webservices/pom.xml
Log:
[JBPAPP-5589] Moving EAP 5.1.1 branch to jbossws-spi-1.1.2.SP5
Modified: branches/JBPAPP_5_1/build/pom.xml
===================================================================
--- branches/JBPAPP_5_1/build/pom.xml 2010-12-14 15:19:29 UTC (rev 109903)
+++ branches/JBPAPP_5_1/build/pom.xml 2010-12-14 17:31:01 UTC (rev 109904)
@@ -104,6 +104,11 @@
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-tomcat</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-webservices</artifactId>
+ </dependency>
</dependencies>
Modified: branches/JBPAPP_5_1/component-matrix/pom.xml
===================================================================
--- branches/JBPAPP_5_1/component-matrix/pom.xml 2010-12-14 15:19:29 UTC (rev 109903)
+++ branches/JBPAPP_5_1/component-matrix/pom.xml 2010-12-14 17:31:01 UTC (rev 109904)
@@ -37,7 +37,7 @@
<version.jboss.jbossts>4.6.1.GA_CP06</version.jboss.jbossts>
<version.jboss.jbossws-common>1.1.0.SP6</version.jboss.jbossws-common>
<version.jboss.jbossws-framework>3.1.2.SP8</version.jboss.jbossws-framework>
- <version.jboss.jbossws-spi>1.1.2.SP4</version.jboss.jbossws-spi>
+ <version.jboss.jbossws-spi>1.1.2.SP5</version.jboss.jbossws-spi>
<version.jboss.jbossws>3.1.2.SP7</version.jboss.jbossws>
<version.jboss.jms-integration-tests>1.0.1.GA</version.jboss.jms-integration-tests>
<version.jboss.messaging>1.4.7.GA</version.jboss.messaging>
Modified: branches/JBPAPP_5_1/webservices/build.xml
===================================================================
--- branches/JBPAPP_5_1/webservices/build.xml 2010-12-14 15:19:29 UTC (rev 109903)
+++ branches/JBPAPP_5_1/webservices/build.xml 2010-12-14 17:31:01 UTC (rev 109904)
@@ -99,6 +99,7 @@
<path refid="jboss.j2se.classpath"/>
<path refid="jboss.jmx.classpath"/>
<path refid="jboss.server.classpath"/>
+ <path refid="jboss.security.int.classpath"/>
<path refid="jboss.system.classpath"/>
<path refid="jboss.systemjmx.classpath"/>
<path refid="jboss.tomcat.classpath"/>
Modified: branches/JBPAPP_5_1/webservices/pom.xml
===================================================================
--- branches/JBPAPP_5_1/webservices/pom.xml 2010-12-14 15:19:29 UTC (rev 109903)
+++ branches/JBPAPP_5_1/webservices/pom.xml 2010-12-14 17:31:01 UTC (rev 109904)
@@ -54,6 +54,11 @@
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-security</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-system</artifactId>
<scope>provided</scope>
</dependency>
Added: branches/JBPAPP_5_1/webservices/src/main/org/jboss/wsf/container/jboss50/security/JaasSecurityDomainAdaptorImpl.java
===================================================================
--- branches/JBPAPP_5_1/webservices/src/main/org/jboss/wsf/container/jboss50/security/JaasSecurityDomainAdaptorImpl.java (rev 0)
+++ branches/JBPAPP_5_1/webservices/src/main/org/jboss/wsf/container/jboss50/security/JaasSecurityDomainAdaptorImpl.java 2010-12-14 17:31:01 UTC (rev 109904)
@@ -0,0 +1,67 @@
+/*
+ * 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.wsf.container.jboss50.security;
+
+import java.security.Key;
+import java.security.KeyStore;
+import java.util.Properties;
+
+import org.jboss.wsf.spi.security.JAASSecurityDomainAdaptor;
+import org.jboss.security.plugins.JaasSecurityDomain;
+
+/**
+ * Adapt JaasSecurityDomain to jbossws spi
+ *
+ * @author alessio.soldano at jboss.com
+ * @since 14-Dec-2010
+ *
+ */
+public class JaasSecurityDomainAdaptorImpl implements JAASSecurityDomainAdaptor
+{
+ private JaasSecurityDomain delegate;
+
+ public JaasSecurityDomainAdaptorImpl(JaasSecurityDomain delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ public KeyStore getKeyStore()
+ {
+ return delegate.getKeyStore();
+ }
+
+ public KeyStore getTrustStore()
+ {
+ return delegate.getTrustStore();
+ }
+
+ public Properties getAdditionalOptions()
+ {
+ return delegate.getAdditionalOptions();
+ }
+
+ public Key getKey(String alias, String serviceAuthToken) throws Exception
+ {
+ return delegate.getKey(alias, serviceAuthToken);
+ }
+
+}
Added: branches/JBPAPP_5_1/webservices/src/main/org/jboss/wsf/container/jboss50/security/JaasSecurityDomainAdaptorResolverImpl.java
===================================================================
--- branches/JBPAPP_5_1/webservices/src/main/org/jboss/wsf/container/jboss50/security/JaasSecurityDomainAdaptorResolverImpl.java (rev 0)
+++ branches/JBPAPP_5_1/webservices/src/main/org/jboss/wsf/container/jboss50/security/JaasSecurityDomainAdaptorResolverImpl.java 2010-12-14 17:31:01 UTC (rev 109904)
@@ -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.wsf.container.jboss50.security;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jboss.logging.Logger;
+import org.jboss.security.plugins.JaasSecurityDomain;
+import org.jboss.wsf.spi.security.JAASSecurityDomainAdaptor;
+import org.jboss.wsf.spi.security.JAASSecurityDomainAdaptorResolver;
+
+/**
+ * Lookup JAASSecurityAdaptor from given JNDI location
+ *
+ * @author alessio.soldano at jboss.com
+ * @since 14-Dec-2010
+ */
+public class JaasSecurityDomainAdaptorResolverImpl implements JAASSecurityDomainAdaptorResolver
+{
+ public JAASSecurityDomainAdaptor lookup(String jndi) throws Exception
+ {
+ InitialContext ic = null;
+ try
+ {
+ ic = new InitialContext();
+ Object o = ic.lookup(jndi);
+ if (!(o instanceof JaasSecurityDomain))
+ {
+ throw new Exception(jndi + " not bound to a JaasSecurityDomain but to a " + o.getClass().getName() + " instance");
+ }
+ return new JaasSecurityDomainAdaptorImpl((JaasSecurityDomain)o);
+ }
+ catch (NamingException e)
+ {
+ throw new Exception("JNDI failure handling " + jndi, e);
+ }
+ finally
+ {
+ if (ic != null)
+ {
+ try
+ {
+ ic.close();
+ }
+ catch (NamingException e)
+ {
+ Logger.getLogger(JaasSecurityDomainAdaptorImpl.class).warn(this + " failed to close InitialContext", e);
+ }
+ }
+ }
+ }
+}
Added: branches/JBPAPP_5_1/webservices/src/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.security.JAASSecurityDomainAdaptorResolver
===================================================================
--- branches/JBPAPP_5_1/webservices/src/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.security.JAASSecurityDomainAdaptorResolver (rev 0)
+++ branches/JBPAPP_5_1/webservices/src/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.security.JAASSecurityDomainAdaptorResolver 2010-12-14 17:31:01 UTC (rev 109904)
@@ -0,0 +1 @@
+org.jboss.wsf.container.jboss50.security.JaasSecurityDomainAdaptorResolverImpl
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list