Skip to content

Commit 3040418

Browse files
authored
Merge pull request #302 from janegilring/sovereign_cloud_updates
Sovereign cloud updates
2 parents b47d202 + e428286 commit 3040418

5 files changed

Lines changed: 22 additions & 35 deletions

File tree

03-Azure/01-03-Infrastructure/01_Sovereign_Cloud/walkthrough/challenge-02/solution-02.md

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -249,29 +249,6 @@ If you navigate to the key inside your Key Vault, you should now see a new versi
249249

250250
---
251251

252-
### Clean-Up (Safe)
253-
254-
```bash
255-
# Optional: revert to platform-managed key before deletion
256-
az storage account update \
257-
-n $STORAGEACCOUNT_NAME \
258-
-g $RESOURCE_GROUP \
259-
--encryption-key-source Microsoft.Storage
260-
261-
# Delete storage account (data becomes unrecoverable after retention window)
262-
az storage account delete -n $STORAGEACCOUNT_NAME -g $RESOURCE_GROUP --yes
263-
264-
# Delete Key Vault (remains recoverable due to soft-delete/purge protection)
265-
az keyvault delete -n $KEYVAULT_NAME -g $RESOURCE_GROUP
266-
267-
# Optional purge (only if policy allows; requires purge protection disabled)
268-
# az keyvault purge --name $KEYVAULT_NAME
269-
```
270-
271-
> **Note:** Evaluate legal hold, retention, and audit requirements before purging keys. With purge protection enabled, the vault persists in a recoverable state for the configured retention period.
272-
273-
---
274-
275252
## Task 4: Sovereignty & Compliance Notes
276253

277254
- **Regional co-location:** Place Key Vault/Managed HSM and Storage in the **same sovereign region** to meet residency mandates and reduce latency.
-11.9 KB
Loading
64.7 KB
Loading
128 KB
Loading

03-Azure/01-03-Infrastructure/01_Sovereign_Cloud/walkthrough/challenge-03/solution-03.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,24 +115,31 @@ az policy assignment create \
115115
### Create Log Analytics workspace and Diagnostic settings to capture logs
116116

117117
### CLI
118+
118119
```bash
119120
# Create Log Analytics workspace
120121
LOG_ANALYTICS_WORKSPACE=law-$RESOURCE_GROUP
121122
az monitor log-analytics workspace create --resource-group $RESOURCE_GROUP \
122123
--workspace-name $LOG_ANALYTICS_WORKSPACE
124+
```
123125

126+
```bash
124127
# Get the storage account resource ID
125128
STORAGE_ACCOUNT_ID=$(az storage account show \
126129
--name $STORAGEACCOUNT_NAME \
127130
--resource-group $RESOURCE_GROUP \
128131
--query id --output tsv)
132+
```
129133

134+
```bash
130135
# Get the Log Analytics workspace resource ID
131136
LOG_ANALYTICS_WORKSPACE_ID=$(az monitor log-analytics workspace show \
132137
--resource-group $RESOURCE_GROUP \
133138
--workspace-name $LOG_ANALYTICS_WORKSPACE \
134139
--query id --output tsv)
140+
```
135141

142+
```bash
136143
# Create diagnostic setting for blob service with StorageRead and StorageWrite categories
137144
az monitor diagnostic-settings create \
138145
--name blob-tls-insights \
@@ -151,6 +158,7 @@ az monitor diagnostic-settings create \
151158
```
152159

153160
### Azure Portal steps
161+
154162
1. Open the storage account and go to **Monitoring > Diagnostic settings**.
155163
2. Select **+ Add diagnostic setting**.
156164
3. Name the setting (e.g., `blob-tls-insights`).
@@ -163,6 +171,7 @@ az monitor diagnostic-settings create \
163171
### Create a Container and perform a blob upload and download
164172

165173
#### Grant access to the current user id to the Blob storage service
174+
166175
```bash
167176
# Get your current user's object ID
168177
CURRENT_USER_ID=$(az ad signed-in-user show --query id --output tsv)
@@ -176,6 +185,7 @@ az role assignment create \
176185
```
177186

