macos-l4: sysext-owned MITM CA, SE-encrypted, XPC-rotated#378
Open
macos-l4: sysext-owned MITM CA, SE-encrypted, XPC-rotated#378
Conversation
Sysext now mints and persists the CA via Secure Enclave in the System Keychain. Container forwards a legacy PEM only as graceful passthrough, retired on commit. Two XPC routes drive rotation: generate-ca-crt parks pending, commit-ca-crt persists + swaps. Hard-fails without SE. clean-secrets removed; delete-ca-crt replaces it.
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.
Container no longer mints or stores the MITM CA. Sysext owns it: minted
in-process, encrypted via Secure Enclave, persisted to the System
Keychain. Hard-fails without SE. Two-phase rotation over XPC, with the
pending CA served via the hijack endpoint so callers can install trust
before the swap.
Pre-PR installs stored the CA in the host's data-protection keychain.
That entry is honored as run-only passthrough until the first commit;
the sysext always prefers an SE-backed CA when one exists.
Rotate the active CA
just macos-l4-cli generate-ca-crt— sysext mints a fresh CA,parks it as pending, hijack endpoint starts serving it. Active TLS
stays on the previous CA. Stdout:
cert_der_b64: <b64>.(can also ofc be retrieved via hijack domain as per usual)
just macos-l4-cli commit-ca-crt— persist + atomic swap.Retires legacy entries on success. Stdout:
previous_cert_der_b64: <b64>(empty if nothing displaced).Non-zero exit if commit succeeded but legacy cleanup failed — run
just macos-l4-cli cleanup-legacy-ca-crtto retry.Move an existing install off legacy
just macos-l4-startforwards legacy via opaque config (run-only); a singlejust macos-l4-cli generate-ca-crt+just macos-l4-cli commit-ca-crtretires it.just macos-l4-cli cleanup-legacy-ca-crtretires legacy without touching the active CA.just macos-l4-cli delete-ca-crtis the full reset (legacy + SE entries).Summary by Aikido
🚀 New Features
⚡ Enhancements
🔧 Refactors
More info