Hi Stefan,
WSE 3.0 still offers a way to specify different security levels for
different methods, but the same policy applies to all of them.
For Example,
<policies xmlns="http://schemas.microsoft.com/wse/2005/06/policy">
<policy name="ClientPolicy">
<mutualCertificate11Security establishSecurityContext="false"
renewExpiredSecurityContext="true" requireSignatureConfirmation="true"
messageProtectionOrder="SignBeforeEncrypt" requireDerivedKeys="false"
ttlInSeconds="300">
<clientToken>
<x509 storeLocation="CurrentUser" storeName="My"
findValue="CN=WSE2QuickStartClient"
findType="FindBySubjectDistinguishedName" />
</clientToken>
<serviceToken>
<x509 storeLocation="CurrentUser" storeName="AddressBook"
findValue="CN=WSE2QuickStartServer"
findType="FindBySubjectDistinguishedName" />
</serviceToken>
<protection requestAction="MyMethod1">
<request signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="true" />
<response signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="true" />
<fault signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="false" />
</protection>
<protection requestAction="MyMethod2">
<request signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="false" />
<response signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="false" />
<fault signatureOptions="IncludeAddressing, IncludeTimestamp,
IncludeSoapBody" encryptBody="false" />
</protection>
</mutualCertificate11Security>
<requireActionHeader />
</policy>
</policies>
Different protection elements in the same policy, the requestAction
attribute specifies the Soap Action.
If you want to use different assertions or no policy at all, you have to
develop a custom security assertion. (Programmaticaly). WSE provides a nice
sample for that, you can find it in the following folder
C:\Program Files\Microsoft
WSE\v3.0\Samples\CS\QuickStart\Advanced\CustomSecurityPolicyAssertion
I hope this can help you.
Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
> hi pablo
>
[quoted text clipped - 30 lines]
>>> greetings from germany
>>> stefan