-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NET-6251] Nomad client templated policy (#19827)
- Loading branch information
1 parent
334de14
commit dc02fa6
Showing
11 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:feature | ||
acl: Adds nomad client templated policy | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
agent/structs/acltemplatedpolicy/policies/ce/nomad-client.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
agent_prefix "" { | ||
policy = "read" | ||
} | ||
node_prefix "" { | ||
policy = "read" | ||
} | ||
service_prefix "" { | ||
policy = "write" | ||
} | ||
key_prefix "" { | ||
policy = "read" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...mplatedpolicy/testdata/FormatTemplatedPolicy/ce/nomad-client-templated-policy.json.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"TemplateName": "builtin/nomad-client", | ||
"Schema": "", | ||
"Template": "agent_prefix \"\" {\n policy = \"read\"\n}\nnode_prefix \"\" {\n policy = \"read\"\n}\nservice_prefix \"\" {\n policy = \"write\"\n}\nkey_prefix \"\" {\n policy = \"read\"\n}", | ||
"Description": "Gives the token or role permissions required for integration with a nomad client." | ||
} |
18 changes: 18 additions & 0 deletions
18
...policy/testdata/FormatTemplatedPolicy/ce/nomad-client-templated-policy.pretty-meta.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Name: builtin/nomad-client | ||
Description: Gives the token or role permissions required for integration with a nomad client. | ||
Input variables: None | ||
Example usage: | ||
consul acl token create -templated-policy builtin/nomad-client | ||
Raw Template: | ||
agent_prefix "" { | ||
policy = "read" | ||
} | ||
node_prefix "" { | ||
policy = "read" | ||
} | ||
service_prefix "" { | ||
policy = "write" | ||
} | ||
key_prefix "" { | ||
policy = "read" | ||
} |
5 changes: 5 additions & 0 deletions
5
...latedpolicy/testdata/FormatTemplatedPolicy/ce/nomad-client-templated-policy.pretty.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Name: builtin/nomad-client | ||
Description: Gives the token or role permissions required for integration with a nomad client. | ||
Input variables: None | ||
Example usage: | ||
consul acl token create -templated-policy builtin/nomad-client |