Skip to content

feat: Make KeychainHelper behave the same on macOS and iOS - #207

Merged
PhilippeWeidmann merged 2 commits into
masterfrom
fix/keychain-macos
Nov 4, 2026
Merged

PhilippeWeidmann merged 2 commits into
masterfrom
fix/keychain-macos

Conversation

@PhilippeWeidmann

@PhilippeWeidmann PhilippeWeidmann commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

It’s highly recommended that you set the value of this key to true for all keychain operations. This key helps to improve the portability of your code across platforms. Use it unless you specifically need access to items previously stored in a legacy keychain in macOS.

https://developer.apple.com/documentation/security/ksecusedataprotectionkeychain

Copilot AI balanced review requested due to automatic review settings October 27, 2026 11:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Existing macOS credentials need migration before reads switch exclusively to the data-protection keychain.

1 open issue
What changed in this PR

This PR aligns KeychainHelper behavior on macOS and iOS by explicitly selecting the data-protection keychain.

Changes:

  • Applies the keychain selector to token reads, writes, updates, and deletions.
  • Uses the same selector for keychain accessibility checks and initialization.
File Description
Sources/​InfomaniakCore/​Account/​KeychainHelper.swift Consistently selects the data-protection keychain across all queries.

Review effort: Balanced

Comment thread .github/workflows/swiftformat.yml Dismissed
Comment thread .github/workflows/swiftlint.yml Dismissed
@sonarqubecloud

Copy link
Copy Markdown

@adrien-coye adrien-coye left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made sure no app today would risk anything.
kDrive Desktop V4 does not include at the moment this lib so we are fine on this side of things.

@PhilippeWeidmann
PhilippeWeidmann merged commit af81065 into master Nov 4, 2026
17 of 20 checks passed
@PhilippeWeidmann
PhilippeWeidmann deleted the fix/keychain-macos branch November 4, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants