Skip to main content

Read Access

How files uploaded to any storage service can be accessed is one of the main security concerns. While many files can be made public, there needs to be a difference between these files and others. So if viewing or changing a file must only be possible with specific access and for specific people, the storage service's features must make this possible.

In Arvancloud Object Storage, you can restrict or make public the viewing of files through public and private access. When creating a bucket and uploading a file, we come across an option called public read access, which can be enabled or disabled at any time after the bucket is created. This guide explains this option and its security function.

Public Read Access When Creating a Bucket​

Each bucket created in Arvancloud Object Storage is accessible with an address like the following.

https://BUCKETNAME.s3.REGION.arvanstorage.ir

If public read access is disabled for the bucket and we enter the bucket's address in the browser, we get an Access Denied error.

Now we enable public read access for the same bucket. We enter the bucket's address in the browser and see an XML listing that gives comprehensive information about which user owns this bucket, what files it contains, their sizes, and when each file was last modified.

So if our data is important, the bucket's public read access shouldn't be enabled, because in this mode the information about the files in the bucket is publicly available.

Public Read Access When Uploading a File​

Public read access for files is a little different. When public read access is enabled for a file, it's accessible at an address like the following.

https:// BUCKETNAME.s3.REGION.arvanstorage.ir/FILENAME

If we enter this address in the browser, the file opens directly.

Now, if we disable public read access for this file, the file's address changes and becomes:

https://s3.ir-thr-at1.arvanstorage.ir/BUCKETNAME/FILENAME?AWSAccessKeyId=xxxxxx-xxxx-xxxx-xxxxxxxxx&Signature=xxxxxxx%2Fs567z9%2F%2BBo%3D&Expires=1591864214

This address contains a set of parameters that make it unguessable, so only you have access to it. Others can only access this file if you give them the address. The address also specifies its expiration time at the end.

Note that if public read access is enabled for a file and we then disable it, the file is only accessible through the address we had while public read access was disabled.

Also, if public read access for a file is disabled and we then change it to enabled, the file is accessible through both addresses; however, the private access address is only accessible until its expiration date, after which the file is only accessible through the public read access address.