Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clipboard-copy field argument not working (or unclear) #1328

Open
theOvercloud opened this issue Dec 5, 2024 · 4 comments
Open

clipboard-copy field argument not working (or unclear) #1328

theOvercloud opened this issue Dec 5, 2024 · 4 comments

Comments

@theOvercloud
Copy link

theOvercloud commented Dec 5, 2024

I want to use the clipboard-copy command to get a filed value from the vault. I am using the following command:

keeper clipboard-copy --field host --output stdout "<path to entry>"

If i use the command without the field argument, i get the password of the entry in stdout as expected. However, as soon as I add the filed argument, the output is empty. I tried a few fields, but non worked. I used the names i get from the get --format json output. Am I doing something wrong?

Thanks in advance!

Edit:

keeper --version
Keeper Commander, version 16.11.19

Using keeper in wsl on windows.

@sk-keeper
Copy link
Collaborator

You are correct. The clipboard-copy command does not work with compound fields.
The host contains two values: hostname and port.

This issue will be fixed in the next release.
Thank you for letting us know about this issue.

@theOvercloud
Copy link
Author

Thanks for the quick reply!

Just to clarify, the --field flag should be able to get any field from an entry, correct? In my case, I would like to get a keypair field.

@sk-keeper
Copy link
Collaborator

Commander v16.11.20 has been published
It supports compound fields, the fields that contain multiple properties
host field is defined as {'hostName': '', 'port': ''}

My Vault> rti -lf keyPair
Field Type ID    Type        Value Type    Value Format
---------------  ----------  ------------  -----------------------------------
keyPair          privateKey  object        {'publicKey': '', 'privateKey': ''}

clipboard-copy --field=host returns a string representation of the field
for host it is hostName:poort
for keyPair it is private key privateKey only

To access to the specific property of the compound field add property name after a colon

clipboard-copy --field=keyPair:pr

the property name does not have to be a full property name.

keyPair needs to be case sensitive

@theOvercloud
Copy link
Author

Can confirm works as described. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants