Search |
||
JSR 196 in Metro WebServices StackPosted by kumarjayanti on July 8, 2009 at 3:12 AM PDT
Metro Security has a pluggable architecture and it makes use of JSR 196 (SOAP Profile) to achieve this pluggability. The use of JSR-196 provides a standard way to integrate Metro with the Authentication and Authorization Infrastructure of the underlying container. Though not all containers on which metro can run today support JSR 196, the idea is that as more and more containers adopt JSR-196, integrating the metro webservices stack with those container would become easy. The use of JSR-196 in metro is also based on the principle of re-using what is already a standard inorder to avoid proliferation of proprietary API's. In the absence of JSR-196, when Metro is used on a Non-GlassFish container then developers of Secure WebServices today are forced to configure a whole lot of things such as CallbackHandler's, Validator's, Keystore's, CertStore's etc, some of which can be non-trivial. All of these configurations would not be necessary if the container supported a publicly callable JSR-196 CallbackHandler that metro could use. When a Metro Secure WebService runs on GlassFish it automatically leverages the Container's Authentication and Authorization Mechanisms by way of invoking the GlassFish JSR-196 CallbackHandler, so user's of metro on GlassFish would generally not have to configure additional things inside the metro configuration file w.r.t security. Metro runtime would invoke the GlassFish JSR-196 CallbackHandler. The GlassFish CallbackHandler would use the container configured mechanisms to authenticate let's say the username-password and finally establish the container's representation of the caller principal in the Subject. This Subject would then be used during the Authorization process. Metro bundles the JSR-196 API along with it so that one can use Metro with JSR-196 enabled on any Container (not just GlassFish). So here are some of the pluggability points that are enabled in metro due to the use of JSR 196 underneath.
When using Pluggability Option 3 above one has to be aware of (and handle) three Container/Environment specific issues.
2. The place where the Metro Security-Tube needs to finally place the JSR-196 javax.security.auth.Subject object such that it gets used for Authorization decisions on the Container is again not defined in any standard. For example on GlassFish this subject is to be set into a GlassFish specific SecurityContext object . For other containers it maybe something else. So there is a META-INF/services entry inside wsit-196-hook.jar named com.sun.xml.ws.security.spi.SecurityContext. The default value of this entry points to an implementation of the following SecurityContext interface that does the correct thing for GlassFish V2. package com.sun.xml.ws.security.spi;
/**
3. Another thing which is again handled by appropriately defining the META-INF/services entry for the above defined SecurityContext is the fact that when there are credentials established by the encompassing runtime under which the SOAP layer webservice interaction is happening (for example an authetication at the transport layer or an SSO Token) then one needs to make the SecurityContext established by the encompassing runtime available to the SOAP layer interaction. Again there is no standard that defines how to obtain this information from the encompassing runtime and hence the mechanism differs from Container to Container (For example, in GlassFish it is again the same SecurityContext object that needs to be retrieved).
As stated above the JSR-196 path is not enabled by default for Non-GlassFish containers, and i mentioned backward-compatibility as the reason. There is some work involved to package the Non-196 path as a JSR-196 Authentication module and once that is done then pluggability option 3 above can be made the default in metro. We may do this in the near future.
»
Related Topics >>
Java Web Services and XML Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|