This procedure demonstrates how to manage access to Azure Storage by uploading files, setting locks, and using shared access tokens.
Step 1: Upload a File to the Storage Container
- Go to the storage account and select Containers.
- Open the container created earlier.
- Click Upload and select a file from your computer.
- Click Upload.
Step 2: Set a Delete Lock on the File
- Go to the storage account and click Locks under Settings.
- Click + Add.
- Name the lock and select Delete as the lock type.
- Click OK.
Step 3: Upload a File to Azure Files
- Go to the storage account and select File shares.
- Open the file share created earlier.
- Click Upload and select a file.
- Click Upload.
Step 4: Create Shared Access Tokens
- Go to the storage account and click Shared access signature.
- Select permissions and expiration time.
- Generate SAS tokens using Key 1 and Key 2.
- Copy the URLs.
Step 5: Access the File Using SAS Token
- Paste the SAS URL in a browser or use a tool like
curl
to access the file.
Step 6: Rotate Key 1 and Test Access
- Go to the storage account and click Access keys.
- Regenerate Key 1.
- Try accessing the file using the SAS URL generated with Key 1.
- Notice that access is denied.