How to provide private storage for internal company documents
Tags: azure, deveops, resourcegroup, storage
Published: 2024-05-31 19:46:46

**The following are below are steps for the above process**
In the Azure portal, search for and select Storage accounts.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qd3jho4313lm3a4duhyi.png)
then Select + Create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8qb1ffuui3arryfw2cnm.png)
Select the Resource group created in the previous lab.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cklgqdm90nf8s8orvljb.png)
Set the Storage account name to private and add an identifier to the name to ensure the name is unique (privatestella).
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/355c7wgjcrviyl19fd4j.png)
Select Review, and then Create the storage account
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0r9xmdzi23arjvad5933.png)
After validation has pass click create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/se1wxv6etfjw07ewrex7.png)
Wait for the storage account to deploy, and then select Go to resource.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jkj9cer9f3s0kl39sv66.png)
In the storage account, in the Data management section, select the Redundancy blade.![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a2s9d7jr5wxe7kvgn412.png)
Ensured Geo-redundant storage (GRS) is selected.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7m2am9ayn3ckvncyokv1.png)
Refresh the page and review the primary and secondary location information.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c4jchuy5io7bhujsu4hw.png)
In the storage account, in the Data storage section, select the Containers blade.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/usat6spmoqbpbfhvop00.png)
Select Container
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/reqrbqrsv9bmrvz7b2xt.png)
Ensure the Name of the container is private and make Public access level is Private (no anonymous access) 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgppkfdn5t6kfsbthvsn.png)
In Advanced settings, take the defaults and click create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wc0ua4hb4mylvf5xic5k.png)
For testing, upload a file to the private container
Select the container
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nfa3c3pnamd67tw2jni1.png)
Select Upload
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzplzay8di5k1hui3pf4.png)
Browse to files and select a file and then Upload the file
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/le09h6g48xcmxgs6e1jf.png)
upload file
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nxridu5oapf9851ar3hz.png)
Select the uploaded file.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/04zxb5lky2ln581du95u.png) 
On the overview tab of the uploaded
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tlnd8wrpq4wfd6ra7i9r.png)
Copy the URL.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gf48ld2myx2gef5bs1u8.png)
Paste the url: https://privatestella.blob.core.windows.net/private/advanced.png on a browser to verify the file doesn’t display and you receive an error.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n02a3dwvb2upmanc8qxf.png)
An external partner requires read and write access to the file for at least the next 24 hours. shared access signature (SAS) should be configured and tested
Select your uploaded blob file and move to the Generate SAS tab
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hmbenh00mgqvpmt0m22x.png)
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 description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ue46ok24x1ps4guzzwcq.png)
On the bottom center, Select Generate SAS token and URL
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ilfi5mx6oy965vr2hzf.png)
Copy the Blob SAS URL (https://privatestella.blob.core.windows.net/private/advanced.png?sp=r&st=2024-05-29T13:08:46Z&se=2024-05-30T13:08:46Z&spr=https&sv=2022-11-02&sr=b&sig=UJrEZnYxYdINV97Kfeb6nlVDQXaDkw9ZuKpkyD742Jo%3D)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iuv3klpf5kbp2pc16d27.png)
Then copy the Blob url to a new browser tab
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yz22nz3a6hfx02uhbgbj.png).
Configure storage access tiers and content replication.
Return to the storage account.![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uzga15vzyhaaxupyy7r4.png)
in the Overview section, the Default access tier is set to Hot.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6j20l080gxcv7txumd8q.png)
Data management section, select the Lifecycle management blade.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/08fkouxb40vnudpvgvfj.png)
Select Add rule.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/stks0h9ld20k6ht4rbq4.png)
Set the Rule name to movetocool
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4pzf4dtqcocxty3vnae.png)
Set the Rule scope to Apply rule to all blobs in the storage account and select Next.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6v4bmy10ezz9em9ge7o.png)
Ensuring the Last modified is selected and set More than (days ago) to 30. In the Then drop-down select Move to cool storage. then click add
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d5qvasytpas4ww4uvlof.png)
The public website files need to be backed up to another storage account
In a the storage account, create a container
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b373jr2cl3t6mehw63dk.png)
Call the container backup and create
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3w5b1qysntknj0cr7n1o.png)
Navigate to the public website storage account (nicolestorage1).In the Data management section, select the Object replication blade
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/msnc06wyaxa6p0t5ysat.png)
Select Create replication rules
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dyz4tfstfkxd2ibh0sz8.png)
Set the destination storage account to the private storage account(privatestella)![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tlo4k7rra26piqqk91ib.png)
Go to the publicwebsitekam storage account created in the previous exercise in the Data management section, select the Object replication blade
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/avjuci7jy0y6jc0nkjrr.png)
Set the Destination storage account to the private storage account
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hglcxjvomisiml629t85.png)
Set the Source container to public and the Destination container to backup
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/24yd97rdv7kfppx6xono.png)
Create the replication rule.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jfzb0a4m7arz17xchw4z.png)