List only objects for current user

DevOma
DevOma
Community Member

Hi,

I'm trying to get all data for a user by the command line tool - currently if I use

op list items --vault uuid

it returns all items of the vault - if I then try to read the details I get errors that the user is not allowed to read some data - that's ok - but I wold prefer to set a parameter to real only the items I have read access for the current user

So my question - any command for getting the uuid of the current user? And then how to set it in op list items command? Perhaps any full documentation of the op.exe commands? Like which fields I can get - there are only some examples in the documentation

Thanks!


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided

Comments

  • DevOma
    DevOma
    Community Member

    No hint?

  • felix_1p
    felix_1p
    1Password Alumni

    if I then try to read the details I get errors that the user is not allowed to read some data

    Mmh, that sounds strange. What permissions does that user have for the vault? If you can list items then you have the ability to read every item. It's not possible to restrict individual items to a specific user.

  • DevOma
    DevOma
    Community Member

    I'm reading as Administrator - but the item is a vault that is granted only for another user - on the list vaults command I get it in the result list but then I'm not able to read any details...

  • felix_1p
    felix_1p
    1Password Alumni

    Ah OK. So op list items --vault ... doesn't actually work (it sounded like it did). It's about op list vaults which list all vaults you have access to in any way.

    Is the fact that op list items --vault ... returns an error not sufficient? Can you share more of your script/approach?

  • DevOma
    DevOma
    Community Member

    Ok - my approach is to read all vaults/secrets for a user to integrate the data into our product - ASG-RemoteDesktop - it's an administration tool and we also store account information to access the users infrastructure - and if customers using a PasswordManager we like to sync the data from the PasswordManager to our database so the user can work with current data without typing any information into 2 systems.

    So first I read the vaults - then for every vault get the vault details (Type and so on) - and then get a list of secrets for each vault - and get username/pwd information for each secret. The retrieved data is then transferred into our product .

    It takes very long to retrieve all the data - you mentioned in another thread that it is possible to get a list of items by id in one command? How can I do? Any limitations?

    I also asked by mail if it is allowed to add the op.exe command line tool to our product installation package - but didn't get any answer - perhaps it's not the right platform for asking all the stuff? But currently this is the only way for me to contact somebody at 1Password :-)

  • ag_yaron
    ag_yaron
    1Password Alumni

    Hey @DevOma ,
    Sorry for the delayed response :)

    We're currently working on improving and optimizing the CLI performance times so it won't take so long to fetch vaults and items. Hopefully that will solve most (if not all) of your issues there.

    I'm not quite sure what our software license policy is regarding adding it to your installation package though. Feel free to email that question to support@1password.com and it will be routed to the right person so you can get a clear answer :)

This discussion has been closed.