Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New gnome keyring #73

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open

New gnome keyring #73

wants to merge 42 commits into from

Commits on May 6, 2024

  1. wip: secret-server backend implementation

    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    Co-Author: Bilal Elmoussaoui <belmouss@redhat.com>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    9a2a5bd View commit details
    Browse the repository at this point in the history
  2. Update Collection::new()

    Updated how Collection objectpath is generated.
    Introduced created: u64, parameter to supply the date, rather than create
    it inside new()
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    2e06e26 View commit details
    Browse the repository at this point in the history
  3. Add set_collections() setter and update create_collection()

    Since Collection is not using and cannot be implemented (easily)
    Copy or Clone traits, the only way to clone a struct Collection
    is call Collection::new() passing getter values.
    
    Removed set_collections() setter.
    See: #73 (comment)
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    2b50ce9 View commit details
    Browse the repository at this point in the history
  4. Adds a way to store a session

    This introduces ServiceManager struct.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    ec9e3ca View commit details
    Browse the repository at this point in the history
  5. Update Secret Service read_alias(), set_alias() and collections()

    These changes update Secret Service alias methods and collections property
    to be async and fix the following errors,
    "`await` is only allowed inside `async` functions and blocks",
    "cannot return value referencing temporary value"
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    865d833 View commit details
    Browse the repository at this point in the history
  6. Update Secret Session implementation

    Session now implements Clone trait.
    Has manager field.
    client_public_key field now has an Arc
    
    Also, adds remove_session() for ServiceManager
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    193bf62 View commit details
    Browse the repository at this point in the history
  7. Wraps manager field inside Mutex

    So, we can mutate manager.sessions via insert_session() and remove_session()
    Also, updates open_session() to insert the newly created session to
    manager.sessions
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    2f80f43 View commit details
    Browse the repository at this point in the history
  8. Updates ServiceManager

    Removed RwLock wrapper from sessions
    Removed async from all the methods
    
    See: #73 (comment)
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    15d6518 View commit details
    Browse the repository at this point in the history
  9. Updates open_session() to serve newly created Session

    Adds sessions_counter field to Service
    Sets proper objectpath for a Session
    Updated Session::close to call ServiceManager::remove_session()
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    ac5a573 View commit details
    Browse the repository at this point in the history
  10. Updates collection and session objectpath constants

    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    b230430 View commit details
    Browse the repository at this point in the history
  11. Adds proper key generation and exchange

    This change adds proper key generation and exchange to open_session()
    service method and removes temporary key.
    Also updates Session::new() to return a Self instance rather than a
    tuple: (instance, key)
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    53f6e2a View commit details
    Browse the repository at this point in the history
  12. Introduce server side Secret API

    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    8d2fa43 View commit details
    Browse the repository at this point in the history
  13. Update server side Item

    This change add parameters and content_type fields and their getters.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    80f6716 View commit details
    Browse the repository at this point in the history
  14. Update org.freedesktop.Secret.Collection CreateItem

    This change update CreateItem to encrypt the secret based on the AES key
    retrieved from session.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    546db12 View commit details
    Browse the repository at this point in the history
  15. Update org.freedesktop.Secret.Item GetSecret

    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    0b37c65 View commit details
    Browse the repository at this point in the history
  16. Removes ServiceManager::new()

    Introduced Derive(Default) instead.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    4ff3472 View commit details
    Browse the repository at this point in the history
  17. Adds missing zbus macros to Item properties

    Also, removes unused modified() from Collection.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    e25a9ca View commit details
    Browse the repository at this point in the history
  18. Implements clone trait for Collection

    Also updates CreateCollection service method and removes unused created()
    from Collection.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    8a5c135 View commit details
    Browse the repository at this point in the history
  19. Update GetSecret to handle invalid Session

    Now GetSecret can properly handle an invalid Session, rather than
    crashing/panicking.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    43483cf View commit details
    Browse the repository at this point in the history
  20. Adds service name and objectpath handling based on compilation type

    Compilation types support: debug and release.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    660cb62 View commit details
    Browse the repository at this point in the history
  21. Updates set_locked() to emit collection_changed service signal

    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    e0e7773 View commit details
    Browse the repository at this point in the history
  22. Updates Secret Session interface name

    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    7b4b219 View commit details
    Browse the repository at this point in the history
  23. Set org.freedesktop.Secret.Item objectpath properly

    This change properly sets the Item objectpath according to gnome-keyring.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    9d96228 View commit details
    Browse the repository at this point in the history
  24. Remove alias from org.freedesktop.Secret.Collection objectpath

    gnome-keyring uses the label to identify a Collection.
    Alias is set later.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    d320d3b View commit details
    Browse the repository at this point in the history
  25. Adds --login option to pass the login keyring password to the daemon

    oo7-daemon can now retrieve the login.keyring password from stdin.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    d97be22 View commit details
    Browse the repository at this point in the history
  26. Init default/login.keyring

    This change fixes the login.keyring being missing from the
    `org.freedesktop.secrets` objects tree.
    Also,
    Implemented Clone trait for Service.
    Implemented Clone trait for Item.
    Updated Item::create_item.
    Fixed all the server side clippy warnings.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    b824434 View commit details
    Browse the repository at this point in the history
  27. Fix invalid value: character error when creating Devel Objectpaths

    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    9fb9f57 View commit details
    Browse the repository at this point in the history
  28. Removed item.unwrap()

    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    6e630a2 View commit details
    Browse the repository at this point in the history
  29. Implement review requests

    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    8f5d1d5 View commit details
    Browse the repository at this point in the history
  30. Modify Service::new() to handle empty password

    Login password can't be empty. So, included a `panic!` to handle it.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 6, 2024
    Configuration menu
    Copy the full SHA
    9670b42 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2024

  1. client: expose decrypt

    Need this change for the server side Prompt implementation.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 12, 2024
    Configuration menu
    Copy the full SHA
    c10a629 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. client: expose Key::new()

    Needed for server side SecretExchange implementation.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 13, 2024
    Configuration menu
    Copy the full SHA
    81ee71c View commit details
    Browse the repository at this point in the history
  2. Add SecretExchange implementation

    SecretExchange allows exchange of secrets between two processes on the
    same system without exposing those secrets.
    
    See https://gnome.pages.gitlab.gnome.org/gcr/gcr-4/class.SecretExchange.html
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 13, 2024
    Configuration menu
    Copy the full SHA
    52e1392 View commit details
    Browse the repository at this point in the history
  3. Expose SecretExchange

    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 13, 2024
    Configuration menu
    Copy the full SHA
    8ebef89 View commit details
    Browse the repository at this point in the history

