none
WCF itemized authorization RRS feed

  • Question

  • i have a wcf service which i hosted in IIS using a service account. i have 4 svc/end points inside the service. now the problem is all the four end points work with different database server, due to security reason the same service account cannot be allowed in different servers. how i can isolate the service account access to the database separately. the ideal requirement to have individual end point have separate service account authorization. how to achieve  that can some one guide me through this?

    Thursday, July 27, 2017 4:25 PM

All replies

  • Hi R,

    >>i have 4 svc/end points inside the service. now the problem is all the four end points work with different database server,

    Do you use username password validation?

    For your issue, we could try UserNamePasswordValidator to valid the user name and password.

    But, in UserNamePasswordValidator, we could not identify which end point the request access.

    For a workaround, I think you could add username and password in the header, and then validate the username and password in operation instead of using UserNamePasswordValidator. By this way, you could get the request URL from HttpContext.

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, July 28, 2017 2:46 AM