Return-Path: Delivered-To: apmail-ws-wsrf-commits-archive@www.apache.org Received: (qmail 7308 invoked from network); 23 Aug 2005 16:46:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Aug 2005 16:46:05 -0000 Received: (qmail 10812 invoked by uid 500); 23 Aug 2005 16:46:04 -0000 Delivered-To: apmail-ws-wsrf-commits-archive@ws.apache.org Received: (qmail 10789 invoked by uid 500); 23 Aug 2005 16:46:04 -0000 Mailing-List: contact wsrf-commits-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: wsrf-dev@ws.apache.org Delivered-To: mailing list wsrf-commits@ws.apache.org Received: (qmail 10770 invoked by uid 500); 23 Aug 2005 16:46:04 -0000 Delivered-To: apmail-ws-wsrf-cvs@ws.apache.org Received: (qmail 10766 invoked by uid 99); 23 Aug 2005 16:46:04 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 23 Aug 2005 09:46:03 -0700 Received: (qmail 7301 invoked by uid 65534); 23 Aug 2005 16:46:03 -0000 Message-ID: <20050823164603.7300.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r239431 - in /webservices/wsrf/trunk/src: java/org/apache/ws/resource/impl/ sandbox/ sandbox/jacc/ site/content/xdocs/ Date: Tue, 23 Aug 2005 16:46:02 -0000 To: wsrf-cvs@ws.apache.org From: ips@apache.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: ips Date: Tue Aug 23 09:45:58 2005 New Revision: 239431 URL: http://svn.apache.org/viewcvs?rev=239431&view=rev Log: a test JACC provider Added: webservices/wsrf/trunk/src/sandbox/ webservices/wsrf/trunk/src/sandbox/jacc/ webservices/wsrf/trunk/src/sandbox/jacc/TestPolicy.java webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfiguration.java webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfigurationFactory.java Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java webservices/wsrf/trunk/src/site/content/xdocs/release.xml Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java?rev=239431&r1=239430&r2=239431&view=diff ============================================================================== --- webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java (original) +++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceContext.java Tue Aug 23 09:45:58 2005 @@ -276,7 +276,7 @@ throw new FaultException( Soap1_1Constants.FAULT_CLIENT, "A WS-Addressing Action SOAP header element is required by this endpoint." ); } - String action = actionHeaderElem.getValue(); + String action = actionHeaderElem.getValue(); try { new URI( action ); @@ -352,14 +352,12 @@ private String getBaseURL( URL serviceURL ) { String s = serviceURL.toString( ); - s = s.substring( 0, - s.lastIndexOf( "/" ) ); - return s; + return s.substring( 0, s.lastIndexOf( "/" ) ); } private void extractFields( SOAPMessageContext msgContext ) { - m_action = getAddressingAction( msgContext ); + m_action = getAddressingAction( msgContext ); // check for wsa:Action first, since it's required by WS-A m_serviceURL = getServiceURL( msgContext ); m_serviceName = getServiceName( msgContext ); m_baseURL = getBaseURL( m_serviceURL ); Added: webservices/wsrf/trunk/src/sandbox/jacc/TestPolicy.java URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/sandbox/jacc/TestPolicy.java?rev=239431&view=auto ============================================================================== --- webservices/wsrf/trunk/src/sandbox/jacc/TestPolicy.java (added) +++ webservices/wsrf/trunk/src/sandbox/jacc/TestPolicy.java Tue Aug 23 09:45:58 2005 @@ -0,0 +1,68 @@ +/*=============================================================================* + * Copyright 2005 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *=============================================================================*/ +package jacc; + +import javax.security.jacc.PolicyContext; +import javax.security.jacc.PolicyContextException; +import javax.servlet.http.HttpServletRequest; +import java.security.CodeSource; +import java.security.Permission; +import java.security.PermissionCollection; +import java.security.Permissions; +import java.security.Policy; +import java.security.ProtectionDomain; + +/** + * TODO + */ +public class TestPolicy extends Policy +{ + + public TestPolicy() + { + System.out.println( "***** In TestPolicy() constructor *****" ); + } + + public void refresh() + { + return; + } + + public PermissionCollection getPermissions( CodeSource codesource ) + { + return new Permissions(); + } + + public boolean implies( ProtectionDomain domain, Permission perm ) + { + System.out.println( "######################< in TestPolicy#implies() >#####################\n" ); + if ( PolicyContext.getHandlerKeys().contains( "javax.servlet.http.HttpServletRequest" ) ) + { + try + { + HttpServletRequest servletRequest = (HttpServletRequest) PolicyContext.getContext( + "javax.servlet.http.HttpServletRequest" ); + System.out.println( "Servlet request: " + servletRequest ); + } + catch ( PolicyContextException pce ) + { + pce.printStackTrace(); + } + } + return true; + } + +} Added: webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfiguration.java URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfiguration.java?rev=239431&view=auto ============================================================================== --- webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfiguration.java (added) +++ webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfiguration.java Tue Aug 23 09:45:58 2005 @@ -0,0 +1,107 @@ +/*=============================================================================* + * Copyright 2005 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *=============================================================================*/ +package jacc; + +import javax.security.jacc.PolicyConfiguration; +import javax.security.jacc.PolicyContextException; +import java.security.PermissionCollection; +import java.security.Permission; + +/** + * TODO + */ +public class TestPolicyConfiguration implements PolicyConfiguration +{ + + private String m_contextID; + + public TestPolicyConfiguration( String contextID ) + { + m_contextID = contextID; + } + + public String getContextID() throws PolicyContextException + { + return m_contextID; + } + + public void addToRole( String faultString, PermissionCollection permissionCollection ) + throws PolicyContextException + { + System.out.println( "addToRole" ); + } + + public void addToRole( String faultString, Permission permission ) throws PolicyContextException + { + System.out.println( "addToRole" ); + } + + public void addToUncheckedPolicy( PermissionCollection permissionCollection ) throws PolicyContextException + { + System.out.println( "addToUncheckedPolicy" ); + } + + public void addToUncheckedPolicy( Permission permission ) throws PolicyContextException + { + System.out.println( "addToUncheckedPolicy" ); + } + + public void addToExcludedPolicy( PermissionCollection permissionCollection ) throws PolicyContextException + { + System.out.println( "addToExcludedPolicy" ); + } + + public void addToExcludedPolicy( Permission permission ) throws PolicyContextException + { + System.out.println( "addToExcludedPolicy" ); + } + + public void removeRole( String faultString ) throws PolicyContextException + { + System.out.println( "removeRole" ); + } + + public void removeUncheckedPolicy() throws PolicyContextException + { + System.out.println( "removeUncheckedPolicy" ); + } + + public void removeExcludedPolicy() throws PolicyContextException + { + System.out.println( "removeExcludedPolicy" ); + } + + public void linkConfiguration( PolicyConfiguration policyConfiguration ) throws PolicyContextException + { + System.out.println( "linkConfiguration" ); + } + + public void delete() throws PolicyContextException + { + System.out.println( "delete" ); + } + + public void commit() throws PolicyContextException + { + System.out.println( "commit" ); + } + + public boolean inService() throws PolicyContextException + { + return true; + } + +} Added: webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfigurationFactory.java URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfigurationFactory.java?rev=239431&view=auto ============================================================================== --- webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfigurationFactory.java (added) +++ webservices/wsrf/trunk/src/sandbox/jacc/TestPolicyConfigurationFactory.java Tue Aug 23 09:45:58 2005 @@ -0,0 +1,43 @@ +/*=============================================================================* + * Copyright 2005 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *=============================================================================*/ +package jacc; + +import javax.security.jacc.PolicyConfiguration; +import javax.security.jacc.PolicyConfigurationFactory; +import javax.security.jacc.PolicyContextException; + +/** + * TODO + */ +public class TestPolicyConfigurationFactory extends PolicyConfigurationFactory +{ + + public TestPolicyConfigurationFactory() + { + System.out.println( "***** In TestPolicyConfigurationFactory() constructor *****" ); + } + + public PolicyConfiguration getPolicyConfiguration( String contextID, boolean remove ) throws PolicyContextException + { + return new TestPolicyConfiguration( contextID ); + } + + public boolean inService( String contextID ) throws PolicyContextException + { + return true; + } + +} Modified: webservices/wsrf/trunk/src/site/content/xdocs/release.xml URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/site/content/xdocs/release.xml?rev=239431&r1=239430&r2=239431&view=diff ============================================================================== --- webservices/wsrf/trunk/src/site/content/xdocs/release.xml (original) +++ webservices/wsrf/trunk/src/site/content/xdocs/release.xml Tue Aug 23 09:45:58 2005 @@ -12,8 +12,8 @@
v1.0