variables: document restrictions on path and size (#14687)
This commit is contained in:
parent
1673714645
commit
62b1e2ef97
|
@ -150,6 +150,18 @@ The table below shows this endpoint's support for [blocking queries] and
|
|||
0, the variable is only created if it does not already exist. This paradigm
|
||||
allows check-and-set style updates.
|
||||
|
||||
## Restrictions
|
||||
|
||||
Variable paths are restricted to [RFC3986][] URL-safe characters that don't
|
||||
conflict with the use of the characters `@` and `.` in template blocks. This
|
||||
includes alphanumeric characters and the special characters `-`, `_`, `~`, and
|
||||
`/`. Paths may be up to 128 bytes long. The following regex matches the allowed
|
||||
paths: `^[a-zA-Z0-9-_~/]{1,128}$`
|
||||
|
||||
Variable items are restricted to 16KiB in size. This limit is calculated by
|
||||
taking the sum of the length in bytes of all of the unencrypted keys and values
|
||||
in the `Items` field.
|
||||
|
||||
### Sample Request
|
||||
|
||||
```shell-session
|
||||
|
@ -287,3 +299,4 @@ the response will include only metadata and not the `Items` field:
|
|||
[`nomad var`]: /docs/commands/var
|
||||
[blocking queries]: /api-docs#blocking-queries
|
||||
[required ACLs]: /api-docs#acls
|
||||
[RFC3986]: https://www.rfc-editor.org/rfc/rfc3986#section-2
|
||||
|
|
|
@ -36,6 +36,17 @@ enabled, this command requires the `variables:write` capability for the
|
|||
destination namespace and path. See the [ACL policy][] documentation for
|
||||
details.
|
||||
|
||||
## Restrictions
|
||||
|
||||
Variable paths are restricted to [RFC3986][] URL-safe characters that don't
|
||||
conflict with the use of the characters `@` and `.` in template blocks. This
|
||||
includes alphanumeric characters and the special characters `-`, `_`, `~`, and
|
||||
`/`. Paths may be up to 128 bytes long. The following regex matches the allowed
|
||||
paths: `^[a-zA-Z0-9-_~/]{1,128}$`
|
||||
|
||||
Variable items are restricted to 16KiB in size. This limit is calculated by
|
||||
taking the sum of the length in bytes of all of the unencrypted keys and values.
|
||||
|
||||
## General Options
|
||||
|
||||
@include 'general_options.mdx'
|
||||
|
@ -90,3 +101,4 @@ $ echo "abcd1234" | vault var put secret/foo bar=-
|
|||
|
||||
[variable]: /docs/concepts/variables
|
||||
[ACL Policy]: /docs/other-specifications/acl-policy#variables
|
||||
[RFC3986]: https://www.rfc-editor.org/rfc/rfc3986#section-2
|
||||
|
|
Loading…
Reference in New Issue