QuestionQ110

VerifiedImplement a secure environment

You have the on-premises networks shown in the following table.

Scenario Image

You have an Azure subscription that contains an Azure SQL Database server named SQL1. SQL1 contains two databases named DB1 and DB2.

You need to configure access to DB1 and DB2. The solution must meet the following requirements:

  • Ensure that DB1 can be accessed only by users in Branch1.
  • Ensure that DB2 can be accessed only by users in Branch2.

Solution: You connect to DB1 and execute the following command.

EXECUTE sp_set_firewall_rule ‘Allow db1 users’, ‘131.107.10.0’, ‘131.107.10.255’  

You connect to DB2 and execute the following command.

EXECUTE sp_set_database_firewall_rule ‘Allow db2 users’, ‘131.107.11.0’, ‘131.107.11.255’  

Does this solution meet the goal?

Explanation

A server-level IP firewall rule grants clients access to the entire logical SQL server and all databases it manages. The rule for 131.107.10.0–131.107.10.255 therefore also permits Branch1 clients to access DB2, violating the requirement that DB2 be accessible only by Branch2. Database-level rules should be used to isolate access per database.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!