Skip to content

Commit ba364fc

Browse files
authored
docs: add missing API field JobACL and fix workload identity headers (#16930)
1 parent c7c8bd4 commit ba364fc

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

website/content/api-docs/acl/policies.mdx

+22-1
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,32 @@ The table below shows this endpoint's support for
8282

8383
- `Rules` `(string: <required>)` - Specifies the Policy rules in HCL or JSON format.
8484

85+
- `JobACL` `(JobACL: <optional>)` - Associates the policy with a given
86+
namespace, job, group, or task. Refer to [Workload Associated ACL
87+
Policies][concepts_workload_identity_acl] for more information.
88+
89+
- `Namespace` `(string: <optional>)` - The namespace to attach the policy.
90+
Required if `JobID` is set.
91+
92+
- `JobID` `(string: <optional>)` - The job to attach to the policy. Required
93+
if `Group` is set.
94+
95+
- `Group` `(string: <optional>)` - The group to attach to the policy.
96+
Required if `Task` is set.
97+
98+
- `Task` `(string: <optional>)` - The task to attach to the policy.
99+
85100
### Sample Payload
86101

87102
```json
88103
{
89104
"Name": "my-policy",
90105
"Description": "This is a great policy",
91-
"Rules": ""
106+
"Rules": "",
107+
"JobACL": {
108+
"Namespace": "default",
109+
"JobID": "example"
110+
}
92111
}
93112
```
94113

@@ -165,3 +184,5 @@ $ curl \
165184
--request DELETE \
166185
https://localhost:4646/v1/acl/policy/foo
167186
```
187+
188+
[concepts_workload_identity_acl]: /nomad/docs/concepts/workload-identity#workload-associated-acl-policies

website/content/docs/concepts/workload-identity.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ includes the following identity claims:
2121
}
2222
```
2323

24-
# Using Workload Identity
24+
## Using Workload Identity
2525

2626
While Nomad always creates and uses workload identities internally, the JWT is
2727
not exposed to tasks by default.
@@ -43,7 +43,7 @@ task "example" {
4343
}
4444
```
4545

46-
# Workload Associated ACL Policies
46+
## Workload Associated ACL Policies
4747

4848
You can associate additional ACL policies with workload identities by passing
4949
the `-job`, `-group`, and `-task` flags to `nomad acl policy apply`. When Nomad

0 commit comments

Comments
 (0)