Re: Securing webmethods webservice selectively using policy files.

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi swapna,

You will have to separate the web methods in two different web services.
The requestAction attribute doesn't work in this case because the policy
applies to both webmethods.
Still, you can specify different protection requeriments under the same
policy with that attribute.

For example, this policy doesn't work because you can't specify IncludeNone
for the signature:

<usernameForCertificateSecurity establishSecurityContext="false"
renewExpiredSecurityContext="true" requireSignatureConfirmation="false"
messageProtectionOrder="SignBeforeEncrypt" requireDerivedKeys="true">
<serviceToken>
<x509 storeLocation="LocalMachine" storeName="My"
findValue="CN=WSE2QuickStartServer"
findType="FindBySubjectDistinguishedName" />
</serviceToken>
<protection requestAction="HelloWorldWithSecurity">
<request signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="true" />
<response signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="true" />
<fault signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="false" />
</protection>
<protection requestAction="HelloWorldWithOutSecurity">
<request signatureOptions="IncludeNone" encryptBody="false" />
<response signatureOptions="IncludeNone" encryptBody="false" />
<fault signatureOptions="IncludeNone" encryptBody="false" />
</protection>
</usernameForCertificateSecurity>

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
http://www.lagash.com



"Swapna" <yswapna44@xxxxxxxxxxx> wrote in message
news:1134560728.590910.123250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
> I am using wse3.0 to secure webservice.
> I have two web methods in this webservice
> viz. HelloWorldWithSecurity.
> HelloWorldWithOutSecurity.
>
> 1) Can I secure only HelloWorldWithSecurity and leave
> HelloWorldWithOutSecurity not secured ?
>
> Is it always necessary to specify the Policy attribute for the class in
> the webservice if we are using the policy method to secure webservices
> ?
> eg.
>
> [WebService(Namespace = "http://www.contoso.com/";)]
> [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
> [Policy("ServicePolicy")] // is this necessary ???
> public class Service : System.Web.Services.WebService
> {
> public Service () {
>
> }
>
> [WebMethod]
> public string HelloWorldWithSecurity() {
> return "Hello World with security";
> }
> [WebMethod]
> public string HelloWorldWithOutSecurity() {
> return "Hello World without security";
> }
>
> }
>
> 2) Can requestAction attribute of the protection element be used for
> this ?
>
>
> The problem I am facing is - If i dont specify the Policy attribute for
> the class none of the methods are secured.
>
> If I use the policy attribute all of them are secured irrespective of
> the method name in the request action attribute.
>
> Can anyone help me out with this ???
> Thanks.
>


.



Relevant Pages

  • Re: Internet Kiosk Group Policy
    ... you can configure policy tight enough so they can't ... that with the proper combination of policy settings you can achieve a very ... tight and secure environment. ... hard drive in the BIOS and setting a BIOS password. ...
    (microsoft.public.windows.group_policy)
  • Re: IPSEC secured server
    ... The secured server policy requires all sessions to be secure it doesn't ... Try using a custom policy or the Server ...
    (microsoft.public.win2000.security)
  • RE: PolicyVerificationException: WSE464: No policy could be found
    ... When I initially used the WSE 2.0 policy wizard to configure the Web Service ... side I entered the name of the service to secure which was ... When I secured only web service and not the web client, ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Restricting Desktop Computers to view USB Flash Drive
    ... Not in a secure way. ... Disbaling the driver via ADM: ... POLICY "USB-MassStorageDriver" ... Mark Heitbrink - MVP Windows Server ...
    (microsoft.public.win2000.group_policy)
  • Re: Initial IPSEC policy
    ... I would like to secure all the IP-Traffic between certain PCs with the DC. ... I tried to set the policy so kerberos ist not secure. ... >> controller and with trusted domain controllers on the domain in all ...
    (microsoft.public.windows.server.security)