locked
WCF - basic security RRS feed

  • Question

  • User139811673 posted

    Is it possible to introduce security for some of the methods in the WCF service?

     

    I need to apply some basic security in WCF service, wherein only some specific client should newly added methods. I am planning of accepting the requests from client which holds some special security token.

     Something like,

    •  client would set proxy.ClientCredential.UserName.UserName = ‘$%^$&H’
    • Service would just validate token ‘$%^$&H’
    Sunday, February 24, 2013 11:59 PM

Answers

  • User-742633084 posted

    Hi Mux.work,

    Since you need to provide different security restriction according to different client users, maybe you can consider open different endpoints for the same service (each endpoint has its own security configuration such as authentication method). WCF supports configuring multiple endpoint for same service implementation. Thus, the code logic and implementation is fully shared.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 27, 2013 5:04 AM

All replies

  • User1291589676 posted

    Refer the below post,

    http://stackoverflow.com/questions/6063348/restrict-methods-of-a-wcf-service-from-unauthorized-unwanted-user-access

    Monday, February 25, 2013 2:47 AM
  • User-1000095884 posted

    Hi,

    I need to apply some basic security in WCF service, wherein only some specific client should newly added methods. I am planning of accepting the requests from client which holds some special security token.

    There are various way to secure your service, you can find common security scenarios in below document.

    #Common Security Scenarios

    http://msdn.microsoft.com/en-us/library/ms730301.aspx

    For example, you can use Transport security with Basic authentication, the user must provide a valid Windows user name and password to access the service, for details, check here.

    Best Regards.

    Tuesday, February 26, 2013 4:26 AM
  • User-742633084 posted

    Hi Mux.work,

    Since you need to provide different security restriction according to different client users, maybe you can consider open different endpoints for the same service (each endpoint has its own security configuration such as authentication method). WCF supports configuring multiple endpoint for same service implementation. Thus, the code logic and implementation is fully shared.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 27, 2013 5:04 AM