WCF Message Level Security

Hope someone can help me on this. I am looking for a message-level security method in my WCF service other than using certificates. The problem is that the application is used on clients that connect via VPN with several sites, each of which has its own domain controller, and the domains do not trust each other. I am completely unfamiliar with certificates, although many of ppl say the way, I don’t know if it can work in this environment?

I ask for help :) Regards Andries

+3
source share
3 answers

- ! ! . : " ". , . , :

1) . → → "cmd" Enter. : makecert.exe MakeCert -pe -ss My -sr LocalMachine -a sha1 -sky exchange -n CN = ClientCertificateName ( "ClientCertificateName" )

2) , !

3) 1) 2) , . TrustedPeople TrustedPeople . → "" → "" → "mmc" Enter

4) , "" → "/ " → "" () "" - "" "- > " "- > → →
. node () / node. , . , . . " /" node.

5) 4) - , -,
, () , , . web.config(app.config) .

  

<security mode="Message">
    <message clientCredentialType="Certificate" />
</security>

node :

    <behaviors >
    <endpointBehaviors>
        <behavior name="your_binding_behavior">
            <clientCredentials>
                <clientCertificate findValue="[The name of the client certificate here]"
                                   storeLocation="LocalMachine"
                                   storeName="My"
                                   x509FindType="FindBySubjectName"/>
                <serviceCertificate>
                    <defaultCertificate findValue="[The name of the server certificate here]"
                                        storeLocation="LocalMachine"
                                        storeName="TrustedPeople"
                                        x509FindType="FindBySubjectName"/>
                    <authentication certificateValidationMode="PeerOrChainTrust"/>
                </serviceCertificate>
            </clientCredentials>
        </behavior>
    </endpointBehaviors>
</behaviors>


! ! . .

+11

- , , MessageClientCredentialType = "None" WCF. web.config

" ", . WCF, :

http://blog.functionalfun.net/2008/05/how-to-create-server-certificate-for.html

+2

Source: https://habr.com/ru/post/1702405/


All Articles