मुझे किसी तृतीय पक्ष को सेवा प्रदान करने की आवश्यकता है जो हस्ताक्षरित टाइमस्टैम्प के साथ साबुन संदेश भेज देगा।डब्लूएसएफ सुरक्षा के साथ डब्ल्यूसीएफ सेवा के लिए हस्ताक्षर किए गए टाइमस्टैम्प की आवश्यकता है केवल
मैं इसका समर्थन करने के लिए अपनी सेवा को कैसे कॉन्फ़िगर कर सकता हूं?
अद्यतन मैं साबुन संदेश का स्वरूप है कि हम के बाद कर रहे हैं लेकिन WCF दोनों उपयोगकर्ता नाम और टाइमस्टैम्प टोकन पर हस्ताक्षर करने पर जोर के करीब पाने के लिए प्रबंधित किया है, वहाँ के लिए बाध्य संशोधित करने के लिए एक रास्ता है केवल टाइमस्टैम्प पर हस्ताक्षर करें?
- टाइमस्टैम्प तत्व हस्ताक्षर किया जाना चाहिए:
इसके अलावा अद्यतन यहाँ हमारी आवश्यकताओं हैं।
- हस्ताक्षर करने के लिए प्रयुक्त प्रमाणपत्र पर सीएन नाम उपयोगकर्ता नाम टोकन तत्व में उपयोगकर्ता नाम से मेल खाता है।
- हस्ताक्षर करने के लिए प्रयुक्त प्रमाणपत्र BinarySecurityToken तत्व में भेजा जाना चाहिए।
- KeyInfo तत्व में केवल एक सुरक्षा टोकन संदर्भ तत्व होना चाहिए, जिसका उपयोग BinarySecurityToken को संदर्भित करने के लिए किया जाना चाहिए।
- एक कैनोलिकलाइजेशन एल्गोरिदम निर्दिष्ट होना चाहिए।
- हस्ताक्षर विधि निर्दिष्ट होना चाहिए और SHA-1 या SHA-2 alghorithm होना चाहिए।
- अलग-अलग हस्ताक्षरों का उपयोग किया जाना चाहिए।
कोई सुझाव?
मौजूदा config
क्लाइंट बाइंडिंग
<bindings>
<wsHttpBinding>
<binding name="WSBC">
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Certificate" proxyCredentialType="None"></transport>
<message clientCredentialType="UserName" negotiateServiceCredential="false" establishSecurityContext="false" />
</security>
</binding>
</wsHttpBinding>
</bindings>
ग्राहक Endpoint
<client>
<endpoint address="https://localhost/WcfTestService/Service2.svc"
behaviorConfiguration="CCB" binding="wsHttpBinding"
bindingConfiguration="WSBC"
contract="ServiceReference2.IService2"
name="wsHttpBinding_IService2" />
</client>
ग्राहक व्यवहार
<behaviors>
<endpointBehaviors>
<behavior name="MBB">
<clientCredentials>
<clientCertificate findValue="03 58 d3 bf 4b e7 67 2e 57 05 47 dc e6 3b 52 7f f8 66 d5 2a"
storeLocation="LocalMachine"
storeName="My"
x509FindType="FindByThumbprint" />
<serviceCertificate>
<defaultCertificate findValue="03 58 d3 bf 4b e7 67 2e 57 05 47 dc e6 3b 52 7f f8 66 d5 2a"
storeLocation="LocalMachine"
storeName="My"
x509FindType="FindByThumbprint" />
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
सेवा बाइंडिंग
<bindings>
<wsHttpBinding>
<binding name="ICB">
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="Certificate" proxyCredentialType="None"></transport>
<message clientCredentialType="UserName"
negotiateServiceCredential="false"
establishSecurityContext="false" />
</security>
</binding>
</wsHttpBinding>
</bindings>
serice Endpoint
<service name="WcfTestService.Service2" behaviorConfiguration="SCB">
<endpoint address="" binding="wsHttpBinding" contract="WcfTestService.IService2"
bindingConfiguration="ICB" name="MS" />
</service>
सेवा व्यवहार
<behaviors>
<serviceBehaviors>
<behavior name="SCB">
<serviceCredentials>
<serviceCertificate findValue="4d a9 d8 f2 fb 4e 74 bd a7 36 d7 20 a8 51 e2 e6 ea 7d 30 08"
storeLocation="LocalMachine"
storeName="TrustedPeople"
x509FindType="FindByThumbprint" />
<userNameAuthentication
userNamePasswordValidationMode="Custom"
customUserNamePasswordValidatorType="WcfTestService.UsernameValidator, WcfTestService" />
<clientCertificate>
<authentication certificateValidationMode="None" revocationMode="NoCheck" />
</clientCertificate>
</serviceCredentials>
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
क्या आपने कॉन्फ़िगरेशन काम करने का प्रबंधन किया था ताकि केवल टाइमस्टैंप तत्व पर हस्ताक्षर किए गए हों? मैं वर्तमान में एक ही चीज़ हासिल करने की कोशिश कर रहा हूं। – Edward