Author: darran.lofthouse(a)jboss.com
Date: 2009-05-07 05:24:41 -0400 (Thu, 07 May 2009)
New Revision: 10006
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/AuthorizeOperation.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Authorize.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Role.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Unchecked.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml
Removed:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxws.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Config.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/resources/schema/jboss-ws-security_1_0.xsd
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties
Log:
[JBPAPP-829] WS-Security Usename Token Profile JAAS Implementation for JSE based
WebServices.
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxws.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxws.xml 2009-05-06
16:41:17 UTC (rev 10005)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxws.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -541,6 +541,17 @@
<include name="wsdl/**"/>
</webinf>
</war>
+
+ <!-- jaxws-jbws1999 -->
+ <war warfile="${tests.output.dir}/libs/jaxws-jbws1999.war"
webxml="${tests.output.dir}/resources/jaxws/jbws1999/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1999/*.class"/>
+ <exclude
name="org/jboss/test/ws/jaxws/jbws1999/*TestCase.class"/>
+ </classes>
+ <webinf
dir="${tests.output.dir}/resources/jaxws/jbws1999/WEB-INF">
+ <include name="*"/>
+ </webinf>
+ </war>
<!-- jaxws-jbws2009 -->
<war warfile="${tests.output.dir}/libs/jaxws-jbws2009.war"
webxml="${tests.output.dir}/resources/jaxws/jbws2009/WEB-INF/web.xml">
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2009-05-06
16:41:17 UTC (rev 10005)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -143,7 +143,7 @@
protected boolean callRequestHandlerChain(QName portName, HandlerType type)
{
BindingExt binding = (BindingExt)getBindingProvider().getBinding();
- HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData,
binding.getHandlerChain(type));
+ HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData,
binding.getHandlerChain(type), false);
executorMap.put(type, executor);
MessageContext msgContext =
(MessageContext)MessageContextAssociation.peekMessageContext();
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2009-05-06
16:41:17 UTC (rev 10005)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -584,7 +584,7 @@
private boolean callRequestHandlerChain(QName portName, HandlerType type)
{
BindingExt binding = (BindingExt)bindingProvider.getBinding();
- HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData,
binding.getHandlerChain(type));
+ HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData,
binding.getHandlerChain(type), false);
executorMap.put(type, executor);
MessageContext msgContext =
(MessageContext)MessageContextAssociation.peekMessageContext();
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2009-05-06
16:41:17 UTC (rev 10005)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -63,10 +63,14 @@
protected int falseIndex = -1;
// True if the current direction is outbound
protected Boolean isOutbound;
+ // True if this is for the server/endpoint side, used to determine client side
specific
+ // conformance requirements.
+ private boolean serverSide;
- public HandlerChainExecutor(EndpointMetaData epMetaData, List<Handler>
unsortedChain)
+ public HandlerChainExecutor(EndpointMetaData epMetaData, List<Handler>
unsortedChain, boolean serverSide)
{
this.epMetaData = epMetaData;
+ this.serverSide = serverSide;
// Sort handler logical handlers first
List<Handler> sortedChain = new ArrayList<Handler>();
@@ -266,9 +270,17 @@
// the client MUST be passed on to the application. If the exception in question is a
subclass of WebService-
// Exception then an implementation MUST rethrow it as-is, without any additional
wrapping, otherwise it
// MUST throw a WebServiceException whose cause is set to the exception that was
thrown during handler processing.
- private void processHandlerFailure(Exception ex)
+ private void processHandlerFailure(RuntimeException ex)
{
log.error("Exception during handler processing", ex);
+
+ // If this call is server side then the conformance requirement specific to
+ // clients can be avoided.
+ if (serverSide == true)
+ {
+ throw ex;
+ }
+
if (ex instanceof WebServiceException)
{
throw (WebServiceException)ex;
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2009-05-06
16:41:17 UTC (rev 10005)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -148,7 +148,8 @@
if (type == HandlerType.ALL)
throw new IllegalArgumentException("Invalid handler type: " + type);
- HandlerChainExecutor executor = new HandlerChainExecutor(sepMetaData,
getHandlerChain(sepMetaData, type));
+ HandlerChainExecutor executor = new HandlerChainExecutor(sepMetaData,
getHandlerChain(sepMetaData, type), true);
+
if (type == HandlerType.PRE)
preExecutor.set(executor);
else if (type == HandlerType.ENDPOINT)
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/AuthorizeOperation.java
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/extensions/security/AuthorizeOperation.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/AuthorizeOperation.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/AuthorizeOperation.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,157 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.extensions.security;
+
+import java.security.Principal;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.security.auth.Subject;
+
+import org.jboss.logging.Logger;
+import org.jboss.security.AuthenticationManager;
+import org.jboss.security.RealmMapping;
+import org.jboss.security.SimplePrincipal;
+import org.jboss.ws.WSException;
+import org.jboss.ws.metadata.wsse.Authorize;
+import org.jboss.ws.metadata.wsse.Role;
+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;
+
+/**
+ * Operation to authenticate and check the authorisation of the
+ * current user.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran
Lofthouse</a>
+ * @since December 23rd 2008
+ */
+public class AuthorizeOperation
+{
+
+ private static final Logger log = Logger.getLogger(AuthorizeOperation.class);
+
+ private Authorize authorize;
+
+ private AuthenticationManager am;
+
+ private RealmMapping rm;
+
+ private SecurityAdaptorFactory secAdapterfactory;
+
+ public AuthorizeOperation(Authorize authorize)
+ {
+ this.authorize = authorize;
+
+ try
+ {
+ Context ctx = new InitialContext();
+ Object obj = ctx.lookup("java:comp/env/security/securityMgr");
+ am = (AuthenticationManager)obj;
+ rm = (RealmMapping)am;
+ }
+ catch (NamingException ne)
+ {
+ throw new WSException("Unable to lookup AuthenticationManager", ne);
+ }
+
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ secAdapterfactory = spiProvider.getSPI(SecurityAdaptorFactory.class);
+ }
+
+ public void process() throws WSSecurityException
+ {
+ boolean TRACE = log.isTraceEnabled();
+
+ if (TRACE)
+ log.trace("About to check authorization, using security domain '"
+ am.getSecurityDomain() + "'");
+
+ // Step 1 - Authenticate using currently associated principals.
+ SecurityAdaptor securityAdaptor = secAdapterfactory.newSecurityAdapter();
+ Principal principal = securityAdaptor.getPrincipal();
+ Object credential = securityAdaptor.getCredential();
+
+ Subject subject = new Subject();
+
+ if (am.isValid(principal, credential, subject) == false)
+ {
+ String msg = "Authentication failed, principal=" + principal;
+ log.error(msg);
+ SecurityException e = new SecurityException(msg);
+ throw new FailedAuthenticationException(e);
+ }
+
+ securityAdaptor.pushSubjectContext(subject, principal, credential);
+
+ if (TRACE)
+ log.trace("Authenticated, principal=" + principal);
+
+ // Step 2 - If unchecked all ok so return.
+ if (authorize.isUnchecked())
+ {
+ if (TRACE)
+ log.trace("authorize.isUnchecked()==true skipping roles check.");
+
+ return;
+ }
+
+ // Step 3 - If roles specified check user in role.
+ Set<Principal> expectedRoles = expectedRoles();
+ if (TRACE)
+ log.trace("expectedRoles=" + expectedRoles);
+
+ if (rm.doesUserHaveRole(principal, expectedRoles) == false)
+ {
+ Set<Principal> userRoles = rm.getUserRoles(principal);
+ String msg = "Insufficient method permissions, principal=" + principal
+ ", requiredRoles=" + expectedRoles + ", principalRoles=" +
userRoles;
+ log.error(msg);
+ SecurityException e = new SecurityException(msg);
+ throw new FailedAuthenticationException(e);
+ }
+
+ if (TRACE)
+ log.trace("Roles check complete, principal=" + principal + ",
requiredRoles=" + expectedRoles);
+ }
+
+ private Set<Principal> expectedRoles()
+ {
+ List<Role> roles = authorize.getRoles();
+ int rolesCount = (roles != null) ? roles.size() : 0;
+ Set<Principal> expectedRoles = new HashSet<Principal>(rolesCount);
+
+ if (roles != null)
+ {
+ for (Role current : roles)
+ {
+ expectedRoles.add(new SimplePrincipal(current.getName()));
+ }
+ }
+
+ return expectedRoles;
+ }
+
+}
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java 2009-05-06
16:41:17 UTC (rev 10005)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/ReceiveUsernameOperation.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -52,6 +52,7 @@
{
UsernameToken user = (UsernameToken)token;
SecurityAdaptor securityAdaptor = secAdapterfactory.newSecurityAdapter();
+
securityAdaptor.setPrincipal(new SimplePrincipal(user.getUsername()));
securityAdaptor.setCredential(user.getPassword());
}
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java 2009-05-06
16:41:17 UTC (rev 10005)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/SecurityDecoder.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -39,6 +39,8 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+
+
/**
* @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
* @version $Revision$
@@ -55,7 +57,7 @@
private SecurityStore store;
- private TimestampVerification timestampVerification;
+ private TimestampVerification timestampVerification;
private Authenticate authenticate;
@@ -143,8 +145,9 @@
if (ids != null)
encryptedIds.addAll(ids);
}
- }
+ }
+
}
public void verify(List<OperationDescription<RequireOperation>>
requireOperations) throws WSSecurityException
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2009-05-06
16:41:17 UTC (rev 10005)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -43,6 +43,8 @@
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
+import org.jboss.ws.metadata.wsse.Authenticate;
+import org.jboss.ws.metadata.wsse.Authorize;
import org.jboss.ws.metadata.wsse.Config;
import org.jboss.ws.metadata.wsse.Encrypt;
import org.jboss.ws.metadata.wsse.Operation;
@@ -115,8 +117,9 @@
SOAPHeader soapHeader = soapMessage.getSOAPHeader();
QName secQName = new QName(Constants.WSSE_NS, "Security");
+
Element secHeaderElement = (soapHeader != null) ? Util.findElement(soapHeader,
secQName) : null;
-
+
if (secHeaderElement == null)
{
// This is ok, we always allow faults to be received because WS-Security does
not encrypt faults
@@ -143,45 +146,18 @@
if (hasRequirements(config, operation, port))
throw convertToFault(new InvalidSecurityHeaderException("This service
requires <wsse:Security>, which is missing."));
-
- return;
}
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(), actualConfig == null ? null :
actualConfig.getAuthenticate());
- decoder.decode(soapMessage.getSOAPPart(), secHeaderElement);
-
- if (log.isTraceEnabled())
- log.trace("Decoded Message:\n" +
DOMWriter.printNode(soapMessage.getSOAPPart(), true));
-
- OperationMetaData opMetaData = ctx.getOperationMetaData();
- if (opMetaData == null)
+ Config operationConfig = getConfig(ctx, config, soapMessage);
+ if (secHeaderElement != null)
{
- // Get the operation meta data from the soap message
- // for the server side inbound message.
- EndpointMetaData epMetaData = ctx.getEndpointMetaData();
- opMetaData = soapMessage.getOperationMetaData(epMetaData);
+ decodeHeader(ctx, config, operationConfig, soapMessage, secHeaderElement);
}
- String operation = null;
- String port = null;
- if (opMetaData != null)
- {
- operation = opMetaData.getQName().toString();
- port = opMetaData.getEndpointMetaData().getPortName().getLocalPart();
- }
-
- List<OperationDescription<RequireOperation>> operations =
buildRequireOperations(config, operation, port);
-
- decoder.verify(operations);
- if (log.isDebugEnabled())
- log.debug("Verification is successful");
-
- decoder.complete();
+ authorize(operationConfig);
}
catch (WSSecurityException e)
{
@@ -194,6 +170,89 @@
}
}
+ private static void decodeHeader(CommonMessageContext ctx, WSSecurityConfiguration
configuration, Config operationConfig, SOAPMessageImpl message,
+ Element secHeaderElement) throws WSSecurityException, SOAPException
+ {
+ SecurityStore securityStore = new SecurityStore(configuration.getKeyStoreURL(),
configuration.getKeyStoreType(), configuration.getKeyStorePassword(),
+ configuration.getKeyPasswords(), configuration.getTrustStoreURL(),
configuration.getTrustStoreType(), configuration.getTrustStorePassword());
+
+ Authenticate authenticate = null;
+
+ if (operationConfig != null)
+ {
+ authenticate = operationConfig.getAuthenticate();
+ }
+
+ SecurityDecoder decoder = new SecurityDecoder(securityStore,
configuration.getTimestampVerification(), authenticate);
+
+ decoder.decode(message.getSOAPPart(), secHeaderElement);
+
+ if (log.isTraceEnabled())
+ log.trace("Decoded Message:\n" +
DOMWriter.printNode(message.getSOAPPart(), true));
+
+ OperationMetaData opMetaData = ctx.getOperationMetaData();
+ if (opMetaData == null)
+ {
+ // Get the operation meta data from the soap message
+ // for the server side inbound message.
+ EndpointMetaData epMetaData = ctx.getEndpointMetaData();
+ opMetaData = message.getOperationMetaData(epMetaData);
+ }
+
+ String operation = null;
+ String port = null;
+ if (opMetaData != null)
+ {
+ operation = opMetaData.getQName().toString();
+ port = opMetaData.getEndpointMetaData().getPortName().getLocalPart();
+ }
+
+ List<OperationDescription<RequireOperation>> operations =
buildRequireOperations(configuration, operation, port);
+
+ decoder.verify(operations);
+ if (log.isDebugEnabled())
+ log.debug("Verification is successful");
+
+ decoder.complete();
+ }
+
+ private static void authorize(Config config) throws WSSecurityException
+ {
+ if (config != null)
+ {
+ Authorize authorize = config.getAuthorize();
+ if (authorize != null)
+ {
+ AuthorizeOperation authorizeOp = new AuthorizeOperation(authorize);
+ authorizeOp.process();
+ }
+ }
+ }
+
+
+ private static Config getConfig(CommonMessageContext ctx, WSSecurityConfiguration
configuration, SOAPMessageImpl message) throws SOAPException
+ {
+ OperationMetaData opMetaData = ctx.getOperationMetaData();
+ if (opMetaData == null)
+ {
+ // Get the operation meta data from the soap message
+ // for the server side inbound message.
+ EndpointMetaData epMetaData = ctx.getEndpointMetaData();
+ opMetaData = message.getOperationMetaData(epMetaData);
+ }
+
+ String operation = null;
+ String port = null;
+ if (opMetaData != null)
+ {
+ operation = opMetaData.getQName().toString();
+ port = opMetaData.getEndpointMetaData().getPortName().getLocalPart();
+ }
+
+ return getConfig(configuration, port, operation);
+ }
+
+
private static WSSecurityConfiguration getSecurityConfig(CommonMessageContext ctx)
{
WSSecurityConfiguration config =
ctx.getEndpointMetaData().getServiceMetaData().getSecurityConfiguration();
@@ -263,8 +322,8 @@
}
private static List<OperationDescription<RequireOperation>>
buildRequireOperations(WSSecurityConfiguration config, String operation, String port)
- {
- Config operationConfig = getConfig(config, port, operation);
+ {
+ Config operationConfig = getConfig(config, port, operation);
if (operationConfig == null)
return null;
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Authorize.java
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Authorize.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Authorize.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Authorize.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,71 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.metadata.wsse;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * <code>Authorize</code> specifies that the users credentials should be
+ * checked to ensure the user is authorized to call the endpoint.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran
Lofthouse</a>
+ * @since December 18th 2008
+ */
+public class Authorize implements Serializable
+{
+
+ private Unchecked unchecked;
+
+ private List<Role> roles = new ArrayList<Role>();
+
+ public List<Role> getRoles()
+ {
+ return Collections.unmodifiableList(roles);
+ }
+
+ public void addRole(final Role role)
+ {
+ if (isUnchecked())
+ {
+ throw new IllegalStateException("Can not add role after setting
'Unchecked'");
+ }
+ roles.add(role);
+ }
+
+ public boolean isUnchecked()
+ {
+ return unchecked != null;
+ }
+
+ void setUnchecked(Unchecked unchecked)
+ {
+ if (roles.isEmpty() == false)
+ {
+ throw new IllegalStateException("Can not set 'Unchecked' with
role(s) defined.");
+ }
+ this.unchecked = unchecked;
+ }
+
+}
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Config.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Config.java 2009-05-06
16:41:17 UTC (rev 10005)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Config.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -39,6 +39,7 @@
private Encrypt encrypt;
private Requires requires;
private Authenticate authenticate;
+ private Authorize authorize;
public Encrypt getEncrypt()
{
@@ -99,4 +100,15 @@
{
this.authenticate = authenticate;
}
+
+ public Authorize getAuthorize()
+ {
+ return this.authorize;
+ }
+
+ public void setAuthorize(Authorize authorize)
+ {
+ this.authorize = authorize;
+ }
+
}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Role.java
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Role.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Role.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Role.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,53 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.metadata.wsse;
+
+import java.io.Serializable;
+
+/**
+ * <code>Role</code> representation of a role authorized to call an
endpoint.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran
Lofthouse</a>
+ * @since December 18th 2008
+ */
+public class Role implements Serializable
+{
+
+ private String name;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.name;
+ }
+
+}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Unchecked.java
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/main/java/org/jboss/ws/metadata/wsse/Unchecked.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Unchecked.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/Unchecked.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.ws.metadata.wsse;
+
+import java.io.Serializable;
+
+/**
+ * <code>Unchecked</code> used when all authenticated users are authorized.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran
Lofthouse</a>
+ * @since December 18th 2008
+ */
+public class Unchecked implements Serializable
+{
+
+}
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2009-05-06
16:41:17 UTC (rev 10005)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsse/WSSecurityOMFactory.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -288,6 +288,10 @@
{
return new Authenticate();
}
+ else if ("authorize".equals(localName))
+ {
+ return new Authorize();
+ }
return null;
}
@@ -364,6 +368,35 @@
authenticate.setSignatureCertAuth(signatureCertAuth);
}
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(Config config, Authorize authorize, UnmarshallingContext
navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + config + ",child=" + authorize +
"]");
+ config.setAuthorize(authorize);
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(Authorize authorize, Unchecked unchecked, UnmarshallingContext
navigator, String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + authorize + ",child=" + unchecked
+ "]");
+ authorize.setUnchecked(unchecked);
+ }
+
+ /**
+ * Called when parsing character is complete.
+ */
+ public void addChild(Authorize authorize, Role role, UnmarshallingContext navigator,
String namespaceURI, String localName)
+ {
+ log.trace("addChild: [obj=" + authorize + ",child=" + role +
"]");
+ authorize.addRole(role);
+ }
+
+
private Object handleTargets(Object object, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
{
log.trace("newChild: " + localName);
@@ -434,9 +467,28 @@
return null;
}
+
/**
* Called when parsing of a new element started.
*/
+ public Object newChild(Authorize authorize, UnmarshallingContext navigator, String
namespaceURI, String localName, Attributes attrs)
+ {
+ log.trace("newChild: " + localName);
+ if ("unchecked".equals(localName))
+ {
+ return new Unchecked();
+ }
+ else if ("role".equals(localName))
+ {
+ return new Role();
+ }
+
+ return null;
+ }
+
+ /**
+ * Called when parsing of a new element started.
+ */
public Object newChild(RequireSignature requireSignature, UnmarshallingContext
navigator, String namespaceURI, String localName, Attributes attrs)
{
return handleTargets(requireSignature, navigator, namespaceURI, localName, attrs);
@@ -456,7 +508,14 @@
target.setValue(value);
}
+
+ public void setValue(Role role, UnmarshallingContext navigator, String namespaceURI,
String localName, String value)
+ {
+ log.trace("setValue: [obj=" + role + ",value=" + value +
"]");
+ role.setName(value);
+ }
+
/**
* Called when parsing character is complete.
*/
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/resources/schema/jboss-ws-security_1_0.xsd
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/resources/schema/jboss-ws-security_1_0.xsd 2009-05-06
16:41:17 UTC (rev 10005)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/resources/schema/jboss-ws-security_1_0.xsd 2009-05-07
09:24:41 UTC (rev 10006)
@@ -131,6 +131,16 @@
<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:element name="authorize" type="authorizeType"
minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>
+ Specifies that authentication is required and either provides a list of roles
authorized to access the endpoint or unchecked if any
+ authenticated user can access the endpoint.
+
+ This should only be used for POJO endpoints, EJB3 endpoints should configure
security as for any other EJB3 session bean.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
</xs:all>
</xs:complexType>
<xs:complexType name="requireTimestampType">
@@ -304,4 +314,19 @@
</xs:annotation>
</xs:attribute>
</xs:complexType>
+ <xs:complexType name="authorizeType">
+ <xs:choice minOccurs="1" maxOccurs="1">
+ <xs:element name="role" type="xs:string"
minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>Specifies a role that is allowed to call the
endpoint.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="unchecked" type="uncheckedType"
minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Specifies that any authenticated user can call the
endpoint.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="uncheckedType"/>
</xs:schema>
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java 2009-05-06
16:41:17 UTC (rev 10005)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxrpc/jbws1316/TestEndpoint.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -30,7 +30,7 @@
*
* @author <a href="mailto:darran.lofthouse@jboss.com">Darran
Lofthouse</a>
* @version $Revision$
- * @since Aril 14 2008
+ * @since April 14 2008
*/
public interface TestEndpoint extends Remote
{
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999)
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1999;
-
-import javax.jws.WebService;
-
-/**
- * Test Endpoint to test UsernameToken authorization / authentication
- * for POJO endpoints.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 12th January 2008
- * @see
https://jira.jboss.org/jira/browse/JBWS-1999
- */
-@WebService(name = "Endpoint", targetNamespace =
"http://ws.jboss.org/jbws1999")
-public interface Endpoint
-{
-
- public String echoUnchecked(final String message);
-
- public String echoFriendRequired(final String message);
-
- public String echoEnemyRequired(final String message);
-
- public String echoNoSecurity(final String message);
-
-}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/Endpoint.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1999;
+
+import javax.jws.WebService;
+
+/**
+ * Test Endpoint to test UsernameToken authorization / authentication
+ * for POJO endpoints.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 12th January 2008
+ * @see
https://jira.jboss.org/jira/browse/JBWS-1999
+ */
+@WebService(name = "Endpoint", targetNamespace =
"http://ws.jboss.org/jbws1999")
+public interface Endpoint
+{
+
+ public String echoUnchecked(final String message);
+
+ public String echoFriendRequired(final String message);
+
+ public String echoEnemyRequired(final String message);
+
+ public String echoNoSecurity(final String message);
+
+}
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.jbws1999;
-
-import javax.jws.WebService;
-
-import org.jboss.ws.annotation.EndpointConfig;
-
-/**
- * Test Endpoint to test UsernameToken authorization / authentication
- * for POJO endpoints.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 12th January 2008
- * @see
https://jira.jboss.org/jira/browse/JBWS-1999
- */
-@WebService(name = "Endpoint", serviceName = "EndpointService",
targetNamespace = "http://ws.jboss.org/jbws1999", endpointInterface =
"org.jboss.test.ws.jaxws.jbws1999.Endpoint")
-@EndpointConfig(configName = "Standard WSSecurity Endpoint")
-public class EndpointImpl implements Endpoint
-{
-
- public String echoEnemyRequired(final String message)
- {
- return message;
- }
-
- public String echoFriendRequired(final String message)
- {
- return message;
- }
-
- public String echoNoSecurity(final String message)
- {
- return message;
- }
-
- public String echoUnchecked(final String message)
- {
- return message;
- }
-
-}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/EndpointImpl.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1999;
+
+import javax.jws.WebService;
+
+import org.jboss.ws.annotation.EndpointConfig;
+
+/**
+ * Test Endpoint to test UsernameToken authorization / authentication
+ * for POJO endpoints.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 12th January 2008
+ * @see
https://jira.jboss.org/jira/browse/JBWS-1999
+ */
+@WebService(name = "Endpoint", serviceName = "EndpointService",
targetNamespace = "http://ws.jboss.org/jbws1999", endpointInterface =
"org.jboss.test.ws.jaxws.jbws1999.Endpoint")
+@EndpointConfig(configName = "Standard WSSecurity Endpoint")
+public class EndpointImpl implements Endpoint
+{
+
+ public String echoEnemyRequired(final String message)
+ {
+ return message;
+ }
+
+ public String echoFriendRequired(final String message)
+ {
+ return message;
+ }
+
+ public String echoNoSecurity(final String message)
+ {
+ return message;
+ }
+
+ public String echoUnchecked(final String message)
+ {
+ return message;
+ }
+
+}
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,211 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.test.ws.jaxws.jbws1999;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.ws.metadata.wsse.Authorize;
-import org.jboss.ws.metadata.wsse.Config;
-import org.jboss.ws.metadata.wsse.Port;
-import org.jboss.ws.metadata.wsse.Role;
-import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
-import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
-import org.jboss.wsf.test.JBossWSTest;
-
-/**
- * Test case to test reading the 'authorize' configuration.
- *
- * @author <a href="mailto:darran.lofthouse@jboss.com">Darran
Lofthouse</a>
- * @since December 18th 2008
- */
-public class JBWS1999ConfigurationTestCase extends JBossWSTest
-{
-
- private WSSecurityConfiguration load(final String fileName) throws IOException
- {
- File configFile = new File("resources/jaxws/jbws1999/config/" +
fileName);
- WSSecurityOMFactory factory = WSSecurityOMFactory.newInstance();
-
- return factory.parse(configFile.toURL());
- }
-
- /**
- * Test loading a configuration with a default 'authorize' definition
- * which contains two roles.
- */
- public void testDefaultRoles() throws Exception
- {
- WSSecurityConfiguration wsConfig = load("jboss-wsse-default-roles.xml");
-
- Config config = wsConfig.getDefaultConfig();
- Authorize authorize = config.getAuthorize();
- assertFalse("Unchecked", authorize.isUnchecked());
- List<Role> roles = authorize.getRoles();
-
- assertEquals("Expected 2 roles", 2, roles.size());
-
- List<String> roleNames = new ArrayList<String>(roles.size());
- for (Role current : roles)
- {
- roleNames.add(current.getName());
- }
- assertTrue("Expected 'Trader' role.",
roleNames.contains("Trader"));
- assertTrue("Expected 'Banker' role.",
roleNames.contains("Banker"));
- }
-
- /**
- * Test loading a configuration with a port 'authorize' definition
- * which contains two roles.
- */
- public void testPortRoles() throws Exception
- {
- WSSecurityConfiguration wsConfig = load("jboss-wsse-port-roles.xml");
-
- Port port = wsConfig.getPorts().get("TestPort");
- Config config = port.getDefaultConfig();
- Authorize authorize = config.getAuthorize();
- assertFalse("Unchecked", authorize.isUnchecked());
- List<Role> roles = authorize.getRoles();
-
- assertEquals("Expected 2 roles", 2, roles.size());
-
- List<String> roleNames = new ArrayList<String>(roles.size());
- for (Role current : roles)
- {
- roleNames.add(current.getName());
- }
- assertTrue("Expected 'Trader' role.",
roleNames.contains("Trader"));
- assertTrue("Expected 'Banker' role.",
roleNames.contains("Banker"));
- }
-
- /**
- * Test loading a configuration with a default 'authorize' definition
- * which contains one role.
- */
- public void testDefaultRole() throws Exception
- {
- WSSecurityConfiguration wsConfig = load("jboss-wsse-default-role.xml");
-
- Config config = wsConfig.getDefaultConfig();
- Authorize authorize = config.getAuthorize();
- assertFalse("Unchecked", authorize.isUnchecked());
- List<Role> roles = authorize.getRoles();
-
- assertEquals("Expected 1 roles", 1, roles.size());
-
- Role role = roles.get(0);
- assertEquals("Expected 'Trader' role.", "Trader",
role.getName());
- }
-
- /**
- * Test loading a configuration with a port 'authorize' definition
- * which contains one role.
- */
- public void testPortRole() throws Exception
- {
- WSSecurityConfiguration wsConfig = load("jboss-wsse-port-role.xml");
-
- Port port = wsConfig.getPorts().get("TestPort");
- Config config = port.getDefaultConfig();
- Authorize authorize = config.getAuthorize();
- assertFalse("Unchecked", authorize.isUnchecked());
- List<Role> roles = authorize.getRoles();
-
- assertEquals("Expected 1 roles", 1, roles.size());
-
- Role role = roles.get(0);
- assertEquals("Expected 'Trader' role.", "Trader",
role.getName());
- }
-
- /**
- * Test loading a configuration with a default 'authorize' definition
- * with unchecked.
- */
- public void testDefaultUnchecked() throws Exception
- {
- WSSecurityConfiguration wsConfig =
load("jboss-wsse-default-unchecked.xml");
-
- Config config = wsConfig.getDefaultConfig();
- Authorize authorize = config.getAuthorize();
- assertTrue("Unchecked", authorize.isUnchecked());
- List<Role> roles = authorize.getRoles();
-
- assertEquals("Expected 0 roles", 0, roles.size());
- }
-
- /**
- * Test loading a configuration with a port 'authorize' definition
- * with unchecked.
- */
- public void testPortUnchecked() throws Exception
- {
- WSSecurityConfiguration wsConfig =
load("jboss-wsse-port-unchecked.xml");
-
- Port port = wsConfig.getPorts().get("TestPort");
- Config config = port.getDefaultConfig();
- Authorize authorize = config.getAuthorize();
- assertTrue("Unchecked", authorize.isUnchecked());
- List<Role> roles = authorize.getRoles();
-
- assertEquals("Expected 0 roles", 0, roles.size());
- }
-
- /**
- * Test loading a configuration with a default 'authorize' definition
- * with unchecked and a role defined, parsing should fail.
- */
- public void testDefaultRoleUnchecked() throws Exception
- {
- try
- {
- WSSecurityConfiguration wsConfig =
load("jboss-wsse-default-role-unchecked.xml");
- fail("Expected exception not thrown.");
- }
- catch (IOException expected)
- {
- Throwable cause = expected.getCause();
- assertEquals(IllegalStateException.class, cause.getClass());
- }
- }
-
- /**
- * Test loading a configuration with a port 'authorize' definition
- * with unchecked and a role defined, parsing should fail.
- */
- public void testPortRoleUnchecked() throws Exception
- {
- try
- {
- WSSecurityConfiguration wsConfig =
load("jboss-wsse-port-role-unchecked.xml");
- fail("Expected exception not thrown.");
- }
- catch (IOException expected)
- {
- Throwable cause = expected.getCause();
- assertEquals(IllegalStateException.class, cause.getClass());
- }
- }
-
-}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999ConfigurationTestCase.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,211 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.test.ws.jaxws.jbws1999;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.ws.metadata.wsse.Authorize;
+import org.jboss.ws.metadata.wsse.Config;
+import org.jboss.ws.metadata.wsse.Port;
+import org.jboss.ws.metadata.wsse.Role;
+import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
+import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * Test case to test reading the 'authorize' configuration.
+ *
+ * @author <a href="mailto:darran.lofthouse@jboss.com">Darran
Lofthouse</a>
+ * @since December 18th 2008
+ */
+public class JBWS1999ConfigurationTestCase extends JBossWSTest
+{
+
+ private WSSecurityConfiguration load(final String fileName) throws IOException
+ {
+ File configFile = new File("resources/jaxws/jbws1999/config/" +
fileName);
+ WSSecurityOMFactory factory = WSSecurityOMFactory.newInstance();
+
+ return factory.parse(configFile.toURL());
+ }
+
+ /**
+ * Test loading a configuration with a default 'authorize' definition
+ * which contains two roles.
+ */
+ public void testDefaultRoles() throws Exception
+ {
+ WSSecurityConfiguration wsConfig = load("jboss-wsse-default-roles.xml");
+
+ Config config = wsConfig.getDefaultConfig();
+ Authorize authorize = config.getAuthorize();
+ assertFalse("Unchecked", authorize.isUnchecked());
+ List<Role> roles = authorize.getRoles();
+
+ assertEquals("Expected 2 roles", 2, roles.size());
+
+ List<String> roleNames = new ArrayList<String>(roles.size());
+ for (Role current : roles)
+ {
+ roleNames.add(current.getName());
+ }
+ assertTrue("Expected 'Trader' role.",
roleNames.contains("Trader"));
+ assertTrue("Expected 'Banker' role.",
roleNames.contains("Banker"));
+ }
+
+ /**
+ * Test loading a configuration with a port 'authorize' definition
+ * which contains two roles.
+ */
+ public void testPortRoles() throws Exception
+ {
+ WSSecurityConfiguration wsConfig = load("jboss-wsse-port-roles.xml");
+
+ Port port = wsConfig.getPorts().get("TestPort");
+ Config config = port.getDefaultConfig();
+ Authorize authorize = config.getAuthorize();
+ assertFalse("Unchecked", authorize.isUnchecked());
+ List<Role> roles = authorize.getRoles();
+
+ assertEquals("Expected 2 roles", 2, roles.size());
+
+ List<String> roleNames = new ArrayList<String>(roles.size());
+ for (Role current : roles)
+ {
+ roleNames.add(current.getName());
+ }
+ assertTrue("Expected 'Trader' role.",
roleNames.contains("Trader"));
+ assertTrue("Expected 'Banker' role.",
roleNames.contains("Banker"));
+ }
+
+ /**
+ * Test loading a configuration with a default 'authorize' definition
+ * which contains one role.
+ */
+ public void testDefaultRole() throws Exception
+ {
+ WSSecurityConfiguration wsConfig = load("jboss-wsse-default-role.xml");
+
+ Config config = wsConfig.getDefaultConfig();
+ Authorize authorize = config.getAuthorize();
+ assertFalse("Unchecked", authorize.isUnchecked());
+ List<Role> roles = authorize.getRoles();
+
+ assertEquals("Expected 1 roles", 1, roles.size());
+
+ Role role = roles.get(0);
+ assertEquals("Expected 'Trader' role.", "Trader",
role.getName());
+ }
+
+ /**
+ * Test loading a configuration with a port 'authorize' definition
+ * which contains one role.
+ */
+ public void testPortRole() throws Exception
+ {
+ WSSecurityConfiguration wsConfig = load("jboss-wsse-port-role.xml");
+
+ Port port = wsConfig.getPorts().get("TestPort");
+ Config config = port.getDefaultConfig();
+ Authorize authorize = config.getAuthorize();
+ assertFalse("Unchecked", authorize.isUnchecked());
+ List<Role> roles = authorize.getRoles();
+
+ assertEquals("Expected 1 roles", 1, roles.size());
+
+ Role role = roles.get(0);
+ assertEquals("Expected 'Trader' role.", "Trader",
role.getName());
+ }
+
+ /**
+ * Test loading a configuration with a default 'authorize' definition
+ * with unchecked.
+ */
+ public void testDefaultUnchecked() throws Exception
+ {
+ WSSecurityConfiguration wsConfig =
load("jboss-wsse-default-unchecked.xml");
+
+ Config config = wsConfig.getDefaultConfig();
+ Authorize authorize = config.getAuthorize();
+ assertTrue("Unchecked", authorize.isUnchecked());
+ List<Role> roles = authorize.getRoles();
+
+ assertEquals("Expected 0 roles", 0, roles.size());
+ }
+
+ /**
+ * Test loading a configuration with a port 'authorize' definition
+ * with unchecked.
+ */
+ public void testPortUnchecked() throws Exception
+ {
+ WSSecurityConfiguration wsConfig =
load("jboss-wsse-port-unchecked.xml");
+
+ Port port = wsConfig.getPorts().get("TestPort");
+ Config config = port.getDefaultConfig();
+ Authorize authorize = config.getAuthorize();
+ assertTrue("Unchecked", authorize.isUnchecked());
+ List<Role> roles = authorize.getRoles();
+
+ assertEquals("Expected 0 roles", 0, roles.size());
+ }
+
+ /**
+ * Test loading a configuration with a default 'authorize' definition
+ * with unchecked and a role defined, parsing should fail.
+ */
+ public void testDefaultRoleUnchecked() throws Exception
+ {
+ try
+ {
+ WSSecurityConfiguration wsConfig =
load("jboss-wsse-default-role-unchecked.xml");
+ fail("Expected exception not thrown.");
+ }
+ catch (IOException expected)
+ {
+ Throwable cause = expected.getCause();
+ assertEquals(IllegalStateException.class, cause.getClass());
+ }
+ }
+
+ /**
+ * Test loading a configuration with a port 'authorize' definition
+ * with unchecked and a role defined, parsing should fail.
+ */
+ public void testPortRoleUnchecked() throws Exception
+ {
+ try
+ {
+ WSSecurityConfiguration wsConfig =
load("jboss-wsse-port-role-unchecked.xml");
+ fail("Expected exception not thrown.");
+ }
+ catch (IOException expected)
+ {
+ Throwable cause = expected.getCause();
+ assertEquals(IllegalStateException.class, cause.getClass());
+ }
+ }
+
+}
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,195 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file in the
-* distribution for a full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
-*/
-package org.jboss.test.ws.jaxws.jbws1999;
-
-import java.io.File;
-import java.net.URL;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.SOAPFault;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import javax.xml.ws.soap.SOAPFaultException;
-
-import junit.framework.Test;
-
-import org.jboss.ws.core.StubExt;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * Test case to test UsernameToken authorization / authentication
- * for POJO endpoints.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 12th January 2008
- * @see
https://jira.jboss.org/jira/browse/JBWS-1999
- */
-public class JBWS1999TestCase extends JBossWSTest
-{
-
- private final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-jbws1999";
-
- private static final String FAULT_CODE = "wsse:FailedAuthentication";
-
- private static final String FAULT_STRING = "The security token could not be
authenticated or authorized.";
-
- public static Test suite() throws Exception
- {
- return new JBossWSTestSetup(JBWS1999TestCase.class,
"jaxws-jbws1999.war");
- }
-
- public void testNoSecurity() throws Exception
- {
- Endpoint endpoint = getPort(false);
-
- String message = "NoSecurity Message";
-
- String response = endpoint.echoNoSecurity(message);
- assertEquals("Response Message", message, response);
- }
-
- public void testUnchecked_Default() throws Exception
- {
- Endpoint endpoint = getPort(false);
-
- String message = "UncheckedDefault Message";
-
- String response = endpoint.echoUnchecked(message);
- assertEquals("Response Message", message, response);
- }
-
- public void testUnchecked() throws Exception
- {
- Endpoint endpoint = getPort(true);
- Map<String, Object> requestContext =
((BindingProvider)endpoint).getRequestContext();
- requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
- requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
-
- String message = "Unchecked Message";
-
- String response = endpoint.echoUnchecked(message);
- assertEquals("Response Message", message, response);
- }
-
- public void testUnchecked_WrongPassword() throws Exception
- {
- Endpoint endpoint = getPort(true);
- Map<String, Object> requestContext =
((BindingProvider)endpoint).getRequestContext();
- requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
- requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thepig");
-
- String message = "Unchecked_WrongPassword Message";
-
- try
- {
- endpoint.echoUnchecked(message);
- fail("Expected SOAPFaultException not thrown!!");
- }
- catch (SOAPFaultException sfe)
- {
- SOAPFault fault = sfe.getFault();
- String faultCode = fault.getFaultCode();
- assertEquals("Fault Code", FAULT_CODE, faultCode);
- String faultString = fault.getFaultString();
- assertEquals("Fault String", FAULT_STRING, faultString);
- }
-
- }
-
- public void testFriendRequired() throws Exception
- {
- Endpoint endpoint = getPort(true);
- Map<String, Object> requestContext =
((BindingProvider)endpoint).getRequestContext();
- requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
- requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
-
- String message = "FriendRequired Message";
-
- String response = endpoint.echoFriendRequired(message);
- assertEquals("Response Message", message, response);
- }
-
- public void testFriendRequired_WrongPassword() throws Exception
- {
- Endpoint endpoint = getPort(true);
- Map<String, Object> requestContext =
((BindingProvider)endpoint).getRequestContext();
- requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
- requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thepig");
-
- String message = "FriendRequired Message";
-
- try
- {
- endpoint.echoFriendRequired(message);
- fail("Expected SOAPFaultException not thrown!!");
- }
- catch (SOAPFaultException sfe)
- {
- SOAPFault fault = sfe.getFault();
- String faultCode = fault.getFaultCode();
- assertEquals("Fault Code", FAULT_CODE, faultCode);
- String faultString = fault.getFaultString();
- assertEquals("Fault Message", FAULT_STRING, faultString);
- }
- }
-
- public void testEnemyRequired() throws Exception
- {
- Endpoint endpoint = getPort(true);
- Map<String, Object> requestContext =
((BindingProvider)endpoint).getRequestContext();
- requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
- requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
-
- String message = "EnemyRequired Message";
-
- try
- {
- endpoint.echoEnemyRequired(message);
- fail("Expected SOAPFaultException not thrown!!");
- }
- catch (SOAPFaultException sfe)
- {
- SOAPFault fault = sfe.getFault();
- String faultCode = fault.getFaultCode();
- assertEquals("Fault Code", FAULT_CODE, faultCode);
- String faultString = fault.getFaultString();
- assertEquals("Fault Message", FAULT_STRING, faultString);
- }
- }
-
- private Endpoint getPort(boolean enableSecurity) throws Exception
- {
- URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
- QName serviceName = new
QName("http://ws.jboss.org/jbws1999",
"EndpointService");
- Endpoint port = Service.create(wsdlURL, serviceName).getPort(Endpoint.class);
- if (enableSecurity == true)
- {
- URL securityURL = new
File("resources/jaxws/jbws1999/jboss-wsse-client.xml").toURL();
- ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
- ((StubExt)port).setConfigName("Standard WSSecurity Client");
- }
-
- return port;
- }
-}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws1999/JBWS1999TestCase.java 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,195 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.test.ws.jaxws.jbws1999;
+
+import java.io.File;
+import java.net.URL;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.SOAPFault;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPFaultException;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Test case to test UsernameToken authorization / authentication
+ * for POJO endpoints.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 12th January 2008
+ * @see
https://jira.jboss.org/jira/browse/JBWS-1999
+ */
+public class JBWS1999TestCase extends JBossWSTest
+{
+
+ private final String TARGET_ENDPOINT_ADDRESS = "http://" + getServerHost() +
":8080/jaxws-jbws1999";
+
+ private static final String FAULT_CODE = "wsse:FailedAuthentication";
+
+ private static final String FAULT_STRING = "The security token could not be
authenticated or authorized.";
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS1999TestCase.class,
"jaxws-jbws1999.war");
+ }
+
+ public void testNoSecurity() throws Exception
+ {
+ Endpoint endpoint = getPort(false);
+
+ String message = "NoSecurity Message";
+
+ String response = endpoint.echoNoSecurity(message);
+ assertEquals("Response Message", message, response);
+ }
+
+ public void testUnchecked_Default() throws Exception
+ {
+ Endpoint endpoint = getPort(false);
+
+ String message = "UncheckedDefault Message";
+
+ String response = endpoint.echoUnchecked(message);
+ assertEquals("Response Message", message, response);
+ }
+
+ public void testUnchecked() throws Exception
+ {
+ Endpoint endpoint = getPort(true);
+ Map<String, Object> requestContext =
((BindingProvider)endpoint).getRequestContext();
+ requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+
+ String message = "Unchecked Message";
+
+ String response = endpoint.echoUnchecked(message);
+ assertEquals("Response Message", message, response);
+ }
+
+ public void testUnchecked_WrongPassword() throws Exception
+ {
+ Endpoint endpoint = getPort(true);
+ Map<String, Object> requestContext =
((BindingProvider)endpoint).getRequestContext();
+ requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thepig");
+
+ String message = "Unchecked_WrongPassword Message";
+
+ try
+ {
+ endpoint.echoUnchecked(message);
+ fail("Expected SOAPFaultException not thrown!!");
+ }
+ catch (SOAPFaultException sfe)
+ {
+ SOAPFault fault = sfe.getFault();
+ String faultCode = fault.getFaultCode();
+ assertEquals("Fault Code", FAULT_CODE, faultCode);
+ String faultString = fault.getFaultString();
+ assertEquals("Fault String", FAULT_STRING, faultString);
+ }
+
+ }
+
+ public void testFriendRequired() throws Exception
+ {
+ Endpoint endpoint = getPort(true);
+ Map<String, Object> requestContext =
((BindingProvider)endpoint).getRequestContext();
+ requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+
+ String message = "FriendRequired Message";
+
+ String response = endpoint.echoFriendRequired(message);
+ assertEquals("Response Message", message, response);
+ }
+
+ public void testFriendRequired_WrongPassword() throws Exception
+ {
+ Endpoint endpoint = getPort(true);
+ Map<String, Object> requestContext =
((BindingProvider)endpoint).getRequestContext();
+ requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thepig");
+
+ String message = "FriendRequired Message";
+
+ try
+ {
+ endpoint.echoFriendRequired(message);
+ fail("Expected SOAPFaultException not thrown!!");
+ }
+ catch (SOAPFaultException sfe)
+ {
+ SOAPFault fault = sfe.getFault();
+ String faultCode = fault.getFaultCode();
+ assertEquals("Fault Code", FAULT_CODE, faultCode);
+ String faultString = fault.getFaultString();
+ assertEquals("Fault Message", FAULT_STRING, faultString);
+ }
+ }
+
+ public void testEnemyRequired() throws Exception
+ {
+ Endpoint endpoint = getPort(true);
+ Map<String, Object> requestContext =
((BindingProvider)endpoint).getRequestContext();
+ requestContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ requestContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+
+ String message = "EnemyRequired Message";
+
+ try
+ {
+ endpoint.echoEnemyRequired(message);
+ fail("Expected SOAPFaultException not thrown!!");
+ }
+ catch (SOAPFaultException sfe)
+ {
+ SOAPFault fault = sfe.getFault();
+ String faultCode = fault.getFaultCode();
+ assertEquals("Fault Code", FAULT_CODE, faultCode);
+ String faultString = fault.getFaultString();
+ assertEquals("Fault Message", FAULT_STRING, faultString);
+ }
+ }
+
+ private Endpoint getPort(boolean enableSecurity) throws Exception
+ {
+ URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
+ QName serviceName = new
QName("http://ws.jboss.org/jbws1999",
"EndpointService");
+ Endpoint port = Service.create(wsdlURL, serviceName).getPort(Endpoint.class);
+ if (enableSecurity == true)
+ {
+ URL securityURL = new
File("resources/jaxws/jbws1999/jboss-wsse-client.xml").toURL();
+ ((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
+ ((StubExt)port).setConfigName("Standard WSSecurity Client");
+ }
+
+ return port;
+ }
+}
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999 (from
rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999)
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF)
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
-
-<jboss-web>
- <security-domain>java:/jaas/JBossWS</security-domain>
-
- <context-root>/jaxws-jbws1999</context-root>
-</jboss-web>
\ No newline at end of file
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-web.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <security-domain>java:/jaas/JBossWS</security-domain>
+
+ <context-root>/jaxws-jbws1999</context-root>
+</jboss-web>
\ No newline at end of file
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,34 +0,0 @@
-<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">
-
- <port name="EndpointPort">
- <operation
name="{http://ws.jboss.org/jbws1999}echoUnchecked">
- <config>
- <authorize>
- <unchecked/>
- </authorize>
- </config>
- </operation>
-
- <operation
name="{http://ws.jboss.org/jbws1999}echoFriendRequired">
- <config>
- <authorize>
- <role>friend</role>
- </authorize>
- </config>
- </operation>
-
- <operation
name="{http://ws.jboss.org/jbws1999}echoEnemyRequired">
- <config>
- <authorize>
- <role>enemy</role>
- </authorize>
- </config>
- </operation>
- </port>
-
-
-
-</jboss-ws-security>
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/jboss-wsse-server.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,34 @@
+<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">
+
+ <port name="EndpointPort">
+ <operation
name="{http://ws.jboss.org/jbws1999}echoUnchecked">
+ <config>
+ <authorize>
+ <unchecked/>
+ </authorize>
+ </config>
+ </operation>
+
+ <operation
name="{http://ws.jboss.org/jbws1999}echoFriendRequired">
+ <config>
+ <authorize>
+ <role>friend</role>
+ </authorize>
+ </config>
+ </operation>
+
+ <operation
name="{http://ws.jboss.org/jbws1999}echoEnemyRequired">
+ <config>
+ <authorize>
+ <role>enemy</role>
+ </authorize>
+ </config>
+ </operation>
+ </port>
+
+
+
+</jboss-ws-security>
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
- <servlet>
- <servlet-name>Endpoint</servlet-name>
-
<servlet-class>org.jboss.test.ws.jaxws.jbws1999.EndpointImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Endpoint</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
\ No newline at end of file
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/WEB-INF/web.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws1999.EndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config)
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,12 +0,0 @@
-<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>
- <authorize>
- <role>Trader</role>
- <unchecked/>
- </authorize>
- </config>
-
-</jboss-ws-security>
\ No newline at end of file
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role-unchecked.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,12 @@
+<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>
+ <authorize>
+ <role>Trader</role>
+ <unchecked/>
+ </authorize>
+ </config>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,11 +0,0 @@
-<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>
- <authorize>
- <role>Trader</role>
- </authorize>
- </config>
-
-</jboss-ws-security>
\ No newline at end of file
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-role.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,11 @@
+<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>
+ <authorize>
+ <role>Trader</role>
+ </authorize>
+ </config>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,12 +0,0 @@
-<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>
- <authorize>
- <role>Banker</role>
- <role>Trader</role>
- </authorize>
- </config>
-
-</jboss-ws-security>
\ No newline at end of file
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-roles.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,12 @@
+<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>
+ <authorize>
+ <role>Banker</role>
+ <role>Trader</role>
+ </authorize>
+ </config>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,11 +0,0 @@
-<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>
- <authorize>
- <unchecked/>
- </authorize>
- </config>
-
-</jboss-ws-security>
\ No newline at end of file
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-default-unchecked.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,11 @@
+<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>
+ <authorize>
+ <unchecked/>
+ </authorize>
+ </config>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,20 +0,0 @@
-<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>
- <authorize>
- <role>Trader</role>
- </authorize>
- </config>
-
- <port name="TestPort">
- <config>
- <authorize>
- <role>Trader</role>
- <unchecked/>
- </authorize>
- </config>
- </port>
-
-</jboss-ws-security>
\ No newline at end of file
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role-unchecked.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,20 @@
+<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>
+ <authorize>
+ <role>Trader</role>
+ </authorize>
+ </config>
+
+ <port name="TestPort">
+ <config>
+ <authorize>
+ <role>Trader</role>
+ <unchecked/>
+ </authorize>
+ </config>
+ </port>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,19 +0,0 @@
-<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>
- <authorize>
- <unchecked/>
- </authorize>
- </config>
-
- <port name="TestPort">
- <config>
- <authorize>
- <role>Trader</role>
- </authorize>
- </config>
- </port>
-
-</jboss-ws-security>
\ No newline at end of file
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-role.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,19 @@
+<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>
+ <authorize>
+ <unchecked/>
+ </authorize>
+ </config>
+
+ <port name="TestPort">
+ <config>
+ <authorize>
+ <role>Trader</role>
+ </authorize>
+ </config>
+ </port>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,20 +0,0 @@
-<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>
- <authorize>
- <unchecked/>
- </authorize>
- </config>
-
- <port name="TestPort">
- <config>
- <authorize>
- <role>Banker</role>
- <role>Trader</role>
- </authorize>
- </config>
- </port>
-
-</jboss-ws-security>
\ No newline at end of file
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-roles.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,20 @@
+<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>
+ <authorize>
+ <unchecked/>
+ </authorize>
+ </config>
+
+ <port name="TestPort">
+ <config>
+ <authorize>
+ <role>Banker</role>
+ <role>Trader</role>
+ </authorize>
+ </config>
+ </port>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,19 +0,0 @@
-<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>
- <authorize>
- <role>Trader</role>
- </authorize>
- </config>
-
- <port name="TestPort">
- <config>
- <authorize>
- <unchecked/>
- </authorize>
- </config>
- </port>
-
-</jboss-ws-security>
\ No newline at end of file
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/config/jboss-wsse-port-unchecked.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,19 @@
+<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>
+ <authorize>
+ <role>Trader</role>
+ </authorize>
+ </config>
+
+ <port name="TestPort">
+ <config>
+ <authorize>
+ <unchecked/>
+ </authorize>
+ </config>
+ </port>
+
+</jboss-ws-security>
\ No newline at end of file
Deleted:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,10 +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>
- <username/>
-
- </config>
-</jboss-ws-security>
\ No newline at end of file
Copied:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml
(from rev 9094,
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1640/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml)
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml
(rev 0)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbws1999/jboss-wsse-client.xml 2009-05-07
09:24:41 UTC (rev 10006)
@@ -0,0 +1,10 @@
+<?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>
+ <username/>
+
+ </config>
+</jboss-ws-security>
\ No newline at end of file
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties 2009-05-06
16:41:17 UTC (rev 10005)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties 2009-05-07
09:24:41 UTC (rev 10006)
@@ -1,5 +1,6 @@
# $Id$
+#
specification.title=JBossWS
specification.vendor=JBoss (
http://www.jboss.org)