WSDualHttpBinding et configuration Password Digest
Bonjour,
J'aimerai pouvoir configurer mon web service qui utilise la liaison WSDualHttpBinding avec la méthode d'authentification Username/password de sorte que le password passé dans les entêtes de message SOAP soit haché avec la méthode PasswordDigest décrite sur le jouranldunet.
Voici ce l'exemple cité dans la page :
Citation:
<wsse:UsernameToken>
<wsse:Username>scott</wsse:Username>
<wsse:Password Type="wsse:PasswordDigest">
KE6QugOpkPyT3Eo0SEgT30W4Keg=</wsse:Password>
<wsse:Nonce>5uW4ABku/m6/S5rnE+L7vg==</wsse:Nonce>
<wsu:Created xmlns:wsu=
"http://schemas.xmlsoap.org/ws/2002/07/utility">
2002-08-19T00:44:02Z
</wsu:Created>
</wsse:UsernameToken>
Seulement mes entêtes sont générés automatiquement via le frameword .Net avec WCF et je ne trouve pas où est ce que je peux configurer ceci dans le fichier de configuration.
Voici mon fichier de configuration actuel :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
<system.serviceModel>
<services>
<service name="WS.ServiceProduits" behaviorConfiguration="behaviorConfig">
<endpoint address="" binding="wsDualHttpBinding" bindingConfiguration="wsDualHttp" contract="WS.Interface.IProduits">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<bindings>
<wsDualHttpBinding>
<binding name="wsDualHttp" maxReceivedMessageSize="10485760">
<readerQuotas maxArrayLength="10485760"/>
<security mode="Message">
<message clientCredentialType="UserName"/>
</security>
</binding>
</wsDualHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="behaviorConfig">
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<clientCertificate>
<authentication certificateValidationMode="None" revocationMode="NoCheck" />
</clientCertificate>
<serviceCertificate storeName="My" storeLocation="LocalMachine" x509FindType="FindBySubjectName" findValue="localhost" />
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="WS.CustomUserNameValidator, WS" />
</serviceCredentials>
<serviceAuthorization principalPermissionMode="Custom">
<authorizationPolicies>
<add policyType="WS.CustomAuthorizationPolicy, WS" />
</authorizationPolicies>
</serviceAuthorization>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="wsDualHttpBinding" scheme="https" bindingConfiguration="wsDualHttp" />
<add binding="wsDualHttpBinding" scheme="http" bindingConfiguration="wsDualHttp" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel> |
Si vous pouvez m'aider se serait vraiment top ;)