yousefvand / secret-service

Service to keep secrets of applications
MIT License
85 stars 11 forks source link

secret-service cannot decrypt database #18

Closed Soulusions closed 1 year ago

Soulusions commented 1 year ago

Hey, I've been using secret-service for a couple weeks, it worked flawlessly for a while but recently credentials have become inaccessible, so after looking into the logs, I've come to find this and going through the docs hasn't really helped me pinpoint the issue... I'd simply like to know the best course of action in this case, whether I just screwed up some part of the config or my database somehow got corrupted and I have to delete it.

Thanks in advance!

Here's what the logs keep spitting out:

time="Wed, 08 Mar 2023 09:54:31 +0100" level=info msg="===== Secret Service Started ====="
time="Wed, 08 Mar 2023 09:54:31 +0100" level=info msg="Secret service dbus address: /org/freedesktop/secrets"
time="Wed, 08 Mar 2023 09:54:33 +0100" level=info msg="Loading data from: '/home/soul/.secret-service/secretserviced/db.json'"
time="Wed, 08 Mar 2023 09:54:33 +0100" level=panic msg="Cannot decrypt database. Error: GCM open failed: Err: cipher: message authentication failed"
yousefvand commented 1 year ago

As log says service cannot decrypt your database. This happens when you try to open a database encrypted with one password and try to decrypt it with another password. Remember reinstalling secret-service changes the password. solution is stopping service, deleting database and starting service.

Soulusions commented 1 year ago

Alright, did just that and it works now, thanks!