-
Notifications
You must be signed in to change notification settings - Fork 53
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
Permission denied to plan and run a job with namespace using client type token #364
Comments
Hi @APCS0, thanks for reporting this issue. There's indeed a bug in the template parser that causes this, have a look at the linked PR for context. |
actually the reason for this is that unless you specify |
Nomad version
Nomad v1.5.6
Nomad-pack version
Nomad Pack v0.0.1-techpreview.4 (50d84d0)
Issue
Nomad-pack fails to plan and run a job with a namespace when it uses a client type token, using the same token with nomad it's possible to execute plan and run.
Reproduction steps
Create a policy with the following capabilities, in this example the namespace is
testns
test-policy.hcl
nomad acl policy apply test-policy test-policy.hcl
Create a token and associate the previous policy
nomad acl token create -name 'test-token' -policy test-policy
load the newly created token
export NOMAD_TOKEN=xxxxxxxxx
plan or run a job with nomad-pack
/tmp/nomad-pack plan hello_world --var register_consul_service=false --var count=1
Expected Result
/tmp/nomad-pack plan hello_world --var register_consul_service=false --var count=1
Actual Result
Job file
Nomad Server logs
[DEBUG] http: request failed: method=POST path=/v1/jobs/parse error="Permission denied" code=403
[DEBUG] http: request complete: method=POST path=/v1/jobs/parse duration=1.501077ms
The text was updated successfully, but these errors were encountered: