On Thu, Nov 6, 2008 at 9:06 AM, Michael Frey <[EMAIL PROTECTED]> wrote:
> Hi, > > Simon Laws schrieb: > > > How is knowledge of the agreement passed between service and client in a > > way that means that one client can't pretend to be another? > > Unfortunately I have to go more in detail to give you an answer on this > topic. > > Web service based application is customized by my policy extension. The > application offers in his composite a gold or silver service, e.g. > CalculatorServiceGold or CalculatorServiceSilver. Every service class > has certain parameters e.g. the policy extension guarantees a response > time for the gold service of at least 15 ms. > > I'm using WSAG4J which is an implementation of the WS-Agreement > specification of the Open Grid Forum. WS-Agreement is a Web Services > protocol for establishing agreements between two parties, such as > between a service provider and consumer. A service (like an calculator > web service) creates templates for a service he offers. The template > describes quality of service properties like throughput or response > time. A client creates an agreement with WSAG4J based upon the templates > of an service. The agreement contains the URL for the service. > > The policy extension gets a notification through RMI if an agreement was > created for a specific service. The extension is now aware of the > clients ip (since the agreement contains the ip of the client) and the > the service class it will use like the gold service. > > This idea/implementation has a few limitations, e.g. if I create > agreements for n-clients I can't separate between them. So far it is > possible to extend WSAG4J and the underlying templates, agreements, etc. > > > Unfortunately some of these things, e.g. the token based security > > policy, haven't made it into a release yet. Are you set on using 1.2.1? > > Are you in a position to try things from trunk that are not in a build > yet? > > Not really. The deadline for my thesis is on the 8th of December 2008. > My thesis is part of an research project and probably I will work at the > university on this topic after the hand over of my thesis. > > > We'd have to make a change to the web service binding to pass the > > context containing the IP information into the tuscany message chain. I > > can do that but of course that change would only be available in trunk > > and in our next release. > > When will be your next release? Anyway it would be great if you add this > feature since I will work on this topic after my thesis. > > > You can get it from msg.from.parameters.callbackReference.uri. This is > > not though a generic solution and only works for services with callback > > interfaces. > > It is not really an option for me since the title of my thesis "Design > and implementation of an generic QoS-Proxy for SOA-services". > > > Sorry this is a bit of a pain at the moment but you just happen to find > > us in the middle of trying to make what you need work;-) > > At the moment I'm trying to build a development version of tuscany but > it is a bit of pain since not everything compiles fine (no offense guys) > for me. I've followed the instructions over here [1]. I'm also trying to > update my policy extension to the development version of Tuscany. There > are a few problems with my old calculator example and the new build of > tuscany and the policy extension. > > java.lang.NullPointerException: > at > > org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109) > at > > org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288) > at > > org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46) > at > > org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439) > at > > org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375) > at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181) > at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143) > > I will have look on that this evening since I have to finish some other > stuff at the lab in the university. > > If the deadline of my thesis is before the release of Tuscany 1.4 it is > probably not an option for me since I have to add an "stable release" > (it has to be an official release) with my thesis. I will give it an try. > > Best regards, > Michael > > [1] http://tuscany.apache.org/sca-java-development-guide.html > Hi Michael I can't say precisely when the next release (1.4) will be but people asking for it usually focuses the mind. If you don't want to take the risk of working with trunk and waiting for the release there is probably a way you could get something rudimentary working over web services but it would be have to be changed to bring it up to speed with the new release when that does come out. If you look at the code for our last formal release (1.3.2) you'll notice that the policy support also had a concept of handlers. Handlers were things that allowed you to plug policy specific functions into the binding implementation. We are replacing these now with a combination of binding specific code and a new binding wire that can support policy interceptors. Here is an example of a handler ( http://svn.apache.org/repos/asf/tuscany/branches/sca-java-1.3.2/modules/policy-security-ws/src/main/java/org/apache/tuscany/sca/policy/security/ws/WSSecurityPolicyHandler.java ). You could leverage this to extract the client info (or anything else you need) from the HTTP/SOAP request and then pass this along in the Tuscany message to your policy interceptor. Problem is that the handler doesn't have access to the Tuscany message. You could cheat and add the client info as an extra parameter in the argument list and then strip it back out again in your policy interceptor. Bit of a hack so I don't really like this approach but if you are stuck you could do this. I would recommend you persevere with the trunk code for a little longer and we can see if we can get you running with that. If so we can work out how to get your scenario working with the latest code. If it looks like this is not going to be done in the time you need it we can show you how to take the same code and make it work as a handler. Simon
