Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Azure websites "private" during development?

Tags:

azure

We want to implement continuous deployment of a web application (front-end and back-end REST API being 2 virtual directories or 2 websites) towards Windows Azure. How can we keep these websites private and thus make them not available to the large public ? We do not want that somebody discovers the URL of our development/staging environment and starts "playing" with it.

But we ofcourse want that our development team and test team can access the web applications ...

We are searching for a simple solution ...

thx

like image 810
cyclomarc Avatar asked Dec 11 '13 18:12

cyclomarc


2 Answers

Assuming you're using Azure Web Sites: Unlike Cloud Services (web & worker roles), you cannot deploy to a staging environment - anyone will be able to find your website (or at least can attempt to find it). Having said that: You can now set up Dynamic IP Address Restrictions (DIPR), to block / allow access. This is set up in the <system.webServer> element. For example:

<system.webServer>   
  <security> 
    <ipSecurity allowUnlisted="false" denyAction="NotFound"> 
      <add allowed="true" ipAddress="10.1.2.0" subnetMask="255.255.255.0"/> 
    </ipSecurity> 
  </security>    
</system.webServer> 

Note the allowUnlisted attribute. Setting it to false will block all IP addresses aside from the ones you specify.

See this blog post by Scott Guthrie for more details.

EDIT June 11, 2014 - Staging slots were added to Web Sites in January 2014. This requires a Standard plan. You'll find the option in the dashboard:

enter image description here

You can then create a separate slot. Here's an example with a guid, for a bit of security-by-obscurity, which is similar to what you have with Cloud Services (web/worker roles):

enter image description here

Now you'll see your primary deployment slot, along with any additional you created. You can then do deployment swaps as well.

enter image description here

You'll now see the Swap button at the bottom, when viewing the Dashboard tab:

enter image description here

You then choose which deployment slot to switch with:

enter image description here

like image 177
David Makogon Avatar answered Oct 11 '22 03:10

David Makogon


The first idea that comes to mind is to filter out by IP addresses, if that's possible for your team.

See this answer for more information.

like image 1
Rusty Divine Avatar answered Oct 11 '22 02:10

Rusty Divine