Skip to content

OscKernelKeyringBackend breaks keyring users which expect get_password() to return None or stringΒ #1

@wstephenson

Description

@wstephenson

Just spent a while debugging why gimme-aws-creds suddenly stopped working for me, and have narrowed it down to OscKernelKeyringBackend.get_password() returning _RetrieverFactory in the case of a non-existent password, as documented in osc.py. I installed osc for the first time on this machine recently and it apparently pulled in python310-keyring-keyutils.

Error, for search engines to find: TypeError: Object of type _PasswordRetriever is not JSON serializable

This behaviour is out of spec according to keyring's backend unit tests
Backends which don't have a password should only return None.

This breaks any program using keyring's default behaviour when no backend contains the password, because by default keyring sorts all backends by priority and tries them all in order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions