After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679864 - libsecret migration
libsecret migration
Status: RESOLVED FIXED
Product: vinagre
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: vinagre-maint
vinagre-maint
Depends on:
Blocks: 679893
 
 
Reported: 2012-07-13 14:50 UTC by Stef Walter
Modified: 2012-08-20 21:57 UTC
See Also:
GNOME target: 3.6
GNOME version: ---


Attachments
WIP patch to migrate to libsecret (12.08 KB, patch)
2012-07-13 14:50 UTC, Stef Walter
none Details | Review
WIP patch to migrate to libsecret (12.08 KB, patch)
2012-07-14 06:51 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2012-07-13 14:50:02 UTC
Created attachment 218731 [details] [review]
WIP patch to migrate to libsecret

libsecret is a new client for the Secret Service DBus API. The Secret Service
allows storage of passwords in a common way on the desktop. Supported by
gnome-keyring and ksecretservice.

libsecret solves many problems with libgnome-keyring. Relevant to
vinagre: it solves threading issues, uses GDBus instead of dbus-glib.

A future GNOME goal will be to migrate away from libgnome-keyring to libsecret:

https://live.gnome.org/GnomeGoals/LibsecretMigration

I've done a rough WIP patch in order to make sure that the libsecret API
covered all the use cases. I'll attach that patch here. I hope the patch is a
help for the migration, but I don't plan to iterate on it at the current time.

Some notes about the patch:

 * Ideally vino would use its own password schema, and not use 
   SECRET_SCHEMA_COMPAT_NETWORK (which is the successor of
   gnome_keyring_set_network_password() and friends). By using its own
   password schema seahorse and other applications can better identify
   the passwords that vino stores. But of course changing isn't so simple
   as it would break for already stored passwords.
 * It would be good to set intelligent labels on the stored keyring items.
   I've tried to come up with some, but you may be able to do better using
   the human readable protocol name in the label.
 * I haven't tested the patch. I'm not familiar with how to trigger all the
   various code paths and logic.
 * secret_password_remove_sync() removes all unlocked passwords that match
   the attributes. This is different behavior than what used to happen
   previously. If you wish to get the old behavior you can do so using
   secret_service_search() and secret_item_delete(). In addition if you
   really wish to track the exact identifier of the item stored, you can
   do so with secret_item_create().
Comment 1 Olav Vitters 2012-07-13 20:41:56 UTC
Per r-t: Targetting GNOME 3.6
Comment 2 Stef Walter 2012-07-14 06:51:08 UTC
Created attachment 218793 [details] [review]
WIP patch to migrate to libsecret

Updated for last minute api change.

The above comment should say:
 * secret_password_clear_sync() removes all unlocked passwords that match
   the attributes. This is different behavior than what used to happen
   previously. If you wish to get the old behavior you can do so using
   secret_service_search() and secret_item_delete(). In addition if you
   really wish to track the exact identifier of the item stored, you can
   do so with secret_item_create().
Comment 3 Stef Walter 2012-07-14 11:20:13 UTC
Just a heads up: Please look at the patch critically. I did the patch as a way to try out the API, and it's not ready to commit. There may be memory leaks or other logic errors. Most libsecret getters return data that must be unreferenced or freed.
Comment 4 David King 2012-08-20 21:57:08 UTC
Comment on attachment 218793 [details] [review]
WIP patch to migrate to libsecret

Pushed to master as commit ff798d9f73c65ad507573a11aeffd552ec4f0261. Thanks a lot for the patch Stef! If there are any regressions (I only tested quickly) I will sort them after the freeze.