DEV Community

Cover image for Provide private storage for internal company documents
okunola babatunde
okunola babatunde

Posted on

Provide private storage for internal company documents

Aim:

This exercise aims atdesigning and implementing a secure, centralised cloud storage solution that enables authorized employees to safely store, access, and manage internal company documents while preventing unauthorized access.

Create a storage account and configure high availability.

  1. Create a storage account for the internal private company documents.
  • In the portal, search for and select Storage accounts.
    Image In the portal, search for and select Storage accounts.

  • Select + Create.
    Image Select + Create.

  • Select the Resource group created in the previous lab
    Image Validation could not be completed due to an error. If this issue persists, please contact support.

  • Set the Storage account name to private.
    Image Set the Storage account name to private.

  • Select Review, and then Create the storage account.
    Image Select Review, and then Create the storage account.

  • Wait for the storage account to deploy, and then select Go to resource.
    Image Wait for the storage account to deploy, and then select Go to resource.

2.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.

  • In the storage account, in the Data management section, select the Redundancy blade.
    Image In the storage account, in the Data management section, select the Redundancy blade.

  • Ensure Geo-redundant storage (GRS) is selected.
    Image Ensure Geo-redundant storage (GRS) is selected.

  • Refresh the page.
    Image Refresh the page.

  • Review the primary and secondary location information.
    Image Review the primary and secondary location information.

  • Review the primary and secondary location information.
    Image Review the primary and secondary location information

  • Save your changes.
    Image Save your changes.

Create a storage container, upload a file, and restrict access to the file.

  1. Create a private storage container for the corporate data.
  • In the storage account, in the Data storage section, select the Containers blade.
    Image In the storage account, in the Data storage section, select the Containers blade.

  • Select + Container.
    Image Select + Container.

  • Ensure the Name of the container is private.
    Image Ensure the Name of the container is private.

  • Ensure the Public access level is Private (no anonymous access).
    Image Ensure the Public access level is Private (no anonymous access).

  • As you have time, review the Advanced settings, but take the defaults.
    Image As you have time, review the Advanced settings, but take the defaults.

  • Select Create.
    Image Select Create.

2. For testing, upload a file to the private container. he 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.

  • Select the container.
    Image Select the container.

  • Select Upload.
    Image Select Upload.

  • Browse to files and select a file.
    Image Browse to files and select a file.

  • Upload the file.
    Image Upload the file.

  • Select the uploaded file.
    Image Select the uploaded file.

  • On the Overview tab, copy the URL.
    Image On the Overview tab, copy the URL.

  • Paste the URL into a new browser tab
    Image Paste the URL into a new browser tab

  • Verify the file doesn’t display and you receive an error.
    Image Verify the file doesn’t display and you receive an error.

3. 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)

  • Select your uploaded blob file and move to the Generate SAS tab.
    Image Select your uploaded blob file and move to the Generate SAS tab.

  • In the Permissions drop-down, ensure the partner has only Read permissions.

Image In the Permissions drop-down, ensure the partner has only Read permissions.

  • Verify the Start and expiry date/time is for the next 24 hours.
    Image Verify the Start and expiry date/time is for the next 24 hours.

  • Select Generate SAS token and URL.
    Image Select Generate SAS token and URL.

  • Copy the Blob SAS URL to a new browser tab.
    Image Copy the Blob SAS URL to a new browser tab.

  • 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.
    Image 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.

  1. To save on costs, after 30 days, move blobs from the hot tier to the cool tier
  • Return to the storage account.
    Image Return to the storage account.

  • In the Overview section, notice the Default access tier is set to Hot.
    Image Return to the storage account.

  • In the Data management section, select the Lifecycle management blade.
    Image In the Data management section, select the Lifecycle management blade.

  • Select Add rule.
    Image Select Add rule.

  • Set the Rule name to movetocool.
    Image Set the Rule name to movetocool.

  • Set the Rule scope to Apply rule to all blobs in the storage account.
    Image Set the Rule scope to Apply rule to all blobs in the storage account.

  • Select Next.
    Image Select Next.

  • Ensure Last modified is selected.
    Image Ensure Last modified is selected.

  • Set More than (days ago) to 30.
    Image Set More than (days ago) to 30.

  • In the Then drop-down select Move to cool storage.
    Image In the Then drop-down select Move to cool storage.

  • As you have time, review other lifecycle options in the drop-down.
    Image As you have time, review other lifecycle options in the drop-down.

  • Add the rule.
    Image Add the rule.

2. The public website files need to be backed up to another storage account

  • In your storage account, create a new container called backup
    Image In your storage account, create a new container called backup

  • Navigate to your publicwebsite storage account. This storage account was created in the previous exercise.
    Image Navigate to your publicwebsite storage account. This storage account was created in the previous exercise.

  • In the Data management section, select the Object replication blade.
    Image In the Data management section, select the Object replication blade.

  • Select Create replication rules.
    Image Select Create replication rules.

  • Set the Destination storage account to the private storage account.
    Image Set the Destination storage account to the private storage account.

  • Set the Source container to public and the Destination container to backup.
    Image Set the Source container to public and the Destination container to backup.

  • Create the replication rule.
    Image Create the replication rule.

  • 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.
    Image 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.

  • When these two files were uploaded into publicwebsite storage,it later appeared in backup when refreshed.

Top comments (1)

Collapse
 
realcloudprojects profile image
SKILL.SCH

Growing!