jaraco / jaraco/keyring

libsecret headless check?

Open
#561 3 comments 0 reactions 0 assignees View on GitHub
help wanted Linux
Dominant language
Python
Stars
1.5k
Forks
196
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

I'm trying to debug an issue in another library and it seems to stem from the libsecret backend failing in `get_password`:
https://github.com/jaraco/keyring/blob/eb1a04a42617131a35ed8b6089f8889e6054bcb1/keyring/backends/libsecret.py#L65-L68

The environment is a GitHub Action (ubuntu), and the error is `g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)
`. Here's a link to the action output: https://github.com/dropseed/workhorse/runs/5160584552?check_suite_focus=true#step:3:263

I found some other discussion about headless, but I guess what I'm wondering is whether there could be some kind of check in libsecret `priority` (or elsewhere) that would prevent it from using that keyring in the first place?
https://github.com/jaraco/keyring/blob/eb1a04a42617131a35ed8b6089f8889e6054bcb1/keyring/backends/libsecret.py#L45-L52

I'm not familiar enough with the details, but I see some stuff that looks a little like that in the kwallet backend:
https://github.com/jaraco/keyring/blob/eb1a04a42617131a35ed8b6089f8889e6054bcb1/keyring/backends/kwallet.py#L40-L58

Or is there some way that it is their responsibility to use `get_keyring` differently?
https://github.com/python-poetry/poetry/blob/7cc684981983963dc202e1a249a4b66667b468bd/src/poetry/utils/password_manager.py#L86-L95

Thanks!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with keyring/backends/libsecret.py at the linked priority and get_password sections, then compare the headless handling in keyring/backends/kwallet.py. Reproduce the GitHub Actions error if possible and determine whether backend selection or the caller's get_keyring usage should address it; done means the headless behavior and responsible layer are clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.