Files
nomad/.changelog/25869.txt
Chris Roberts 2cc598ef00 Get ACL policy by job using exact job ID (#26019)
In the original state, when getting ACL policies by job, the
search was performing a prefix-based lookup on the index. This
can result in polcies being applied incorrectly when used for
workload identities. For example, if a `custom-test` policy is
created like so:

```
nomad acl policy apply -namespace=default -job=test-job custom-test ./policy.hcl
```

A job named `test-job` will properly get this ACL policy. However,
due to the lookup being prefix-based on the index, a job named
`test-job-1` will also get this ACL policy.

To prevent this behavior, the lookup behavior on the index is
modified so it is a direct match.
2025-06-09 13:08:29 -07:00

127 B