Skip to content

acl: allow host-volume-delete capability to pass validation - #27434

Merged
tgross merged 2 commits into
mainfrom
b-acl-validation
Jan 29, 2026
Merged

tgross merged 2 commits into
mainfrom
b-acl-validation

Conversation

@tgross

@tgross tgross commented Jan 29, 2026 •

Copy link
Copy Markdown
Member

When we added ACLs for dynamic host volumes, we missed marking the host-volume-delete capability as valid. Fix this and add a test that prevents us from making similar mistakes in the future by reading the source for constants we care about and checking them.

Fixes: #27433

Description

Testing & Reproduction steps

Links

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad product documentation, which is stored in the
    web-unified-docs repo. Refer to the web-unified-docs contributor guide for docs guidelines.
    Please also consider whether the change requires notes within the upgrade
    guide
    . If you would like help with the docs, tag the nomad-docs team in this PR.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.
  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

When we added ACLs for dynamic host volumes, we missed marking the
`host-volume-delete` capability as valid. Fix this and add a test that prevents
us from making similar mistakes in the future by reading the source for
constants we care about and checking them.

Fixes: #27433
@tgross

tgross commented Jan 29, 2026

Copy link
Copy Markdown
Member Author

Security scan issue is a credentials config issue. Being discussed here: https://ibm-hashicorp.slack.com/archives/C09KSMGTVPV/p1769703193263569 (internal)

gulducat
gulducat previously approved these changes Jan 29, 2026

@gulducat gulducat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As usual, I'm obsessed about test minutia, but LGTM!

Comment thread acl/policy_test.go
// valid
func TestPolicy_isCapabilityValid(t *testing.T) {
filename := "policy.go"
src, err := os.ReadFile(filename)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Neat approach!

Comment thread acl/policy_test.go Outdated
Comment thread acl/policy_test.go Outdated

@gulducat gulducat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@tgross tgross added backport/ent/1.10.x+ent backport to 1.10.x+ent release line backport/1.11.x backport to 1.11.x release line labels Jan 29, 2026
@tgross
tgross merged commit 2adf966 into main Jan 29, 2026
44 of 45 checks passed
@tgross
tgross deleted the b-acl-validation branch January 29, 2026 19:50
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 6, 2026

This branch was successfully deployed

1 active deployment
Preview — a76afa1e Deployed Jan 29, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/ent/1.10.x+ent backport to 1.10.x+ent release line backport/1.11.x backport to 1.11.x release line theme/acl theme/storage type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid "host-volume-delete" permission in policy

2 participants