You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **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
-
275
252
## Task 4: Sovereignty & Compliance Notes
276
253
277
254
-**Regional co-location:** Place Key Vault/Managed HSM and Storage in the **same sovereign region** to meet residency mandates and reduce latency.
Copy file name to clipboardExpand all lines: 03-Azure/01-03-Infrastructure/01_Sovereign_Cloud/walkthrough/challenge-03/solution-03.md
+22-12Lines changed: 22 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,24 +115,31 @@ az policy assignment create \
115
115
### Create Log Analytics workspace and Diagnostic settings to capture logs
116
116
117
117
### CLI
118
+
118
119
```bash
119
120
# Create Log Analytics workspace
120
121
LOG_ANALYTICS_WORKSPACE=law-$RESOURCE_GROUP
121
122
az monitor log-analytics workspace create --resource-group $RESOURCE_GROUP \
122
123
--workspace-name $LOG_ANALYTICS_WORKSPACE
124
+
```
123
125
126
+
```bash
124
127
# Get the storage account resource ID
125
128
STORAGE_ACCOUNT_ID=$(az storage account show \
126
129
--name $STORAGEACCOUNT_NAME \
127
130
--resource-group $RESOURCE_GROUP \
128
131
--query id --output tsv)
132
+
```
129
133
134
+
```bash
130
135
# Get the Log Analytics workspace resource ID
131
136
LOG_ANALYTICS_WORKSPACE_ID=$(az monitor log-analytics workspace show \
132
137
--resource-group $RESOURCE_GROUP \
133
138
--workspace-name $LOG_ANALYTICS_WORKSPACE \
134
139
--query id --output tsv)
140
+
```
135
141
142
+
```bash
136
143
# Create diagnostic setting for blob service with StorageRead and StorageWrite categories
137
144
az monitor diagnostic-settings create \
138
145
--name blob-tls-insights \
@@ -151,6 +158,7 @@ az monitor diagnostic-settings create \
151
158
```
152
159
153
160
### Azure Portal steps
161
+
154
162
1. Open the storage account and go to **Monitoring > Diagnostic settings**.
155
163
2. Select **+ Add diagnostic setting**.
156
164
3. Name the setting (e.g., `blob-tls-insights`).
@@ -163,6 +171,7 @@ az monitor diagnostic-settings create \
163
171
### Create a Container and perform a blob upload and download
164
172
165
173
#### Grant access to the current user id to the Blob storage service
174
+
166
175
```bash
167
176
# Get your current user's object ID
168
177
CURRENT_USER_ID=$(az ad signed-in-user show --query id --output tsv)
@@ -176,6 +185,7 @@ az role assignment create \
176
185
```
177
186
178
187
#### Create a Container
188
+
179
189
```bash
180
190
# Create a blob storage container
181
191
# Create a container named "test-container"
@@ -185,40 +195,40 @@ az storage container create \
185
195
--auth-mode login
186
196
```
187
197
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
+

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:
189
205
190
206
```kusto
191
207
StorageBlobLogs
192
-
| where TimeGenerated > ago(7d) and AccountName == "$STORAGEACCOUNT_NAME"
208
+
| where TimeGenerated > ago(1d)
193
209
| summarize requests = count() by TlsVersion
194
210
```
195
211
196
212

197
213
198
214
```kusto
199
215
StorageBlobLogs
200
-
| where TimeGenerated > ago(7d) and AccountName == "$STORAGEACCOUNT_NAME"
> **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
+

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)).
207
225
208
226
## Results & acceptance criteria
209
227
210
228
- ✅ 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)).
211
229
- ✅ 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)).
212
230
- ✅ 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)).
213
231
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.
0 commit comments