I have an ASP.NET MVC website that uses WebAPI, SignalR.
I want my server (the same server that hosts the website) to make HTTP requests to the WebAPI controller - I want to do this so that I can connect to the SignalR functions on my site.
I want to make website users unable to access methods on the WebAPI controller, but the server can.
I looked at the options for securing WebAPI requests in general, and it seems to me that I have the following options:
- Send username and password for each request. AKA Basic Authentication
- Create a "Client Certificate" and send it with each request.
These are the only two methods that sound like they will work, but I wonder if these methods will overdo it if the requests come from localhost (the same server).
Is it really too complicated, is there an easier way to restrict HTTP requests from the local machine to a WebAPI controller?
security c # certificate asp.net-web-api
Luke
source share