Closed phil1995 closed 5 months ago
The project has undergone a significant update, enhancing the authentication flow with the Cryptomator Hub. It now supports a new cryptographic library, SwiftECC, and includes UI updates for account key entry. The authentication process has been refined with additional error handling and a minimum hub version requirement. The JWEHelper has been expanded with new encryption and decryption methods, and the tests have been updated to cover the new functionality.
File Path | Change Summary |
---|---|
CryptomatorCommon/Package.swift |
Updated Swift tools to 5.9, added "SwiftECC" dependency, included "SwiftUIIntrospect" and "SwiftECC" in products. |
CryptomatorCommon/Sources/CryptomatorCommonCore/Hub/*.swift |
Refactored authentication enums, added new methods and constants, updated protocols and UI elements for account key handling. Introduces a new method in HubAuthenticationCoordinator extension. |
CryptomatorCommon/Sources/CryptomatorCommonCore/JWEHelper.swift |
Renamed and added methods for key decryption and encryption, added private key extension. |
CryptomatorCommon/Sources/CryptomatorCommonCore/SwiftUI/SwiftUI+CustomKeyboard.swift |
Added extensions for custom keyboard functionality. |
CryptomatorCommon/Tests/CryptomatorCommonCoreTests/Hub/HubAuthenticationViewModelTests.swift ,CryptomatorCommon/Tests/CryptomatorCommonCoreTests/Hub/JWEHelperTests.swift |
Updated tests for new authentication flow and JWEHelper methods. |
SharedResources/en.lproj/Localizable.strings |
Added new keys for hub authentication messages. |
.github/workflows/build.yml |
Added a step to select Xcode 15.1 using sudo xcode-select command. |
Cryptomator.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved |
Additions and updates to remote source control dependencies. |
🐇✨ A hop of code, a leap of Swift,
Encryption's gift, now set adrift.
Keys entwine in a silent ballet,
Cryptomator's dance, secure they'll stay. 🌟🔐
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@coderabbitai review
cloud-access-swift
1.9.0 has been released and can be used now.
Adds support for the updated Device Registration and Unlock which has been introduced with Cryptomator Hub 1.3.0. For more details about the updated flow see https://github.com/cryptomator/cryptomator/pull/3041 and https://github.com/cryptomator/cryptomator/issues/3181. Unlike the Cryptomator Desktop App we removed the support for Cryptomator Hub instances with a minimum API level of 0, i.e. Cryptomator Hub < 1.3.0. Therefore, we request the API config at (
<API-BASE-URL>/config/
and check thatapiLevel >= 1
.This can't be merged at the current state because we still need to update
cloud-access-swift
to use the latestJOSESwift
branch which adds support forPBES2_HS512_A256KW
(needed to decrypt the user key). Additionally we need to update theHubConfig
to the following:Also the localization for the authentication errors is still missing.
I have added a new dependency https://github.com/leif-ibsen/SwiftECC. The only reason it has been added is to support PKCS#8 since CryptoKit does not support it out of the box. We can exchange this later with our own implementation in
cryptolib-swift
if we want.Summary by CodeRabbit
New Features
Enhancements
Refactor
Tests
Documentation