RMidhunSuresh
e6a9e39c7d
Implement store for shared secret
2023-06-05 11:51:07 +05:30
Bruno Windels
780dfeb199
WIP
2023-03-13 09:15:49 +01:00
Bruno Windels
eff495c36d
also delete old crossSigningKeys field on userIdentities
2023-03-03 11:57:29 +01:00
Bruno Windels
08984ad1bc
log amount of marked user identities in migration
2023-03-03 11:57:15 +01:00
Bruno Windels
2563aa23e1
actually write modified values in migration
2023-03-03 11:56:51 +01:00
Bruno Windels
c747d5f228
rename deviceTrackingStatus to keysTrackingStatus
...
as this field also reflects the tracking status of the cross-signing
keys for a given user.
2023-03-03 11:34:09 +01:00
Bruno Windels
7d806b03b3
mark all existing user identities outdated as cross-signing keys missing
2023-03-03 11:33:19 +01:00
Bruno Windels
4dce93e5ef
make sure the key property doesn't leak out of the storage layer
...
as it ends up in the value we're signing and uploading,
corrupting the signature
2023-03-02 17:13:15 +01:00
Bruno Windels
a9412aa57c
fix import paths after TS conversion
2023-03-02 17:12:56 +01:00
Bruno Windels
daf66e1d6c
implement signing users and other devices
2023-03-02 15:02:42 +01:00
Bruno Windels
b8fb2b6df1
Store device keys in format needed to sign/verify, convert to TS
...
In order to sign and verify signatures of design keys, we need
to have them in the format as they are uploaded and downloaded
from the homeserver. So, like the cross-signing keys, we store
them in locally in the same format to avoid constant convertions.
I also renamed deviceIdentities to deviceKeys, analogue to
crossSigningKeys. In order to prevent mistakes in this refactor,
I also converted DeviceTracker to typescript.
2023-02-28 17:25:01 +01:00
Bruno Windels
151090527b
Store cross-signing keys in format as returned from server, in separate store
...
This will make it easier to sign and verify signatures with these keys,
as the signed value needs to have the same layout when signing and
for every verification.
2023-02-28 14:07:55 +01:00
Bruno Windels
920fedae5e
merge master into bwindels/calls
2023-01-20 16:24:38 +01:00
Bruno Windels
32835e26b9
adjust query for finding all state events of a type
...
we were looking for state events with state key between \0 and \u10FFFF
but an empty state key is also valid and would come before \0,
so allow empty state keys at the beginning of the range and include them
in the result by opening the lower bound.
2022-11-10 14:12:22 +01:00
Bruno Windels
ec4413550b
apply method rename (and catch errors)
2022-11-08 07:59:26 +01:00
Eric Eastwood
b4f4636555
Clarify that we no-op because if it's already aborted, that's what we wanted to do anyway ( #861 )
...
Split off from https://github.com/vector-im/hydrogen-web/pull/653
2022-10-17 15:56:34 -05:00
RMidhunSuresh
d6cea6fc5c
Extract method to function outside class
2022-08-19 16:36:21 +05:30
RMidhunSuresh
bfd54f2764
Delete localstorage on logout
2022-08-09 23:11:02 +05:30
Bruno Windels
4838e19c92
Merge pull request #811 from vector-im/bwindels/sharekeyswithinvitees
...
Key sharing based on room history visibility
2022-07-29 14:23:26 +00:00
Half-Shot
5b5c852401
Revert "use logging items"
...
This reverts commit d937b9b14b
.
2022-07-29 10:44:37 +01:00
Half-Shot
d937b9b14b
use logging items
2022-07-29 10:39:41 +01:00
Bruno Windels
f337940202
this migration shouldn't be needed anymore
...
and undoes the export of addRoomToIdentity, which is somewhat internal
2022-07-22 17:46:29 +02:00
Will Hunt
a85d2c96d6
Log the error when we can't get storage access
...
This is quite useful when debugging why a session isn't working properly.
2022-07-06 10:06:00 +01:00
Bruno Windels
83eef2be9d
log lack of persisted storage in ... persisted logs!
2022-06-01 15:30:41 +02:00
Bruno Windels
2852834ce3
persist calls so they can be quickly loaded after a restart
...
also use event prefixes compatible with Element Call/MSC
2022-04-07 10:32:43 +02:00
Bruno Windels
74c640f937
convert Session
2022-02-15 18:21:12 +01:00
Bruno Windels
2e3616e05d
call cursor.update during backup field migration, needs new version
2022-02-01 12:31:10 +01:00
Bruno Windels
b29ecd339d
add more logging to backup storage migration
2022-02-01 12:18:28 +01:00
Bruno Windels
ae5cc17290
mark all inbound sessions to be backed up again when changing version
2022-01-31 14:36:04 +01:00
Bruno Windels
eabd303c8e
count on the index if we're using one, don't always take the store
2022-01-28 15:14:58 +01:00
Bruno Windels
eb134a6c47
only take into account non-backed up keys for counting
2022-01-28 13:18:03 +01:00
Bruno Windels
b30db544a3
use idb key range to select non-backed up keys
2022-01-28 13:11:32 +01:00
Bruno Windels
a499689bd8
also write room key that we create ourselves with RoomKey infrastructure
...
so all keys are written in one place and the flags are always correct
2022-01-28 13:10:48 +01:00
Bruno Windels
c81dde53e7
store key source in inbound session
2022-01-28 10:03:30 +01:00
Bruno Windels
48e72f9b69
replace SessionsNeedingBackup store with backup field on inbound session
2022-01-27 16:00:46 +01:00
Bruno Windels
e80acd4d57
add migration when backup is enabled
2022-01-26 16:30:40 +01:00
Bruno Windels
60ed276b8a
add progress notification and cancellation to key backup flush
2022-01-26 15:19:31 +01:00
Bruno Windels
524090e27d
support idb store/index.count
2022-01-26 15:12:11 +01:00
Bruno Windels
86caa5f9b1
rename session backup to key backup to be consistent with RoomKey
2022-01-26 09:51:48 +01:00
Bruno Windels
290aaad63a
add sessionsNeedingBackup store
2022-01-25 18:47:27 +01:00
Bruno Windels
5d87d8bde3
change store.get return type when no value is found to undefined
...
IDBRequest.result is undefined according to the official TS type decls.
2022-01-25 18:43:44 +01:00
Bruno Windels
1a618dd106
only import fake-indexeddb in tests
...
as it is a devDependency and can end up in the legacy bundle
under circumstances
2021-12-01 17:25:07 +01:00
RMidhunSuresh
4ce7634201
Convert error.js to ts
2021-11-17 20:28:44 +05:30
Bruno Windels
695996d6e2
add ILogger and ILogExport interface, to give export correct return type
...
also move logging related types to own file
2021-11-17 11:39:12 +01:00
RMidhunSuresh
14eaa57434
No need for type assertion here
2021-11-16 13:14:11 +05:30
RMidhunSuresh
7097ba07d1
Replace LogLabelOrNull type with undefined
2021-11-15 18:59:33 +05:30
RMidhunSuresh
30a384fe1e
Make LogFilter optional
2021-11-15 18:44:25 +05:30
RMidhunSuresh
520e0f1b89
Use interface ILogItem
2021-11-15 17:29:08 +05:30
RMidhunSuresh
a7d059b3ed
Fix imports
2021-11-14 19:42:18 +05:30
RMidhunSuresh
29a8260514
Add explicit types for return in methods
2021-11-12 23:12:15 +05:30