Commits on May 16, 2024

  1. Fix formatting error

    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 16, 2024
    Configuration menu
    Copy the full SHA
    a16e39e View commit details
    Browse the repository at this point in the history

Commits on May 17, 2024

  1. Add SecretExchange payload parsing

    As in the GCRSecretExchange implementation, now the payload: `exchange`
    is a String.
    Introduced encode/decode operations to parse a HashMap into a String or
    the other way.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed May 17, 2024
    Configuration menu
    Copy the full SHA
    eb1e0f8 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2024

  1. Integrate legacy keyring migration support

    This change replaces call to `Keyring::load()` with `Keyring::open()`
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed Jun 1, 2024
    Configuration menu
    Copy the full SHA
    8036ba0 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2024

  1. Add gcr Prompter interface implementation

    This change adds org.gnome.keyring.Prompter interface implementations.
    Missing PrompterCallback::prompt_ready() implementation and
    test: test_prompt() need to update.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    22e1f86 View commit details
    Browse the repository at this point in the history
  2. Add Secret.Service.Prompt interface implementation

    TODO:
    Complete prompt() method implementation.
    Complete completed() signal implementation.
    Code cleanup.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    4530a0b View commit details
    Browse the repository at this point in the history
  3. Updates prompt needed service methods

    This change updates Service:CreateCollection, Service:Unlock, Service:Lock
    and Item:Delete.
    
    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    fc9bc20 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2024

  1. Fix Signature mismatch: got 's', expected 'ms' error

    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    18fdc52 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2024

  1. Add prompter callback counter to ServiceManager

    Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
    warusadura committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    bd24c11 View commit details
    Browse the repository at this point in the history