Skip to content

CLI: Setup Azure missing parameter during setup/export - #5220

Open
MonkeyCanCode wants to merge 5 commits into
apache:mainfrom
MonkeyCanCode:set_azure_missing_parameter
Open

CLI: Setup Azure missing parameter during setup/export#5220
MonkeyCanCode wants to merge 5 commits into
apache:mainfrom
MonkeyCanCode:set_azure_missing_parameter

Conversation

@MonkeyCanCode

Copy link
Copy Markdown
Contributor

Similar to #5219 but for Azure. This PR adds the missing field (hierarchical) that got loss during setup apply/export.

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 Clearly explained why the changes are needed, or linked related issues: Fixes #
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Updated CHANGELOG.md (if needed)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

dimas-b
dimas-b previously approved these changes Aug 12, 2026
@github-project-automation github-project-automation Bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Aug 12, 2026
flyrain
flyrain previously approved these changes Aug 12, 2026

@flyrain flyrain left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Left minor comments.

# The URL for OAuth consent.
consent_url: "https://login.microsoftonline.com/consent"
# Set to true if the Azure storage account has a hierarchical namespace enabled.
# This scopes SAS tokens down to the most specific path.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment explains the upside of true but not the failure mode of guessing. Per configuring-azure-blob-cloud-storage-specific.md:71-73, this value has to match whether HNS is actually enabled on the account, if they disagree, tokens are scoped against directory ACLs that don't exist and you get runtime 403s. Worth one more clause: "must match the storage account's actual HNS setting."

@dimas-b dimas-b Aug 12, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, point, but IIRC setting it to false on a real HNS Azure storage will not cause errors. Tokens will just be scoped wider than they have to be.

Cf. API spec doc in #3347

IMHO the doc statement from #4451 may need to be revisited.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for chiming in. +1 on the doc change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a change around this. Please take a look.

Comment thread CHANGELOG.md Outdated
dimas-b
dimas-b previously approved these changes Aug 12, 2026

@flyingImer flyingImer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is right and I'd merge it. Losing hierarchical is not cosmetic. Just some minor inline

"tenant_id",
"multi_tenant_app_name",
"consent_url",
"hierarchical",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC this allowlist is more than a passthrough: since CatalogsCommand's ​post_init​ turns a missing hierarchical into an explicit False rather than leaving it unset, wouldn't a field left off this list silently widen an HNS catalog's SAS scope back to container-wide instead of just failing to round-trip? Might be worth a short comment here flagging that an omission isn't just a data-loss bug, it can change a security default.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A missing hierarchical flag is treated as false, IIRC.

@MonkeyCanCode
MonkeyCanCode dismissed stale reviews from dimas-b and flyrain via 9070627 August 14, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants