JBossWS SVN: r18373 - stack/cxf/branches/jbossws-cxf-4.2.x.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-02-17 05:07:20 -0500 (Mon, 17 Feb 2014)
New Revision: 18373
Modified:
stack/cxf/branches/jbossws-cxf-4.2.x/
Log:
Blocked revisions 18275,18277-18281,18285-18286,18290-18292,18295-18296,18298-18299,18304-18306,18309,18311-18312,18345,18363,18371 via svnmerge
.......
r18275 | rsearls | 2014-01-26 22:35:31 +0100 (Sun, 26 Jan 2014) | 1 line
[JBWS-3738] component pieces for ActAs test. Test not yet fully functional.
.......
r18277 | asoldano | 2014-01-27 15:24:58 +0100 (Mon, 27 Jan 2014) | 2 lines
Upgrading to Undertow 1.0.0.Beta33 to solve some regressions against WFLY next
.......
r18278 | asoldano | 2014-01-27 16:04:27 +0100 (Mon, 27 Jan 2014) | 2 lines
[JBWS-3752] Moving to Apache CXF 2.7.9-SNAPSHOT
.......
r18279 | asoldano | 2014-01-27 17:48:40 +0100 (Mon, 27 Jan 2014) | 2 lines
[JBWS-3753] Installing a custom DestinationRegistry impl to use map lookup for matching destination on request receival
.......
r18280 | asoldano | 2014-01-27 17:49:11 +0100 (Mon, 27 Jan 2014) | 2 lines
[JBWS-3753] Adding testcase
.......
r18281 | asoldano | 2014-01-28 14:49:17 +0100 (Tue, 28 Jan 2014) | 2 lines
[JBWS-3741] Replace //, ///, ////, etc. in request paths with /
.......
r18285 | asoldano | 2014-01-28 21:05:05 +0100 (Tue, 28 Jan 2014) | 2 lines
[JBWS-3737] Do not try building PolicyAttachmentStore when there's no @PolicySets annotated class in the deployment
.......
r18286 | rsearls | 2014-01-28 22:25:10 +0100 (Tue, 28 Jan 2014) | 1 line
[JBWS-3738] incremental update; base components working.
.......
r18290 | asoldano | 2014-01-29 17:00:52 +0100 (Wed, 29 Jan 2014) | 2 lines
[JBWS-3702] Fixing binary distro regression
.......
r18291 | asoldano | 2014-01-30 11:00:02 +0100 (Thu, 30 Jan 2014) | 2 lines
Adding some permissions
.......
r18292 | asoldano | 2014-01-30 14:18:00 +0100 (Thu, 30 Jan 2014) | 2 lines
More permissions.xml
.......
r18295 | asoldano | 2014-01-30 18:13:26 +0100 (Thu, 30 Jan 2014) | 2 lines
[JBWS-3755] Use ClassLoaderProvider.isSet() to know when to look for the ServerConfig in ProviderImpl
.......
r18296 | asoldano | 2014-01-30 18:37:40 +0100 (Thu, 30 Jan 2014) | 2 lines
More on permissions
.......
r18298 | rsearls | 2014-01-30 23:44:04 +0100 (Thu, 30 Jan 2014) | 1 line
[JBWS-3738] Working ActAs test.
.......
r18299 | asoldano | 2014-02-03 16:52:20 +0100 (Mon, 03 Feb 2014) | 2 lines
More permissions related fixes
.......
r18304 | asoldano | 2014-02-03 18:02:53 +0100 (Mon, 03 Feb 2014) | 2 lines
[JBWS-3756] Add permission checks to sensitive public static methods
.......
r18305 | asoldano | 2014-02-03 18:40:34 +0100 (Mon, 03 Feb 2014) | 2 lines
Fixing binary distro testsuite regressions: move the endpoint publish build to build-jars-jaxws.xml where it really belongs to (not being meant to be part of the bindist)
.......
r18306 | asoldano | 2014-02-04 17:13:25 +0100 (Tue, 04 Feb 2014) | 2 lines
[JBWS-3738] Solving permissions related failures when running with security manager enabled
.......
r18309 | rsearls | 2014-02-06 18:29:54 +0100 (Thu, 06 Feb 2014) | 1 line
[JBWS-3738] added OnBehalfOf test. Restructured trust directory.
.......
r18311 | rsearls | 2014-02-06 22:28:28 +0100 (Thu, 06 Feb 2014) | 1 line
[JBWS-3738] added copyright text and other misc minor changes.
.......
r18312 | asoldano | 2014-02-07 10:16:05 +0100 (Fri, 07 Feb 2014) | 2 lines
[JBWS-3738] Fixing reference to STS class (moved in former commit)
.......
r18345 | asoldano | 2014-02-12 17:11:53 +0100 (Wed, 12 Feb 2014) | 2 lines
Moving to latest jbossws-native snapshot
.......
r18363 | asoldano | 2014-02-13 16:06:38 +0100 (Thu, 13 Feb 2014) | 2 lines
Use jbossws-native 4.2.0.CR1
.......
r18371 | rsearls | 2014-02-14 14:49:30 +0100 (Fri, 14 Feb 2014) | 1 line
[JBWS-3738] code cleanup. Removed some commented out code.
.......
Property changes on: stack/cxf/branches/jbossws-cxf-4.2.x
___________________________________________________________________
Modified: svnmerge-blocked
- /stack/cxf/trunk:18090,18094,18104,18117,18157,18164,18225-18226,18229,18239-18241,18249-18250,18254,18268,18270-18271
+ /stack/cxf/trunk:18090,18094,18104,18117,18157,18164,18225-18226,18229,18239-18241,18249-18250,18254,18268,18270-18271,18275,18277-18281,18285-18286,18290-18292,18295-18296,18298-18299,18304-18306,18309,18311-18312,18345,18363,18371
10 years, 2 months
JBossWS SVN: r18372 - stack/cxf/branches/jbossws-cxf-4.2.x.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-02-14 10:25:31 -0500 (Fri, 14 Feb 2014)
New Revision: 18372
Modified:
stack/cxf/branches/jbossws-cxf-4.2.x/
Log:
Blocked revisions 18090,18094,18104,18117,18157,18164,18225-18226,18229,18239-18241,18249-18250,18254,18268,18270-18271 via svnmerge
.......
r18090 | asoldano | 2013-11-11 11:49:10 +0100 (Mon, 11 Nov 2013) | 2 lines
Updating spi and common versions
.......
r18094 | asoldano | 2013-11-15 14:42:03 +0100 (Fri, 15 Nov 2013) | 2 lines
[JBWS-3734] Moving to cxf and wss4j snapshots
.......
r18104 | asoldano | 2013-11-26 16:34:13 +0100 (Tue, 26 Nov 2013) | 2 lines
[JBWS-3734] Upgrade to Apache CXF 2.7.8
.......
r18117 | asoldano | 2013-12-03 12:58:12 +0100 (Tue, 03 Dec 2013) | 2 lines
Use latest 720 ASIL
.......
r18157 | rsearls | 2013-12-09 19:45:05 +0100 (Mon, 09 Dec 2013) | 1 line
bz-1032593: added method to remove app's wsdl directory
.......
r18164 | rsearls | 2013-12-10 22:25:10 +0100 (Tue, 10 Dec 2013) | 1 line
BZ-1029762: added check that endpointConfig is set else throw exception.
.......
r18225 | asoldano | 2014-01-07 15:21:14 +0100 (Tue, 07 Jan 2014) | 2 lines
Update WFLY version
.......
r18226 | rsearls | 2014-01-08 17:25:17 +0100 (Wed, 08 Jan 2014) | 1 line
JBWS-3738: updated the location of netty/main in wildfly800 env
.......
r18229 | asoldano | 2014-01-10 15:24:51 +0100 (Fri, 10 Jan 2014) | 2 lines
[JBWS-3751] Upgrade to WSS4J 1.6.14
.......
r18239 | jim.ma | 2014-01-15 11:00:35 +0100 (Wed, 15 Jan 2014) | 1 line
[JBWS-3702]:Add Undertow HttpDestinationFactory; Replace old httpserver integration(modules) with new undertow implementation
.......
r18240 | asoldano | 2014-01-15 12:03:47 +0100 (Wed, 15 Jan 2014) | 2 lines
[JBWS-3702] updating fixme
.......
r18241 | asoldano | 2014-01-15 12:06:08 +0100 (Wed, 15 Jan 2014) | 2 lines
Setting svn:ignore props
.......
r18249 | asoldano | 2014-01-16 16:04:35 +0100 (Thu, 16 Jan 2014) | 2 lines
[JBWS-3739][JBWS-3708][JBWS-3707][JBWS-3689] svn merge -r 18113:18144 https://svn.jboss.org/repos/jbossws/stack/cxf/branches/JBWS-3739 .
.......
r18250 | asoldano | 2014-01-16 16:05:46 +0100 (Thu, 16 Jan 2014) | 2 lines
[JBWS-3739][JBWS-3708][JBWS-3707][JBWS-3689] adding class change forgotten in former commit
.......
r18254 | asoldano | 2014-01-16 16:21:46 +0100 (Thu, 16 Jan 2014) | 2 lines
Moving to jaxws-undertow-httpspi-1.0.0.Beta1
.......
r18268 | asoldano | 2014-01-21 12:04:21 +0100 (Tue, 21 Jan 2014) | 2 lines
Synch with WFLY modules
.......
r18270 | rsearls | 2014-01-22 15:32:26 +0100 (Wed, 22 Jan 2014) | 1 line
JBWS-3738: Added tests for CallbackHander and Signaturename attributes
.......
r18271 | asoldano | 2014-01-22 15:51:18 +0100 (Wed, 22 Jan 2014) | 2 lines
Moving to JAXB 2.2.6 (sync with cxf)
.......
Property changes on: stack/cxf/branches/jbossws-cxf-4.2.x
___________________________________________________________________
Added: svnmerge-blocked
+ /stack/cxf/trunk:18090,18094,18104,18117,18157,18164,18225-18226,18229,18239-18241,18249-18250,18254,18268,18270-18271
10 years, 2 months
JBossWS SVN: r18371 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-02-14 08:49:30 -0500 (Fri, 14 Feb 2014)
New Revision: 18371
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java
Log:
[JBWS-3738] code cleanup. Removed some commented out code.
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java 2014-02-14 13:44:38 UTC (rev 18370)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/trust/WSTrustTestUtils.java 2014-02-14 13:49:30 UTC (rev 18371)
@@ -149,10 +149,8 @@
UsernameTokenCallbackHandler ch = new UsernameTokenCallbackHandler();
String str = ch.getUsernameTokenString("myactaskey", null);
- //System.out.println("##ut: " + str);
- //String tmpStr ="<wsse:UsernameToken xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext..." xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utilit..." wsu:Id=\"id-myactaskey\"> <wsse:Username>myactaskey</wsse:Username> </wsse:UsernameToken>";
- ctx.put(SecurityConstants.STS_TOKEN_ACT_AS, /*tmpStr*/str);
+ ctx.put(SecurityConstants.STS_TOKEN_ACT_AS, str);
STSClient stsClient = new STSClient(bus);
@@ -168,8 +166,6 @@
ctx.put(SecurityConstants.STS_CLIENT, stsClient);
}
- //-
-
/**
* Request a security token that allows it to act on the behalf of somebody else.
*
10 years, 2 months
JBossWS SVN: r18370 - in stack/cxf/branches/jaspi/modules: client/src/main/java/org/jboss/wsf/stack/cxf/client and 20 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-02-14 08:44:38 -0500 (Fri, 14 Feb 2014)
New Revision: 18370
Added:
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/DefaultJASPIAuthenticationProvider.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverInInterceptor.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverOutInterceptor.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSubjectCreatingInitInterceptor.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/log/
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/log/Loggers.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/module/
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/module/UsernameTokenServerAuthModule.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/resources/
stack/cxf/branches/jaspi/modules/jaspi/src/main/resources/META-INF/
stack/cxf/branches/jaspi/modules/jaspi/src/main/resources/META-INF/services/
stack/cxf/branches/jaspi/modules/jaspi/src/main/resources/META-INF/services/org.jboss.wsf.spi.security.JASPIAuthenticationProvider
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AutenticationMgrSubjectCreatingInterceptor.java
Removed:
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/jaspi/
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiSeverInInterceptor.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiSeverOutInterceptor.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/jaspi/
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/JaspiSubjectCreatingInterceptor.java
Modified:
stack/cxf/branches/jaspi/modules/client/pom.xml
stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/CXFClientConfigurer.java
stack/cxf/branches/jaspi/modules/jaspi/pom.xml
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConfigProvider.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConstants.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSClientAuthConfig.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSClientAuthContext.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthConfig.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthContext.java
stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/SecurityActions.java
stack/cxf/branches/jaspi/modules/server/pom.xml
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDJmsAddressBean.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/ChangeRequestnterceptor.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/Endpoint.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/EndpointImpl.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java
stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/Helper.java
Log:
Make jaspi authentication plugable for AS72 and Wildfly800
Modified: stack/cxf/branches/jaspi/modules/client/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/client/pom.xml 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/client/pom.xml 2014-02-14 13:44:38 UTC (rev 18370)
@@ -224,10 +224,6 @@
<dependency>
<groupId>org.jboss.spec.javax.xml.soap</groupId>
<artifactId>jboss-saaj-api_1.3_spec</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.spec.javax.security.auth.message</groupId>
- <artifactId>jboss-jaspi-api_1.1_spec</artifactId>
</dependency>
<!-- [JBWS-3722] Explicit JAXB dependencies to ensure the dependency management from jbossws-cxf pom.xml applies -->
<dependency>
@@ -244,10 +240,6 @@
<artifactId>jboss-common-core</artifactId>
</dependency>
<dependency>
- <groupId>org.picketbox</groupId>
- <artifactId>picketbox</artifactId>
- </dependency>
- <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
Modified: stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/CXFClientConfigurer.java
===================================================================
--- stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/CXFClientConfigurer.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/CXFClientConfigurer.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -22,31 +22,17 @@
package org.jboss.wsf.stack.cxf.client.configuration;
import java.util.Map;
-import java.util.Properties;
import java.util.Set;
-import javax.security.auth.message.config.AuthConfigFactory;
-import javax.security.auth.message.config.AuthConfigProvider;
-import javax.security.auth.message.config.ClientAuthConfig;
-
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.jaxws.DispatchImpl;
-import org.jboss.security.auth.callback.JBossCallbackHandler;
-import org.jboss.security.auth.login.AuthenticationInfo;
-import org.jboss.security.auth.login.BaseAuthenticationInfo;
-import org.jboss.security.auth.login.JASPIAuthenticationInfo;
-import org.jboss.security.config.ApplicationPolicy;
-import org.jboss.security.config.SecurityConfiguration;
import org.jboss.ws.common.configuration.ConfigHelper;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.metadata.config.ClientConfig;
-import org.jboss.wsf.stack.cxf.Loggers;
-import org.jboss.wsf.stack.cxf.client.jaspi.JaspiClientAuthenticator;
-import org.jboss.wsf.stack.cxf.client.jaspi.JaspiClientInInterceptor;
-import org.jboss.wsf.stack.cxf.client.jaspi.JaspiClientOutInterceptor;
-import org.jboss.wsf.stack.cxf.jaspi.config.JBossWSAuthConfigProvider;
-import org.jboss.wsf.stack.cxf.jaspi.config.JBossWSAuthConstants;
+import org.jboss.wsf.spi.security.JASPIAuthenticationProvider;
/**
* CXF extension of common ClientConfigurer
@@ -76,53 +62,19 @@
setConfigProperties(cxfClient, props);
//config jaspi
- JaspiClientAuthenticator clientAuthenticator = getJaspiAuthenticator(cxfClient, props) ;
- if (clientAuthenticator != null) {
- cxfClient.getInInterceptors().add(new JaspiClientInInterceptor(clientAuthenticator));
- cxfClient.getOutInterceptors().add(new JaspiClientOutInterceptor(clientAuthenticator));
- }
-
- }
-
-
- private JaspiClientAuthenticator getJaspiAuthenticator(Client client, Map<String, String> properties) {
- String securityDomain = properties.get(JaspiClientAuthenticator.JASPI_SECURITY_DOMAIN);
- if (securityDomain == null) {
- return null;
- }
- ApplicationPolicy appPolicy = SecurityConfiguration.getApplicationPolicy(securityDomain);
- if (appPolicy == null) {
- Loggers.ROOT_LOGGER.noApplicationPolicy(securityDomain);
- return null;
- }
- BaseAuthenticationInfo bai = appPolicy.getAuthenticationInfo();
- if (bai == null || bai instanceof AuthenticationInfo) {
- Loggers.ROOT_LOGGER.noJaspiApplicationPolicy(securityDomain);
- return null;
- }
- JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai;
-
- String contextRoot = client.getEndpoint().getEndpointInfo().getName().toString();
- String appId = "localhost " + contextRoot;
- AuthConfigFactory factory = AuthConfigFactory.getFactory();
-
- Properties props = new Properties();
- AuthConfigProvider provider = new JBossWSAuthConfigProvider(props, factory);
- provider = factory.getConfigProvider(JBossWSAuthConstants.SOAP_LAYER, appId, null);
- JBossCallbackHandler callbackHandler = new JBossCallbackHandler();
try
{
- ClientAuthConfig clientConfig = provider.getClientAuthConfig("soap", appId, callbackHandler);
- return new JaspiClientAuthenticator(clientConfig, securityDomain, jai);
+ JASPIAuthenticationProvider japsiProvider = SPIProvider.getInstance().getSPI(JASPIAuthenticationProvider.class);
+ if (japsiProvider != null)
+ {
+ japsiProvider.enableClientAuthentication(cxfClient, props);
+ }
}
- catch (Exception e)
+ catch (WSFException e)
{
- //ignore
+ // ignore
}
-
- return null;
-
- }
+ }
public void setConfigProperties(Client client, Map<String, String> properties) {
client.getEndpoint().putAll(properties);
Modified: stack/cxf/branches/jaspi/modules/jaspi/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/pom.xml 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/jaspi/pom.xml 2014-02-14 13:44:38 UTC (rev 18370)
@@ -16,11 +16,25 @@
<!-- Dependencies -->
<dependencies>
<dependency>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.servlet</groupId>
+ <artifactId>jboss-servlet-api_3.0_spec</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
</dependency>
<dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-ws-security</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.picketbox</groupId>
<artifactId>picketbox</artifactId>
</dependency>
@@ -31,6 +45,20 @@
</dependency>
<dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-processor</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
Added: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/DefaultJASPIAuthenticationProvider.java
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/DefaultJASPIAuthenticationProvider.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/DefaultJASPIAuthenticationProvider.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -0,0 +1,227 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.stack.cxf.jaspi;
+
+import java.util.Map;
+import java.util.Properties;
+
+import javax.security.auth.message.config.AuthConfigFactory;
+import javax.security.auth.message.config.AuthConfigProvider;
+import javax.security.auth.message.config.ClientAuthConfig;
+import javax.security.auth.message.config.ServerAuthConfig;
+import javax.security.auth.message.config.ServerAuthContext;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.jaxws22.EndpointImpl;
+import org.jboss.security.auth.callback.JBossCallbackHandler;
+import org.jboss.security.auth.login.AuthenticationInfo;
+import org.jboss.security.auth.login.BaseAuthenticationInfo;
+import org.jboss.security.auth.login.JASPIAuthenticationInfo;
+import org.jboss.security.config.ApplicationPolicy;
+import org.jboss.security.config.SecurityConfiguration;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
+import org.jboss.wsf.spi.security.JASPIAuthenticationProvider;
+import org.jboss.wsf.stack.cxf.jaspi.client.JaspiClientAuthenticator;
+import org.jboss.wsf.stack.cxf.jaspi.client.JaspiClientInInterceptor;
+import org.jboss.wsf.stack.cxf.jaspi.client.JaspiClientOutInterceptor;
+import org.jboss.wsf.stack.cxf.jaspi.config.JBossWSAuthConfigProvider;
+import org.jboss.wsf.stack.cxf.jaspi.config.JBossWSAuthConstants;
+import org.jboss.wsf.stack.cxf.jaspi.interceptor.JaspiSeverInInterceptor;
+import org.jboss.wsf.stack.cxf.jaspi.interceptor.JaspiSeverOutInterceptor;
+import org.jboss.wsf.stack.cxf.jaspi.log.Loggers;
+
+/**
+ * Class to enable the jaspi authentication interceptors in cxf bus , endpoint or client
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ */
+public class DefaultJASPIAuthenticationProvider implements JASPIAuthenticationProvider
+{
+ public DefaultJASPIAuthenticationProvider()
+ {
+ }
+
+ public boolean enableClientAuthentication(Object target, Map<String, String> properties)
+ {
+ if (!(target instanceof Client)) {
+ Loggers.ROOT_LOGGER.cannotEnableJASPIAuthentication(target.getClass().getSimpleName());
+ return false;
+ }
+ Client client = (Client)target;
+ String securityDomain = properties.get(JaspiClientAuthenticator.JASPI_SECURITY_DOMAIN);
+ if (securityDomain == null)
+ {
+ return false;
+ }
+ ApplicationPolicy appPolicy = SecurityConfiguration.getApplicationPolicy(securityDomain);
+ if (appPolicy == null)
+ {
+ Loggers.ROOT_LOGGER.noApplicationPolicy(securityDomain);
+ return false;
+ }
+ BaseAuthenticationInfo bai = appPolicy.getAuthenticationInfo();
+ if (bai == null || bai instanceof AuthenticationInfo)
+ {
+ Loggers.ROOT_LOGGER.noJaspiApplicationPolicy(securityDomain);
+ return false;
+ }
+ JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai;
+
+ String contextRoot = client.getEndpoint().getEndpointInfo().getName().toString();
+ String appId = "localhost " + contextRoot;
+ AuthConfigFactory factory = AuthConfigFactory.getFactory();
+
+ Properties props = new Properties();
+ AuthConfigProvider provider = new JBossWSAuthConfigProvider(props, factory);
+ provider = factory.getConfigProvider(JBossWSAuthConstants.SOAP_LAYER, appId, null);
+ JBossCallbackHandler callbackHandler = new JBossCallbackHandler();
+ try
+ {
+ ClientAuthConfig clientConfig = provider.getClientAuthConfig("soap", appId, callbackHandler);
+ JaspiClientAuthenticator clientAuthenticator = new JaspiClientAuthenticator(clientConfig, securityDomain, jai);
+ client.getInInterceptors().add(new JaspiClientInInterceptor(clientAuthenticator));
+ client.getOutInterceptors().add(new JaspiClientOutInterceptor(clientAuthenticator));
+ }
+ catch (Exception e)
+ {
+ //ignore
+ }
+
+ return false;
+
+ }
+
+ public boolean enableServerAuthentication(Deployment dep, JBossWebservicesMetaData wsmd)
+ {
+ String securityDomain = null;
+ if (wsmd != null)
+ {
+ securityDomain = wsmd.getProperty(JaspiServerAuthenticator.JASPI_SECURITY_DOMAIN);
+ }
+ if (securityDomain == null)
+ {
+ return false;
+ }
+ ApplicationPolicy appPolicy = SecurityConfiguration.getApplicationPolicy(securityDomain);
+ if (appPolicy == null)
+ {
+ Loggers.ROOT_LOGGER.noApplicationPolicy(securityDomain);
+ return false;
+ }
+ BaseAuthenticationInfo bai = appPolicy.getAuthenticationInfo();
+ if (bai == null || bai instanceof AuthenticationInfo)
+ {
+ Loggers.ROOT_LOGGER.noJaspiApplicationPolicy(securityDomain);
+ return false;
+ }
+ JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai;
+
+ String contextRoot = dep.getService().getContextRoot();
+ String appId = "localhost " + contextRoot;
+ AuthConfigFactory factory = AuthConfigFactory.getFactory();
+ Properties properties = new Properties();
+ AuthConfigProvider provider = new JBossWSAuthConfigProvider(properties, factory);
+ provider = factory.getConfigProvider(JBossWSAuthConstants.SOAP_LAYER, appId, null);
+
+ JBossCallbackHandler callbackHandler = new JBossCallbackHandler();
+ try
+ {
+ ServerAuthConfig serverConfig = provider.getServerAuthConfig(JBossWSAuthConstants.SOAP_LAYER, appId,
+ callbackHandler);
+ Properties serverContextProperties = new Properties();
+ serverContextProperties.put("security-domain", securityDomain);
+ serverContextProperties.put("jaspi-policy", jai);
+ Bus bus = dep.getAttachment(Bus.class);
+ serverContextProperties.put(Bus.class, bus);
+ String authContextID = dep.getSimpleName();
+ ServerAuthContext sctx = serverConfig.getAuthContext(authContextID, null, serverContextProperties);
+ JaspiServerAuthenticator serverAuthenticator = new JaspiServerAuthenticator(sctx);
+ bus.getInInterceptors().add(new JaspiSeverInInterceptor(serverAuthenticator));
+ bus.getOutInterceptors().add(new JaspiSeverOutInterceptor(serverAuthenticator));
+ return true;
+ }
+ catch (Exception e)
+ {
+ Loggers.DEPLOYMENT_LOGGER.cannotCreateServerAuthContext(securityDomain, e);
+ }
+ return false;
+ }
+
+ public boolean enableServerAuthentication(Object target, Endpoint endpoint)
+ {
+ if (target instanceof EndpointImpl) {
+ Loggers.ROOT_LOGGER.cannotEnableJASPIAuthentication(target.getClass().getSimpleName());
+ return false;
+ }
+ EndpointImpl endpointImpl = (EndpointImpl)target;
+ String securityDomain = (String) endpointImpl.getProperties().get(JaspiServerAuthenticator.JASPI_SECURITY_DOMAIN);
+ if (securityDomain == null)
+ {
+ return false;
+ }
+ ApplicationPolicy appPolicy = SecurityConfiguration.getApplicationPolicy(securityDomain);
+ if (appPolicy == null)
+ {
+ Loggers.ROOT_LOGGER.noApplicationPolicy(securityDomain);
+ return false;
+ }
+ BaseAuthenticationInfo bai = appPolicy.getAuthenticationInfo();
+ if (bai == null || bai instanceof AuthenticationInfo)
+ {
+ Loggers.ROOT_LOGGER.noJaspiApplicationPolicy(securityDomain);
+ return false;
+ }
+ JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai;
+ String contextRoot = endpoint.getService().getContextRoot();
+ String appId = "localhost " + contextRoot;
+ AuthConfigFactory factory = AuthConfigFactory.getFactory();
+ Properties properties = new Properties();
+ AuthConfigProvider provider = new JBossWSAuthConfigProvider(properties, factory);
+ provider = factory.getConfigProvider(JBossWSAuthConstants.SOAP_LAYER, appId, null);
+
+ JBossCallbackHandler callbackHandler = new JBossCallbackHandler();
+ JaspiServerAuthenticator serverAuthenticator = null;
+ try
+ {
+ ServerAuthConfig serverConfig = provider.getServerAuthConfig(JBossWSAuthConstants.SOAP_LAYER, appId,
+ callbackHandler);
+ Properties serverContextProperties = new Properties();
+ serverContextProperties.put("security-domain", securityDomain);
+ serverContextProperties.put("jaspi-policy", jai);
+ serverContextProperties.put(javax.xml.ws.Endpoint.class, endpointImpl);
+ String authContextID = endpointImpl.getBeanName();
+ ServerAuthContext sctx = serverConfig.getAuthContext(authContextID, null, serverContextProperties);
+ serverAuthenticator = new JaspiServerAuthenticator(sctx);
+ endpointImpl.getInInterceptors().add(new JaspiSeverInInterceptor(serverAuthenticator));
+ endpointImpl.getOutInterceptors().add(new JaspiSeverOutInterceptor(serverAuthenticator));
+ return true;
+
+ }
+ catch (Exception e)
+ {
+ Loggers.DEPLOYMENT_LOGGER.cannotCreateServerAuthContext(securityDomain, e);
+ }
+ return false;
+ }
+}
Property changes on: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/DefaultJASPIAuthenticationProvider.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConfigProvider.java
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConfigProvider.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConfigProvider.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -31,7 +31,12 @@
import javax.security.auth.message.config.ServerAuthConfig;
/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ * Factory class used to getJBossWSClientAuthConfig and JBossWSServerAuthConfig
+ * <p>I
+ * It is used to Obtain JBosswSClientAuthConfig and JBossWSServerAuthConfig
+ * @see org.jboss.wsf.stack.cxf.jaspi.config.JBosswSClientAuthConfig
+ * @see org.jboss.wsf.stack.cxf.jaspi.config.JBossWSServerAuthConfig
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
public class JBossWSAuthConfigProvider implements AuthConfigProvider
{
@@ -48,13 +53,15 @@
}
@Override
- public ClientAuthConfig getClientAuthConfig(String layer, String appContext, CallbackHandler handler) throws AuthException, SecurityException
+ public ClientAuthConfig getClientAuthConfig(String layer, String appContext, CallbackHandler handler)
+ throws AuthException, SecurityException
{
return new JBossWSClientAuthConfig(layer, appContext, handler, contextProperties);
}
@Override
- public ServerAuthConfig getServerAuthConfig(String layer, String appContext, CallbackHandler handler) throws AuthException, SecurityException
+ public ServerAuthConfig getServerAuthConfig(String layer, String appContext, CallbackHandler handler)
+ throws AuthException, SecurityException
{
return new JBossWSServerAuthConfig(layer, appContext, handler, contextProperties);
}
Modified: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConstants.java
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConstants.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSAuthConstants.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -21,8 +21,9 @@
*/
package org.jboss.wsf.stack.cxf.jaspi.config;
-/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
+/**
+ * Define the jaspi authentication property name
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
public class JBossWSAuthConstants
{
Modified: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSClientAuthConfig.java
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSClientAuthConfig.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSClientAuthConfig.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -52,29 +52,34 @@
import org.jboss.security.plugins.ClassLoaderLocatorFactory;
/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ * JBossWS ClientAuthConfig implementation to obtain ClientAuthContext
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
public class JBossWSClientAuthConfig extends JBossClientAuthConfig
{
@SuppressWarnings("rawtypes")
private final List modules = new ArrayList();
+
private CallbackHandler callbackHandler;
@SuppressWarnings("rawtypes")
public JBossWSClientAuthConfig(String layer, String appContext, CallbackHandler handler, Map properties)
{
super(layer, appContext, handler, properties);
+ callbackHandler = handler;
}
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public ClientAuthContext getAuthContext(String authContextID, Subject clientSubject, Map properties) throws AuthException
+ @SuppressWarnings(
+ {"rawtypes", "unchecked"})
+ public ClientAuthContext getAuthContext(String authContextID, Subject clientSubject, Map properties)
+ throws AuthException
{
List<ControlFlag> controlFlags = new ArrayList<ControlFlag>();
Map<String, Map> mapOptionsByName = new HashMap<String, Map>();
- JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo)properties.get("jaspi-policy");
+ JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) properties.get("jaspi-policy");
AuthModuleEntry[] amearr = jai.getAuthModuleEntry();
ClassLoader moduleCL = null;
@@ -105,30 +110,32 @@
}
}
- JBossWSClientAuthContext clientAuthContext = new JBossWSClientAuthContext(modules, mapOptionsByName, this.callbackHandler);
+ JBossWSClientAuthContext clientAuthContext = new JBossWSClientAuthContext(modules, mapOptionsByName,
+ this.callbackHandler);
clientAuthContext.setControlFlags(controlFlags);
return clientAuthContext;
}
- @SuppressWarnings({ "unchecked", "rawtypes" })
+ @SuppressWarnings(
+ {"unchecked", "rawtypes"})
private ClientAuthModule createCAM(ClassLoader moduleCL, String name) throws Exception
{
Class clazz = SecurityActions.loadClass(moduleCL, name);
Constructor ctr = clazz.getConstructor(new Class[0]);
- return (ClientAuthModule)ctr.newInstance(new Object[0]);
+ return (ClientAuthModule) ctr.newInstance(new Object[0]);
}
- @SuppressWarnings({ "rawtypes" })
+ @SuppressWarnings(
+ {"rawtypes"})
public List getClientAuthModules()
{
return modules;
}
-
-
+
@SuppressWarnings("rawtypes")
public String getAuthContextID(MessageInfo messageInfo)
{
- SOAPMessage request = (SOAPMessage)messageInfo.getRequestMessage();
+ SOAPMessage request = (SOAPMessage) messageInfo.getRequestMessage();
if (request == null)
{
return null;
@@ -159,14 +166,14 @@
SOAPBody body = envelope.getBody();
if (body != null)
{
-
+
Iterator it = body.getChildElements();
while (it.hasNext())
{
Object o = it.next();
if (o instanceof SOAPElement)
{
- QName name = ((SOAPElement)o).getElementQName();
+ QName name = ((SOAPElement) o).getElementQName();
return name.getLocalPart();
}
Modified: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSClientAuthContext.java
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSClientAuthContext.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSClientAuthContext.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -36,46 +36,55 @@
import org.jboss.security.config.ControlFlag;
/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ * JBossWS ClientAuthContext implementation to {@link #secureRequest(MessageInfo, Subject)}
+ * <p>and {@link #validateResponse(MessageInfo, Subject, Subject)}
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
-public class JBossWSClientAuthContext implements ClientAuthContext {
+public class JBossWSClientAuthContext implements ClientAuthContext
+{
private final List<ClientAuthModule> modules;
+
@SuppressWarnings("rawtypes")
private final Map<String, Map> moduleOptionsByName;
+
protected List<ControlFlag> controlFlags = new ArrayList<ControlFlag>();
@SuppressWarnings("rawtypes")
- public JBossWSClientAuthContext(List<ClientAuthModule> modules,
- Map<String, Map> moduleNameToOptions, CallbackHandler cbh)
- throws AuthException {
+ public JBossWSClientAuthContext(List<ClientAuthModule> modules, Map<String, Map> moduleNameToOptions,
+ CallbackHandler cbh) throws AuthException
+ {
this.modules = modules;
this.moduleOptionsByName = moduleNameToOptions;
- for (ClientAuthModule cam : modules) {
- cam.initialize(null, null, cbh,
- moduleOptionsByName.get(cam.getClass().getName()));
+ for (ClientAuthModule cam : modules)
+ {
+ cam.initialize(null, null, cbh, moduleOptionsByName.get(cam.getClass().getName()));
}
}
@Override
- public void cleanSubject(MessageInfo messageInfo, Subject subject)
- throws AuthException {
- for (ClientAuthModule cam : modules) {
+ public void cleanSubject(MessageInfo messageInfo, Subject subject) throws AuthException
+ {
+ for (ClientAuthModule cam : modules)
+ {
cam.cleanSubject(messageInfo, subject);
}
}
- public void setControlFlags(List<ControlFlag> controlFlags) {
+ public void setControlFlags(List<ControlFlag> controlFlags)
+ {
this.controlFlags = controlFlags;
}
@Override
- public AuthStatus secureRequest(MessageInfo messageInfo,
- Subject clientSubject) throws AuthException {
+ public AuthStatus secureRequest(MessageInfo messageInfo, Subject clientSubject) throws AuthException
+ {
AuthStatus status = null;
- for (ClientAuthModule sam : modules) {
+ for (ClientAuthModule sam : modules)
+ {
status = sam.secureRequest(messageInfo, clientSubject);
- if (status == AuthStatus.FAILURE) {
+ if (status == AuthStatus.FAILURE)
+ {
break;
}
}
@@ -83,12 +92,15 @@
}
@Override
- public AuthStatus validateResponse(MessageInfo messageInfo,
- Subject clientSubject, Subject serviceSubject) throws AuthException {
+ public AuthStatus validateResponse(MessageInfo messageInfo, Subject clientSubject, Subject serviceSubject)
+ throws AuthException
+ {
AuthStatus status = null;
- for (ClientAuthModule sam : modules) {
+ for (ClientAuthModule sam : modules)
+ {
status = sam.secureRequest(messageInfo, clientSubject);
- if (status == AuthStatus.FAILURE) {
+ if (status == AuthStatus.FAILURE)
+ {
break;
}
}
Modified: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthConfig.java
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthConfig.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthConfig.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -52,27 +52,34 @@
import org.jboss.security.config.ControlFlag;
import org.jboss.security.plugins.ClassLoaderLocator;
import org.jboss.security.plugins.ClassLoaderLocatorFactory;
-/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
+
+/**
+ * JBossWS ServerAuthConfig implentation to obtain JBossWSServerAuthContext
+ * @see org.jboss.wsf.stack.cxf.jaspi.config.JBossWSServerAuthContext
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
-public class JBossWSServerAuthConfig extends JBossServerAuthConfig {
- private final CallbackHandler callbackHandler = new JBossCallbackHandler();
- @SuppressWarnings("rawtypes")
- private final List modules = new ArrayList();
+public class JBossWSServerAuthConfig extends JBossServerAuthConfig
+{
+ private final CallbackHandler callbackHandler = new JBossCallbackHandler();
- @SuppressWarnings("rawtypes")
- public JBossWSServerAuthConfig(String layer, String appContext,
- CallbackHandler handler, Map properties) {
- super(layer, appContext, handler, properties);
- }
+ @SuppressWarnings("rawtypes")
+ private final List modules = new ArrayList();
- @SuppressWarnings({ "rawtypes", "unchecked" })
- public ServerAuthContext getAuthContext(String authContextID, Subject serviceSubject, Map properties) throws AuthException
+ @SuppressWarnings("rawtypes")
+ public JBossWSServerAuthConfig(String layer, String appContext, CallbackHandler handler, Map properties)
{
+ super(layer, appContext, handler, properties);
+ }
+
+ @SuppressWarnings(
+ {"rawtypes", "unchecked"})
+ public ServerAuthContext getAuthContext(String authContextID, Subject serviceSubject, Map properties)
+ throws AuthException
+ {
List<ControlFlag> controlFlags = new ArrayList<ControlFlag>();
Map<String, Map> mapOptionsByName = new HashMap<String, Map>();
- JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo)properties.get("jaspi-policy");
+ JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) properties.get("jaspi-policy");
AuthModuleEntry[] amearr = jai.getAuthModuleEntry();
ClassLoader moduleCL = null;
@@ -92,14 +99,15 @@
{
mapOptionsByName.put(ame.getAuthModuleName(), ame.getOptions());
controlFlags.add(ame.getControlFlag());
- ServerAuthModule sam = this.createSAM(moduleCL, ame.getAuthModuleName(), ame.getLoginModuleStackHolderName());
+ ServerAuthModule sam = this.createSAM(moduleCL, ame.getAuthModuleName(),
+ ame.getLoginModuleStackHolderName());
Map options = new HashMap();
- Bus bus = (Bus)properties.get(Bus.class);
+ Bus bus = (Bus) properties.get(Bus.class);
options.put(Bus.class, bus);
- javax.xml.ws.Endpoint endpoint = (javax.xml.ws.Endpoint)properties.get(javax.xml.ws.Endpoint.class);
+ javax.xml.ws.Endpoint endpoint = (javax.xml.ws.Endpoint) properties.get(javax.xml.ws.Endpoint.class);
options.put(javax.xml.ws.Endpoint.class, endpoint);
-
+
sam.initialize(null, null, callbackHandler, options);
modules.add(sam);
}
@@ -127,15 +135,16 @@
}
}
- JBossWSServerAuthContext serverAuthContext = new JBossWSServerAuthContext(modules, mapOptionsByName, this.callbackHandler);
+ JBossWSServerAuthContext serverAuthContext = new JBossWSServerAuthContext(modules, mapOptionsByName,
+ this.callbackHandler);
serverAuthContext.setControlFlags(controlFlags);
return serverAuthContext;
- }
+ }
- @SuppressWarnings("rawtypes")
+ @SuppressWarnings("rawtypes")
public String getAuthContextID(MessageInfo messageInfo)
{
- SOAPMessage request = (SOAPMessage)messageInfo.getRequestMessage();
+ SOAPMessage request = (SOAPMessage) messageInfo.getRequestMessage();
if (request == null)
{
return null;
@@ -166,14 +175,14 @@
SOAPBody body = envelope.getBody();
if (body != null)
{
-
+
Iterator it = body.getChildElements();
while (it.hasNext())
{
Object o = it.next();
if (o instanceof SOAPElement)
{
- QName name = ((SOAPElement)o).getElementQName();
+ QName name = ((SOAPElement) o).getElementQName();
return name.getLocalPart();
}
@@ -190,24 +199,29 @@
return null;
}
- public boolean isProtected() {
- throw new UnsupportedOperationException();
- }
+ public boolean isProtected()
+ {
+ throw new UnsupportedOperationException();
+ }
- @SuppressWarnings({ "unchecked", "rawtypes" })
- private ServerAuthModule createSAM(ClassLoader moduleCL, String name)
- throws Exception {
- Class clazz = SecurityActions.loadClass(moduleCL, name);
- Constructor ctr = clazz.getConstructor(new Class[0]);
- return (ServerAuthModule) ctr.newInstance(new Object[0]);
- }
+ @SuppressWarnings(
+ {"unchecked", "rawtypes"})
+ private ServerAuthModule createSAM(ClassLoader moduleCL, String name) throws Exception
+ {
+ Class clazz = SecurityActions.loadClass(moduleCL, name);
+ Constructor ctr = clazz.getConstructor(new Class[0]);
+ return (ServerAuthModule) ctr.newInstance(new Object[0]);
+ }
- @SuppressWarnings({ "unchecked", "rawtypes" })
- private ServerAuthModule createSAM(ClassLoader moduleCL, String name,
- String lmshName) throws Exception {
- Class clazz = SecurityActions.loadClass(moduleCL, name);
- Constructor ctr = clazz.getConstructor(new Class[] { String.class });
- return (ServerAuthModule) ctr.newInstance(new Object[] { lmshName });
- }
+ @SuppressWarnings(
+ {"unchecked", "rawtypes"})
+ private ServerAuthModule createSAM(ClassLoader moduleCL, String name, String lmshName) throws Exception
+ {
+ Class clazz = SecurityActions.loadClass(moduleCL, name);
+ Constructor ctr = clazz.getConstructor(new Class[]
+ {String.class});
+ return (ServerAuthModule) ctr.newInstance(new Object[]
+ {lmshName});
+ }
}
\ No newline at end of file
Modified: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthContext.java
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthContext.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthContext.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -20,8 +20,10 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.wsf.stack.cxf.jaspi.config;
+
/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ * JBossWS ServerAuthContext implementation
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
import java.util.List;
import java.util.Map;
@@ -31,13 +33,15 @@
import javax.security.auth.message.module.ServerAuthModule;
import org.jboss.security.auth.message.config.JBossServerAuthContext;
-@SuppressWarnings({"rawtypes" })
-public class JBossWSServerAuthContext extends JBossServerAuthContext {
- public JBossWSServerAuthContext(List<ServerAuthModule> modules,
- Map<String, Map> moduleNameToOptions, CallbackHandler cbh)
- throws AuthException {
- super(modules, moduleNameToOptions, cbh);
- }
+@SuppressWarnings({"rawtypes"})
+public class JBossWSServerAuthContext extends JBossServerAuthContext
+{
+ public JBossWSServerAuthContext(List<ServerAuthModule> modules, Map<String, Map> moduleNameToOptions,
+ CallbackHandler cbh) throws AuthException
+ {
+ super(modules, moduleNameToOptions, cbh);
+ }
+
}
Modified: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/SecurityActions.java
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/SecurityActions.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/SecurityActions.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -21,7 +21,7 @@
*/
package org.jboss.wsf.stack.cxf.jaspi.config;
/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
import java.security.AccessController;
import java.security.PrivilegedAction;
Added: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverInInterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverInInterceptor.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverInInterceptor.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -0,0 +1,99 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.stack.cxf.jaspi.interceptor;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.xml.soap.MessageFactory;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
+
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
+import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
+import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.SAAJPreInInterceptor;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.phase.Phase;
+import org.jboss.wsf.stack.cxf.jaspi.JaspiServerAuthenticator;
+/**
+ * CXF in interceptor to validateRequest cxf SoapMessage with JaspiServerAuthenticator
+ * @see org.jboss.wsf.stack.cxf.jaspi.JaspiServerAuthenticator
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ */
+public class JaspiSeverInInterceptor extends AbstractSoapInterceptor
+{
+ private final JaspiServerAuthenticator authManager;
+
+ public JaspiSeverInInterceptor(JaspiServerAuthenticator authManager)
+ {
+ super(Phase.PRE_PROTOCOL);
+ addAfter(SAAJInInterceptor.class.getName());
+ this.authManager = authManager;
+ }
+
+ @Override
+ public void handleMessage(SoapMessage message) throws Fault
+ {
+ if (message.getContent(SOAPMessage.class) == null)
+ {
+ SAAJInInterceptor saajIn = new SAAJInInterceptor();
+ saajIn.handleMessage(message);
+ }
+ SOAPMessage soapMessage = message.getContent(SOAPMessage.class);
+ if (soapMessage == null)
+ {
+ return;
+ }
+
+ SOAPMessage copyMessage = null;
+ try
+ {
+ MessageFactory messageFactory = SAAJPreInInterceptor.INSTANCE.getFactory(message);
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ soapMessage.writeTo(bout);
+ copyMessage = messageFactory.createMessage(soapMessage.getMimeHeaders(), new ByteArrayInputStream(bout.toByteArray()));
+ }
+ catch (SOAPException e)
+ {
+ throw new Fault(e);
+ }
+ catch (IOException e)
+ {
+ throw new Fault(e);
+ }
+ if (copyMessage != null) {
+ message.put(SOAPMessage.class, copyMessage);
+ }
+ try
+ {
+ authManager.validateRequest(message);
+ }
+ finally
+ {
+ message.put(SOAPMessage.class, soapMessage);
+ }
+
+ }
+
+}
Property changes on: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverInInterceptor.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverOutInterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverOutInterceptor.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverOutInterceptor.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.stack.cxf.jaspi.interceptor;
+
+import java.util.ListIterator;
+
+import javax.xml.soap.SOAPMessage;
+
+import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
+import org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor;
+import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.interceptor.StaxOutInterceptor;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.Phase;
+import org.jboss.wsf.stack.cxf.jaspi.JaspiServerAuthenticator;
+
+/**
+ * CXF out interceptor to secureResponse cxf SoapMessage with JaspiServerAuthenticator
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ */
+public class JaspiSeverOutInterceptor extends AbstractSoapInterceptor
+{
+ private final JaspiServerAuthenticator authManager;
+ private static final SAAJOutInterceptor SAAJ_OUT = new SAAJOutInterceptor();
+
+ public JaspiSeverOutInterceptor(JaspiServerAuthenticator authManager)
+ {
+ super(Phase.PRE_STREAM);
+ addAfter(StaxOutInterceptor.class.getName());
+ this.authManager = authManager;
+ }
+
+ @Override
+ public void handleMessage(SoapMessage message) throws Fault
+ {
+ if (!chainAlreadyContainsSAAJ(message))
+ {
+ SAAJ_OUT.handleMessage(message);
+ }
+ message.getInterceptorChain().add(new JaspiServerOutEndingInterceptor());
+
+ }
+
+ private static boolean chainAlreadyContainsSAAJ(SoapMessage message)
+ {
+ ListIterator<Interceptor<? extends Message>> listIterator = message.getInterceptorChain().getIterator();
+ while (listIterator.hasNext())
+ {
+ if (listIterator.next() instanceof SAAJOutInterceptor)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public class JaspiServerOutEndingInterceptor extends AbstractSoapInterceptor
+ {
+ public JaspiServerOutEndingInterceptor()
+ {
+ super(Phase.WRITE_ENDING);
+ addAfter(SoapOutInterceptor.SoapOutEndingInterceptor.class.getName());
+ }
+
+ @Override
+ public void handleMessage(SoapMessage message) throws Fault
+ {
+ if (message.getContent(SOAPMessage.class) == null)
+ {
+ return;
+ }
+ authManager.secureResponse(message);
+ }
+ }
+
+}
Property changes on: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSeverOutInterceptor.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSubjectCreatingInitInterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSubjectCreatingInitInterceptor.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSubjectCreatingInitInterceptor.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -0,0 +1,32 @@
+package org.jboss.wsf.stack.cxf.jaspi.interceptor;
+
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+import org.jboss.security.auth.callback.JBossCallbackHandler;
+import org.jboss.security.plugins.JBossAuthenticationManager;
+
+/*
+ * CXF interceptor to set jaspi JBossAuthenticationManager in message
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ */
+public class JaspiSubjectCreatingInitInterceptor extends AbstractPhaseInterceptor<Message>
+{
+ private final JBossAuthenticationManager authenticationManger;
+
+ public JaspiSubjectCreatingInitInterceptor(String securityDomain) {
+ super(Phase.PRE_INVOKE);
+ this.addBefore("org.jboss.wsf.stack.cxf.security.authentication.JaspiSubjectCreatingInterceptor");
+ authenticationManger = new JBossAuthenticationManager(securityDomain, new JBossCallbackHandler());
+ }
+
+
+ @Override
+ public void handleMessage(Message message) throws Fault
+ {
+ message.put(JBossAuthenticationManager.class, authenticationManger);
+ }
+
+
+}
Property changes on: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/interceptor/JaspiSubjectCreatingInitInterceptor.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/log/Loggers.java
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/log/Loggers.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/log/Loggers.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, Red Hat, Inc., 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.stack.cxf.jaspi.log;
+
+import static org.jboss.logging.Logger.Level.WARN;
+
+import org.jboss.logging.BasicLogger;
+import org.jboss.logging.Cause;
+import org.jboss.logging.LogMessage;
+import org.jboss.logging.Message;
+import org.jboss.logging.MessageLogger;
+
+/**
+ * JBossWS-CXF log messages
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+@SuppressWarnings("deprecation")
+@MessageLogger(projectCode = "JBWS")
+public interface Loggers extends BasicLogger
+{
+ Loggers ROOT_LOGGER = org.jboss.logging.Logger.getMessageLogger(Loggers.class, "org.jboss.ws.cxf");
+ Loggers DEPLOYMENT_LOGGER = org.jboss.logging.Logger.getMessageLogger(Loggers.class, "org.jboss.ws.cxf.deployment");
+
+ @LogMessage(level = WARN)
+ @Message(id = 24102, value = "No application policy found for security domain '%s'")
+ void noApplicationPolicy(String securityDomain);
+
+ @LogMessage(level = WARN)
+ @Message(id = 24103, value = "No JASPIAuthenticationInfo found for security domain '%s'")
+ void noJaspiApplicationPolicy(String securityDomain);
+
+ @LogMessage(level = WARN)
+ @Message(id = 24104, value = "Can not create Jaspi ServerAuthContext for security domain '%s'")
+ void cannotCreateServerAuthContext(String securityDomain, @Cause Throwable cause);
+
+ @LogMessage(level = WARN)
+ @Message(id = 24105, value = "Can not enable Jaspi authentication for '%s' instance")
+ void cannotEnableJASPIAuthentication(String classname);
+}
Property changes on: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/log/Loggers.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/module/UsernameTokenServerAuthModule.java
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/module/UsernameTokenServerAuthModule.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/module/UsernameTokenServerAuthModule.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, Red Hat, Inc., 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.stack.cxf.jaspi.module;
+
+import java.util.Map;
+
+import javax.security.auth.Subject;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.message.AuthException;
+import javax.security.auth.message.AuthStatus;
+import javax.security.auth.message.MessageInfo;
+import javax.security.auth.message.MessagePolicy;
+import javax.xml.soap.SOAPMessage;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.interceptor.InterceptorProvider;
+import org.apache.cxf.ws.security.SecurityConstants;
+import org.jboss.security.auth.container.modules.AbstractServerAuthModule;
+import org.jboss.wsf.stack.cxf.jaspi.interceptor.JaspiSubjectCreatingInitInterceptor;
+
+
+/**
+ * This ServerAuthModule class adds JaspiSubjectCreatingInitInterceptor to authenticate principal and populates Subject
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ */
+public class UsernameTokenServerAuthModule extends AbstractServerAuthModule
+{
+ private final String securityDomainName;
+
+ @SuppressWarnings("rawtypes")
+ public void initialize(MessagePolicy requestPolicy, MessagePolicy responsePolicy, CallbackHandler handler, Map options) throws AuthException
+ {
+ super.initialize(requestPolicy, responsePolicy, handler, options);
+ final javax.xml.ws.Endpoint endpoint = (javax.xml.ws.Endpoint)options.get(javax.xml.ws.Endpoint.class);
+ InterceptorProvider ip = null;
+ if (endpoint == null && options.get(Bus.class) != null)
+ {
+ final Bus bus = (Bus)options.get(Bus.class);
+ bus.setProperty(SecurityConstants.VALIDATE_TOKEN, false);
+ ip = (InterceptorProvider)bus;
+ }
+ if (endpoint != null) {
+ endpoint.getProperties().put(SecurityConstants.VALIDATE_TOKEN, false);
+ ip = (InterceptorProvider)endpoint;
+ }
+ if (ip != null)
+ {
+ JaspiSubjectCreatingInitInterceptor jaspiInterceptor = new JaspiSubjectCreatingInitInterceptor(securityDomainName);
+ ip.getInInterceptors().add(jaspiInterceptor);
+ }
+
+ }
+
+ public UsernameTokenServerAuthModule()
+ {
+ supportedTypes.add(Object.class);
+ supportedTypes.add(SOAPMessage.class);
+ securityDomainName = null;
+ }
+
+ public UsernameTokenServerAuthModule(String lmshName)
+ {
+ supportedTypes.add(Object.class);
+ this.supportedTypes.add(SOAPMessage.class);
+ securityDomainName = lmshName;
+ }
+
+ @Override
+ public AuthStatus validateRequest(MessageInfo messageInfo, Subject clientSubject, Subject serviceSubject) throws AuthException
+ {
+ return AuthStatus.SUCCESS;
+ }
+
+ public AuthStatus secureResponse(MessageInfo messageInfo, Subject arg1) throws AuthException
+ {
+ return AuthStatus.SUCCESS;
+ }
+
+ protected String getSecurityDomainName()
+ {
+ if (this.securityDomainName != null)
+ return securityDomainName;
+
+ // Check if it is passed in the options
+ String domainName = (String)options.get("javax.security.auth.login.LoginContext");
+ if (domainName == null)
+ {
+ domainName = getClass().getName();
+ }
+ return domainName;
+ }
+
+ @Override
+ protected boolean validate(Subject clientSubject, MessageInfo messageInfo) throws AuthException
+ {
+ return true;
+ }
+
+}
\ No newline at end of file
Property changes on: stack/cxf/branches/jaspi/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/module/UsernameTokenServerAuthModule.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/branches/jaspi/modules/jaspi/src/main/resources/META-INF/services/org.jboss.wsf.spi.security.JASPIAuthenticationProvider
===================================================================
--- stack/cxf/branches/jaspi/modules/jaspi/src/main/resources/META-INF/services/org.jboss.wsf.spi.security.JASPIAuthenticationProvider (rev 0)
+++ stack/cxf/branches/jaspi/modules/jaspi/src/main/resources/META-INF/services/org.jboss.wsf.spi.security.JASPIAuthenticationProvider 2014-02-14 13:44:38 UTC (rev 18370)
@@ -0,0 +1 @@
+org.jboss.wsf.stack.cxf.jaspi.DefaultJASPIAuthenticationProvider
Modified: stack/cxf/branches/jaspi/modules/server/pom.xml
===================================================================
--- stack/cxf/branches/jaspi/modules/server/pom.xml 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/server/pom.xml 2014-02-14 13:44:38 UTC (rev 18370)
@@ -20,13 +20,12 @@
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
<version>${project.version}</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-jaspi</artifactId>
<version>${project.version}</version>
- </dependency>
-
+ </dependency>
<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
@@ -253,10 +252,6 @@
<groupId>org.jboss.spec.javax.jms</groupId>
<artifactId>jboss-jms-api_1.1_spec</artifactId>
</dependency>
- <dependency>
- <groupId>org.jboss.spec.javax.security.auth.message</groupId>
- <artifactId>jboss-jaspi-api_1.1_spec</artifactId>
- </dependency>
<dependency>
<groupId>junit</groupId>
Modified: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -24,14 +24,8 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
import java.util.Map.Entry;
-import javax.security.auth.message.config.AuthConfigFactory;
-import javax.security.auth.message.config.AuthConfigProvider;
-import javax.security.auth.message.config.ServerAuthConfig;
-import javax.security.auth.message.config.ServerAuthContext;
-
import org.apache.cxf.Bus;
import org.apache.cxf.buslifecycle.BusLifeCycleListener;
import org.apache.cxf.buslifecycle.BusLifeCycleManager;
@@ -54,33 +48,26 @@
import org.apache.cxf.ws.policy.AlternativeSelector;
import org.apache.cxf.ws.policy.PolicyEngine;
import org.apache.cxf.ws.policy.selector.MaximalAlternativeSelector;
-import org.jboss.security.auth.callback.JBossCallbackHandler;
-import org.jboss.security.auth.login.AuthenticationInfo;
-import org.jboss.security.auth.login.BaseAuthenticationInfo;
-import org.jboss.security.auth.login.JASPIAuthenticationInfo;
-import org.jboss.security.config.ApplicationPolicy;
-import org.jboss.security.config.SecurityConfiguration;
import org.jboss.ws.api.annotation.PolicySets;
import org.jboss.ws.api.binding.BindingCustomization;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.WSFException;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.deployment.AnnotationsInfo;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
-import org.jboss.wsf.stack.cxf.Loggers;
+import org.jboss.wsf.spi.security.JASPIAuthenticationProvider;
import org.jboss.wsf.stack.cxf.client.Constants;
import org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher;
import org.jboss.wsf.stack.cxf.extensions.policy.PolicySetsAnnotationListener;
import org.jboss.wsf.stack.cxf.interceptor.EnableDecoupledFaultInterceptor;
import org.jboss.wsf.stack.cxf.interceptor.EndpointAssociationInterceptor;
import org.jboss.wsf.stack.cxf.interceptor.HandlerAuthInterceptor;
-import org.jboss.wsf.stack.cxf.interceptor.JaspiSeverInInterceptor;
-import org.jboss.wsf.stack.cxf.interceptor.JaspiSeverOutInterceptor;
import org.jboss.wsf.stack.cxf.interceptor.NsCtxSelectorStoreInterceptor;
-import org.jboss.wsf.stack.cxf.jaspi.JaspiServerAuthenticator;
-import org.jboss.wsf.stack.cxf.jaspi.config.JBossWSAuthConfigProvider;
-import org.jboss.wsf.stack.cxf.jaspi.config.JBossWSAuthConstants;
import org.jboss.wsf.stack.cxf.management.InstrumentationManagerExtImpl;
+import org.jboss.wsf.stack.cxf.security.authentication.AutenticationMgrSubjectCreatingInterceptor;
import org.jboss.wsf.stack.cxf.transport.JBossWSDestinationRegistryImpl;
/**
@@ -131,12 +118,22 @@
Map<String, String> props = (wsmd == null) ? null : wsmd.getProperties();
setInterceptors(bus, props);
-
- final JaspiServerAuthenticator authenticator = getJaspiAuthenticator(dep, wsmd);
- if (authenticator != null) {
- bus.getInInterceptors().add(new JaspiSeverInInterceptor(authenticator));
- bus.getOutInterceptors().add(new JaspiSeverOutInterceptor(authenticator));
+
+ try
+ {
+ final JASPIAuthenticationProvider jaspiProvider = SPIProvider.getInstance().getSPI(
+ JASPIAuthenticationProvider.class,
+ ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader());
+ if (jaspiProvider != null)
+ {
+ jaspiProvider.enableServerAuthentication(dep, wsmd);
+ bus.getInInterceptors().add(new AutenticationMgrSubjectCreatingInterceptor());
+ }
}
+ catch (WSFException e)
+ {
+ // ignore
+ }
setResourceResolver(bus, resolver);
@@ -306,52 +303,8 @@
return selector;
}
- private JaspiServerAuthenticator getJaspiAuthenticator(Deployment dep, JBossWebservicesMetaData wsmd) {
- String securityDomain = null;
- if (wsmd != null) {
- securityDomain = wsmd.getProperty(JaspiServerAuthenticator.JASPI_SECURITY_DOMAIN);
- }
- if (securityDomain == null) {
- return null;
- }
- ApplicationPolicy appPolicy = SecurityConfiguration.getApplicationPolicy(securityDomain);
- if (appPolicy == null) {
- Loggers.ROOT_LOGGER.noApplicationPolicy(securityDomain);
- return null;
- }
- BaseAuthenticationInfo bai = appPolicy.getAuthenticationInfo();
- if (bai == null || bai instanceof AuthenticationInfo) {
- Loggers.ROOT_LOGGER.noJaspiApplicationPolicy(securityDomain);
- return null;
- }
- JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai;
-
- String contextRoot = dep.getService().getContextRoot();
- String appId = "localhost " + contextRoot;
- AuthConfigFactory factory = AuthConfigFactory.getFactory();
- Properties properties = new Properties();
- AuthConfigProvider provider = new JBossWSAuthConfigProvider(properties, factory);
- provider = factory.getConfigProvider(JBossWSAuthConstants.SOAP_LAYER, appId, null);
-
- JBossCallbackHandler callbackHandler = new JBossCallbackHandler();
- try
- {
- ServerAuthConfig serverConfig = provider.getServerAuthConfig(JBossWSAuthConstants.SOAP_LAYER, appId, callbackHandler);
- Properties serverContextProperties = new Properties();
- serverContextProperties.put("security-domain", securityDomain);
- serverContextProperties.put("jaspi-policy", jai);
- serverContextProperties.put(Bus.class, bus);
- String authContextID = dep.getSimpleName();
- ServerAuthContext sctx = serverConfig.getAuthContext(authContextID, null, serverContextProperties);
- return new JaspiServerAuthenticator(sctx);
- }
- catch (Exception e)
- {
- Loggers.DEPLOYMENT_LOGGER.cannotCreateServerAuthContext(securityDomain, e);
- }
- return null;
- }
+
private static AutomaticWorkQueue createWorkQueue(String name, Map<String, String> props) {
int mqs = parseInt(props.get(Constants.CXF_QUEUE_MAX_QUEUE_SIZE_PROP), 256);
int initialThreads = parseInt(props.get(Constants.CXF_QUEUE_INITIAL_THREADS_PROP), 0);
Modified: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/ServerBeanCustomizer.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -24,38 +24,25 @@
import java.io.IOException;
import java.security.AccessController;
import java.util.List;
-import java.util.Properties;
-import javax.security.auth.message.config.AuthConfigFactory;
-import javax.security.auth.message.config.AuthConfigProvider;
-import javax.security.auth.message.config.ServerAuthConfig;
-import javax.security.auth.message.config.ServerAuthContext;
-
import org.apache.cxf.frontend.ServerFactoryBean;
-import org.jboss.security.auth.callback.JBossCallbackHandler;
-import org.jboss.security.auth.login.AuthenticationInfo;
-import org.jboss.security.auth.login.BaseAuthenticationInfo;
-import org.jboss.security.auth.login.JASPIAuthenticationInfo;
-import org.jboss.security.config.ApplicationPolicy;
-import org.jboss.security.config.SecurityConfiguration;
import org.jboss.ws.api.annotation.EndpointConfig;
import org.jboss.ws.common.management.AbstractServerConfig;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.WSFException;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.metadata.config.ConfigMetaDataParser;
import org.jboss.wsf.spi.metadata.config.ConfigRoot;
+import org.jboss.wsf.spi.security.JASPIAuthenticationProvider;
import org.jboss.wsf.stack.cxf.JBossWSInvoker;
-import org.jboss.wsf.stack.cxf.Loggers;
import org.jboss.wsf.stack.cxf.Messages;
import org.jboss.wsf.stack.cxf.client.configuration.BeanCustomizer;
import org.jboss.wsf.stack.cxf.deployment.EndpointImpl;
import org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher;
-import org.jboss.wsf.stack.cxf.interceptor.JaspiSeverInInterceptor;
-import org.jboss.wsf.stack.cxf.interceptor.JaspiSeverOutInterceptor;
-import org.jboss.wsf.stack.cxf.jaspi.JaspiServerAuthenticator;
-import org.jboss.wsf.stack.cxf.jaspi.config.JBossWSAuthConfigProvider;
-import org.jboss.wsf.stack.cxf.jaspi.config.JBossWSAuthConstants;
+import org.jboss.wsf.stack.cxf.security.authentication.AutenticationMgrSubjectCreatingInterceptor;
/**
*
@@ -175,8 +162,20 @@
throw Messages.MESSAGES.couldNotReadConfigFile(configFile);
}
}
-
- addJaspiInterceptors(endpoint);
+ try
+ {
+ final JASPIAuthenticationProvider jaspiProvider = SPIProvider.getInstance().getSPI(JASPIAuthenticationProvider.class,
+ ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader());
+ if (jaspiProvider != null)
+ {
+ jaspiProvider.enableServerAuthentication(endpoint, depEndpoints.get(0));
+ endpoint.getInInterceptors().add(new AutenticationMgrSubjectCreatingInterceptor());
+ }
+ }
+ catch (WSFException e)
+ {
+ //ignore
+ }
}
}
@@ -212,48 +211,6 @@
this.epConfigFile = epConfigFile;
}
- private void addJaspiInterceptors(EndpointImpl endpoint) {
- String securityDomain = (String)endpoint.getProperties().get(JaspiServerAuthenticator.JASPI_SECURITY_DOMAIN);
- if (securityDomain == null) {
- return;
- }
- ApplicationPolicy appPolicy = SecurityConfiguration.getApplicationPolicy(securityDomain);
- if (appPolicy == null) {
- Loggers.ROOT_LOGGER.noApplicationPolicy(securityDomain);
- return;
- }
- BaseAuthenticationInfo bai = appPolicy.getAuthenticationInfo();
- if (bai == null || bai instanceof AuthenticationInfo) {
- Loggers.ROOT_LOGGER.noJaspiApplicationPolicy(securityDomain);
- return;
- }
- JASPIAuthenticationInfo jai = (JASPIAuthenticationInfo) bai;
- String contextRoot = depEndpoints.get(0).getService().getContextRoot();
- String appId = "localhost " + contextRoot;
- AuthConfigFactory factory = AuthConfigFactory.getFactory();
- Properties properties = new Properties();
- AuthConfigProvider provider = new JBossWSAuthConfigProvider(properties, factory);
- provider = factory.getConfigProvider(JBossWSAuthConstants.SOAP_LAYER, appId, null);
+
- JBossCallbackHandler callbackHandler = new JBossCallbackHandler();
- JaspiServerAuthenticator serverAuthenticator = null;
- try
- {
- ServerAuthConfig serverConfig = provider.getServerAuthConfig(JBossWSAuthConstants.SOAP_LAYER, appId, callbackHandler);
- Properties serverContextProperties = new Properties();
- serverContextProperties.put("security-domain", securityDomain);
- serverContextProperties.put("jaspi-policy", jai);
- serverContextProperties.put(javax.xml.ws.Endpoint.class, endpoint);
- String authContextID = endpoint.getBeanName();
- ServerAuthContext sctx = serverConfig.getAuthContext(authContextID, null, serverContextProperties);
- serverAuthenticator = new JaspiServerAuthenticator(sctx);
- endpoint.getInInterceptors().add(new JaspiSeverInInterceptor(serverAuthenticator));
- endpoint.getOutInterceptors().add(new JaspiSeverOutInterceptor(serverAuthenticator));
- }
- catch (Exception e)
- {
- Loggers.DEPLOYMENT_LOGGER.cannotCreateServerAuthContext(securityDomain, e);
- }
- }
-
}
Modified: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/deployment/aspect/BusDeploymentAspect.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -27,6 +27,7 @@
import javax.xml.ws.spi.Provider;
+import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.configuration.Configurer;
import org.jboss.ws.api.binding.BindingCustomization;
@@ -136,6 +137,7 @@
holder.configure(resolver, configurer, wsmd, dep);
dep.addAttachment(BusHolder.class, holder);
+ dep.addAttachment(Bus.class, holder.getBus());
if (holder instanceof SpringBusHolder)
{
for (Endpoint endpoint : dep.getService().getEndpoints())
Deleted: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiSeverInInterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiSeverInInterceptor.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiSeverInInterceptor.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -1,97 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.stack.cxf.interceptor;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-import javax.xml.soap.MessageFactory;
-import javax.xml.soap.SOAPException;
-import javax.xml.soap.SOAPMessage;
-
-import org.apache.cxf.binding.soap.SoapMessage;
-import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
-import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor;
-import org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.SAAJPreInInterceptor;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.phase.Phase;
-import org.jboss.wsf.stack.cxf.jaspi.JaspiServerAuthenticator;
-/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class JaspiSeverInInterceptor extends AbstractSoapInterceptor
-{
- private final JaspiServerAuthenticator authManager;
-
- public JaspiSeverInInterceptor(JaspiServerAuthenticator authManager)
- {
- super(Phase.PRE_PROTOCOL);
- addAfter(SAAJInInterceptor.class.getName());
- this.authManager = authManager;
- }
-
- @Override
- public void handleMessage(SoapMessage message) throws Fault
- {
- if (message.getContent(SOAPMessage.class) == null)
- {
- SAAJInInterceptor saajIn = new SAAJInInterceptor();
- saajIn.handleMessage(message);
- }
- SOAPMessage soapMessage = message.getContent(SOAPMessage.class);
- if (soapMessage == null)
- {
- return;
- }
-
- SOAPMessage copyMessage = null;
- try
- {
- MessageFactory messageFactory = SAAJPreInInterceptor.INSTANCE.getFactory(message);
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- soapMessage.writeTo(bout);
- copyMessage = messageFactory.createMessage(soapMessage.getMimeHeaders(), new ByteArrayInputStream(bout.toByteArray()));
- }
- catch (SOAPException e)
- {
- throw new Fault(e);
- }
- catch (IOException e)
- {
- throw new Fault(e);
- }
- if (copyMessage != null) {
- message.put(SOAPMessage.class, copyMessage);
- }
- try
- {
- authManager.validateRequest(message);
- }
- finally
- {
- message.put(SOAPMessage.class, soapMessage);
- }
-
- }
-
-}
Deleted: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiSeverOutInterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiSeverOutInterceptor.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/JaspiSeverOutInterceptor.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -1,97 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.stack.cxf.interceptor;
-
-import java.util.ListIterator;
-
-import javax.xml.soap.SOAPMessage;
-
-import org.apache.cxf.binding.soap.SoapMessage;
-import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
-import org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor;
-import org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.interceptor.Interceptor;
-import org.apache.cxf.interceptor.StaxOutInterceptor;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.phase.Phase;
-import org.jboss.wsf.stack.cxf.jaspi.JaspiServerAuthenticator;
-
-/**
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
- */
-public class JaspiSeverOutInterceptor extends AbstractSoapInterceptor
-{
- private final JaspiServerAuthenticator authManager;
- private static final SAAJOutInterceptor SAAJ_OUT = new SAAJOutInterceptor();
-
- public JaspiSeverOutInterceptor(JaspiServerAuthenticator authManager)
- {
- super(Phase.PRE_STREAM);
- addAfter(StaxOutInterceptor.class.getName());
- this.authManager = authManager;
- }
-
- @Override
- public void handleMessage(SoapMessage message) throws Fault
- {
- if (!chainAlreadyContainsSAAJ(message))
- {
- SAAJ_OUT.handleMessage(message);
- }
- message.getInterceptorChain().add(new JaspiServerOutEndingInterceptor());
-
- }
-
- private static boolean chainAlreadyContainsSAAJ(SoapMessage message)
- {
- ListIterator<Interceptor<? extends Message>> listIterator = message.getInterceptorChain().getIterator();
- while (listIterator.hasNext())
- {
- if (listIterator.next() instanceof SAAJOutInterceptor)
- {
- return true;
- }
- }
- return false;
- }
-
- public class JaspiServerOutEndingInterceptor extends AbstractSoapInterceptor
- {
- public JaspiServerOutEndingInterceptor()
- {
- super(Phase.WRITE_ENDING);
- addAfter(SoapOutInterceptor.SoapOutEndingInterceptor.class.getName());
- }
-
- @Override
- public void handleMessage(SoapMessage message) throws Fault
- {
- if (message.getContent(SOAPMessage.class) == null)
- {
- return;
- }
- authManager.secureResponse(message);
- }
- }
-
-}
Modified: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDJmsAddressBean.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDJmsAddressBean.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/services/DDJmsAddressBean.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -29,7 +29,7 @@
/**
* DDJmsAddressBean.
*
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
public class DDJmsAddressBean
{
Added: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AutenticationMgrSubjectCreatingInterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AutenticationMgrSubjectCreatingInterceptor.java (rev 0)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AutenticationMgrSubjectCreatingInterceptor.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -0,0 +1,73 @@
+package org.jboss.wsf.stack.cxf.security.authentication;
+
+import java.security.Principal;
+
+import javax.security.auth.Subject;
+
+import org.apache.cxf.common.security.SecurityToken;
+import org.apache.cxf.common.security.TokenType;
+import org.apache.cxf.common.security.UsernameToken;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.security.SecurityContext;
+import org.apache.ws.security.WSUsernameTokenPrincipal;
+import org.jboss.security.plugins.JBossAuthenticationManager;
+import org.jboss.wsf.stack.cxf.Loggers;
+import org.jboss.wsf.stack.cxf.Messages;
+
+/*
+ * Interceptor to authenticate principal with provided jaspi JBossAuthenticationManager
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ */
+public class AutenticationMgrSubjectCreatingInterceptor extends SubjectCreatingPolicyInterceptor
+{
+
+ public AutenticationMgrSubjectCreatingInterceptor() {
+ super();
+ }
+
+
+ @Override
+ public void handleMessage(Message message) throws Fault
+ {
+ JBossAuthenticationManager authenticationManger = message.get(JBossAuthenticationManager.class);
+ if (authenticationManger == null) {
+ return;
+ }
+ SecurityContext context = message.get(SecurityContext.class);
+ if (context == null || context.getUserPrincipal() == null)
+ {
+ Loggers.SECURITY_LOGGER.userPrincipalNotAvailableOnCurrentMessage();
+ return;
+ }
+
+ SecurityToken token = message.get(SecurityToken.class);
+ Subject subject = null;
+ if (token != null)
+ {
+ //Try authenticating using SecurityToken info
+ if (token.getTokenType() != TokenType.UsernameToken)
+ {
+ throw Messages.MESSAGES.unsupportedTokenType(token.getTokenType());
+ }
+ UsernameToken ut = (UsernameToken) token;
+ subject = helper.createSubject(authenticationManger, ut.getName(), ut.getPassword(), ut.isHashed(), ut.getNonce(), ut.getCreatedTime());
+
+ }
+ else
+ {
+ //Try authenticating using WSS4J internal info (previously set into SecurityContext by WSS4JInInterceptor)
+ Principal p = context.getUserPrincipal();
+ if (!(p instanceof WSUsernameTokenPrincipal)) {
+ throw Messages.MESSAGES.couldNotGetSubjectInfo();
+ }
+ WSUsernameTokenPrincipal up = (WSUsernameTokenPrincipal) p;
+ subject = helper.createSubject(authenticationManger, up.getName(), up.getPassword(), up.isPasswordDigest(), up.getNonce(), up.getCreatedTime());
+ }
+
+ Principal principal = getPrincipal(context.getUserPrincipal(), subject);
+ message.put(SecurityContext.class, createSecurityContext(principal, subject));
+ }
+
+
+}
Property changes on: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/AutenticationMgrSubjectCreatingInterceptor.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Deleted: stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/JaspiSubjectCreatingInterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/JaspiSubjectCreatingInterceptor.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/server/src/main/java/org/jboss/wsf/stack/cxf/security/authentication/JaspiSubjectCreatingInterceptor.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -1,68 +0,0 @@
-package org.jboss.wsf.stack.cxf.security.authentication;
-
-import java.security.Principal;
-
-import javax.security.auth.Subject;
-
-import org.apache.cxf.common.security.SecurityToken;
-import org.apache.cxf.common.security.TokenType;
-import org.apache.cxf.common.security.UsernameToken;
-import org.apache.cxf.interceptor.Fault;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.security.SecurityContext;
-import org.apache.ws.security.WSUsernameTokenPrincipal;
-import org.jboss.security.auth.callback.JBossCallbackHandler;
-import org.jboss.security.plugins.JBossAuthenticationManager;
-import org.jboss.wsf.stack.cxf.Loggers;
-import org.jboss.wsf.stack.cxf.Messages;
-
-public class JaspiSubjectCreatingInterceptor extends SubjectCreatingPolicyInterceptor
-{
- private final JBossAuthenticationManager authenticationManger;
-
- public JaspiSubjectCreatingInterceptor(String securityDomain) {
- super();
- authenticationManger = new JBossAuthenticationManager(securityDomain, new JBossCallbackHandler());
- }
-
-
- @Override
- public void handleMessage(Message message) throws Fault
- {
- SecurityContext context = message.get(SecurityContext.class);
- if (context == null || context.getUserPrincipal() == null)
- {
- Loggers.SECURITY_LOGGER.userPrincipalNotAvailableOnCurrentMessage();
- return;
- }
-
- SecurityToken token = message.get(SecurityToken.class);
- Subject subject = null;
- if (token != null)
- {
- //Try authenticating using SecurityToken info
- if (token.getTokenType() != TokenType.UsernameToken)
- {
- throw Messages.MESSAGES.unsupportedTokenType(token.getTokenType());
- }
- UsernameToken ut = (UsernameToken) token;
- subject = helper.createSubject(authenticationManger, ut.getName(), ut.getPassword(), ut.isHashed(), ut.getNonce(), ut.getCreatedTime());
-
- }
- else
- {
- //Try authenticating using WSS4J internal info (previously set into SecurityContext by WSS4JInInterceptor)
- Principal p = context.getUserPrincipal();
- if (!(p instanceof WSUsernameTokenPrincipal)) {
- throw Messages.MESSAGES.couldNotGetSubjectInfo();
- }
- WSUsernameTokenPrincipal up = (WSUsernameTokenPrincipal) p;
- subject = helper.createSubject(authenticationManger, up.getName(), up.getPassword(), up.isPasswordDigest(), up.getNonce(), up.getCreatedTime());
- }
-
- Principal principal = getPrincipal(context.getUserPrincipal(), subject);
- message.put(SecurityContext.class, createSecurityContext(principal, subject));
- }
-
-
-}
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/ChangeRequestnterceptor.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/ChangeRequestnterceptor.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/ChangeRequestnterceptor.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -31,7 +31,7 @@
/**
* The cxf interceptor to change the request "Hello" to "ChangedRequest"
*
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
public class ChangeRequestnterceptor extends AbstractPhaseInterceptor<Message>
{
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/Endpoint.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/Endpoint.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/Endpoint.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -27,7 +27,7 @@
/**
* Endpoint.
*
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbws3033")
@SOAPBinding(style = SOAPBinding.Style.RPC)
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/EndpointImpl.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/EndpointImpl.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/EndpointImpl.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -27,7 +27,7 @@
/**
* EndpointImpl.
*
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
@WebService(name = "Endpoint", serviceName = "EndpointService", targetNamespace = "http://org.jboss.ws/jbws3033", endpointInterface = "org.jboss.test.ws.jaxws.cxf.configuration.Endpoint")
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/configuration/JBossWSCXFConfigurerTestCase.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -34,7 +34,7 @@
/**
* To test configure bean by name auto wire
*
- * @author <a href="ema(a)redhat.com">Jim Ma</a>
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
public class JBossWSCXFConfigurerTestCase extends JBossWSTest
{
Modified: stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/Helper.java
===================================================================
--- stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/Helper.java 2014-02-14 12:43:48 UTC (rev 18369)
+++ stack/cxf/branches/jaspi/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/jaspi/Helper.java 2014-02-14 13:44:38 UTC (rev 18370)
@@ -29,7 +29,7 @@
import org.apache.cxf.ws.security.SecurityConstants;
import org.jboss.ws.api.configuration.ClientConfigUtil;
-import org.jboss.wsf.stack.cxf.client.jaspi.module.SOAPClientAuthModule;
+import org.jboss.wsf.stack.cxf.jaspi.client.module.SOAPClientAuthModule;
import org.jboss.wsf.test.ClientHelper;
public class Helper implements ClientHelper
10 years, 2 months
JBossWS SVN: r18369 - spi/branches/jaspi/src/main/java/org/jboss/wsf/spi/security.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-02-14 07:43:48 -0500 (Fri, 14 Feb 2014)
New Revision: 18369
Added:
spi/branches/jaspi/src/main/java/org/jboss/wsf/spi/security/JASPIAuthenticationProvider.java
Log:
Add JASPIAuthenticationProvider
Added: spi/branches/jaspi/src/main/java/org/jboss/wsf/spi/security/JASPIAuthenticationProvider.java
===================================================================
--- spi/branches/jaspi/src/main/java/org/jboss/wsf/spi/security/JASPIAuthenticationProvider.java (rev 0)
+++ spi/branches/jaspi/src/main/java/org/jboss/wsf/spi/security/JASPIAuthenticationProvider.java 2014-02-14 12:43:48 UTC (rev 18369)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, 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.spi.security;
+
+import java.util.Map;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.metadata.webservices.JBossWebservicesMetaData;
+
+/**
+ * Interafact to enable jaspi authentication on server/client side
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ */
+public interface JASPIAuthenticationProvider
+{
+ boolean enableClientAuthentication(Object target, Map<String, String> properties);
+ boolean enableServerAuthentication(Deployment dep, JBossWebservicesMetaData wsmd);
+ public boolean enableServerAuthentication(Object target, Endpoint endpoint);
+
+}
Property changes on: spi/branches/jaspi/src/main/java/org/jboss/wsf/spi/security/JASPIAuthenticationProvider.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
10 years, 2 months
JBossWS SVN: r18368 - in stack/native/branches/jbossws-native-3.1.2: modules/client and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-02-14 05:47:26 -0500 (Fri, 14 Feb 2014)
New Revision: 18368
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/client/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/core/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/endorsed/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/management/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/resources/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/framework-tests/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/pom.xml
stack/native/branches/jbossws-native-3.1.2/pom.xml
Log:
Preparing for next dev cycle
Modified: stack/native/branches/jbossws-native-3.1.2/modules/client/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/client/pom.xml 2014-02-14 10:42:13 UTC (rev 18367)
+++ stack/native/branches/jbossws-native-3.1.2/modules/client/pom.xml 2014-02-14 10:47:26 UTC (rev 18368)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP18</version>
+ <version>3.1.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/pom.xml 2014-02-14 10:42:13 UTC (rev 18367)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/pom.xml 2014-02-14 10:47:26 UTC (rev 18368)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP18</version>
+ <version>3.1.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/endorsed/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/endorsed/pom.xml 2014-02-14 10:42:13 UTC (rev 18367)
+++ stack/native/branches/jbossws-native-3.1.2/modules/endorsed/pom.xml 2014-02-14 10:47:26 UTC (rev 18368)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP18</version>
+ <version>3.1.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/management/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/management/pom.xml 2014-02-14 10:42:13 UTC (rev 18367)
+++ stack/native/branches/jbossws-native-3.1.2/modules/management/pom.xml 2014-02-14 10:47:26 UTC (rev 18368)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP18</version>
+ <version>3.1.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/resources/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/resources/pom.xml 2014-02-14 10:42:13 UTC (rev 18367)
+++ stack/native/branches/jbossws-native-3.1.2/modules/resources/pom.xml 2014-02-14 10:47:26 UTC (rev 18368)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP18</version>
+ <version>3.1.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/framework-tests/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/framework-tests/pom.xml 2014-02-14 10:42:13 UTC (rev 18367)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/framework-tests/pom.xml 2014-02-14 10:47:26 UTC (rev 18368)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-testsuite</artifactId>
- <version>3.1.2.SP18</version>
+ <version>3.1.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/pom.xml 2014-02-14 10:42:13 UTC (rev 18367)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/pom.xml 2014-02-14 10:47:26 UTC (rev 18368)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-testsuite</artifactId>
- <version>3.1.2.SP18</version>
+ <version>3.1.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/pom.xml 2014-02-14 10:42:13 UTC (rev 18367)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/pom.xml 2014-02-14 10:47:26 UTC (rev 18368)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP18</version>
+ <version>3.1.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/pom.xml 2014-02-14 10:42:13 UTC (rev 18367)
+++ stack/native/branches/jbossws-native-3.1.2/pom.xml 2014-02-14 10:47:26 UTC (rev 18368)
@@ -17,7 +17,7 @@
<artifactId>jbossws-native</artifactId>
<packaging>pom</packaging>
- <version>3.1.2.SP18</version>
+ <version>3.1.2-SNAPSHOT</version>
<!-- Parent -->
<parent>
10 years, 2 months
JBossWS SVN: r18366 - stack/native/tags.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-02-14 05:39:16 -0500 (Fri, 14 Feb 2014)
New Revision: 18366
Added:
stack/native/tags/jbossws-native-3.1.2.SP18/
Log:
[JBPAPP-10984] Tagging jbossws-native-3.1.2.SP18
10 years, 2 months
JBossWS SVN: r18365 - in stack/native/branches/jbossws-native-3.1.2: modules/client and 7 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-02-14 05:37:15 -0500 (Fri, 14 Feb 2014)
New Revision: 18365
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/client/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/core/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/endorsed/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/management/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/resources/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/framework-tests/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/pom.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/pom.xml
stack/native/branches/jbossws-native-3.1.2/pom.xml
Log:
Preparing for tagging 3.1.2.SP18
Modified: stack/native/branches/jbossws-native-3.1.2/modules/client/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/client/pom.xml 2014-02-14 10:33:44 UTC (rev 18364)
+++ stack/native/branches/jbossws-native-3.1.2/modules/client/pom.xml 2014-02-14 10:37:15 UTC (rev 18365)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.2.SP18</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/pom.xml 2014-02-14 10:33:44 UTC (rev 18364)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/pom.xml 2014-02-14 10:37:15 UTC (rev 18365)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.2.SP18</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/endorsed/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/endorsed/pom.xml 2014-02-14 10:33:44 UTC (rev 18364)
+++ stack/native/branches/jbossws-native-3.1.2/modules/endorsed/pom.xml 2014-02-14 10:37:15 UTC (rev 18365)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.2.SP18</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/management/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/management/pom.xml 2014-02-14 10:33:44 UTC (rev 18364)
+++ stack/native/branches/jbossws-native-3.1.2/modules/management/pom.xml 2014-02-14 10:37:15 UTC (rev 18365)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.2.SP18</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/resources/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/resources/pom.xml 2014-02-14 10:33:44 UTC (rev 18364)
+++ stack/native/branches/jbossws-native-3.1.2/modules/resources/pom.xml 2014-02-14 10:37:15 UTC (rev 18365)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.2.SP18</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/framework-tests/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/framework-tests/pom.xml 2014-02-14 10:33:44 UTC (rev 18364)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/framework-tests/pom.xml 2014-02-14 10:37:15 UTC (rev 18365)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-testsuite</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.2.SP18</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/pom.xml 2014-02-14 10:33:44 UTC (rev 18364)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/pom.xml 2014-02-14 10:37:15 UTC (rev 18365)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-testsuite</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.2.SP18</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/pom.xml 2014-02-14 10:33:44 UTC (rev 18364)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/pom.xml 2014-02-14 10:37:15 UTC (rev 18365)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.2.SP18</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/branches/jbossws-native-3.1.2/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/pom.xml 2014-02-14 10:33:44 UTC (rev 18364)
+++ stack/native/branches/jbossws-native-3.1.2/pom.xml 2014-02-14 10:37:15 UTC (rev 18365)
@@ -17,7 +17,7 @@
<artifactId>jbossws-native</artifactId>
<packaging>pom</packaging>
- <version>3.1.2-SNAPSHOT</version>
+ <version>3.1.2.SP18</version>
<!-- Parent -->
<parent>
10 years, 2 months
JBossWS SVN: r18364 - stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-02-14 05:33:44 -0500 (Fri, 14 Feb 2014)
New Revision: 18364
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
Log:
[JBPAPP-10967] Applying Kyle's path
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2014-02-13 15:06:38 UTC (rev 18363)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2014-02-14 10:33:44 UTC (rev 18364)
@@ -838,7 +838,8 @@
public void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException
{
- this.element.setIdAttributeNode(idAttr, isId);
+ Attr attr = element.getAttributeNodeNS(idAttr.getNamespaceURI(), idAttr.getName());
+ this.element.setIdAttributeNode(attr, isId);
}
public void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException
10 years, 2 months