Share credentials via the data-protection keychain so the File Provider extension can authenticate#18
Merged
Merged
Conversation
The token was stored in the file-based login keychain with no access group. The app could read it, but the File Provider extension — a separate binary whose code signature changes when Sparkle replaces the bundle — could not, because file-based keychain access is bound to specific code rather than to an entitlement. The domain then showed as "signed out" in Finder and "Open in Finder" did nothing, even though the app itself was signed in and syncing. Store credentials in the data-protection keychain, where the app and extension share items through their common keychain-access-group entitlement; access is granted by entitlement, so it survives the app being re-signed. retrieveToken transparently migrates any token left in the legacy file-based keychain forward, so existing users don't have to sign in again.
Nightly BuildDownload Findle Nightly (unsigned) Built from 5c3c4cf. Important This build is unsigned. macOS will block it on first launch. To open 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.
Summary
After updating to the fixed 0.2.0, the app signs in and syncs, but Finder shows the domain as "signed out" and Open in Finder does nothing.
Root cause: the auth token lived in the file-based login keychain with no access group (confirmed on disk via
security find-generic-password). The app can read it, but the File Provider extension is a separate binary whose code signature changes when Sparkle replaces the bundle — and file-based keychain access is bound to specific code, not to an entitlement. So the extension'sisAuthenticatedcheck (which requires reading the token) fails and the domain reports not-authenticated, which also leavesgetUserVisibleURL(Open in Finder) unable to resolve.The DB side is already correct: the container holds the site, a connected account, and 177 items —
databaseIsReadypasses. The only failing gate is the keychain read.Fix
Store credentials in the data-protection keychain, where the app and extension share items through their common
keychain-access-groupentitlement. Access is granted by entitlement, so it survives re-signing.retrieveTokentransparently migrates any token still in the legacy file-based keychain forward, so existing users don't have to sign in again.Notes