Keep the storage browser out of containers holding secrets - #348
Merged
Conversation
The blob browser applied no container filtering. The storage-admin section grant decides who may open it; nothing decided what it could reach. So an administrator could browse to the container holding the Data Protection keyring and read it — and the keyring protects authentication cookies, session state and antiforgery tokens, so reading it allows those to be decrypted, replacing it allows them to be forged, and deleting it invalidates every one of them at once. Confirmed on the running stack before changing anything: the container was listed alongside ordinary application data, the preview pane rendered the key descriptors inline, and the download route returned the keyring as XML. Two further routes were open by inspection — delete, and upload, which is the worst of the set because a replacement keyring lets tokens be minted rather than merely read. One deny-list, consulted at a single choke point, before any route resolves a container. A protected container is refused for listing, reading, writing and deleting alike, rather than six separate guards that drift apart, and the refusal comes before the blob is touched — a blob that is opened and then withheld has still been opened. Protected containers are also omitted from the listing entirely: refusing the routes while still naming the container advertises where the keyring lives. 404 rather than 403, matching what a non-granted admin section already returns. The list is configuration with the keyring as its built-in default, so a future secret container is covered by a setting rather than a release, and an environment that binds nothing is still protected. Moving the keyring to Key Vault is the stronger fix and is separate work. This is about the application not serving its own secrets. Whether the keyring needs rotating depends on whether the browser has been reachable in a deployed environment by anyone outside the team, which is the service owner's call. Refs #346
|
Review app for PR 348 was deleted |
paulc1983
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The blob browser applied no container filtering. The storage-admin section grant decides who may open it; nothing decided what it could reach. So an administrator could browse to the container holding the Data Protection keyring and read it — and the keyring protects authentication cookies, session state and antiforgery tokens, so reading it allows those to be decrypted, replacing it allows them to be forged, and deleting it invalidates every one of them at once.
Confirmed on the running stack before changing anything: the container was listed alongside ordinary application data, the preview pane rendered the key descriptors inline, and the download route returned the keyring as XML. Two further routes were open by inspection — delete, and upload, which is the worst of the set because a replacement keyring lets tokens be minted rather than merely read.
One deny-list, consulted at a single choke point, before any route resolves a container. A protected container is refused for listing, reading, writing and deleting alike, rather than six separate guards that drift apart, and the refusal comes before the blob is touched — a blob that is opened and then withheld has still been opened. Protected containers are also omitted from the listing entirely: refusing the routes while still naming the container advertises where the keyring lives.
404 rather than 403, matching what a non-granted admin section already returns. The list is configuration with the keyring as its built-in default, so a future secret container is covered by a setting rather than a release, and an environment that binds nothing is still protected.
Moving the keyring to Key Vault is the stronger fix and is separate work. This is about the application not serving its own secrets. Whether the keyring needs rotating depends on whether the browser has been reachable in a deployed environment by anyone outside the team, which is the service owner's call.
Closes #346