Reputation: 21
I am trying to restrict access to my azure web app only to one of my web jobs. Can I use IP Restrictions to achieve this.
Upvotes: 1
Views: 459
Reputation: 18
To achieve this type of restriction, IP Based restriction will not be of use for the following reasons:
A quick and easy solution for your original problem is:
Here are a few links that discuss implementing Basic Auth for Azure Web Apps and how to call such an app via PowerShell:
How to use the script (Invoke-WebRequest -Uri) to pass a parameter to your page Use Invoke-WebRequest with a username and password for basic authentication on the GitHub API
How to use a C# code in the Web App to authenticate the request parameter
https://learn.microsoft.com/en-us/rest/api/datacatalog/authenticate-a-client-app
Since with basic authentication, credentials are passed in plaintext an can be easily decoded, we recommend that the web job calls the WebApp URL over SSL. Also, Basic Auth is one of the simplest authentication mechanisms, there are other more complex authentication schemes available too that you might want to explore.
Upvotes: 0