buxx / trsync

Tracim synchronization tool
MIT License
13 stars 2 forks source link

bug: password not found in secret manager #81

Open yvan-algoo opened 1 month ago

yvan-algoo commented 1 month ago

Hi Bux,

I would like trsync_manager to retrieve the Tracim instance password has described in the README:

trsync_manager will try to get passwords from system secret manager with key trsync::<instance name> and current logged user as user.

ERROR trsync_core::config] Unable to read password from config for instance 'algoo.tracim.fr' and user 'yvan', this instance will be ignored : 'No matching entry found in secure storage'

Do you have a idea about what I am doing wrong?

Thanks, Yvan

buxx commented 1 month ago

Hello @yvan-algoo ! I have to investigate a bit to take a look about which key is expected in secret manager. Hope find some time in next days :)

buxx commented 1 month ago

@yvan-algoo I think the documentation is wrong and the key should be (example for mon.tracim.fr) : trsync::mon.tracim.fr.

buxx commented 1 month ago

@yvan-algoo If you are using trsync_manager standalone (without trsync_systray). Please not I just updated the repository with fixed version.

I'm publishing a new release.

buxx commented 1 month ago

@yvan-algoo I found how password should be manually stored. I updated the doc : https://github.com/buxx/trsync/commit/51ffeab4ac374f2ffc46121f7c70b0cd6272e92c

yvan-algoo commented 1 month ago

Thanks @buxx ! I tried what you explain but trsync still doesn't find the password. I don't know how these secret managers are queried, but maybe it is just Seahorse that is not "standard" and thus not compatible with trsync?

buxx commented 1 month ago

@yvan-algoo Seahorse is just a graphic interface for system secret manager. I tested with success deployment of trsync_manager and manually set password with

secret-tool store --label "TrSync MyInstance" application rust-keyring service trsync::<instance address> username <linux logged username>

Are you able to "read" the password with command

secret-tool lookup application rust-keyring service trsync::<instance address like mon.tracim.fr> username <linux user like root>

?

yvan-algoo commented 1 month ago

Thanks for the explanation! It works now for me.

Here is what I understood, based on your explanations, my reading and some testing. It may be obvious but it was not for me, so it might be useful for others:

Maybe @buxx you could also add to the README.md the required attributes (application, service and username, and maybe schema)?

Thanks again :-)