Secure WCF Service

I am very new to using WCF services. Right now I have a WCF service that I'm calling using jQuery. I am concerned that users make unauthorized calls to the service. What would be the best way to protect my service?

+4
source share
2 answers

If this is a browser application and you are worried about security, you may already have some kind of authentication mechanism (cookies, sessions, something). All this is available from WCF services (I assume that you are using webHttpBinding or basicHttpBinding?) Through the WebOperationContext.Current.IncomingRequest property . You can check / check the cookie (or something else) from your service code or write a pass-through MessageInspector to apply the check to all methods of the service behavior. WCF services can also be integrated with traditional ASP.NET authentication (forms, etc.) if you host this service with a compatibility flag . The browser application logs in normally, and your service can use credentials / token / something else.

+3
source

you can use the certificate to sign WCF messages (everything in the WCF settings) on both sides (client and server)

Here are some detailed explanations:

Message Security

0
source

All Articles