From 11745d2ccaaec337995546211da3739b455d61e1 Mon Sep 17 00:00:00 2001 From: Murali Date: Wed, 17 Jan 2024 16:42:41 +0530 Subject: [PATCH 1/8] fix: uptake at_chops major version --- .../abstract_atkey_encryption.dart | 13 ++++++++++--- packages/at_client/pubspec.yaml | 8 ++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/packages/at_client/lib/src/encryption_service/abstract_atkey_encryption.dart b/packages/at_client/lib/src/encryption_service/abstract_atkey_encryption.dart index 78612f25a..a60d7d27b 100644 --- a/packages/at_client/lib/src/encryption_service/abstract_atkey_encryption.dart +++ b/packages/at_client/lib/src/encryption_service/abstract_atkey_encryption.dart @@ -209,14 +209,21 @@ abstract class AbstractAtKeyEncryption implements AtKeyEncryption { } /// (ii) Encrypt the symmetric key with their public key - theirEncryptedCopy = - EncryptionUtil.encryptKey(symmetricKeyBase64, sharedWithPublicKey); + // theirEncryptedCopy = + // EncryptionUtil.encryptKey(symmetricKeyBase64, sharedWithPublicKey); + var rsaEncryptionAlgo = DefaultEncryptionAlgo(); + rsaEncryptionAlgo.atPublicKey = AtPublicKey.fromString(sharedWithPublicKey); + var encryptionResult = _atClient.atChops!.encryptString( + symmetricKeyBase64, EncryptionKeyType.rsa2048, + encryptionAlgorithm: rsaEncryptionAlgo); + // _logger.info('encrypt key result from AtChops: ${encryptionResult.result}'); + theirEncryptedCopy = encryptionResult.result; /// - (b) save encrypted copy to atServer _logger.info( "Saving 'their' copy of shared symmetric key for ${atKey.sharedWith} to atServer"); await storeTheirCopyOfEncryptedSharedKeyToSecondary( - atKey, theirEncryptedCopy, + atKey, theirEncryptedCopy!, secondary: _atClient.getRemoteSecondary()!); /// - (c) save encrypted copy to local storage and return diff --git a/packages/at_client/pubspec.yaml b/packages/at_client/pubspec.yaml index b02c4112e..8067f23d5 100644 --- a/packages/at_client/pubspec.yaml +++ b/packages/at_client/pubspec.yaml @@ -40,6 +40,14 @@ dependencies: meta: ^1.8.0 version: ^3.0.2 +dependency_overrides: + at_chops: +# path: ../../../at_libraries/packages/at_chops + git: + url: https://github.com/atsign-foundation/at_libraries + path: packages/at_chops + ref: pass_optional_key_params + dev_dependencies: lints: ^2.1.1 test: ^1.21.4 From a20ffa428896d06b05f9f4a6c49936590711f24e Mon Sep 17 00:00:00 2001 From: Murali Date: Wed, 17 Jan 2024 17:10:33 +0530 Subject: [PATCH 2/8] fix: change pubspec for functional and end2endtest --- tests/at_end2end_test/pubspec.yaml | 6 ++++++ tests/at_functional_test/pubspec.yaml | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/at_end2end_test/pubspec.yaml b/tests/at_end2end_test/pubspec.yaml index fc9af626f..4bc069163 100644 --- a/tests/at_end2end_test/pubspec.yaml +++ b/tests/at_end2end_test/pubspec.yaml @@ -13,6 +13,12 @@ dependencies: at_client: path: ../../packages/at_client +dependency_overrides: + at_chops: + git: + url: https://github.com/atsign-foundation/at_libraries + path: packages/at_chops + ref: pass_optional_key_params dev_dependencies: test: ^1.24.3 lints: ^2.0.0 diff --git a/tests/at_functional_test/pubspec.yaml b/tests/at_functional_test/pubspec.yaml index 095a0fe30..eb032e967 100644 --- a/tests/at_functional_test/pubspec.yaml +++ b/tests/at_functional_test/pubspec.yaml @@ -10,7 +10,12 @@ dependencies: uuid: 3.0.7 at_client: path: ../../packages/at_client - +dependency_overrides: + at_chops: + git: + url: https://github.com/atsign-foundation/at_libraries + path: packages/at_chops + ref: pass_optional_key_params dev_dependencies: test: ^1.24.3 lints: ^2.0.0 From ade89592970d62d8aba76f13ddb2336721ee4709 Mon Sep 17 00:00:00 2001 From: Murali Date: Fri, 19 Jan 2024 11:26:40 +0530 Subject: [PATCH 3/8] fix: replace default encryption with rsa encryption in abstract_atkey_encryption.dart --- .../lib/src/encryption_service/abstract_atkey_encryption.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/at_client/lib/src/encryption_service/abstract_atkey_encryption.dart b/packages/at_client/lib/src/encryption_service/abstract_atkey_encryption.dart index a60d7d27b..e7fd33d5b 100644 --- a/packages/at_client/lib/src/encryption_service/abstract_atkey_encryption.dart +++ b/packages/at_client/lib/src/encryption_service/abstract_atkey_encryption.dart @@ -211,7 +211,7 @@ abstract class AbstractAtKeyEncryption implements AtKeyEncryption { /// (ii) Encrypt the symmetric key with their public key // theirEncryptedCopy = // EncryptionUtil.encryptKey(symmetricKeyBase64, sharedWithPublicKey); - var rsaEncryptionAlgo = DefaultEncryptionAlgo(); + var rsaEncryptionAlgo = RsaEncryptionAlgo(); rsaEncryptionAlgo.atPublicKey = AtPublicKey.fromString(sharedWithPublicKey); var encryptionResult = _atClient.atChops!.encryptString( symmetricKeyBase64, EncryptionKeyType.rsa2048, From bde8e82ef1dd697482480b31944352eaff4c9b12 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Fri, 19 Jan 2024 17:01:41 +0800 Subject: [PATCH 4/8] chore: upgrade melos to 4.0.0 --- .github/workflows/melos_bootstrap.yaml | 2 +- melos.yaml | 5 ++++- pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/melos_bootstrap.yaml b/.github/workflows/melos_bootstrap.yaml index 656f0cec0..a2eaeeb3d 100644 --- a/.github/workflows/melos_bootstrap.yaml +++ b/.github/workflows/melos_bootstrap.yaml @@ -15,4 +15,4 @@ jobs: - name: flutter pub get run: flutter pub get - name: Do melos bootstrap - run: dart run melos bootstrap + run: dart run melos bootstrap --no-example diff --git a/melos.yaml b/melos.yaml index a260d4028..48b2d5afe 100644 --- a/melos.yaml +++ b/melos.yaml @@ -2,5 +2,8 @@ name: at_client_sdk packages: - packages/at_client_mobile - - packages/*/example - tests/* + +command: + bootstrap: + runPubGetInParallel: false diff --git a/pubspec.yaml b/pubspec.yaml index f228eed64..5d0a625fe 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,4 +4,4 @@ environment: sdk: ">=2.18.0 <4.0.0" dev_dependencies: - melos: ^3.0.1 \ No newline at end of file + melos: ^4.0.0 \ No newline at end of file From e51c22883f6361149b12de9967998f1ca2e63b19 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Fri, 19 Jan 2024 17:11:29 +0800 Subject: [PATCH 5/8] chore: try melos bootstrap without --no-example --- .github/workflows/melos_bootstrap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/melos_bootstrap.yaml b/.github/workflows/melos_bootstrap.yaml index a2eaeeb3d..656f0cec0 100644 --- a/.github/workflows/melos_bootstrap.yaml +++ b/.github/workflows/melos_bootstrap.yaml @@ -15,4 +15,4 @@ jobs: - name: flutter pub get run: flutter pub get - name: Do melos bootstrap - run: dart run melos bootstrap --no-example + run: dart run melos bootstrap From 7fd36d7cf12c4311e1f3cc0fa4ec9f0045869921 Mon Sep 17 00:00:00 2001 From: Murali Date: Mon, 22 Jan 2024 10:50:26 +0530 Subject: [PATCH 6/8] fix: remove commented code --- .../lib/src/encryption_service/abstract_atkey_encryption.dart | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/at_client/lib/src/encryption_service/abstract_atkey_encryption.dart b/packages/at_client/lib/src/encryption_service/abstract_atkey_encryption.dart index e7fd33d5b..6158b2827 100644 --- a/packages/at_client/lib/src/encryption_service/abstract_atkey_encryption.dart +++ b/packages/at_client/lib/src/encryption_service/abstract_atkey_encryption.dart @@ -209,14 +209,11 @@ abstract class AbstractAtKeyEncryption implements AtKeyEncryption { } /// (ii) Encrypt the symmetric key with their public key - // theirEncryptedCopy = - // EncryptionUtil.encryptKey(symmetricKeyBase64, sharedWithPublicKey); var rsaEncryptionAlgo = RsaEncryptionAlgo(); rsaEncryptionAlgo.atPublicKey = AtPublicKey.fromString(sharedWithPublicKey); var encryptionResult = _atClient.atChops!.encryptString( symmetricKeyBase64, EncryptionKeyType.rsa2048, encryptionAlgorithm: rsaEncryptionAlgo); - // _logger.info('encrypt key result from AtChops: ${encryptionResult.result}'); theirEncryptedCopy = encryptionResult.result; /// - (b) save encrypted copy to atServer From fd35c09e972252118d5af92a5e0d74dcb58ebf9c Mon Sep 17 00:00:00 2001 From: Murali Date: Wed, 24 Jan 2024 15:44:31 +0530 Subject: [PATCH 7/8] build: upgrade at_chops,at_lookup dependency --- packages/at_client/CHANGELOG.md | 6 +++++- .../lib/src/preference/at_client_config.dart | 2 +- packages/at_client/pubspec.yaml | 14 +++----------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/packages/at_client/CHANGELOG.md b/packages/at_client/CHANGELOG.md index e6060efb8..ee3fa385c 100644 --- a/packages/at_client/CHANGELOG.md +++ b/packages/at_client/CHANGELOG.md @@ -1,4 +1,8 @@ -# 3.0.73 +## 3.0.74 +- build[deps]: Upgraded dependencies for the following packages: + - at_chops to v2.0.0 + - at_lookup to v3.0.45 +## 3.0.73 - build[deps]: Upgraded dependencies for the following packages: - at_commons to v4.0.0 - at_utils to v3.0.16 diff --git a/packages/at_client/lib/src/preference/at_client_config.dart b/packages/at_client/lib/src/preference/at_client_config.dart index dd97d2bff..d13d8879d 100644 --- a/packages/at_client/lib/src/preference/at_client_config.dart +++ b/packages/at_client/lib/src/preference/at_client_config.dart @@ -10,7 +10,7 @@ class AtClientConfig { /// Represents the at_client version. /// Must always be the same as the actual version in pubspec.yaml - final String atClientVersion = '3.0.73'; + final String atClientVersion = '3.0.74'; /// Represents the client commit log compaction time interval /// diff --git a/packages/at_client/pubspec.yaml b/packages/at_client/pubspec.yaml index 8067f23d5..80e2a09a1 100644 --- a/packages/at_client/pubspec.yaml +++ b/packages/at_client/pubspec.yaml @@ -4,7 +4,7 @@ description: The at_client library is the non-platform specific Client SDK which ## ## ## NB: When incrementing the version, please also increment the version in AtClientConfig file -version: 3.0.73 +version: 3.0.74 ## NB: When incrementing the version, please also increment the version in AtClientConfig file ## @@ -33,21 +33,13 @@ dependencies: at_base2e15: ^1.0.0 at_commons: ^4.0.0 at_utils: ^3.0.16 - at_chops: ^1.0.7 - at_lookup: ^3.0.44 + at_chops: ^2.0.0 + at_lookup: ^3.0.45 at_persistence_spec: ^2.0.14 at_persistence_secondary_server: ^3.0.60 meta: ^1.8.0 version: ^3.0.2 -dependency_overrides: - at_chops: -# path: ../../../at_libraries/packages/at_chops - git: - url: https://github.com/atsign-foundation/at_libraries - path: packages/at_chops - ref: pass_optional_key_params - dev_dependencies: lints: ^2.1.1 test: ^1.21.4 From cf03773d05f63694dcf0db604844764eb1b49fd0 Mon Sep 17 00:00:00 2001 From: Murali Date: Wed, 24 Jan 2024 15:49:17 +0530 Subject: [PATCH 8/8] fix: remove dependency overrides for at_chops in tests --- tests/at_end2end_test/pubspec.yaml | 6 ------ tests/at_functional_test/pubspec.yaml | 7 +------ 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/at_end2end_test/pubspec.yaml b/tests/at_end2end_test/pubspec.yaml index 4bc069163..fc9af626f 100644 --- a/tests/at_end2end_test/pubspec.yaml +++ b/tests/at_end2end_test/pubspec.yaml @@ -13,12 +13,6 @@ dependencies: at_client: path: ../../packages/at_client -dependency_overrides: - at_chops: - git: - url: https://github.com/atsign-foundation/at_libraries - path: packages/at_chops - ref: pass_optional_key_params dev_dependencies: test: ^1.24.3 lints: ^2.0.0 diff --git a/tests/at_functional_test/pubspec.yaml b/tests/at_functional_test/pubspec.yaml index eb032e967..095a0fe30 100644 --- a/tests/at_functional_test/pubspec.yaml +++ b/tests/at_functional_test/pubspec.yaml @@ -10,12 +10,7 @@ dependencies: uuid: 3.0.7 at_client: path: ../../packages/at_client -dependency_overrides: - at_chops: - git: - url: https://github.com/atsign-foundation/at_libraries - path: packages/at_chops - ref: pass_optional_key_params + dev_dependencies: test: ^1.24.3 lints: ^2.0.0