178187
#### Create a Container
188+
179189
```bash
180190
# Create a blob storage container
181191
# Create a container named "test-container"
@@ -185,40 +195,40 @@ az storage container create \
185195
--auth-mode login
186196
```
187197

188-
Run the following queries in **Log Analytics**:
198+
- In the Azure portal, search for **Storage accounts** in the top center search bar and navigate to the storage account which resides in your resource group.
199+
- Click on the menu blade **Storage browser**, navigate to **Blob containers** -> **test-container** and click the **Upload**-button to upload a sample file (e.g. an image or text-file) from your local computer to generate some traffic/logs
200+
201+
![Storage account](./images/storage_04.png)
202+
203+
- In the Azure portal, search for **Log Analytics workspaces** in the top center search bar and navigate to the workspace which resides in your resource group.
204+
- Click on **Logs**, close any welcome/introduction-notifications, select **KQL mode** and run the following queries:
189205

190206
```kusto
191207
StorageBlobLogs
192-
| where TimeGenerated > ago(7d) and AccountName == "$STORAGEACCOUNT_NAME"
208+
| where TimeGenerated > ago(1d)
193209
| summarize requests = count() by TlsVersion
194210
```
195211

196212
![Log Analytics](./images/log_analytics_01.png)
197213

198214
```kusto
199215
StorageBlobLogs
200-
| where TimeGenerated > ago(7d) and AccountName == "$STORAGEACCOUNT_NAME"
216+
| where TimeGenerated > ago(1d)
201217
| where TlsVersion !in ("TLS 1.2","TLS 1.3")
202218
| project TimeGenerated, TlsVersion, CallerIpAddress, UserAgentHeader, OperationName
203219
| sort by TimeGenerated desc
204220
```
205221

206-
> **Tip:** If you observe TLS 1.0/1.1 usage, upgrade client frameworks (e.g., .NET, Java, Python SDKs), avoid hardcoded protocol versions, and rely on OS defaults that negotiate TLS 1.2+ ([learn.microsoft.com](https://learn.microsoft.com/en-us/azure/storage/common/transport-layer-security-configure-minimum-version)).
222+
![Log Analytics](./images/log_analytics_02.png)
223+
224+
> **Tip:** If you observe TLS 1.0/1.1 usage, upgrade client frameworks (e.g., .NET, Java, Python SDKs), avoid hardcoded protocol versions, and rely on OS defaults that negotiate TLS 1.2+ ([learn.microsoft.com](https://learn.microsoft.com/azure/storage/common/transport-layer-security-configure-minimum-version)).
207225
208226
## Results & acceptance criteria
209227

210228
- ✅ Storage accounts reject HTTP requests and enforce HTTPS (secure transfer required) ([learn.microsoft.com](https://learn.microsoft.com/en-us/azure/storage/common/storage-require-secure-transfer)).
211229
- ✅ Policy compliance shows all storage accounts with **Minimum TLS Version = TLS 1.2** ([learn.microsoft.com](https://learn.microsoft.com/en-us/azure/storage/common/transport-layer-security-configure-minimum-version?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&tabs=portal#use-azure-policy-to-audit-for-compliance)).
212230
- ✅ Log Analytics reports no requests using TLS 1.0/1.1 in the past 7 days (or policy denies/blocks them) ([learn.microsoft.com](https://learn.microsoft.com/en-us/azure/storage/common/transport-layer-security-configure-minimum-version?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&tabs=portal#detect-the-tls-version-used-by-client-applications)).
213231

214-
## Cleanup
215-
216-
- Remove the policy assignment when enforcement is no longer required:
217-
```bash
218-
az policy assignment delete --name enforce-storage-min-tls12 --scope /subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP
219-
```
220-
- Delete or disable diagnostic settings to stop streaming logs if the workspace costs are no longer justified.
221-
222232
## References
223233

224234
- [Azure encryption overview](https://learn.microsoft.com/en-us/azure/security/fundamentals/encryption-overview)

0 commit comments

Comments
 (0)