Secret reference syntax - whitespace
On the CLI syntax rules for secret references page, it allows use of 'the whitespace character' (I assume just the ASCII space character).
I can confirm the VS Code 1Password extension works with a secret reference of op://Private/Example - 123/Section 1/Password A
.
The docs for the 1Password CLI op inject
/ op run
commands says reference names cannot contain whitespace.
You can specify each part of a secret reference using its name or ID. Reference names cannot contain any whitespaces or special characters, with the exception of hyphens (-) and underscores (_).
But it looks like whitespace is also supported there (for environment variables at least)?
$ export TEST_PASSWORD="op://Private/Example - 123/Section 1/Password A" $ op run --no-masking -- printenv TEST_PASSWORD my-password
If the official stance is still to not use whitespace (I can understand why), then it might be worth adding an admonition to the secrets reference syntax rules page as well, to point out the caveat of using whitespace in secret references?
1Password Version: op --version: 2.4.1
Extension Version: Not Provided
OS Version: Not Provided
Browser:_ Not Provided
Comments
-
Hey @ajh0912,
Thank you for reaching out to us! Indeed, this documentation has not been updated, after the introduction of support for spaces in secret references. We have opened an internal issue, looking to get this documentation updated.
Thanks once again for notifying us, and let us know if you encounter any other irregularities such as this one!
Best,
Horia0