Updating the records in 1Password mac app.

Options
allroundexperts
allroundexperts
Community Member

Hello,
For a week or so, I have been working on a program that directly play's around with the "OnePassword.sqlite" file. I managed to read and write records into it but there's a slight problem that I can not wrap my head around.

Whenever I add a new record directly to the sqlite file, I have to lock and unlock the 1password mac app in order for the new entry to appear.

I know that when adding a new entry through any other device (iOS app or the chrome extension), the new entry shows up in real time. Is there anything that I can do to make it appear real time so that I do not have to lock and unlock the vault?

Thanks!


1Password Version: 7
Extension Version: Not Provided
OS Version: OSX Mojave
Sync Type: Dropbox

Comments

  • Ben
    Options

    For anyone else reading

    We do not recommend providing your Master Password to anything that isn't 1Password
    We would not recommend modifying any of 1Password's data files directly

    with that out of the way... :)

    --

    Hi @allroundexperts

    Modifying the OnePassword.sqlite file

    This file isn't a "sync" file. It is the database 1Password works directly from. It isn't intended to be modified by anything other than 1Password. Even other native instances of 1Password do not modify this file on other machines directly. They use intermediary sync files (either the 1Password.com service database or an OPVault file in Dropbox / iCloud). You'll never get 1Password to automatically refresh using this approach because 1Password doesn't expect any other process to modify this file. Additionally because nothing other than 1Password is expected to touch this the formatting is subject to change at any point.

    How to do this the "right" way

    1Password refreshes when changes are made on other devices because of a notifier that listens to 1Password.com or updates to a sync file are detected. You won't be able to emulate the 1Password.com API (or shouldn't be able to, to the best of my knowledge) so the "best" way to do whatever it is you're trying to do is likely through OPVault sync files and Folder Sync. OPVault is a long standing and well documented format:

    OPVault design

    And you can read about Folder Sync here:

    Sync your 1Password data

    This won't allow you to emulate 1Password.com vaults, which are a little different than standalone vaults, but you can emulate standalone vaults this way. Does that help?

    Ben

  • allroundexperts
    allroundexperts
    Community Member
    Options

    @Ben Thank you for the quick response.
    I'm using dropbox as my sync folder. However, I've tried to edit the opvault file in there and the changes aren't getting picked up by the app even after a restart.

    Am I editing the wrong file?

    Thanks!

  • Ben
    Options

    Nope, that is the right file (keychain.opvault). If your changes aren't being reflected they're likely not valid or 1Password for Mac isn't configured to sync with that file.

    Ben

  • allroundexperts
    allroundexperts
    Community Member
    Options

    Great, Thanks for the help @Ben !

  • Ben
    Options

    You're very welcome. :)

    Ben

This discussion has been closed.