Repository navigation
Closed
Labels
Description
Problem Description
After a devcontainer rebuild from a new image, devops devcontainer unlock-keyring rejects the keyring password. The user typed the same password as before the rebuild. We need to find out why.
Reproduction Steps
- Use a devcontainer and set a keyring password with
devops devcontainer unlock-keyring. - Rebuild the devcontainer from a new image. The home directory keeps
~/.local/share/keyrings/login.keyring. - Run
devops devcontainer unlock-keyringand type the same password.
Expected vs Actual Behavior
Expected: the keyring unlocks with the password that was set before the rebuild.
Actual: Wrong password; the keyring is still locked. The prompt was Keyring password:, so an existing login.keyring was found. The file date is before the rebuild.
Environment Diagnostics
- gnome-keyring-daemon 51.1 in the new image. The version in the old image is unknown.
login.keyringhas the headerGnomeKeyring\n\r\0\n, so it is a valid encrypted keyring. It is 719 bytes.- The shell is zsh.
Findings so far
_unlock_keyringinsrc/devops_cli/commands/devcontainer.pysends the raw password tognome-keyring-daemon --replace --unlock --components=secrets. It adds no newline, and this code has not changed in git history.- In a new temporary keyring on 51.1, create then unlock with the same password works. The same password with a trailing newline fails.
- On a copy of the user's file, the daemon rejects the password as typed and with a trailing newline.
Hypotheses to test
- The file was created with a password other than the one the user remembers (for example by an earlier first run or by another tool).
- The old image used a different gnome-keyring version that stored or checked the password in another way.
- The password has non-ASCII characters, and the locale or encoding differs between images.
- The persisted file and a fresh daemon or D-Bus state disagree after a rebuild (for example a stale
.keyring-unlock-pendingmarker or a shared /tmp volume).
Done when
- The cause is known and recorded here, with evidence.
- A fix or a failing check exists, or this issue says why none is possible.
unlock-keyringgives a clear way forward when an existing keyring rejects the password.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 27, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The candidate describes a bug in how the devcontainer handles keyring password unlocking after a rebuild.This is a medium priority because it affects development workflow but does not block core functionality.The fix improves usability for developers using devcontainers, which is valuable but not critical to all users.Finding the root cause of a keyring password issue involves complex interactions between system libraries and may require deep debugging.Both items relate to keyring handling but ask for different changes: one fixes a devcontainer issue with keyring unlocking, the other refactors keyring usage across functions.dan-petty commentedon Oct 27, 2026
Root Cause Analysis and Evidence
Summary
The rejection of the keyring password after rebuilding the devcontainer is caused by a password mismatch between the entered password and the password used to encrypt the persisted keyring file (Hypothesis 1).
Analysis of Hypotheses
Hypothesis 2: gnome-keyring version or format change (Disproven)
gnome-keyringsource code (pkcs11/secret-store/gkm-secret-binary.c,egg/egg-symkey.c) confirms that the binary keyring format (GnomeKeyring\n\r\0\n, AES-128-CBC, SHA-256 key derivation with salt and iterations, MD5 integrity check) has remained unchanged across versions (42 through 51.1).Hypothesis 4: Stale marker or shared
/tmp/ D-Bus state (Disproven)XDG_DATA_HOME,XDG_RUNTIME_DIR, and a new D-Bus session.locked: True), whereas a freshly created keyring in the identical environment unlocked successfully.Hypothesis 3: Non-ASCII characters or encoding differences (Disproven)
Hypothesis 1: Keyring created with a different password (Confirmed)
~/.local/share/keyrings/login.keyringacross image rebuilds.devops devcontainer unlock-keyringruns after a rebuild, it finds the pre-existing keyring file from before the rebuild.Remediation and Way Forward
devops devcontainer unlock-keyringis updated to provide a clear path forward when an existing keyring rejects the password. The error message explicitly names the keyring file and provides the exact command to move the old file to a backup and unlock a fresh keyring:Wrong password; the keyring is still locked. To reset the keyring, move <path> to a backup file and run 'devops devcontainer unlock-keyring'.