[GH-ISSUE #4912] Launcher on macOS: the keychain re-asks for every secret item after each update #1486

Closed
opened 2026-11-02 15:47:20 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @socksprox on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4912

Originally assigned to: @socksprox on GitHub.

🤖 Filed by socksprox's AI agent (Devin, SWE-2 High), not by socksprox personally.

What happens

On macOS, a launcher start that follows a self-update shows "Horizon wants to use your confidential information stored in "dev.playhorizon.launcher"" once per stored keychain item — several prompts in a row (allow one, three more appear). "Always Allow" does not survive the next update, so the prompts come back almost every start.

Why

Two things compound:

  1. Every account's secret is split over several items. Credential Manager on Windows caps an item at 2560 bytes, so account.rs splits secrets into <=1000-byte pieces under <uuid>, <uuid>.1, <uuid>.2, ... — on macOS too, where no such limit exists. macOS tracks consent per item: each piece prompts separately, and set/delete touch every piece again.
  2. Shipped builds are signed ad hoc. codesign -dv on the released Horizon.app shows Signature=adhoc with designated => cdhash ..., so "Always Allow" records trust for that exact binary hash. Every launcher update changes the cdhash, so consent is re-asked after every update — and launcher releases ship several times a day.

Accounts::has_owner also walks the accounts in list order, reading each account's items until an owner is found, instead of checking the selected account first.

The fix

  • macOS: keep the whole secret in the account's one item (the piece layout stays Windows-only, where the 2560-byte limit is real). Reads already concatenate key, key.1, ..., so old split secrets fold into the single item on first read and writes remove leftover pieces. Older launchers read a merged item correctly — it is "piece 0" to them — so the layouts interoperate both ways.
  • has_owner: check the selected account first; when it owns the game that is one item read, not every account's.

That leaves at most one prompt per account touched per new signature — typically a single prompt after an update. Removing the prompt entirely on ad hoc builds is not possible in code: it is inherent to cdhash trust. Signing the shipped builds (MACOS_SIGN_IDENTITY, packaging/macos/README.md) would end it for good, but that is a release-infrastructure decision, out of scope here.

Originally created by @socksprox on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4912 Originally assigned to: @socksprox on GitHub. > 🤖 Filed by socksprox's AI agent (Devin, SWE-2 High), not by socksprox personally. ## What happens On macOS, a launcher start that follows a self-update shows "Horizon wants to use your confidential information stored in \"dev.playhorizon.launcher\"" once per stored keychain item — several prompts in a row (allow one, three more appear). "Always Allow" does not survive the next update, so the prompts come back almost every start. ## Why Two things compound: 1. **Every account's secret is split over several items.** Credential Manager on Windows caps an item at 2560 bytes, so `account.rs` splits secrets into <=1000-byte pieces under `<uuid>`, `<uuid>.1`, `<uuid>.2`, ... — on macOS too, where no such limit exists. macOS tracks consent per item: each piece prompts separately, and `set`/`delete` touch every piece again. 2. **Shipped builds are signed ad hoc.** `codesign -dv` on the released `Horizon.app` shows `Signature=adhoc` with `designated => cdhash ...`, so "Always Allow" records trust for that exact binary hash. Every launcher update changes the cdhash, so consent is re-asked after every update — and launcher releases ship several times a day. `Accounts::has_owner` also walks the accounts in list order, reading each account's items until an owner is found, instead of checking the selected account first. ## The fix - macOS: keep the whole secret in the account's one item (the piece layout stays Windows-only, where the 2560-byte limit is real). Reads already concatenate `key`, `key.1`, ..., so old split secrets fold into the single item on first read and writes remove leftover pieces. Older launchers read a merged item correctly — it is "piece 0" to them — so the layouts interoperate both ways. - `has_owner`: check the selected account first; when it owns the game that is one item read, not every account's. That leaves at most one prompt per account touched per new signature — typically a single prompt after an update. Removing the prompt entirely on ad hoc builds is not possible in code: it is inherent to `cdhash` trust. Signing the shipped builds (`MACOS_SIGN_IDENTITY`, `packaging/macos/README.md`) would end it for good, but that is a release-infrastructure decision, out of scope here.
Author
Owner

@socksprox commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6537891446 --> @socksprox commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1486
No description provided.