Skip to content

fix(devcontainer): a rejected unlock password becomes the keyring password - #4249

Merged
dan-petty merged 3 commits into
mainfrom
fix/4240-keyring-rekey
Nov 9, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/4240-keyring-rekey

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

gnome-keyring keeps the last password that --unlock rejects. After a later unlock through its GUI prompt, it changes the login keyring password to that rejected password, with no message. The VS Code lifecycle terminal sends each key two times, so the post-start prompt always gave a rejected password, and the keyring became unreadable three times.

  • The session bus and gnome-keyring-daemon start without DISPLAY and WAYLAND_DISPLAY, so the GUI prompt cannot open.
  • post-start does not ask for the password. The first interactive terminal asks.
  • After each successful unlock, unlock-keyring copies login.keyring to keyrings/backups/ and keeps the 10 newest different copies. The wrong-password error names that folder.

Closes #4240

Change: openspec/changes/archive/2026-11-09-4240-a-rejected-unlock-password-becomes-the/

…sword

gnome-keyring keeps the last password that --unlock rejected, and its GUI unlock prompt then changes the login keyring password to it. The VS Code lifecycle terminal sends each key twice, so the post-start prompt always gave a rejected password.

- Start the session bus and gnome-keyring-daemon without DISPLAY and WAYLAND_DISPLAY, so the GUI prompt cannot open.
- Remove the post-start password prompt and its timeout; the first interactive terminal asks.
- Copy login.keyring to keyrings/backups after each successful unlock, keep the 10 newest different copies, and name the folder in the wrong-password error.

Closes #4240
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/devcontainer The DevContainer, its image and its features labels Nov 9, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Checks before the push:

  • devops ci fail-to-pass --base origin/main: 6 tests fail on the base and pass on the branch (test_the_session_bus_gets_no_display, test_unlock_keyring_gives_the_daemon_no_display, test_unlock_keyring_reports_a_wrong_password, test_post_start_leaves_the_keyring_password_to_the_first_terminal, test_a_successful_unlock_keeps_a_copy_of_the_keyring, test_only_the_newest_keyring_copies_are_kept). 108 pass on both.
  • tests/commands/test_devcontainer.py: 115 passed. tests/invariants: 649 passed. devops ci docs: up to date. devops openspec archive: every spec and change validates.

Evidence for the cause (also in #4240 and the proposal's Feasibility section):

  • gnome-keyring 51.1 source: gkd-login.c keeps a rejected --unlock password; gkm-wrap-prompt.c fix_login_keyring_if_unlock_failed sets it as the master password after a GUI prompt unlock.
  • The two lost keyring files opened only with the correct password with every character doubled (5,355 variants tried).
  • Sandbox: a client unlock request on a bus with no display returns "dismissed" after 0.0 s, so no client hangs.

Pending a person: review the diff in tuicr (tuicr -r origin/main..HEAD).

@dan-petty
dan-petty marked this pull request as ready for review November 9, 2026 17:16
@dan-petty
dan-petty enabled auto-merge (squash) November 9, 2026 17:16
@dan-petty
dan-petty merged commit cc3d22e into main Nov 9, 2026
26 checks passed
@dan-petty
dan-petty deleted the fix/4240-keyring-rekey branch November 9, 2026 17:21
dan-petty pushed a commit that referenced this pull request Nov 9, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.101.1](v0.101.0...v0.101.1)
(2026-11-09)


### Bug Fixes

* **devcontainer:** a rejected unlock password becomes the keyring
password ([#4249](#4249))
([cc3d22e](cc3d22e))
* **roadmap:** count the reported input in the run window estimate
([#4238](#4238))
([af9c27a](af9c27a))
* **roadmap:** send one tool call at a time to a Claude group
([#4243](#4243))
([b855601](b855601))


### Code Refactoring

* **ai:** replace PydanticAgent with pydantic-ai Agent
([#4237](#4237))
([5edd7a5](5edd7a5))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/devcontainer The DevContainer, its image and its features type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(devcontainer): a rejected unlock password becomes the keyring password

1 participant