I am using 1P to store OpenSSL private keys and some accompanying documentation.
A script will generate a new key, create a CSR based on it and an OpenSSL config and some documentation files. All those are put into an encrypted ZIP file with a randomly generated password.
My automation currently stops there. I then upload the file as a new document into 1P, add a "ZIP Password" field via the GUI, and copy/paste the random password from my terminal output into it.
Playing with the CLI I already managed to auto-upload the file as a new document.
However, unless I am missing something, there is currently no way to either add the password field to the document during creation, now afterwards. I then thought, I might create an additional password entry and associate that with the document, but I couldn't figure that one out, either.
1Password Version: 6.8.2
Extension Version: Not Provided
OS Version: macOS 10.12
Sync Type: Not Provided
@dschneller Wow that's awesome! I'd love if this could be documented in a blog post/GitHub repo somewhere, I'd love to see how you did it.
You're right, at the current time there is no way to add extra fields to new documents using the CLI, it's a use-case I personally hadn't even thought of when creating a document. At some point (once we've figured out a sensible way to do item editing), you'll be able to add that field programmatically, but until then there's no real way to do it.
One workaround I can think of is this:
notesPlainfield (or a custom field you create)
Just an idea, let me know if it works, or even come up with something better!
@cohix Thanks for the reply. Is there a field I could populate to create the link between the password entry and the ZIP document as an association? As of now, I am the only one on the Team using the CLI -- the rest of the team needs to be able to work with the UI. They wouldn't gain anything from a UUID in a text field.
@dschneller : yea you can you use a reference field/sectoin for that. We really need public facing documentation for this stuff.
Here's an example field:
k: must be
n: must be a unique identifier. For example generate a new UUID and remove the dashes and you get something that looks like my example
v: the UUID of the item you're referencing. It must be within the same vault
t: the title, what appears on the left hand side when shown in the UI
Please put this reference field within a section with title "Related Items" and name "linked items", as the apps make some assumptions about where these live.
Put together here's an example section:
I hope this helps.