DEV Community

Cover image for How to provide private storage for internal company's documents
jeremiah enoghase
jeremiah enoghase

Posted on

How to provide private storage for internal company's documents

This article provides the guidelines on how to provide private storage for internal company's documents.

Note: This process requires you to have created a storage for a public website because we will be using the resource group.

The first step is to create a storage account and configure high availability.

Kindly follow the process below to achieve this.

  • Search for and select Storage accounts in the Azure portal

storage account

  • Select + Create.

create

  • Select the Resource group created in the previous lab.
  • Set the Storage account name to private by adding an identifier to make the name unique.
  • Select Review + create and then Create the storage account. Wait for the storage account to deploy, and then select Go to resource.

Configure the appropriate level of redundancy.

  • In the Data management section of the storage account, select the Redundancy blade and ensure Geo-redundant storage (GRS) is selected.

redundancy
And ensure to save your changes.

The next step is to create a storage container, upload a file, and restrict access to the file.

Kindly follow the process below to achieve this.

  • In the Data storage section of the storage account, select the Containers blade.
  • Select + Container and ensure the Name of the container is private.
  • Ensure the Public access level is Private (no anonymous access).
  • Select Create.

container

Testing for file upload.

  • Select the container.
  • Select Upload.
  • Browse to files and select a file. Upload the file and select the uploaded file.
  • On the Overview tab, copy the URL.
  • Paste the URL into a new browser tab. Verify the file doesn’t display and you receive an error.

file testing

file testing

file testing

file testing

file testing
all set and done. Now to the next phase.

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. 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.
  • Select Generate SAS token and URL.
  • 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.

FILE TESTING

FILE TESTING

FILE TESTING

Configure storage access tiers and content replication.

For Cost minimization, after 30 days, move blobs from the hot tier to the cool tier.

  • Return to the storage account. In the Overview section, you will notice that the Default access tier is set to Hot.
  • Select the Lifecycle management blade in the Data management section
  • Select Add rule.

  • Set the Rule name to movetocool.

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

  • Select Next.

Ensure Last modified is selected. Set More than (days ago) to 30.
In the drop-down select Move to cool storage.
As you have time, review other lifecycle options in the drop-down.
Add the rule.

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

This is carried out with the steps below.

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

Navigate to your publicwebsite storage account.

  • Select the Object replication blade, In the Data management section
  • Select Create replication rules.

duplication

  • Set the Destination storage account to the private storage account.
  • Set the Source container to public and the Destination container to backup.
  • Create the replication rule.

back up.

This is how you provide private storage for internal company's documents.

kindly review and leave your comments.

Thank You.

Top comments (0)