Author: klape
Date: 2013-11-12 23:35:58 -0500 (Tue, 12 Nov 2013)
New Revision: 18092
Modified:
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/client/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/endorsed/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/src/main/webapp/index.html
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/resources/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/framework-tests/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/pom.xml
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/pom.xml
Log:
productization
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/client/pom.xml
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/client/pom.xml 2013-11-13
04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/client/pom.xml 2013-11-13
04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -37,7 +37,7 @@
<configuration>
<archive>
<manifestEntries>
- <Class-Path>jbossws-spi.jar jbossws-common.jar jbossws-framework.jar
jbossws-native-core.jar jbossws-native-factories.jar jaxrpc-api.jar jaxws-api.jar
jsr181-api.jar saaj-api.jar activation.jar commons-logging.jar concurrent.jar
javassist.jar jaxb-api.jar jaxb-impl.jar mail.jar jboss-logging-spi.jar
jboss-logging-log4j.jar jcl-over-slf4j.jar slf4j-api.jar slf4j-jboss-logging.jar
jbosssx-client.jar jboss-javaee.jar jboss-remoting.jar jboss-xml-binding.jar jbossxb.jar
netty.jar policy.jar stax-api.jar wsdl4j.jar</Class-Path>
+ <Class-Path>jbossws-spi.jar jbossws-common.jar jbossws-framework.jar
jbossws-native-core.jar jbossws-native-factories.jar jboss-jaxrpc-api_1.1_spec.jar
jaxws-api.jar jsr181-api.jar saaj-api.jar activation.jar commons-logging.jar
concurrent.jar javassist.jar jaxb-api.jar jaxb-impl.jar mail.jar jboss-logging-spi.jar
jboss-logging-log4j.jar jcl-over-slf4j.jar slf4j-api.jar slf4j-jboss-logging.jar
jbosssx-client.jar jboss-javaee.jar jboss-remoting.jar jboss-xml-binding.jar jbossxb.jar
netty.jar policy.jar stax-api.jar wsdl4j.jar</Class-Path>
</manifestEntries>
</archive>
</configuration>
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/pom.xml
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/pom.xml 2013-11-13
04:19:37 UTC (rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/pom.xml 2013-11-13
04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified:
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2013-11-13
04:35:58 UTC (rev 18092)
@@ -76,6 +76,8 @@
{
// provide logging
private static Logger log = Logger.getLogger(WSSecurityDispatcher.class);
+
+ private static boolean VERBOSE_EXCEPTION_REPORTING =
Boolean.getBoolean("org.jboss.ws.native.security.verbose_exception_reporting");
public void decodeMessage(WSSecurityConfiguration configuration, SOAPMessage message,
Config operationConfig) throws SOAPException
{
@@ -88,7 +90,7 @@
if (secHeaderElement == null)
{
if (hasRequirements(config, fault))
- throw convertToFault(new InvalidSecurityHeaderException("This service
requires <wsse:Security>, which is missing."));
+ throw convertToFault(new InvalidSecurityHeaderException("This service
requires <wsse:Security>, which is missing."), true);
}
try
@@ -263,8 +265,18 @@
private CommonSOAPFaultException convertToFault(WSSecurityException e)
{
- return new CommonSOAPFaultException(e.getFaultCode(), e.getFaultString());
+ return convertToFault(e, VERBOSE_EXCEPTION_REPORTING);
}
+
+ private CommonSOAPFaultException convertToFault(WSSecurityException e, boolean
verbose)
+ {
+ if (verbose) {
+ return new CommonSOAPFaultException(e.getFaultCode(), e.getFaultString());
+ } else {
+ QName faultCode = new QName(Constants.JBOSS_WSSE_NS, "GenericError",
Constants.JBOSS_WSSE_PREFIX);
+ return new CommonSOAPFaultException(faultCode, "A WS-Security error
occurred.");
+ }
+ }
private List<RequireOperation> buildRequireOperations(Config operationConfig,
boolean fault)
{
Modified:
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/element/EncryptedKey.java 2013-11-13
04:35:58 UTC (rev 18092)
@@ -32,8 +32,10 @@
import org.jboss.ws.extensions.security.Constants;
import org.jboss.ws.extensions.security.KeyResolver;
import org.jboss.ws.extensions.security.Util;
+import org.jboss.ws.extensions.security.exception.FailedCheckException;
import org.jboss.ws.extensions.security.exception.InvalidSecurityHeaderException;
import org.jboss.ws.extensions.security.exception.WSSecurityException;
+import org.jboss.ws.extensions.security.operation.EncryptionOperation;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -128,7 +130,16 @@
}
catch (XMLSecurityException e)
{
- throw new WSSecurityException("Could not parse encrypted key: " +
e.getMessage(), e);
+ try
+ {
+ this.secretKey = EncryptionOperation.generateSecretKey(alg);
+ }
+ catch (Exception ex)
+ {
+ WSSecurityException exception = new FailedCheckException(e);
+ exception.setInternal(true);
+ throw exception;
+ }
}
this.document = element.getOwnerDocument();
Modified:
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/FailedCheckException.java 2013-11-13
04:35:58 UTC (rev 18092)
@@ -32,7 +32,7 @@
{
public static final QName faultCode = new QName(Constants.WSSE_NS,
"FailedCheck", Constants.WSSE_PREFIX);
- public static final String faultString = "The signature or decryption was
invlaid.";
+ public static final String faultString = "The signature or decryption was
invalid.";
public FailedCheckException()
{
Modified:
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/exception/WSSecurityException.java 2013-11-13
04:35:58 UTC (rev 18092)
@@ -72,4 +72,9 @@
{
return faultString;
}
+
+ public void setInternal(boolean internal)
+ {
+ this.internal = internal;
+ }
}
Modified:
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/DecryptionOperation.java 2013-11-13
04:35:58 UTC (rev 18092)
@@ -107,7 +107,7 @@
}
catch (XMLEncryptionException e)
{
- throw new FailedCheckException("Decryption was invalid.");
+ throw new FailedCheckException(e);
}
catch (Exception e)
{
Modified:
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/EncryptionOperation.java 2013-11-13
04:35:58 UTC (rev 18092)
@@ -75,6 +75,7 @@
}
private static HashMap<String, Algorithm> algorithms;
+ private static HashMap<String, String> algorithmsID;
private static final String DEFAULT_ALGORITHM = "aes-128";
@@ -88,6 +89,12 @@
algorithms.put("aes-192-gcm", new Algorithm("AES",
XMLCipher.AES_192_GCM, 192));
algorithms.put("aes-256-gcm", new Algorithm("AES",
XMLCipher.AES_256_GCM, 256));
algorithms.put("tripledes", new Algorithm("TripleDes",
XMLCipher.TRIPLEDES, 168));
+
+ algorithmsID = new HashMap<String, String>(4);
+ algorithmsID.put(XMLCipher.AES_128, "aes-128");
+ algorithmsID.put(XMLCipher.AES_192, "aes-192");
+ algorithmsID.put(XMLCipher.AES_256, "aes-256");
+ algorithmsID.put(XMLCipher.TRIPLEDES, "tripledes");
}
public EncryptionOperation(List<Target> targets, String alias, String algorithm,
String wrap, String tokenRefType, String securityDomainAliasLabel)
@@ -130,7 +137,7 @@
}
}
- public SecretKey getSecretKey(String algorithm) throws WSSecurityException
+ private static SecretKey getSecretKey(String algorithm) throws WSSecurityException
{
Algorithm alg = algorithms.get(algorithm);
@@ -146,6 +153,11 @@
}
}
+ public static SecretKey generateSecretKey(String alg) throws WSSecurityException
+ {
+ return getSecretKey(algorithmsID.get(alg));
+ }
+
public void process(Document message, SecurityHeader header, SecurityStore store)
throws WSSecurityException
{
if (! algorithms.containsKey(algorithm))
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/endorsed/pom.xml
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/endorsed/pom.xml 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/endorsed/pom.xml 2013-11-13
04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/pom.xml
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/pom.xml 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/pom.xml 2013-11-13
04:35:58 UTC (rev 18092)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -50,8 +50,7 @@
<!-- Build -->
<build>
<plugins>
- <plugin>
- <!-- PRE: scm is correctly configured in parent pom -->
+ <!--<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<executions>
@@ -69,7 +68,7 @@
</items>
<doUpdate>false</doUpdate>
</configuration>
- </plugin>
+ </plugin>-->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
Modified:
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/src/main/webapp/index.html
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/src/main/webapp/index.html 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/management/src/main/webapp/index.html 2013-11-13
04:35:58 UTC (rev 18092)
@@ -1,6 +1,6 @@
<html><head>
<meta http-equiv='Content-Type' content='text/html;
charset=iso-8859-1'>
-<title>JBossWS (@implementation.version@)</title>
+<title>JBossWS</title>
<link rel='stylesheet' href='./styles.css'>
</head>
<body>
@@ -19,7 +19,6 @@
<legend><b>Runtime information</b></legend>
<ul>
<li><b>Version: jbossws-native-@version@</b></li>
- <li><b>Build: @buildNumber@</b></li>
<li><a href="services">View a list of deployed
services</a></li>
<!--li><a href="depends">View installed
dependencies</a></li-->
<li><a href="/jmx-console/">Access JMX
console</a></li>
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/resources/pom.xml
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/resources/pom.xml 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/resources/pom.xml 2013-11-13
04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified:
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/framework-tests/pom.xml
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/framework-tests/pom.xml 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/framework-tests/pom.xml 2013-11-13
04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-testsuite</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified:
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/pom.xml
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/pom.xml 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/pom.xml 2013-11-13
04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-testsuite</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified:
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java 2013-11-13
04:35:58 UTC (rev 18092)
@@ -33,7 +33,6 @@
import junit.framework.Test;
import org.jboss.ws.core.StubExt;
-import org.jboss.ws.extensions.security.exception.FailedAuthenticationException;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -50,10 +49,8 @@
private final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-jbws1999";
- private static final String FAULT_CODE = "wsse:FailedAuthentication";
+ private static final String FAULT_CODE = "jboss-wsse:GenericError";
- private static final String FAULT_STRING = FailedAuthenticationException.faultString;
-
public static Test suite() throws Exception
{
return new JBossWSTestSetup(JBWS1999TestCase.class,
"jaxws-jbws1999.war");
@@ -111,8 +108,6 @@
SOAPFault fault = sfe.getFault();
String faultCode = fault.getFaultCode();
assertEquals("Fault Code", FAULT_CODE, faultCode);
- String faultString = fault.getFaultString();
- assertEquals("Fault String", FAULT_STRING, faultString);
}
}
@@ -149,8 +144,6 @@
SOAPFault fault = sfe.getFault();
String faultCode = fault.getFaultCode();
assertEquals("Fault Code", FAULT_CODE, faultCode);
- String faultString = fault.getFaultString();
- assertEquals("Fault Message", FAULT_STRING, faultString);
}
}
@@ -173,8 +166,6 @@
SOAPFault fault = sfe.getFault();
String faultCode = fault.getFaultCode();
assertEquals("Fault Code", FAULT_CODE, faultCode);
- String faultString = fault.getFaultString();
- assertEquals("Fault Message", FAULT_STRING, faultString);
}
}
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/pom.xml
===================================================================
---
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/pom.xml 2013-11-13
04:19:37 UTC (rev 18091)
+++
stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/modules/testsuite/pom.xml 2013-11-13
04:35:58 UTC (rev 18092)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native</artifactId>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<relativePath>../../pom.xml</relativePath>
</parent>
Modified: stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/pom.xml
===================================================================
--- stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/pom.xml 2013-11-13 04:19:37 UTC
(rev 18091)
+++ stack/native/tags/jbossws-native-3.1.2.SP15-patch-01/pom.xml 2013-11-13 04:35:58 UTC
(rev 18092)
@@ -17,7 +17,7 @@
<artifactId>jbossws-native</artifactId>
<packaging>pom</packaging>
- <version>3.1.2.SP15</version>
+ <version>3.1.2.SP15-patch-01</version>
<!-- Parent -->
<parent>