Use shared access group for macOS keychain secrets#14855
Closed
greg-openai wants to merge 7 commits intomainfrom
Closed
Use shared access group for macOS keychain secrets#14855greg-openai wants to merge 7 commits intomainfrom
greg-openai wants to merge 7 commits intomainfrom
Conversation
# Conflicts: # .github/actions/macos-code-sign/action.yml
ac9bfa4 to
4232b4c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
macOS keychain items are normally only accessible to the app that created them unless other builds are signed with a shared keychain access group. We want new Codex builds to converge on a shared secret container while older builds keep working with their legacy secrets during rollout.
Summary
codex-keyring-store2DC432GLL2.com.openai.codex.sharedMigration flow
flowchart TD A["New entitled Codex build reads secret"] --> B{"Shared item exists?"} B -->|Yes| C["Use shared item\n2DC432GLL2.com.openai.codex.shared"] B -->|No| D{"Legacy item exists?"} D -->|No| E["Return missing secret"] D -->|Yes| F["Read legacy item"] F --> G["Attempt to write shared copy"] G -->|Success| H["Return value and future reads prefer shared"] G -->|Failure| I["Return legacy value\nand keep legacy item unchanged"] J["New entitled Codex build writes secret"] --> K["Write shared item only"] K --> L["Legacy item is left untouched"] M["Older non-entitled build"] --> N["Continues reading legacy item"]Expected behavior
keychain-access-groupsentitlementNotes
SecItemUpdatekeychain-access-groupsare rejected by AMFI without the right provisioning context, so full end-to-end validation still has to happen in the signedCodex.app/ shipping pipelineTesting
cargo test -p codex-keyring-storecargo test -p codex-clijust fix -p codex-keyring-storejust fmt