Skip to content

Agent Mesh

docs: label values exclude quotes and backslashes, 64 labels per node

Tomas Tormo668921022d6a
diff --git a/site/content/docs/reference/node-config.md b/site/content/docs/reference/node-config.md
index 2e6e4025..df6c01ad 100644
--- a/site/content/docs/reference/node-config.md
+++ b/site/content/docs/reference/node-config.md
@@ -59,10 +59,12 @@ does not know.
## `labels`
-A map of `key: value`. Keys are 1 to 63 characters from `[a-zA-Z0-9_.-]`.
-Values are non-empty, at most 255 characters, and contain no `,`, `=` or
-control characters, because the wire form is a comma-separated `key=value`
-list. A malformed label stops the node at start.
+A map of `key: value`, at most 64 entries. Keys are 1 to 63 characters from
+`[a-zA-Z0-9_.-]`. Values are non-empty and at most 255 characters. Values
+contain no `,` or `=`, because the wire form is a comma-separated `key=value`
+list. Values also contain no `"`, `\` or control characters, because the
+control plane writes the value into Datalog. A malformed label, or more than
+64 labels, stops the node at start.
Labels are sent at enrollment. The control plane writes them into the node's
credential as `label(key, value)` facts, but only if a role the node holds
diff --git a/site/content/docs/reference/policy.md b/site/content/docs/reference/policy.md
index c9acc303..f8dc267b 100644
--- a/site/content/docs/reference/policy.md
+++ b/site/content/docs/reference/policy.md
@@ -162,8 +162,8 @@ Exact entries of one fact are merged into one `granted_target_set` fact.
| `*` | any label |
Keys match `[a-zA-Z0-9_.-]{1,63}`. Values are up to 255 characters with no
-`,`, `=` or control characters. Every label that a node declares must be
-permitted by a role it holds, or enrollment fails. Manual approval of a
+`,`, `=`, `"`, `\` or control characters. Every label that a node declares
+must be permitted by a role it holds, or enrollment fails. Manual approval of a
bootstrap enrollment does not bypass this check.
### HTTP grants