JBossWS SVN: r8759 - stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-11-18 13:21:01 -0500 (Tue, 18 Nov 2008)
New Revision: 8759
Modified:
stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
Log:
Further modification to correct timestamp configuration for outbound messages.
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2008-11-18 17:33:33 UTC (rev 8758)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2008-11-18 18:21:01 UTC (rev 8759)
@@ -264,7 +264,7 @@
Boolean include = new Boolean(true);
String timestamp = attrs.getValue("", "includeTimestamp");
if (timestamp != null)
- include = (Boolean)SimpleTypeBindings.unmarshal(timestamp, SimpleTypeBindings.XS_BOOLEAN_NAME, null);
+ include = (Boolean)SimpleTypeBindings.unmarshal(SimpleTypeBindings.XS_BOOLEAN_NAME, timestamp, null);
return new Sign(attrs.getValue("", "type"), attrs.getValue("", "alias"), include.booleanValue());
}
16 years, 1 month
JBossWS SVN: r8758 - stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxrpc/wsse.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-11-18 12:33:33 -0500 (Tue, 18 Nov 2008)
New Revision: 8758
Modified:
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java
Log:
Further backport for -r 7167
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java 2008-11-18 17:22:16 UTC (rev 8757)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxrpc/wsse/MicrosoftInteropTestCase.java 2008-11-18 17:33:33 UTC (rev 8758)
@@ -95,7 +95,8 @@
cal.set(Calendar.MINUTE, 22);
cal.set(Calendar.SECOND, 25);
- SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal, null);
+ SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal, null, null);
+
decoder.decode(soapEnv.getOwnerDocument());
decoder.complete();
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java 2008-11-18 17:22:16 UTC (rev 8757)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxrpc/wsse/RoundTripTestCase.java 2008-11-18 17:33:33 UTC (rev 8758)
@@ -92,8 +92,8 @@
env = soapMsg.getSOAPPart().getEnvelope();
doc = env.getOwnerDocument();
+ SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), null, null);
- SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), null);
decoder.decode(doc);
decoder.verify(buildRequireOperations());
decoder.complete();
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java 2008-11-18 17:22:16 UTC (rev 8757)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxrpc/wsse/SunInteropTestCase.java 2008-11-18 17:33:33 UTC (rev 8758)
@@ -72,7 +72,8 @@
cal.set(Calendar.MINUTE, 32);
cal.set(Calendar.SECOND, 25);
- SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal, null);
+ SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal, null, null);
+
decoder.decode(doc);
decoder.complete();
@@ -106,8 +107,8 @@
cal.set(Calendar.MINUTE, 8);
cal.set(Calendar.SECOND, 40);
+ SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal, null, null);
- SecurityDecoder decoder = new SecurityDecoder(new SecurityStore(), cal, null);
decoder.decode(doc);
decoder.complete();
16 years, 1 month
JBossWS SVN: r8757 - stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-11-18 12:22:16 -0500 (Tue, 18 Nov 2008)
New Revision: 8757
Modified:
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-server.xml
Log:
Backport -r 7168
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-server.xml 2008-11-18 17:13:12 UTC (rev 8756)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-server.xml 2008-11-18 17:22:16 UTC (rev 8757)
@@ -12,5 +12,8 @@
<requires>
<signature/>
</requires>
+ <authenticate>
+ <signatureCertAuth certificatePrincipal="org.jboss.security.auth.certs.SubjectCNMapping"/>
+ </authenticate>
</config>
</jboss-ws-security>
\ No newline at end of file
16 years, 1 month
JBossWS SVN: r8756 - in stack/native/branches/dlofthouse/JBPAPP-1349/src/main: java/org/jboss/ws/extensions/security/element and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-11-18 12:13:12 -0500 (Tue, 18 Nov 2008)
New Revision: 8756
Added:
stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/Authenticate.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/SignatureCertAuth.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/UsernameAuth.java
Modified:
stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/KeyResolver.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/ReceiveX509Certificate.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/element/Signature.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/Config.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/main/resources/schema/jboss-ws-security_1_0.xsd
Log:
Backported -r 7167
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/KeyResolver.java
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/KeyResolver.java 2008-11-18 16:46:47 UTC (rev 8755)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/KeyResolver.java 2008-11-18 17:13:12 UTC (rev 8756)
@@ -92,7 +92,7 @@
return resolveX509IssuerSerial(issuerSerial);
}
- throw new NotImplementedException("Currently only DirectReference is supported!");
+ throw new NotImplementedException("Currently only DirectReference, KeyIdentifier and X509IssuerSerial are supported!");
}
private BinarySecurityToken resolveDirectReference(DirectReference direct) throws WSSecurityException
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/ReceiveX509Certificate.java
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/ReceiveX509Certificate.java 2008-11-18 16:46:47 UTC (rev 8755)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/ReceiveX509Certificate.java 2008-11-18 17:13:12 UTC (rev 8756)
@@ -19,7 +19,7 @@
* 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.ws.extensions.security.operation;
+package org.jboss.ws.extensions.security;
import java.security.Principal;
import java.security.cert.X509Certificate;
@@ -30,7 +30,7 @@
import org.jboss.security.auth.certs.SubjectDNMapping;
import org.jboss.ws.extensions.security.element.Token;
import org.jboss.ws.extensions.security.element.X509Token;
-import org.jboss.ws.extensions.security.exception.WSSecurityException;
+import org.jboss.ws.extensions.security.WSSecurityException;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.invocation.SecurityAdaptor;
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java 2008-11-18 16:46:47 UTC (rev 8755)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java 2008-11-18 17:13:12 UTC (rev 8756)
@@ -34,6 +34,7 @@
import org.jboss.ws.extensions.security.element.Timestamp;
import org.jboss.ws.extensions.security.element.Token;
import org.jboss.ws.extensions.security.element.UsernameToken;
+import org.jboss.ws.metadata.wsse.Authenticate;
import org.jboss.ws.metadata.wsse.TimestampVerification;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -46,26 +47,28 @@
{
private Element headerElement;
- private Calendar now = null;
+ private Calendar now = null;
private SecurityHeader header;
private Document message;
private SecurityStore store;
-
+
private TimestampVerification timestampVerification;
+ private Authenticate authenticate;
+
private HashSet<String> signedIds = new HashSet<String>();
private HashSet<String> encryptedIds = new HashSet<String>();
-
- public SecurityDecoder(SecurityStore store, TimestampVerification timestampVerification)
+ public SecurityDecoder(SecurityStore store, TimestampVerification timestampVerification, Authenticate authenticate)
{
org.apache.xml.security.Init.init();
this.store = store;
this.timestampVerification = timestampVerification;
+ this.authenticate = authenticate;
}
/**
@@ -76,9 +79,9 @@
* @param now The timestamp to use as the current time when validating a message expiration
*/
- public SecurityDecoder(SecurityStore store, Calendar now, TimestampVerification timestampVerification)
+ public SecurityDecoder(SecurityStore store, Calendar now, TimestampVerification timestampVerification, Authenticate authenticate)
{
- this(store, timestampVerification);
+ this(store, timestampVerification, authenticate);
this.now = now;
}
@@ -96,7 +99,6 @@
headerElement.getParentNode().removeChild(headerElement);
}
-
private void decode() throws WSSecurityException
{
// Validate a timestamp if it is present
@@ -104,15 +106,17 @@
if (timestamp != null)
{
- TimestampVerificationOperation operation =
- (now == null) ? new TimestampVerificationOperation(timestampVerification) : new TimestampVerificationOperation(now);
+ TimestampVerificationOperation operation = (now == null) ? new TimestampVerificationOperation(timestampVerification) : new TimestampVerificationOperation(now);
operation.process(message, timestamp);
}
- for (Token token : header.getTokens())
+ if (authenticate == null || authenticate.isUsernameAuth())
{
- if (token instanceof UsernameToken)
- new ReceiveUsernameOperation(header, store).process(message, token);
+ for (Token token : header.getTokens())
+ {
+ if (token instanceof UsernameToken)
+ new ReceiveUsernameOperation(header, store).process(message, token);
+ }
}
signedIds.clear();
@@ -126,9 +130,12 @@
// If this list gets much larger it should probably be a hash lookup
if (process instanceof Signature)
{
- Collection<String> ids = signatureVerifier.process(message, process);
+ Signature signature = (Signature)process;
+ Collection<String> ids = signatureVerifier.process(message, signature);
if (ids != null)
- signedIds.addAll(ids);
+ signedIds.addAll(ids);
+ if (authenticate != null && authenticate.isSignatureCertAuth())
+ new ReceiveX509Certificate(authenticate.getSignatureCertAuth().getCertificatePrincipal()).process(message, signature.getSecurityToken());
}
else if (process instanceof EncryptedKey)
{
@@ -137,6 +144,7 @@
encryptedIds.addAll(ids);
}
}
+
}
public void verify(List<OperationDescription<RequireOperation>> requireOperations) throws WSSecurityException
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2008-11-18 16:46:47 UTC (rev 8755)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2008-11-18 17:13:12 UTC (rev 8756)
@@ -32,12 +32,14 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;
import javax.xml.ws.BindingProvider;
+import javax.xml.ws.WebServiceException;
import org.jboss.logging.Logger;
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.CommonSOAPFaultException;
import org.jboss.ws.core.StubExt;
+import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -109,10 +111,11 @@
{
WSSecurityConfiguration config = getSecurityConfig(ctx);
SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
+ Config actualConfig = getActualConfig(config, null);
SOAPHeader soapHeader = soapMessage.getSOAPHeader();
QName secQName = new QName(Constants.WSSE_NS, "Security");
- Element secHeaderElement = (soapHeader != null) ? Util.findElement(soapHeader, secQName) : null;
+ Element secHeaderElement = (soapHeader != null) ? Util.findElement(soapHeader, secQName) : null;
if (secHeaderElement == null)
{
@@ -140,12 +143,12 @@
try
{
- SecurityStore securityStore = new SecurityStore(config.getKeyStoreURL(), config.getKeyStoreType(), config.getKeyStorePassword(), config.getKeyPasswords(), config.getTrustStoreURL(),
- config.getTrustStoreType(), config.getTrustStorePassword());
- SecurityDecoder decoder = new SecurityDecoder(securityStore, config.getTimestampVerification());
+ SecurityStore securityStore = new SecurityStore(config.getKeyStoreURL(), config.getKeyStoreType(), config.getKeyStorePassword(), config.getKeyPasswords(),
+ config.getTrustStoreURL(), config.getTrustStoreType(), config.getTrustStorePassword());
+ SecurityDecoder decoder = new SecurityDecoder(securityStore, config.getTimestampVerification(), actualConfig == null ? null : actualConfig.getAuthenticate());
decoder.decode(soapMessage.getSOAPPart(), secHeaderElement);
-
+
if (log.isTraceEnabled())
log.trace("Decoded Message:\n" + DOMWriter.printNode(soapMessage.getSOAPPart(), true));
@@ -164,7 +167,8 @@
List<OperationDescription<RequireOperation>> operations = buildRequireOperations(config, operation, port);
decoder.verify(operations);
- if(log.isDebugEnabled()) log.debug("Verification is successful");
+ if (log.isDebugEnabled())
+ log.debug("Verification is successful");
decoder.complete();
}
@@ -172,7 +176,8 @@
{
if (e.isInternalError())
log.error("Internal error occured handling inbound message:", e);
- else if(log.isDebugEnabled()) log.debug("Returning error to sender: " + e.getMessage());
+ else if (log.isDebugEnabled())
+ log.debug("Returning error to sender: " + e.getMessage());
throw convertToFault(e);
}
@@ -187,6 +192,59 @@
return config;
}
+ private static Config getActualConfig(WSSecurityConfiguration configuration, Config operationConfig)
+ {
+ if (operationConfig == null)
+ {
+ //if no configuration override, we try getting the right operation config
+ //according to the invoked operation that can be found using the context
+ CommonMessageContext ctx = MessageContextAssociation.peekMessageContext();
+ if (ctx != null)
+ {
+ EndpointMetaData epMetaData = ctx.getEndpointMetaData();
+ QName port = epMetaData.getPortName();
+
+ OperationMetaData opMetaData = ctx.getOperationMetaData();
+ if (opMetaData == null)
+ {
+ // Get the operation meta data from the soap message
+ // for the server side inbound message.
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
+ try
+ {
+ opMetaData = soapMessage.getOperationMetaData(epMetaData);
+ }
+ catch (SOAPException e)
+ {
+ throw new WebServiceException("Error while looking for the operation meta data: " + e);
+ }
+ }
+ if (opMetaData != null)
+ operationConfig = selectOperationConfig(configuration, port, opMetaData.getQName());
+ }
+ }
+ //null operationConfig means default behavior
+ return operationConfig != null ? operationConfig : configuration.getDefaultConfig();
+ }
+
+ private static Config selectOperationConfig(WSSecurityConfiguration configuration, QName portName, QName opName)
+ {
+ Port port = configuration.getPorts().get(portName != null ? portName.getLocalPart() : null);
+ if (port == null)
+ return configuration.getDefaultConfig();
+
+ Operation operation = port.getOperations().get(opName != null ? opName.toString() : null);
+ if (operation == null)
+ {
+ //if the operation name was not available or didn't match any wsse configured operation,
+ //we fall back to the port wsse config (if available) or the default config.
+ Config portConfig = port.getDefaultConfig();
+ return (portConfig == null) ? configuration.getDefaultConfig() : portConfig;
+
+ }
+ return operation.getConfig();
+ }
+
private static boolean hasRequirements(WSSecurityConfiguration config, String operation, String port)
{
Config operationConfig = getConfig(config, port, operation);
@@ -237,7 +295,7 @@
Config operationConfig = getConfig(config, port, operation);
log.debug("WS-Security config: " + operationConfig);
-
+
// Nothing to process
if (operationConfig == null)
return;
@@ -253,7 +311,7 @@
{
Object user = ctx.get(Stub.USERNAME_PROPERTY);
Object pass = ctx.get(Stub.PASSWORD_PROPERTY);
-
+
if (user == null && pass == null)
{
user = ctx.get(BindingProvider.USERNAME_PROPERTY);
@@ -293,12 +351,13 @@
if (operations.size() == 0)
return;
- if(log.isDebugEnabled()) log.debug("Encoding Message:\n" + DOMWriter.printNode(soapMessage.getSOAPPart(), true));
+ if (log.isDebugEnabled())
+ log.debug("Encoding Message:\n" + DOMWriter.printNode(soapMessage.getSOAPPart(), true));
try
{
- SecurityStore securityStore = new SecurityStore(config.getKeyStoreURL(), config.getKeyStoreType(), config.getKeyStorePassword(), config.getKeyPasswords() , config.getTrustStoreURL(),
- config.getTrustStoreType(), config.getTrustStorePassword());
+ SecurityStore securityStore = new SecurityStore(config.getKeyStoreURL(), config.getKeyStoreType(), config.getKeyStorePassword(), config.getKeyPasswords(),
+ config.getTrustStoreURL(), config.getTrustStoreType(), config.getTrustStorePassword());
SecurityEncoder encoder = new SecurityEncoder(operations, securityStore);
encoder.encode(soapMessage.getSOAPPart());
}
@@ -306,7 +365,8 @@
{
if (e.isInternalError())
log.error("Internal error occured handling outbound message:", e);
- else if(log.isDebugEnabled()) log.debug("Returning error to sender: " + e.getMessage());
+ else if (log.isDebugEnabled())
+ log.debug("Returning error to sender: " + e.getMessage());
throw convertToFault(e);
}
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/element/Signature.java
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/element/Signature.java 2008-11-18 16:46:47 UTC (rev 8755)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/element/Signature.java 2008-11-18 17:13:12 UTC (rev 8756)
@@ -25,6 +25,7 @@
import org.apache.xml.security.exceptions.XMLSecurityException;
import org.apache.xml.security.signature.XMLSignature;
+import org.jboss.logging.Logger;
import org.jboss.ws.extensions.security.KeyResolver;
import org.jboss.ws.extensions.security.WSSecurityException;
import org.w3c.dom.Element;
@@ -36,10 +37,13 @@
*/
public class Signature implements SecurityProcess
{
+ private static Logger log = Logger.getLogger(Signature.class);
private XMLSignature signature;
/* Used only for decoding */
private PublicKey publicKey;
+ /* Used only for jaas authentication */
+ private BinarySecurityToken securityToken;
private Element cachedElement;
@@ -54,6 +58,15 @@
{
signature = new XMLSignature(element, null);
publicKey = resolver.resolvePublicKey(signature.getKeyInfo());
+ try
+ {
+ securityToken = resolver.resolve(signature.getKeyInfo());
+ }
+ catch (Exception e)
+ {
+ //log exception and ignore, KeyInfo might not reference a security token
+ log.debug("KeyInfo does not contain any reference to a binary security token.", e);
+ }
}
catch (XMLSecurityException e)
{
@@ -84,4 +97,9 @@
{
return publicKey;
}
+
+ public BinarySecurityToken getSecurityToken()
+ {
+ return securityToken;
+ }
}
\ No newline at end of file
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/Authenticate.java (from rev 7167, stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsse/Authenticate.java)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/Authenticate.java (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/Authenticate.java 2008-11-18 17:13:12 UTC (rev 8756)
@@ -0,0 +1,68 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.ws.metadata.wsse;
+
+import java.io.Serializable;
+
+/**
+ * <code>Authenticate</code> specifies the token to be used for JAAS authentication.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-May-2008
+ */
+public class Authenticate implements Serializable
+{
+ private static final long serialVersionUID = -1338421514796889714L;
+
+ private UsernameAuth usernameAuth;
+ private SignatureCertAuth signatureCertAuth;
+
+ public UsernameAuth getUsernameAuth()
+ {
+ return usernameAuth;
+ }
+
+ public void setUsernameAuth(UsernameAuth usernameAuth)
+ {
+ this.usernameAuth = usernameAuth;
+ }
+
+ public SignatureCertAuth getSignatureCertAuth()
+ {
+ return signatureCertAuth;
+ }
+
+ public void setSignatureCertAuth(SignatureCertAuth signatureCertAuth)
+ {
+ this.signatureCertAuth = signatureCertAuth;
+ }
+
+ public boolean isUsernameAuth()
+ {
+ return usernameAuth != null;
+ }
+
+ public boolean isSignatureCertAuth()
+ {
+ return signatureCertAuth != null;
+ }
+}
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/Config.java
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/Config.java 2008-11-18 16:46:47 UTC (rev 8755)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/Config.java 2008-11-18 17:13:12 UTC (rev 8756)
@@ -38,6 +38,7 @@
private Sign sign;
private Encrypt encrypt;
private Requires requires;
+ private Authenticate authenticate;
public Encrypt getEncrypt()
{
@@ -88,4 +89,14 @@
{
this.requires = requires;
}
+
+ public Authenticate getAuthenticate()
+ {
+ return authenticate;
+ }
+
+ public void setAuthenticate(Authenticate authenticate)
+ {
+ this.authenticate = authenticate;
+ }
}
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/SignatureCertAuth.java (from rev 7167, stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsse/SignatureCertAuth.java)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/SignatureCertAuth.java (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/SignatureCertAuth.java 2008-11-18 17:13:12 UTC (rev 8756)
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.ws.metadata.wsse;
+
+import java.io.Serializable;
+
+/**
+ * <code>UsernameAuth</code> specifies that the certificate token
+ * referenced by the signature should be used for JAAS authentication.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-May-2008
+ */
+public class SignatureCertAuth implements Serializable
+{
+ private static final long serialVersionUID = -6618730662350740011L;
+ private String certificatePrincipal;
+
+ public SignatureCertAuth(String certificatePrincipal)
+ {
+ this.certificatePrincipal = certificatePrincipal;
+ }
+
+ public String getCertificatePrincipal()
+ {
+ return certificatePrincipal;
+ }
+
+ public void setCertificatePrincipal(String certificatePrincipal)
+ {
+ this.certificatePrincipal = certificatePrincipal;
+ }
+}
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/UsernameAuth.java (from rev 7167, stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/wsse/UsernameAuth.java)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/UsernameAuth.java (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/UsernameAuth.java 2008-11-18 17:13:12 UTC (rev 8756)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.ws.metadata.wsse;
+
+import java.io.Serializable;
+
+/**
+ * <code>UsernameAuth</code> specifies that the username
+ * token should be used for JAAS authentication.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 26-May-2008
+ */
+public class UsernameAuth implements Serializable
+{
+ private static final long serialVersionUID = -7767474325576294780L;
+
+ public UsernameAuth()
+ {
+
+ }
+}
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2008-11-18 16:46:47 UTC (rev 8755)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2008-11-18 17:13:12 UTC (rev 8756)
@@ -284,6 +284,10 @@
{
return new Username();
}
+ else if ("authenticate".equals(localName))
+ {
+ return new Authenticate();
+ }
return null;
}
@@ -332,6 +336,33 @@
log.trace("addChild: [obj=" + config + ",child=" + requires + "]");
config.setRequires(requires);
}
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(Config config, Authenticate authenticate, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + config + ",child=" + authenticate + "]");
+ config.setAuthenticate(authenticate);
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(Authenticate authenticate, UsernameAuth usernameAuth, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + authenticate + ",child=" + usernameAuth + "]");
+ authenticate.setUsernameAuth(usernameAuth);
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(Authenticate authenticate, SignatureCertAuth signatureCertAuth, UnmarshallingContext navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + authenticate + ",child=" + signatureCertAuth + "]");
+ authenticate.setSignatureCertAuth(signatureCertAuth);
+ }
private Object handleTargets(Object object, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
{
@@ -384,7 +415,25 @@
return null;
}
+
+ /**
+ * Called when parsing of a new element started.
+ */
+ public Object newChild(Authenticate authenticate, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("newChild: " + localName);
+ if ("usernameAuth".equals(localName))
+ {
+ return new UsernameAuth();
+ }
+ else if ("signatureCertAuth".equals(localName))
+ {
+ return new SignatureCertAuth(attrs.getValue("", "certificatePrincipal"));
+ }
+ return null;
+ }
+
/**
* Called when parsing of a new element started.
*/
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/src/main/resources/schema/jboss-ws-security_1_0.xsd
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/main/resources/schema/jboss-ws-security_1_0.xsd 2008-11-18 16:46:47 UTC (rev 8755)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/main/resources/schema/jboss-ws-security_1_0.xsd 2008-11-18 17:13:12 UTC (rev 8756)
@@ -126,6 +126,11 @@
<xs:documentation>Specifies the security requirements that should be applied when receiving a response from the communicating party. If this is not specified, all messages will be allowed through.</xs:documentation>
</xs:annotation>
</xs:element>
+ <xs:element name="authenticate" type="authenticateType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Specifies the token to be used for JAAS authentication. If this is not specified, the username token will be used if available.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
</xs:all>
</xs:complexType>
<xs:complexType name="requireTimestampType">
@@ -277,4 +282,26 @@
</xs:element>
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="authenticateType">
+ <xs:choice minOccurs="1" maxOccurs="1">
+ <xs:element name="usernameAuth" type="usernameAuthType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Specifies that the username token should be used for JAAS authentication.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="signatureCertAuth" type="signatureCertAuthType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Specifies that the certificate token referenced from the signature should be used for JAAS authentication.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="usernameAuthType"/>
+ <xs:complexType name="signatureCertAuthType">
+ <xs:attribute name="certificatePrincipal" use="optional">
+ <xs:annotation>
+ <xs:documentation>This specifies the class to be used to map certificates to principal. It must implement org.jboss.security.auth.certs.CertificatePrincipal. Default is org.jboss.security.auth.certs.SubjectCNMapping</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
</xs:schema>
16 years, 1 month
JBossWS SVN: r8755 - stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-11-18 11:46:47 -0500 (Tue, 18 Nov 2008)
New Revision: 8755
Added:
stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/ReceiveX509Certificate.java
Log:
Backport implementation added in -r 7167
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/ReceiveX509Certificate.java (from rev 7167, stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/security/operation/ReceiveX509Certificate.java)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/ReceiveX509Certificate.java (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/main/java/org/jboss/ws/extensions/security/ReceiveX509Certificate.java 2008-11-18 16:46:47 UTC (rev 8755)
@@ -0,0 +1,87 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.ws.extensions.security.operation;
+
+import java.security.Principal;
+import java.security.cert.X509Certificate;
+
+import org.jboss.logging.Logger;
+import org.jboss.security.CertificatePrincipal;
+import org.jboss.security.auth.certs.SubjectCNMapping;
+import org.jboss.security.auth.certs.SubjectDNMapping;
+import org.jboss.ws.extensions.security.element.Token;
+import org.jboss.ws.extensions.security.element.X509Token;
+import org.jboss.ws.extensions.security.exception.WSSecurityException;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
+import org.w3c.dom.Document;
+
+/**
+ * This is used for X509Certificate JAAS authentication
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 24-May-2008
+ */
+public class ReceiveX509Certificate implements TokenOperation
+{
+ private static Logger log = Logger.getLogger(ReceiveX509Certificate.class);
+ private SecurityAdaptorFactory secAdapterfactory;
+ private CertificatePrincipal certMapping;
+
+ public ReceiveX509Certificate(String certificatePrincipal)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ secAdapterfactory = spiProvider.getSPI(SecurityAdaptorFactory.class);
+ if (certificatePrincipal != null && !certificatePrincipal.equals(""))
+ {
+ try
+ {
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ Class<?> cpClass = loader.loadClass(certificatePrincipal);
+ certMapping = (CertificatePrincipal) cpClass.newInstance();
+ }
+ catch (Exception e)
+ {
+ log.error("Failed to load CertificatePrincipal '" + certificatePrincipal + "', using default SubjectDNMapping.", e);
+ }
+ }
+ if (certMapping == null)
+ certMapping = new SubjectDNMapping();
+ }
+
+ public void process(Document message, Token token) throws WSSecurityException
+ {
+ if (token == null || !(token instanceof X509Token))
+ {
+ throw new IllegalArgumentException("Token " + token + " is not a X509Token!");
+ }
+ X509Certificate cert = ((X509Token)token).getCert();
+ Principal principal = certMapping.toPrinicipal(new X509Certificate[] { cert });
+ SecurityAdaptor securityAdaptor = secAdapterfactory.newSecurityAdapter();
+ securityAdaptor.setPrincipal(principal);
+ securityAdaptor.setCredential(cert);
+
+ }
+
+}
16 years, 1 month
JBossWS SVN: r8754 - in stack/native/branches/dlofthouse/JBPAPP-1349: src/test/java/org/jboss/test/ws/jaxws and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-11-18 11:34:04 -0500 (Tue, 18 Nov 2008)
New Revision: 8754
Added:
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/CertAuthTestCase.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/Hello.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/HelloJavaBean.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/Alice.cer
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/Bob.cer
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/John.cer
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-service.xml
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-client.xml
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-server.xml
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss.xml
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jbossws-roles.properties
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/keystore.jks
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/login-config.xml
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/alice-sign.jks
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/bob-sign.jks
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/john-sign.jks
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/readme.txt
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/wsse10.truststore
Removed:
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/CertAuthTestCase.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/Hello.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/HelloJavaBean.java
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/Alice.cer
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/Bob.cer
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/John.cer
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-service.xml
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-client.xml
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-server.xml
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss.xml
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jbossws-roles.properties
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/keystore.jks
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/login-config.xml
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/alice-sign.jks
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/bob-sign.jks
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/john-sign.jks
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/readme.txt
stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/wsse10.truststore
Modified:
stack/native/branches/dlofthouse/JBPAPP-1349/ant-import-tests/build-jars-jaxws.xml
Log:
Backported -r 7155
Modified: stack/native/branches/dlofthouse/JBPAPP-1349/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/ant-import-tests/build-jars-jaxws.xml 2008-11-18 15:38:43 UTC (rev 8753)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/ant-import-tests/build-jars-jaxws.xml 2008-11-18 16:34:04 UTC (rev 8754)
@@ -309,6 +309,30 @@
<include name="wsdl/**"/>
</metainf>
</jar>
+
+ <!-- jaxws-jbws2116-->
+ <jar destfile="${tests.output.dir}/libs/jaxws-jbws2116.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2116/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxws/jbws2116/*TestCase.class"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/resources/jaxws/jbws2116/META-INF">
+ <include name="jboss-wsse-server.xml"/>
+ <include name="jboss.xml"/>
+ </metainf>
+ <metainf dir="${tests.output.dir}/resources/jaxws/jbws2116/">
+ <include name="wsse10.truststore"/>
+ <include name="bob-sign.jks"/>
+ </metainf>
+ </jar>
+ <jar jarfile="${tests.output.dir}/libs/jaxws-jbws2116.sar">
+ <metainf dir="${tests.output.dir}/resources/jaxws/jbws2116/META-INF">
+ <include name="jboss-service.xml"/>
+ <include name="login-config.xml"/>
+ <include name="keystore.jks"/>
+ <include name="jbossws-roles.properties"/>
+ </metainf>
+ </jar>
<!-- jaxws-jbws1283 -->
<jar destfile="${tests.output.dir}/libs/jaxws-jbws1283.jar">
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116 (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2116)
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/CertAuthTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2116/CertAuthTestCase.java 2008-05-24 16:45:14 UTC (rev 7155)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/CertAuthTestCase.java 2008-11-18 16:34:04 UTC (rev 8754)
@@ -1,148 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2116;
-
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
-import org.jboss.ws.core.StubExt;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * Test case for certificate authentication & authorization with WS-Security
- * http://jira.jboss.org/jira/browse/JBWS-2116
- *
- * @author alessio.soldano(a)jboss.com
- * @since 24-May-2008
- */
-public class CertAuthTestCase extends JBossWSTest
-{
- private String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2116";
- private String keyStore;
- private String trustStore;
- private String keyStorePassword;
- private String trustStorePassword;
- private String keyStoreType;
- private String trustStoreType;
-
- public static Test suite() throws Exception
- {
- return new JBossWSTestSetup(CertAuthTestCase.class, "jaxws-jbws2116.sar jaxws-jbws2116.jar");
- }
-
- protected void setUp() throws Exception
- {
- super.setUp();
- //Backup values
- keyStore = System.getProperty("org.jboss.ws.wsse.keyStore");
- keyStorePassword = System.getProperty("org.jboss.ws.wsse.keyStorePassword");
- keyStoreType = System.getProperty("org.jboss.ws.wsse.keyStoreType");
- trustStore = System.getProperty("org.jboss.ws.wsse.trustStore");
- trustStorePassword = System.getProperty("org.jboss.ws.wsse.trustStorePassword");
- trustStoreType = System.getProperty("org.jboss.ws.wsse.trustStoreType");
-
- }
-
- protected void tearDown() throws Exception
- {
- //Restore environment
- System.setProperty("org.jboss.ws.wsse.keyStore", keyStore);
- System.setProperty("org.jboss.ws.wsse.trustStore", trustStore);
- System.setProperty("org.jboss.ws.wsse.keyStorePassword", keyStorePassword);
- System.setProperty("org.jboss.ws.wsse.trustStorePassword", trustStorePassword);
- System.setProperty("org.jboss.ws.wsse.keyStoreType", keyStoreType);
- System.setProperty("org.jboss.ws.wsse.trustStoreType", trustStoreType);
- super.tearDown();
- }
-
- public void testAuthAlice() throws Exception
- {
- setEnvironment("alice");
- Hello port = getPort();
- String msg = "Hi!";
- try
- {
- String result = port.echo(msg);
- assertEquals(msg, result);
- result = port.echo2(msg);
- assertEquals(msg, result);
- }
- catch (Exception e)
- {
- fail();
- }
- }
-
- public void testAuthJohn() throws Exception
- {
- setEnvironment("john");
- Hello port = getPort();
- String msg = "Hi!";
- try
- {
- String result = port.echo(msg);
- assertEquals(msg, result);
- }
- catch (Exception e)
- {
- fail();
- }
- try
- {
- port.echo2(msg);
- fail("John shouldn't be allowed to run this method!");
- }
- catch (Exception e)
- {
- //OK
- }
- }
-
- private void setEnvironment(String name)
- {
- //Setup values
- System.setProperty("org.jboss.ws.wsse.keyStore", getResourceFile("jaxws/jbws2116/" + name + "-sign.jks").getPath());
- System.setProperty("org.jboss.ws.wsse.trustStore", getResourceFile("jaxws/jbws2116/wsse10.truststore").getPath());
- System.setProperty("org.jboss.ws.wsse.keyStorePassword", "password");
- System.setProperty("org.jboss.ws.wsse.trustStorePassword", "password");
- System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
- System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
- }
-
- private Hello getPort() throws Exception
- {
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- QName serviceName = new QName("http://org.jboss.ws/jbws2116", "HelloService");
- Hello port = Service.create(wsdlURL, serviceName).getPort(Hello.class);
- URL securityURL = getResourceURL("jaxws/jbws2116/META-INF/jboss-wsse-client.xml");
- ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
- ((StubExt)port).setConfigName("Standard WSSecurity Client");
- ((BindingProvider)port).getRequestContext().put(StubExt.PROPERTY_AUTH_TYPE, StubExt.PROPERTY_AUTH_TYPE_WSSE);
- return port;
- }
-}
\ No newline at end of file
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/CertAuthTestCase.java (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2116/CertAuthTestCase.java)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/CertAuthTestCase.java (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/CertAuthTestCase.java 2008-11-18 16:34:04 UTC (rev 8754)
@@ -0,0 +1,150 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2116;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test case for certificate authentication & authorization with WS-Security
+ * http://jira.jboss.org/jira/browse/JBWS-2116
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 24-May-2008
+ */
+public class CertAuthTestCase extends JBossWSTest
+{
+ private String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-jbws2116";
+ private String keyStore;
+ private String trustStore;
+ private String keyStorePassword;
+ private String trustStorePassword;
+ private String keyStoreType;
+ private String trustStoreType;
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(CertAuthTestCase.class, "jaxws-jbws2116.sar jaxws-jbws2116.jar");
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ //Backup values
+ keyStore = System.getProperty("org.jboss.ws.wsse.keyStore");
+ keyStorePassword = System.getProperty("org.jboss.ws.wsse.keyStorePassword");
+ keyStoreType = System.getProperty("org.jboss.ws.wsse.keyStoreType");
+ trustStore = System.getProperty("org.jboss.ws.wsse.trustStore");
+ trustStorePassword = System.getProperty("org.jboss.ws.wsse.trustStorePassword");
+ trustStoreType = System.getProperty("org.jboss.ws.wsse.trustStoreType");
+
+ }
+
+ protected void tearDown() throws Exception
+ {
+ //Restore environment
+ System.setProperty("org.jboss.ws.wsse.keyStore", keyStore);
+ System.setProperty("org.jboss.ws.wsse.trustStore", trustStore);
+ System.setProperty("org.jboss.ws.wsse.keyStorePassword", keyStorePassword);
+ System.setProperty("org.jboss.ws.wsse.trustStorePassword", trustStorePassword);
+ System.setProperty("org.jboss.ws.wsse.keyStoreType", keyStoreType);
+ System.setProperty("org.jboss.ws.wsse.trustStoreType", trustStoreType);
+ super.tearDown();
+ }
+
+ public void testAuthAlice() throws Exception
+ {
+ setEnvironment("alice");
+ Hello port = getPort();
+ String msg = "Hi!";
+ try
+ {
+ String result = port.echo(msg);
+ assertEquals(msg, result);
+ result = port.echo2(msg);
+ assertEquals(msg, result);
+ }
+ catch (Exception e)
+ {
+ fail();
+ }
+ }
+
+ public void testAuthJohn() throws Exception
+ {
+ setEnvironment("john");
+ Hello port = getPort();
+ String msg = "Hi!";
+ try
+ {
+ String result = port.echo(msg);
+ assertEquals(msg, result);
+ }
+ catch (Exception e)
+ {
+ fail();
+ }
+ try
+ {
+ port.echo2(msg);
+ fail("John shouldn't be allowed to run this method!");
+ }
+ catch (Exception e)
+ {
+ //OK
+ }
+ }
+
+ private void setEnvironment(String name)
+ {
+ //Setup values
+
+ System.setProperty("org.jboss.ws.wsse.keyStore", new File("resources/jaxws/jbws2116/" + name + "-sign.jks").getPath());
+ System.setProperty("org.jboss.ws.wsse.trustStore", new File("resources/jaxws/jbws2116/wsse10.truststore").getPath());
+ System.setProperty("org.jboss.ws.wsse.keyStorePassword", "password");
+ System.setProperty("org.jboss.ws.wsse.trustStorePassword", "password");
+ System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
+ System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
+ }
+
+ private Hello getPort() throws Exception
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jbws2116", "HelloService");
+ Hello port = Service.create(wsdlURL, serviceName).getPort(Hello.class);
+ URL securityURL = new File("resources/jaxws/jbws2116/META-INF/jboss-wsse-client.xml").toURL();
+ ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
+ ((BindingProvider)port).getRequestContext().put(StubExt.PROPERTY_AUTH_TYPE, StubExt.PROPERTY_AUTH_TYPE_WSSE);
+ return port;
+ }
+}
\ No newline at end of file
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/Hello.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2116/Hello.java 2008-05-24 16:45:14 UTC (rev 7155)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/Hello.java 2008-11-18 16:34:04 UTC (rev 8754)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2116;
-
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-
-@WebService(name = "Hello", targetNamespace = "http://org.jboss.ws/jbws2116")
-@SOAPBinding(style = SOAPBinding.Style.RPC)
-public interface Hello
-{
- @WebMethod
- public String echo(String par);
-
- @WebMethod
- public String echo2(String par);
-}
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/Hello.java (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2116/Hello.java)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/Hello.java (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/Hello.java 2008-11-18 16:34:04 UTC (rev 8754)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2116;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "Hello", targetNamespace = "http://org.jboss.ws/jbws2116")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface Hello
+{
+ @WebMethod
+ public String echo(String par);
+
+ @WebMethod
+ public String echo2(String par);
+}
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/HelloJavaBean.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2116/HelloJavaBean.java 2008-05-24 16:45:14 UTC (rev 7155)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/HelloJavaBean.java 2008-11-18 16:34:04 UTC (rev 8754)
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2116;
-
-import javax.annotation.Resource;
-import javax.annotation.security.RolesAllowed;
-import javax.ejb.Stateless;
-import javax.jws.WebMethod;
-import javax.jws.WebService;
-import javax.jws.soap.SOAPBinding;
-import javax.xml.ws.WebServiceContext;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.annotation.EndpointConfig;
-import org.jboss.wsf.spi.annotation.WebContext;
-
-
-@Stateless
-@WebService(name = "Hello", serviceName = "HelloService", targetNamespace = "http://org.jboss.ws/jbws2116")
-@SOAPBinding(style = SOAPBinding.Style.RPC)
-@WebContext(contextRoot = "/jaxws-jbws2116", urlPattern = "/*")
-@EndpointConfig(configName = "Standard WSSecurity Endpoint")
-//We're declaring the domain in the jboss.xml since we have different annotation packages for AS5 and AS42
-//@SecurityDomain("JBossWS")
-public class HelloJavaBean
-{
- private Logger log = Logger.getLogger(HelloJavaBean.class);
- @Resource
- private WebServiceContext ctx;
-
- @WebMethod
- @RolesAllowed({"friend"})
- public String echo(String par)
- {
- log.info("User principal: " + ctx.getUserPrincipal());
- return par;
- }
-
- @WebMethod
- @RolesAllowed({"girlfriend"})
- public String echo2(String par)
- {
- log.info("User principal: " + ctx.getUserPrincipal());
- return par;
- }
-}
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/HelloJavaBean.java (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2116/HelloJavaBean.java)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/HelloJavaBean.java (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/java/org/jboss/test/ws/jaxws/jbws2116/HelloJavaBean.java 2008-11-18 16:34:04 UTC (rev 8754)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.test.ws.jaxws.jbws2116;
+
+import javax.annotation.Resource;
+import javax.annotation.security.RolesAllowed;
+import javax.ejb.Stateless;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.WebServiceContext;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.EndpointConfig;
+import org.jboss.wsf.spi.annotation.WebContext;
+
+
+@Stateless
+@WebService(name = "Hello", serviceName = "HelloService", targetNamespace = "http://org.jboss.ws/jbws2116")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+@WebContext(contextRoot = "/jaxws-jbws2116", urlPattern = "/*")
+@EndpointConfig(configName = "Standard WSSecurity Endpoint")
+//We're declaring the domain in the jboss.xml since we have different annotation packages for AS5 and AS42
+//@SecurityDomain("JBossWS")
+public class HelloJavaBean
+{
+ private Logger log = Logger.getLogger(HelloJavaBean.class);
+ @Resource
+ private WebServiceContext ctx;
+
+ @WebMethod
+ @RolesAllowed({"friend"})
+ public String echo(String par)
+ {
+ log.info("User principal: " + ctx.getUserPrincipal());
+ return par;
+ }
+
+ @WebMethod
+ @RolesAllowed({"girlfriend"})
+ public String echo2(String par)
+ {
+ log.info("User principal: " + ctx.getUserPrincipal());
+ return par;
+ }
+}
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116 (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116)
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/Alice.cer
===================================================================
(Binary files differ)
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/Alice.cer (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/Alice.cer)
===================================================================
(Binary files differ)
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/Bob.cer
===================================================================
(Binary files differ)
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/Bob.cer (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/Bob.cer)
===================================================================
(Binary files differ)
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/John.cer
===================================================================
(Binary files differ)
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/John.cer (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/John.cer)
===================================================================
(Binary files differ)
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF)
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-service.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF/jboss-service.xml 2008-05-24 16:45:14 UTC (rev 7155)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-service.xml 2008-11-18 16:34:04 UTC (rev 8754)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<server>
- <!-- ==================================================================== -->
- <!-- JassSecurityDomain required to use CertRolesLoginModule -->
- <!-- ==================================================================== -->
- <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
- name="jboss.security:service=SecurityDomain">
- <constructor>
- <arg type="java.lang.String" value="JBossWSCert"/>
- </constructor>
- <attribute name="KeyStoreURL">resource:META-INF/keystore.jks</attribute>
- <attribute name="KeyStorePass">password</attribute>
- <depends>jboss.security:service=JaasSecurityManager</depends>
- </mbean>
- <!-- ==================================================================== -->
- <!-- Dynamic login config to install the CertRolesLoginModule -->
- <!-- ==================================================================== -->
- <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
- name="jboss:service=DynamicLoginConfig">
- <attribute name="AuthConfig">META-INF/login-config.xml</attribute>
- <!-- The service which supports dynamic processing of login-config.xml
- configurations.
- -->
- <depends optional-attribute-name="LoginConfigService">
- jboss.security:service=XMLLoginConfig
- </depends>
- <!-- Optionally specify the security mgr service to use when
- this service is stopped to flush the auth caches of the domains
- registered by this service.
- -->
- <depends optional-attribute-name="SecurityManagerService">
- jboss.security:service=JaasSecurityManager
- </depends>
- </mbean>
-</server>
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-service.xml (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF/jboss-service.xml)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-service.xml (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-service.xml 2008-11-18 16:34:04 UTC (rev 8754)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+ <!-- ==================================================================== -->
+ <!-- JassSecurityDomain required to use CertRolesLoginModule -->
+ <!-- ==================================================================== -->
+ <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
+ name="jboss.security:service=SecurityDomain">
+ <constructor>
+ <arg type="java.lang.String" value="JBossWSCert"/>
+ </constructor>
+ <attribute name="KeyStoreURL">resource:META-INF/keystore.jks</attribute>
+ <attribute name="KeyStorePass">password</attribute>
+ <depends>jboss.security:service=JaasSecurityManager</depends>
+ </mbean>
+ <!-- ==================================================================== -->
+ <!-- Dynamic login config to install the CertRolesLoginModule -->
+ <!-- ==================================================================== -->
+ <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
+ name="jboss:service=DynamicLoginConfig">
+ <attribute name="AuthConfig">META-INF/login-config.xml</attribute>
+ <!-- The service which supports dynamic processing of login-config.xml
+ configurations.
+ -->
+ <depends optional-attribute-name="LoginConfigService">
+ jboss.security:service=XMLLoginConfig
+ </depends>
+ <!-- Optionally specify the security mgr service to use when
+ this service is stopped to flush the auth caches of the domains
+ registered by this service.
+ -->
+ <depends optional-attribute-name="SecurityManagerService">
+ jboss.security:service=JaasSecurityManager
+ </depends>
+ </mbean>
+</server>
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-client.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-client.xml 2008-05-24 16:45:14 UTC (rev 7155)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-client.xml 2008-11-18 16:34:04 UTC (rev 8754)
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
- <config>
- <sign type="x509v3" alias="1" includeTimestamp="false"/>
- <requires>
- <signature/>
- </requires>
- </config>
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-client.xml (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-client.xml)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-client.xml (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-client.xml 2008-11-18 16:34:04 UTC (rev 8754)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+ <config>
+ <sign type="x509v3" alias="1" includeTimestamp="false"/>
+ <requires>
+ <signature/>
+ </requires>
+ </config>
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-server.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-server.xml 2008-05-24 16:45:14 UTC (rev 7155)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-server.xml 2008-11-18 16:34:04 UTC (rev 8754)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
- <key-store-file>META-INF/bob-sign.jks</key-store-file>
- <key-store-password>password</key-store-password>
- <key-store-type>jks</key-store-type>
- <trust-store-file>META-INF/wsse10.truststore</trust-store-file>
- <trust-store-password>password</trust-store-password>
- <config>
- <sign type="x509v3" alias="1" includeTimestamp="false"/>
- <requires>
- <signature/>
- </requires>
- </config>
-</jboss-ws-security>
\ No newline at end of file
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-server.xml (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-server.xml)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-server.xml (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss-wsse-server.xml 2008-11-18 16:34:04 UTC (rev 8754)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+ <key-store-file>META-INF/bob-sign.jks</key-store-file>
+ <key-store-password>password</key-store-password>
+ <key-store-type>jks</key-store-type>
+ <trust-store-file>META-INF/wsse10.truststore</trust-store-file>
+ <trust-store-password>password</trust-store-password>
+ <config>
+ <sign type="x509v3" alias="1" includeTimestamp="false"/>
+ <requires>
+ <signature/>
+ </requires>
+ </config>
+</jboss-ws-security>
\ No newline at end of file
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF/jboss.xml 2008-05-24 16:45:14 UTC (rev 7155)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss.xml 2008-11-18 16:34:04 UTC (rev 8754)
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss>
- <security-domain>java:/jaas/JBossWSCert</security-domain>
-</jboss>
\ No newline at end of file
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss.xml (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF/jboss.xml)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss.xml (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jboss.xml 2008-11-18 16:34:04 UTC (rev 8754)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss>
+ <security-domain>java:/jaas/JBossWSCert</security-domain>
+</jboss>
\ No newline at end of file
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jbossws-roles.properties
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF/jbossws-roles.properties 2008-05-24 16:45:14 UTC (rev 7155)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jbossws-roles.properties 2008-11-18 16:34:04 UTC (rev 8754)
@@ -1,3 +0,0 @@
-# A sample roles.properties file for use with the CertRolesLoginModule
-alice=friend,girlfriend
-john=friend
\ No newline at end of file
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jbossws-roles.properties (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF/jbossws-roles.properties)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jbossws-roles.properties (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/jbossws-roles.properties 2008-11-18 16:34:04 UTC (rev 8754)
@@ -0,0 +1,3 @@
+# A sample roles.properties file for use with the CertRolesLoginModule
+alice=friend,girlfriend
+john=friend
\ No newline at end of file
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/keystore.jks
===================================================================
(Binary files differ)
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/keystore.jks (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF/keystore.jks)
===================================================================
(Binary files differ)
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/login-config.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF/login-config.xml 2008-05-24 16:45:14 UTC (rev 7155)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/login-config.xml 2008-11-18 16:34:04 UTC (rev 8754)
@@ -1,20 +0,0 @@
-<?xml version='1.0'?>
-<!DOCTYPE policy PUBLIC
- "-//JBoss//DTD JBOSS Security Config 3.0//EN"
- "http://www.jboss.org/j2ee/dtd/security_config.dtd">
-
-<policy>
-
- <application-policy name="JBossWSCert">
- <authentication>
- <login-module code="org.jboss.security.auth.spi.CertRolesLoginModule"
- flag="required">
- <module-option name="rolesProperties">META-INF/jbossws-roles.properties</module-option>
- <module-option name="unauthenticatedIdentity">anonymous</module-option>
- <module-option name="securityDomain">java:/jaas/JBossWSCert</module-option>
- </login-module>
- </authentication>
- </application-policy>
-
-</policy>
-
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/login-config.xml (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/META-INF/login-config.xml)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/login-config.xml (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/META-INF/login-config.xml 2008-11-18 16:34:04 UTC (rev 8754)
@@ -0,0 +1,20 @@
+<?xml version='1.0'?>
+<!DOCTYPE policy PUBLIC
+ "-//JBoss//DTD JBOSS Security Config 3.0//EN"
+ "http://www.jboss.org/j2ee/dtd/security_config.dtd">
+
+<policy>
+
+ <application-policy name="JBossWSCert">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.CertRolesLoginModule"
+ flag="required">
+ <module-option name="rolesProperties">META-INF/jbossws-roles.properties</module-option>
+ <module-option name="unauthenticatedIdentity">anonymous</module-option>
+ <module-option name="securityDomain">java:/jaas/JBossWSCert</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+</policy>
+
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/alice-sign.jks
===================================================================
(Binary files differ)
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/alice-sign.jks (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/alice-sign.jks)
===================================================================
(Binary files differ)
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/bob-sign.jks
===================================================================
(Binary files differ)
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/bob-sign.jks (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/bob-sign.jks)
===================================================================
(Binary files differ)
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/john-sign.jks
===================================================================
(Binary files differ)
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/john-sign.jks (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/john-sign.jks)
===================================================================
(Binary files differ)
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/readme.txt
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/readme.txt 2008-05-24 16:45:14 UTC (rev 7155)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/readme.txt 2008-11-18 16:34:04 UTC (rev 8754)
@@ -1,114 +0,0 @@
- -------------------------------------
- Certificates & keystores
- -------------------------------------
-
-
- Alice - Client 1 John - Client 2 Bob - Server
-
-Signature
--> Keystore alice-sign.jks john-sign.jks bob-sign.jks
--> Truststore wsse10.truststore wsse10.truststore wsse10.truststore
-
-
-> keytool -printcert -file Alice.cer
-
-Proprietario: CN=Alice, OU=OASIS Interop Test Cert, O=OASIS
-Organismo di emissione: CN=OASIS Interop Test CA, O=OASIS
-Numero di serie: 33a6047fb155631fed6721178150a899
-Valido da Sat Mar 19 01:00:00 CET 2005 a Tue Mar 20 00:59:59 CET 2018
-Impronte digitali certificato:
- MD5: 57:CE:81:F1:03:C4:2C:F7:5B:1A:DE:AC:43:64:0A:84
- SHA1: 6E:0E:88:F3:6E:BB:87:44:D4:70:F6:2F:60:4D:03:EA:4E:BE:50:94
-
-
---------------------------------------------------------------------------------------
-> keytool -printcert -file Bob.cer
-Proprietario: CN=Bob, OU=OASIS Interop Test Cert, O=OASIS
-Organismo di emissione: CN=OASIS Interop Test CA, O=OASIS
-Numero di serie: 6038eedbfeac9bbec89d87d3abae71f8
-Valido da Sat Mar 19 01:00:00 CET 2005 a Tue Mar 20 00:59:59 CET 2018
-Impronte digitali certificato:
- MD5: 89:3E:86:D2:4F:9C:E7:39:B6:71:8A:EF:00:C5:89:DC
- SHA1: 35:03:34:20:1B:EE:A6:50:2D:11:34:2F:93:EE:A0:9F:C0:B5:DF:01
-
---------------------------------------------------------------------------------------
-> keytool -printcert -file John.cer
-Proprietario: CN=John, OU=Test, O=Test, L=Test, ST=Test, C=IT
-Organismo di emissione: CN=John, OU=Test, O=Test, L=Test, ST=Test, C=IT
-Numero di serie: 4832ac71
-Valido da Tue May 20 12:48:17 CEST 2008 a Fri May 18 12:48:17 CEST 2018
-Impronte digitali certificato:
- MD5: C8:64:7A:4A:67:AC:73:A2:48:26:0A:B3:84:1D:0C:BB
- SHA1: 0A:22:01:1C:11:E0:CC:33:D7:D1:97:D6:BF:0B:3B:77:A3:6C:93:70
-
-
---------------------------------------------------------------------------------------
-keytool -list -keystore wsse10.truststore
-Immettere la password del keystore: password
-
-Tipo keystore: jks
-Provider keystore: SUN
-
-Il keystore contiene 3 entry
-
-alice, 9-mar-2006, trustedCertEntry,
-Impronta digitale certificato (MD5): 57:CE:81:F1:03:C4:2C:F7:5B:1A:DE:AC:43:64:0A:84
-bob, 9-mar-2006, trustedCertEntry,
-Impronta digitale certificato (MD5): 89:3E:86:D2:4F:9C:E7:39:B6:71:8A:EF:00:C5:89:DC
-john, 20-mag-2008, trustedCertEntry,
-Impronta digitale certificato (MD5): C8:64:7A:4A:67:AC:73:A2:48:26:0A:B3:84:1D:0C:BB
-
-
---------------------------------------------------------------------------------------
-> keytool -list -keystore alice-sign.jks
-Immettere la password del keystore: password
-
-Tipo keystore: jks
-Provider keystore: SUN
-
-Il keystore contiene 2 entry
-
-1, 27-ott-2007, keyEntry,
-Impronta digitale certificato (MD5): 57:CE:81:F1:03:C4:2C:F7:5B:1A:DE:AC:43:64:0A:84
-
-
---------------------------------------------------------------------------------------
-> keytool -list -keystore bob-sign.jks
-Immettere la password del keystore: password
-
-Tipo keystore: jks
-Provider keystore: SUN
-
-Il keystore contiene 3 entry
-
-1, 27-ott-2007, keyEntry,
-Impronta digitale certificato (MD5): 89:3E:86:D2:4F:9C:E7:39:B6:71:8A:EF:00:C5:89:DC
-
-
---------------------------------------------------------------------------------------
-> keytool -list -keystore john-sign.jks
-Immettere la password del keystore: password
-
-Tipo keystore: jks
-Provider keystore: SUN
-
-Il keystore contiene 2 entry
-
-1, 20-mag-2008, keyEntry,
-Impronta digitale certificato (MD5): C8:64:7A:4A:67:AC:73:A2:48:26:0A:B3:84:1D:0C:BB
-
-
---------------------------------------------------------------------------------------
-keytool -list -keystore keystore.jks
-Immettere la password del keystore: password
-
-Tipo keystore: jks
-Provider keystore: SUN
-
-Il keystore contiene 3 entry
-
-alice, 9-mar-2006, trustedCertEntry,
-Impronta digitale certificato (MD5): 57:CE:81:F1:03:C4:2C:F7:5B:1A:DE:AC:43:64:0A:84
-john, 20-mag-2008, trustedCertEntry,
-Impronta digitale certificato (MD5): C8:64:7A:4A:67:AC:73:A2:48:26:0A:B3:84:1D:0C:BB
-
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/readme.txt (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/readme.txt)
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/readme.txt (rev 0)
+++ stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/readme.txt 2008-11-18 16:34:04 UTC (rev 8754)
@@ -0,0 +1,114 @@
+ -------------------------------------
+ Certificates & keystores
+ -------------------------------------
+
+
+ Alice - Client 1 John - Client 2 Bob - Server
+
+Signature
+-> Keystore alice-sign.jks john-sign.jks bob-sign.jks
+-> Truststore wsse10.truststore wsse10.truststore wsse10.truststore
+
+
+> keytool -printcert -file Alice.cer
+
+Proprietario: CN=Alice, OU=OASIS Interop Test Cert, O=OASIS
+Organismo di emissione: CN=OASIS Interop Test CA, O=OASIS
+Numero di serie: 33a6047fb155631fed6721178150a899
+Valido da Sat Mar 19 01:00:00 CET 2005 a Tue Mar 20 00:59:59 CET 2018
+Impronte digitali certificato:
+ MD5: 57:CE:81:F1:03:C4:2C:F7:5B:1A:DE:AC:43:64:0A:84
+ SHA1: 6E:0E:88:F3:6E:BB:87:44:D4:70:F6:2F:60:4D:03:EA:4E:BE:50:94
+
+
+--------------------------------------------------------------------------------------
+> keytool -printcert -file Bob.cer
+Proprietario: CN=Bob, OU=OASIS Interop Test Cert, O=OASIS
+Organismo di emissione: CN=OASIS Interop Test CA, O=OASIS
+Numero di serie: 6038eedbfeac9bbec89d87d3abae71f8
+Valido da Sat Mar 19 01:00:00 CET 2005 a Tue Mar 20 00:59:59 CET 2018
+Impronte digitali certificato:
+ MD5: 89:3E:86:D2:4F:9C:E7:39:B6:71:8A:EF:00:C5:89:DC
+ SHA1: 35:03:34:20:1B:EE:A6:50:2D:11:34:2F:93:EE:A0:9F:C0:B5:DF:01
+
+--------------------------------------------------------------------------------------
+> keytool -printcert -file John.cer
+Proprietario: CN=John, OU=Test, O=Test, L=Test, ST=Test, C=IT
+Organismo di emissione: CN=John, OU=Test, O=Test, L=Test, ST=Test, C=IT
+Numero di serie: 4832ac71
+Valido da Tue May 20 12:48:17 CEST 2008 a Fri May 18 12:48:17 CEST 2018
+Impronte digitali certificato:
+ MD5: C8:64:7A:4A:67:AC:73:A2:48:26:0A:B3:84:1D:0C:BB
+ SHA1: 0A:22:01:1C:11:E0:CC:33:D7:D1:97:D6:BF:0B:3B:77:A3:6C:93:70
+
+
+--------------------------------------------------------------------------------------
+keytool -list -keystore wsse10.truststore
+Immettere la password del keystore: password
+
+Tipo keystore: jks
+Provider keystore: SUN
+
+Il keystore contiene 3 entry
+
+alice, 9-mar-2006, trustedCertEntry,
+Impronta digitale certificato (MD5): 57:CE:81:F1:03:C4:2C:F7:5B:1A:DE:AC:43:64:0A:84
+bob, 9-mar-2006, trustedCertEntry,
+Impronta digitale certificato (MD5): 89:3E:86:D2:4F:9C:E7:39:B6:71:8A:EF:00:C5:89:DC
+john, 20-mag-2008, trustedCertEntry,
+Impronta digitale certificato (MD5): C8:64:7A:4A:67:AC:73:A2:48:26:0A:B3:84:1D:0C:BB
+
+
+--------------------------------------------------------------------------------------
+> keytool -list -keystore alice-sign.jks
+Immettere la password del keystore: password
+
+Tipo keystore: jks
+Provider keystore: SUN
+
+Il keystore contiene 2 entry
+
+1, 27-ott-2007, keyEntry,
+Impronta digitale certificato (MD5): 57:CE:81:F1:03:C4:2C:F7:5B:1A:DE:AC:43:64:0A:84
+
+
+--------------------------------------------------------------------------------------
+> keytool -list -keystore bob-sign.jks
+Immettere la password del keystore: password
+
+Tipo keystore: jks
+Provider keystore: SUN
+
+Il keystore contiene 3 entry
+
+1, 27-ott-2007, keyEntry,
+Impronta digitale certificato (MD5): 89:3E:86:D2:4F:9C:E7:39:B6:71:8A:EF:00:C5:89:DC
+
+
+--------------------------------------------------------------------------------------
+> keytool -list -keystore john-sign.jks
+Immettere la password del keystore: password
+
+Tipo keystore: jks
+Provider keystore: SUN
+
+Il keystore contiene 2 entry
+
+1, 20-mag-2008, keyEntry,
+Impronta digitale certificato (MD5): C8:64:7A:4A:67:AC:73:A2:48:26:0A:B3:84:1D:0C:BB
+
+
+--------------------------------------------------------------------------------------
+keytool -list -keystore keystore.jks
+Immettere la password del keystore: password
+
+Tipo keystore: jks
+Provider keystore: SUN
+
+Il keystore contiene 3 entry
+
+alice, 9-mar-2006, trustedCertEntry,
+Impronta digitale certificato (MD5): 57:CE:81:F1:03:C4:2C:F7:5B:1A:DE:AC:43:64:0A:84
+john, 20-mag-2008, trustedCertEntry,
+Impronta digitale certificato (MD5): C8:64:7A:4A:67:AC:73:A2:48:26:0A:B3:84:1D:0C:BB
+
Deleted: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/wsse10.truststore
===================================================================
(Binary files differ)
Copied: stack/native/branches/dlofthouse/JBPAPP-1349/src/test/resources/jaxws/jbws2116/wsse10.truststore (from rev 7155, stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/jbws2116/wsse10.truststore)
===================================================================
(Binary files differ)
16 years, 1 month
JBossWS SVN: r8753 - stack/native/branches/dlofthouse.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2008-11-18 10:38:43 -0500 (Tue, 18 Nov 2008)
New Revision: 8753
Added:
stack/native/branches/dlofthouse/JBPAPP-1349/
Log:
Temporary working area to backport multiple commits.
Copied: stack/native/branches/dlofthouse/JBPAPP-1349 (from rev 8752, stack/native/branches/jbossws-native-2.0.1.SP2_CP)
16 years, 1 month
JBossWS SVN: r8752 - container/jboss50/trunk.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-11-18 03:51:04 -0500 (Tue, 18 Nov 2008)
New Revision: 8752
Modified:
container/jboss50/trunk/pom.xml
Log:
sync with AS trunk
Modified: container/jboss50/trunk/pom.xml
===================================================================
--- container/jboss50/trunk/pom.xml 2008-11-18 08:45:28 UTC (rev 8751)
+++ container/jboss50/trunk/pom.xml 2008-11-18 08:51:04 UTC (rev 8752)
@@ -32,13 +32,13 @@
http://snapshots.jboss.org/maven2/org/jboss/jbossas/jboss-as-component-ma...
-->
<jboss.version>5.0.0-SNAPSHOT</jboss.version>
- <jboss.ejb3.version>1.0.0-Beta5</jboss.ejb3.version>
- <jboss.deployers.version>2.0.0.CR3</jboss.deployers.version>
+ <jboss.ejb3.version>1.0.0-Beta8</jboss.ejb3.version>
+ <jboss.deployers.version>2.0.0.CR5</jboss.deployers.version>
<jboss.jbossxb.version>2.0.0.GA</jboss.jbossxb.version>
- <jboss.metadata.version>1.0.0.CR5</jboss.metadata.version>
- <jboss.microcontainer.version>2.0.0.CR3</jboss.microcontainer.version>
+ <jboss.metadata.version>1.0.0.CR6</jboss.metadata.version>
+ <jboss.microcontainer.version>2.0.0.CR5</jboss.microcontainer.version>
<jboss.reflect.version>2.0.0.GA</jboss.reflect.version>
- <jboss.security.version>2.0.2.CR11</jboss.security.version>
+ <jboss.security.version>2.0.2.SP1</jboss.security.version>
<jboss.vfs.version>2.0.0.CR5</jboss.vfs.version>
</properties>
16 years, 1 month
JBossWS SVN: r8751 - stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-11-18 03:45:28 -0500 (Tue, 18 Nov 2008)
New Revision: 8751
Modified:
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java
Log:
Use SOAPFactotyImpl's own method when calling from itself
Modified: stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java
===================================================================
--- stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java 2008-11-18 08:44:41 UTC (rev 8750)
+++ stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java 2008-11-18 08:45:28 UTC (rev 8751)
@@ -118,8 +118,9 @@
String prefix = domElement.getPrefix() != null ? domElement.getPrefix() : "";
String nsURI = domElement.getNamespaceURI() != null ? domElement.getNamespaceURI() : "";
- SOAPFactory factory = SOAPFactory.newInstance();
- SOAPElement soapElement = factory.createElement(localName, prefix, nsURI);
+// SOAPFactory factory = SOAPFactory.newInstance();
+// SOAPElement soapElement = factory.createElement(localName, prefix, nsURI);
+ SOAPElement soapElement = createElement(localName, prefix, nsURI);
if (domElement instanceof Element)
DOMUtils.copyAttributes(soapElement, (Element)domElement);
16 years, 1 month
JBossWS SVN: r8750 - stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-11-18 03:44:41 -0500 (Tue, 18 Nov 2008)
New Revision: 8750
Modified:
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPHeaderImpl.java
Log:
Do not depend on Name implementation specific behavior
Modified: stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java
===================================================================
--- stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2008-11-18 08:43:48 UTC (rev 8749)
+++ stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPElementImpl.java 2008-11-18 08:44:41 UTC (rev 8750)
@@ -492,7 +492,20 @@
*/
public Iterator getChildElements(Name name)
{
- return getChildElements(((NameImpl)name).toQName());
+ if (name instanceof NameImpl)
+ {
+ return getChildElements(((NameImpl)name).toQName());
+ }
+ else
+ {
+ QName qname;
+ if (name.getPrefix() != null)
+ qname = new QName(name.getURI(), name.getLocalName(), name.getPrefix());
+ else
+ qname = new QName(name.getURI(), name.getLocalName());
+ return getChildElements(qname);
+ }
+// return getChildElements(((NameImpl)name).toQName());
}
public Iterator getChildElements(QName qname)
Modified: stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPHeaderImpl.java
===================================================================
--- stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPHeaderImpl.java 2008-11-18 08:43:48 UTC (rev 8749)
+++ stack/native/branches/asoldano/modules/core/src/main/java/org/jboss/ws/core/soap/SOAPHeaderImpl.java 2008-11-18 08:44:41 UTC (rev 8750)
@@ -89,7 +89,20 @@
if (name == null)
throw new SOAPException("Invalid SOAPHeaderElement name: " + name);
- return addHeaderElement(((NameImpl)name).toQName());
+ if (name instanceof NameImpl)
+ {
+ return addHeaderElement(((NameImpl)name).toQName());
+ }
+ else
+ {
+ QName qname;
+ if (name.getPrefix() != null)
+ qname = new QName(name.getURI(), name.getLocalName(), name.getPrefix());
+ else
+ qname = new QName(name.getURI(), name.getLocalName());
+ return addHeaderElement(qname);
+ }
+// return addHeaderElement(((NameImpl)name).toQName());
}
public SOAPHeaderElement addHeaderElement(QName qname) throws SOAPException
16 years, 1 month