Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation] Documented example regarding ACL plugin fails with error failed to parse rules: Invalid plugin policy #23270

Closed
EugenKon opened this issue Jun 7, 2024 · 3 comments · Fixed by #23277
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/acl type/bug

Comments

@EugenKon
Copy link

EugenKon commented Jun 7, 2024

Version

Nomad v1.8.0
BuildDate 2024-05-28T17:38:17Z
Revision 28b82e4b2259fae5a62e2ed47395334bea5a24c4

Issue

Having this configuration:
https://developer.hashicorp.com/nomad/docs/other-specifications/acl-policy
image

Fails with error message:

+ nomad acl policy apply -token 50d0a579-771a-015c-9b3d-f5b60085c5f0 -description 'Policy to allow reading of agents and nodes and listing and submitting jobs in all namespaces.' node-read-job-submit /ops/shared/config/acl/nomad-acl-user.hcl
Error writing ACL policy: Unexpected response code: 400 (policy 0 invalid: 1 error occurred:
	* failed to parse rules: Invalid plugin policy: &acl.PluginPolicy{Policy:"write"})

Reproduction steps

Try to bootstrap Nomad ACL using given example

Expected Result

No error should occur

Actual Result

Error happened

@jrasell
Copy link
Member

jrasell commented Jun 10, 2024

Hi @EugenKon and thanks for raising this issue. I believe the problem lies with the validation logic, so I have raised a PR to fix that.

@jrasell jrasell added stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/acl labels Jun 10, 2024
@jrasell jrasell self-assigned this Jun 10, 2024
@EugenKon
Copy link
Author

I see the example fix was merged. Thanks.

Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 Dec 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/acl type/bug
Projects
Development

Successfully merging a pull request may close this issue.

2 participants