Introduction
Private storage in Azure refers to a storage account that is only accessible from within your virtual network (VNet). This is achieved through the use of Azure Private Endpoints.
Azure Private Endpoints are network interfaces that provide secure, private connectivity to Azure services within your VNet. By creating a private endpoint for your storage account, you can access your data without exposing it to the public internet.
Benefits of using private storage in Azure:
Enhanced security: Reduces the risk of unauthorized access to your data.
Reduced attack surface: Eliminates public-facing endpoints, making it harder for attackers to target your storage.
Compliance: Helps meet compliance requirements that mandate data isolation and protection.
Improved performance: In some cases, using a private endpoint can improve network latency and performance.
How it works:
Create a private endpoint: Within your VNet, you create a private endpoint that is assigned a private IP address from your VNet's address space.
Connect to a service: The private endpoint then connects to the Azure service you want to access, such as a storage account. This connection is made through a private link, ensuring that your data remains within your private network.
Secure access: Once connected, you can access the service using the same connection strings and authorization mechanisms you would use if you were accessing it publicly.
NOTE: The company needs storage for their offices and departments. This content is private to the company and shouldn't be shared without consent. This storage requires high availability if there's a regional outage. The company wants to use this storage to back up the public website storage.
Here are steps in creating private storage
Skilling tasks
- Create a storage account for the company private documents.
- Configure redundancy for the storage account.
- Configure a shared access signature so partners have restricted access to a file.
- Back up the public website storage.
- Implement lifecycle management to move content to the cool tier.
Create a storage account and configure high availability.
- Create a storage account for the internal private company documents. a. In the portal, search for and select Storage accounts.
b. Select + Create.
c. Select the Resource group created in the previous lab.
d. Set the Storage account name to private. Add an identifier to the name to ensure the name is unique.
e. Select Review, and then Create the storage account.
f. Wait for the storage account to deploy, and then select Go to resource.
- This storage requires high availability if there’s a regional outage. Read access in the secondary region is not required. Configure the appropriate level of redundancy.
a. In the storage account, in the Data management section, select the Redundancy blade.
b. Ensure Geo-redundant storage (GRS) is selected.
c. Refresh the page.
d. Review the primary and secondary location information.
e. Save your changes.
Create a storage container, upload a file, and restrict access to the file.
- Create a private storage container for the corporate data.
a. In the storage account, in the Data storage section, select the Containers blade.
b. Select + Container.
c. Ensure the Name of the container is private.
d. Ensure the Public access level is Private (no anonymous access).
e. As you have time, review the Advanced settings, but take the defaults.
f. Select Create.
- For testing, upload a file to the private container. The type of file doesn’t matter. A small image or text file is a good choice. Test to ensure the file isn’t publically accessible.
a. Select the container.
b. Select Upload.
c. Browse to files and select a file.
d. Upload the file.
e. Select the uploaded file.
f. On the Overview tab, copy the URL.
g. Paste the URL into a new browser tab.
h. Verify the file doesn’t display and you receive an error.
- An external partner requires read and write access to the file for at least the next 24 hours. Configure and test a shared access signature (SAS).
a. Select your uploaded blob file and move to the Generate SAS tab.
b. In the Permissions drop-down, ensure the partner has only Read permissions.
c. Verify the Start and expiry date/time is for the next 24 hours.
d. Select Generate SAS token and URL.
e. Copy the Blob SAS URL to a new browser tab.
f. Verify you can access the file. If you have uploaded an image file it will display in the browser. Other file types will be downloaded.
Configure storage access tiers and content replication.
- To save on costs, after 30 days, move blobs from the hot tier to the cool tier. a. Return to the storage account. b. In the Overview section, notice the Default access tier is set to Hot.
c. In the Data management section, select the Lifecycle management blade.
d. Select Add rule.
e. Set the Rule name to movetocool.
f. Set the Rule scope to Apply rule to all blobs in the storage account.
g. Select Next.
h. Ensure Last modified is selected.
i. Set More than (days ago) to 30.
j. In the Then drop-down select Move to cool storage.
k. As you have time, review other lifecycle options in the drop-down.
l. Add the rule.
- The public website files need to be backed up to another storage account. a. In your storage account, create a new container called backup. Use the default values. Refer back to Lab 02a if you need detailed instructions.
b. Navigate to your publicwebsite storage account. This storage account was created in the previous exercise.
c. In the Data management section, select the Object replication blade.
d. Select Create replication rules.
e. Set the Destination storage account to the private storage account.
f. Set the Source container to public and the Destination container to backup.
g. Create the replication rule.
h. Optionally, as you have time, upload a file to the public container. Return to the private storage account and refresh the backup container. Within a few minutes your public website file will appear in the backup folder.
Top comments (0)