Skip to content

feat(hubs): add opt-in parameter to disable shared key access on hub storage accounts - #2316

Draft
Michael Flanakin (flanakin) wants to merge 1 commit into
devfrom
flanakin/2312-disable-shared-key-access
Draft

feat(hubs): add opt-in parameter to disable shared key access on hub storage accounts#2316
Michael Flanakin (flanakin) wants to merge 1 commit into
devfrom
flanakin/2312-disable-shared-key-access

Conversation

@flanakin

Copy link
Copy Markdown
Collaborator

Summary

Adds an opt-in disableStorageSharedKeyAccess parameter (default false, preserving current behavior) to disable Shared Key (storage account key) authentication on FinOps hub storage accounts.

  • Threaded through main.bicephub.bicepHubProperties.options → both storage account resources:
    • The publisher/ingestion storage account in modules/fx/hub-app.bicep.
    • The private-routing script storage account in modules/Microsoft.FinOpsHubs/Core/infrastructure.bicep.
  • Exposed in the portal UI (createUiDefinition.json) as a new "Storage account security" section under Advanced.
  • Exposed in PowerShell as a -DisableStorageSharedKeyAccess switch on Deploy-FinOpsHub, version-gated for template v16+ (mirrors the -EnablePurgeProtection pattern).
  • Added a changelog entry under the FinOps hubs "Unreleased" (v16) section.
  • Added PowerShell unit tests covering the default, the switch, and the version gate.

Why this is safe by default: Data Factory already authenticates to hub storage accounts using its managed identity plus Storage Blob Data Contributor RBAC (not the storage account key), and the deployment-script storage account also uses managed identity. So nothing internally depends on Shared Key access, and disabling it has no propagation-delay or irreversibility caveat — allowSharedKeyAccess is a freely mutable property, unlike Key Vault purge protection.

Closes #2312

Test plan

  • bicep build src/templates/finops-hub/main.bicep compiles cleanly (only pre-existing, unrelated linter warnings).
  • Verified the compiled ARM JSON correctly threads disableStorageSharedKeyAccess from main.bicep down through hub.bicep, newHub/newHubInternal, and into both allowSharedKeyAccess resource properties.
  • Validated createUiDefinition.json is well-formed JSON.
  • PowerShell Pester tests (Deploy-FinOpsHub.Tests.ps1) were added but not executed in this environment (pwsh unavailable) — please confirm they pass in CI.
  • Manual portal deployment through the new "Storage account security" UI section.

🤖 [AI]

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

…storage accounts

Adds a disableStorageSharedKeyAccess parameter (default false, preserving
current behavior) threaded through main.bicep -> hub.bicep -> HubProperties
options -> the publisher storage account (hub-app.bicep) and the
private-routing script storage account (infrastructure.bicep). When enabled,
allowSharedKeyAccess is set to false on both storage accounts so only
Microsoft Entra ID and managed identity authentication are allowed.

Nothing internally depends on the storage account key: Data Factory already
authenticates via managed identity + Storage Blob Data Contributor RBAC, and
the deployment-script storage account uses MSI too. Shared Key access is a
freely mutable property (not irreversible like Key Vault purge protection),
so no propagation-delay caveat is needed.

Also exposes the parameter in createUiDefinition.json (new "Storage account
security" section under Advanced) and in Deploy-FinOpsHub.ps1 as a
-DisableStorageSharedKeyAccess switch, version-gated for template v16+,
following the review feedback from PR #2249 that flagged these two surfaces
as easy to miss when adding a new hub template parameter.

Closes #2312

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Review 👀 PR that is ready to be reviewed Tool: FinOps hubs Data pipeline solution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add opt-in parameter to disable Shared Key access on hub storage accounts

2 participants