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
Copy file name to clipboardExpand all lines: articles/storage/blobs/blob-storage-monitoring-scenarios.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: normesta
6
6
ms.service: azure-blob-storage
7
7
ms.topic: conceptual
8
8
ms.author: normesta
9
-
ms.date: 07/30/2021
9
+
ms.date: 05/10/2023
10
10
ms.custom: "monitoring"
11
11
---
12
12
@@ -163,19 +163,23 @@ StorageBlobLogs
163
163
| project TimeGenerated, AuthenticationType, AuthenticationHash, OperationName, Uri
164
164
```
165
165
166
-
For security reasons, SAS tokens don't appear in logs. However, the SHA-256 hash of the SAS token will appear in the `AuthenticationHash` field that is returned by this query.
166
+
For security reasons, SAS tokens don't appear in logs. However, the SHA-256 hash of the SAS token signature will appear in the `AuthenticationHash` field that is returned by this query.
167
167
168
-
If you've distributed several SAS tokens, and you want to know which SAS tokens are being used, you'll have to convert each of your SAS tokens to an SHA-256 hash, and then compare that hash to the hash value that appears in logs.
168
+
If you've distributed several SAS tokens, and you want to know which SAS tokens are being used, you'll have to convert the signature portion of each of your SAS tokens to an SHA-256 hash, and then compare that hash to the hash value that appears in logs.
169
169
170
-
First decode each SAS token string. The following example decodes a SAS token string by using PowerShell.
170
+
First decode each SAS token string. The following example decodes the signature portion of the SAS token string by using PowerShell.
Then, you can pass that string to the [Get-FileHash](/powershell/module/microsoft.powershell.utility/get-filehash) PowerShell cmdlet. For an example, see [Example 4: Compute the hash of a string](/powershell/module/microsoft.powershell.utility/get-filehash#example-4--compute-the-hash-of-a-string).
176
+
You can use any tool or SDK to convert the decoded signature to the SHA-256 has of that signature. For example, on a Linux system, you could use the following command:
177
177
178
-
Alternatively, you can pass the decoded string to the [hash_sha256()](/azure/data-explorer/kusto/query/sha256hashfunction) function as part of a query when you use Azure Data Explorer.
178
+
```bash
179
+
echo -n "<Decoded SAS signature>"| python3 -c "import sys; from urllib.parse import unquote; print(unquote(sys.stdin.read()), end='');"| sha256sum
180
+
```
181
+
182
+
Another way to convert the decoded signature is to pass the decoded string to the [hash_sha256()](/azure/data-explorer/kusto/query/sha256hashfunction) function as part of a query when you use Azure Data Explorer.
179
183
180
184
SAS tokens do not contain identity information. One way to track the activities of users or organizations, is to keep a mapping of users or organizations to various SAS token hashes.
0 commit comments