Commit Graph

54 Commits

Author SHA1 Message Date
Sasha Weiss
6b5ce3690f
Add support for changing visible username case 2024-01-18 11:13:18 -08:00
Sasha Weiss
a3f12e3f55
Reclaim username during registration 2024-01-17 16:59:33 -08:00
Harry
ed048b0eb5
Backup/Restore pinned thread ordering 2024-01-04 05:58:35 -08:00
Harry
0b61f88474
Update SVR2 enclave values 2023-12-08 12:10:19 -06:00
Harry
9f1c8e3dd0
Refactor AccountManager's finishProvisioningSecondary method 2023-11-21 12:37:00 -08:00
Harry
f392e20de2
Always set master key (falling back to local) when registering 2023-11-20 12:28:22 -08:00
Max Radermacher
600eef4bec
Replace Curve25519Kit with LibSignal 2023-10-31 14:18:22 -05:00
Max Radermacher
7d94cf95e3
Remove 6 redundant methods from protocol DB 2023-10-31 00:44:09 -05:00
Max Radermacher
fd9c5e8c64
Make isPrimaryDevice available to contact merges 2023-10-23 13:27:25 -05:00
Max Radermacher
13837c4e09
Add session switchover events 2023-10-23 13:13:55 -05:00
Harry
e3d39d9fc0
Launch KBS into the sun 2023-10-17 11:20:27 -07:00
Harry
80885e77ff
Send master key sync messages 2023-10-16 21:37:57 -07:00
Harry
77cbdba235
Handle incoming master key sync messages 2023-10-16 13:41:33 -07:00
Max Radermacher
33c9da712d
Clean up ACI/phone number recipient merges
Co-authored-by: Harry <109690906+harry-signal@users.noreply.github.com>
2023-10-11 18:42:00 -05:00
Max Radermacher
4269f26c9e
Use ServiceId in SessionStore/IdentityManager 2023-10-11 10:54:38 -05:00
Harry
da921de7af
[Death to TSAccountManager, long live TSAccountManager][8] Final cleanup before callsites can be migrated 2023-09-29 12:19:26 -07:00
Max Radermacher
c75515ca7a
Move ThreadMerger/ThreadRemover mocks 2023-09-29 12:39:21 -05:00
Max Radermacher
c4bfaf7867
Add awaitableWrite database method 2023-09-25 13:43:24 -05:00
Pete Walters
94df0160ae
Clean up warnings around designated/unavailable initializers 2023-09-06 22:01:10 -05:00
Sasha Weiss
c39af86c22
Catch retained transactions in MockDB 2023-08-30 12:39:26 -07:00
Sasha Weiss
71a299420b
Remove dead code from prekey operations 2023-08-28 16:46:00 -07:00
Sasha Weiss
e727ae5356
Unlink a linked device if we get a PNI decryption error and keys are mismatched 2023-08-25 15:25:19 -07:00
Max Radermacher
0038125cdf
Use the rethrows pattern for db read/write 2023-08-18 13:33:03 -05:00
Max Radermacher
b103f3d939
[ServiceId] Update outgoing messages 2023-08-17 11:09:00 -05:00
Pete Walters
0818e359d5
Update PniHelloWorld to add PQ keys 2023-08-15 15:37:20 -05:00
Pete Walters
9d27c3f341
Implement SSKKyberPreKeyStore operations 2023-08-02 16:53:29 -05:00
Pete Walters
d238cb1445
Update Scheduler to handle protocol additions 2023-07-20 18:10:21 -05:00
Max Radermacher
a091255898 Remove unnecessary escaping annotation 2023-07-17 18:35:32 -05:00
Harry
b9bf24eb4d
Allow for nullable svr credentials in registration reglock response 2023-06-05 14:17:52 -07:00
Harry
c912ed67a9
Update rules for SVR2 rollout 2023-06-02 09:52:31 -07:00
Harry
fde4e94cfb
Remove unnecessary KBS migration & method it exclusively used 2023-05-31 15:25:16 -07:00
Harry
12db9af53f
Start using SVR2 auth credentials 2023-05-26 15:39:52 -07:00
Harry
cc67fe55ad
SVR2 implementation part 1: local operations 2023-05-23 12:26:25 -07:00
Harry
ea3e742142
Add SVR2Impl stub and OrchestratingSVRImpl 2023-05-23 11:56:35 -07:00
Harry
bbbaab9f82
Add SVRAuthCredential 2023-05-16 13:59:52 -07:00
Harry
1bd1354a1d
Rename KeyBackupService protocol to SecureValueRecovery 2023-05-12 10:13:46 -07:00
Harry
f7bc793ae9
Make SystemStoryManagerTest synchronous to end its reign of flaky terror
* Use schedulers with ChainedPromise

* Add full queue initializer redirection in Schedulers

