Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I limit azure app service access to specific Google users only?

Azure app services provides an authentication/authorization setting for an "azure webapp" -- see here. However, for all OAUTH authentication providers supported (e.g., Google, Facebook, Twitter, etc.) but Microsoft's own AD there's no authorization support, just authentication. Once a user is authenticated, he is free to get in. Any way to authorize (once authenticated) access to specific Google users only (without having to write custom code)?

like image 707
Uri Avatar asked Jan 03 '17 15:01

Uri


People also ask

How do I make Azure App Service private?

You need to set up a private DNS server or an Azure DNS private zone. Create the DNS zone privatelink.azurewebsites.net. After this configuration, you'll be able to reach your web app privately by using the default name mywebappname.azurewebsites.net. For more information, see DNS.

What methods does Microsoft Azure App Service use to obtain credentials for users attempting to access an app?

Azure App Service provides built-in authentication and authorization capabilities (sometimes referred to as "Easy Auth"), so you can sign in users and access data by writing minimal or no code in your web app, RESTful API, and mobile back end, and also Azure Functions.

When users try to access an app How does Microsoft Azure App Service get their credentials choose one?

App-level credentials: one set of credentials for each app. It can be used to deploy to that app only. The credentials for each app are generated automatically at app creation. They can't be configured manually, but can be reset anytime.


1 Answers

Well, turns out there is a way! You can use place a web.config file at the root directory of your site (e.g., wwwroot) and use standard IIS web.config syntax. This below is an example of letting just [email protected] and [email protected] into our website:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
   <system.web>
      <authorization>
        <allow users="[email protected],[email protected]"/>
        <deny users="*"/>
      </authorization>
   </system.web>
</configuration>

You can add and edit the file very easily using the Azure Debug Console at

http://your-app-url.scm.azurewebsites.net

.

like image 118
Uri Avatar answered Sep 28 '22 05:09

Uri