* pass scheduler to OWSURLSession

* Use schedulers in SystemStoryManager

* make SystemStoryManagerTest synchronous
2023-03-29 08:47:49 -07:00
Harry
5ad17c4f2d
Support change number in registration coordinator
* Factor out RegistrationCoordinatorLoader

* Add PNI change number state to regcoordinatorloader

* Don't exit change number flow once we start a pni operation

* Add ChangePhoneNumberPniManager to reg coordinator dependencies

* add params required for pni to change number registration mode

* change number from regcoordinator

* rename ChangePhoneNumber -> LegacyChangePhoneNumber

* remove pni change number support from LegacyChangePhoneNumber

* remove codable conformance from pni change number manager's pending state

* Update ts account manager state when finalizing change number

* Add message processor deps to reg coordinator

* addAsyncCompletion on dbv2 write transactions

* Suspend message processing while doing a reg coordinator change number

* hook up change number

* Add handler-free message processing suspension method

* odds and ends

* minor cleanup

* slight refactor to finalize change phone number in the export function

* Put wait for message processing + suspend onto messageProcessor

* kick of prekey refresh after pni change number finalize transaction ends

* nit
2023-03-17 17:55:06 -07:00
Harry
a31fb00368
Change all e164 references in reg coordinator to E164 type 2023-03-16 11:32:13 -07:00
Sasha Weiss
367fdd769c
Rename KeyBackupServiceProtocol 2023-03-14 16:29:21 -07:00
Sasha Weiss
81b6201a03
Rename KeyValueStoreProtocol -> KeyValueStore 2023-03-14 13:26:06 -07:00
Harry
ac9a68688c
Set registration recovery password in AccountAttributes
* Move AccountAttributes into shared file

* Add AccountAttributesRequestFactory

* Add new AccountAttributes generators

* Migrate verifyPrimaryDeviceRequest

* Migrate verifySecondaryDeviceRequest

* clarify the role of secondary device account attributes

* Remove AuthKey from AccountAttributes; it was unused on the server and therefore totally vestigial

* remove old updatePrimaryDeviceAttributes request and associated code

* Add registration recovery password to AccountAttributes

* Unconditionally set account attributes when changing or setting the PIN

* fix tests

* easy pr comments

* dont set v1 2fa pin unless no kbs backups exist
2023-03-14 13:11:09 -07:00
Pete Walters
3e3e0e5acf
Add manager to periodically validate usernames 2023-03-14 09:56:08 -05:00
Harry
feeabc2ba8
Catch re-entrant MockDBv2 transactions in tests
* Catch re-entrant MockDBv2 transactions in tests

* Fix some promise + transaction issues in RegCoordinator

* undo dumdum changes; dont handle errors on a guarantee
2023-03-10 15:03:27 -08:00
Harry
a146e18aaf
Set up account state and exit registration
* Go to chat list view after registration

* sync system contacts during registration

* Use explicit local credentials for storage service operations during registration

* fix tests

* Quick hack to get through double pin confirmation

* Finishing touches

* lint

* fix build

* reload phone number discoverability after storage service sync

* fix tests again

* Take chat auth on account and contact record initializers

* Change around branches for clarity in OWSUserProfile

* pr comments

* Split ChatServiceAuth into the same and AuthedAccount

* fix tests

* merge woes
2023-03-09 21:54:51 -08:00
Evan Hahn
2d48da8a6d
Handle new registration push challenges 2023-03-09 15:54:47 -06:00
Evan Hahn
7deb93ee98 Test scheduler: handle advancement to current time or earlier
This change should have no user impact.

Two changes:

1. Calling `advance(to: timeInThePast)` is now a fatal error.
2. Calling `advance(to: currentTime)` is now tested.
2023-03-06 12:23:13 -06:00
Harry
8c42d66489
Wipe related state on RegCoordinator when session id changes
* Wipe related state on RegCoordinator when session id changes

* Update Signal/Registration/RegistrationCoordinatorImpl.swift

Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>

* Update Signal/Registration/RegistrationCoordinatorImpl.swift

Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>

---------

Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>
2023-03-06 09:50:18 -08:00
Harry
798ad6dc67
Hook up RegistrationPermissionsViewController
* Hook up RegistrationPermissionsViewController

* Update tests accordingly

* rebase woes

* Simplify opening path testing in RegistrationCoordinatorTest
2023-02-17 16:31:13 -08:00
Harry
cd63f67b3e
Retry most network failures in RegistrationCoordinator
* Retry most network failures in RegistrationCoordinator

* Update the way we identify network errors to be more flexible

* Retry remaining requests

* Automatically retry registration requests if time intervals are short

* fix error types not compiling on kbs

* Add test for reg recovery password reg with retries

* fix extra t
2023-02-17 14:50:54 -08:00