Commit graph

347 commits

Author SHA1 Message Date
bunnie
c48f88ab93
Merge pull request #302 from gsora/feat/apps-block-device
feat: user-space USB block devices
2023-01-31 01:34:08 +08:00
bunnie
2191503f0c fix #304
this adds a "kicker" thread that gets updated with a target time
to kick the UX by the FIDO2 USB handler. When the target time is
met, an "update" command is issued to the UX.

This hopefully creates an efficient mechanism for triggering a
UX redraw that also has an acceptable delay.
2023-01-30 23:14:16 +08:00
bunnie
797bb0adc6 fix https://github.com/google/OpenSK/issues/584
I suspect this fix is actually the correct solution to the problem,
but refer to the issue above for tracking.
2023-01-30 18:34:43 +08:00
bunnie
b4ce65cb8e possible fix for https://github.com/google/OpenSK/issues/586
This may not be the correct fix, but it causes the test bench to pass.
This will be revisted once I hear back from the OpenSK maintainers.

I strongly supect the issue is actually a bug in how permissions are cleared
after a user presence test, and not that the checks themselves are
incorrect.
2023-01-30 18:33:33 +08:00
bunnie
e64351569f update ctap timeouts in the main loop
This is necessary because there are some timed permissions that
must expire over time that are not asynchronous like the
user presence tests.
2023-01-30 18:32:26 +08:00
bunnie
b1362c0ca4 chore: add a comment 2023-01-30 18:31:53 +08:00
bunnie
c237ff7b46 fix https://github.com/google/OpenSK/issues/582
See the above issue for more details
2023-01-30 18:31:12 +08:00
bunnie
d77552899b add some code to help find OOM keys 2023-01-29 04:16:56 +08:00
Gianguido Sorà
73a4f7898f
apps/hello: bring back order 2023-01-26 19:34:58 +01:00
Gianguido Sorà
916c22896a
apps/transientdisk: app to demonstrate userspace usb mass storage api
Exposes a 1.44mb usb drive, that survives until you either shutdown
the device, or change app.
2023-01-26 19:31:40 +01:00
bunnie
25cc571228 chore: remove warning, and old notes 2023-01-27 02:23:53 +08:00
bunnie
9ea5182103 cleanup minor UX issue (disappearing title when no items present) 2023-01-27 02:23:34 +08:00
bunnie
20a2388b5d update commit ref of opensk code 2023-01-27 01:47:48 +08:00
bunnie
99995f963d use bulk delete to speed up the reset process
this is necessary to pass the test after creating
dozens of credentials; it takes too long to process the
deletion if it's done one at a time
2023-01-27 01:42:50 +08:00
bunnie
50458e837b improve debug output in storage layer 2023-01-26 23:34:08 +08:00
bunnie
dee4bac956 add some more time allowance for resets to process from boot 2023-01-26 23:33:38 +08:00
bunnie
c21f1069bc make reset timing a bit looser
currently 10 seconds from boot before cred reset can be issued;
automated testing can't always keep up with that. expand to
20 seconds. This is not "standards compliant" but the idea that
you unplug the device and it stays on is also not "standards compliant".
2023-01-26 17:59:52 +08:00
bunnie
f1f486e9fb fix PIN permissions; add support for autotest reset 2023-01-26 04:42:40 +08:00
bunnie
10a64da826 allow vendor commands; get vaultbackup-rs working 2023-01-26 02:38:03 +08:00
bunnie
fd4e402d98 refine the heuristic for detecting keys 2023-01-25 22:41:03 +08:00
bunnie
e9ae3fe72b fix key deletion in fido2 2023-01-25 22:36:15 +08:00
bunnie
8974a86f24 add migration from old to new version
confirmed this works for U2F and FIDO2 keys

however, the PIN is reset.
2023-01-25 15:34:54 +08:00
bunnie
5ce6e1b766 initial integration of fido2.1 now passing some basic tests 2023-01-25 00:55:12 +08:00
Gianguido Sorà
7eef972065 usb-device-xous: implement primitive for apps-based block devices 2023-01-24 17:30:35 +01:00
bunnie
2fb776b2a6 first cut at porting in FIDO2.1 features from OpenSK
Code now builds, but, it doesn't fully work. Also,
the vault backup vendor routines have yet to be wedged in.

On the other hand, this edit is much more targeted than
the first one, so hopefully future port-ins of OpenSK
will be much smoother. In particular, OpenSK has a nice
`env` abstraction that has enough power now for us to
stick most of the Xous-specific stuff in there. There's
still a few patches needed to the main code loop, mainly
to accommodate our ability to display more information
than flash an LED.

The storage layer is also migrated to a totally new
dictionary, because the latest version also completely
redoes the storage with some sort of key/value system,
which maps nicely into the PDDB.
2023-01-24 03:56:30 +08:00
bunnie
70d5490bbb Merge branch 'main' of github.com:betrusted-io/xous-core into main 2023-01-20 18:13:59 +08:00
bunnie
f542943df1 fix search criteria to match case-insensitive listing 2023-01-20 18:13:39 +08:00
bunnie
a62251e563
Merge pull request #301 from betrusted-io/tmarble/issue-300
mtxcli: chat room updates asynchronously
2023-01-20 15:16:53 +08:00
Tom Marble
168b1a7f5c
mtxcli: chat room updates asynchronously
Added more predefined scalar messages
Checks WiFi status
Spawns separate thread for client_sync (reading the network)
Most all log messages are now INFO (to be shown by default)

Closes #300

Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-19 21:59:50 -06:00
bunnie
20270609b9 fix cached state to match disk state in UX for edit/delete in passwords 2023-01-20 05:06:16 +08:00
bunnie
d811ef0d2e fix deletion UX in vault 2023-01-20 02:00:35 +08:00
Tom Marble
277d014f39 Updates for #287
Allows a variable to be set to the EMPTY string
- by not setting a value `/set myvar`

During initialization now verifies that PDDB is mounted.

Added warnings for PDDB not mounted and WiFi not connected.
- the WiFi check is not yet implemented

Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-17 12:23:02 -06:00
Tom Marble
e9f21396aa Completes fix for #287
Adds migrations framework
Delays mtxcli initialization until first user input, because we know:
- PDDB is mounted
- Timer is stable
- User actually using mtxcli
Adds send_async_msg scalar_async_msg
- basis for automatically updating chatroom

Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-17 12:23:02 -06:00
Tom Marble
c213dfb745 WIP: Fix mtxcli excessive memory usage #287
Adds migrations framework
- Migration for v0.9.11-0120: update the filter

Filter
- narrow filter to only the fields and events for the current room

Introduces "read only" variables (e.g. __version).

Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-17 12:23:02 -06:00
Tom Marble
a042deb462 WIP #287: Adds /heap command to mtxcli
Signed-off-by: Tom Marble <tmarble@info9.net>
2023-01-17 12:23:02 -06:00
bunnie
232a4b6c6c bump xous version 2023-01-18 00:02:46 +08:00
bunnie
41d4837551 bump versions to absorb WDT change 2023-01-06 17:48:12 +08:00
bunnie
bb5d7b3adf bump versions to absorb hosted mode fix 2023-01-05 14:07:24 +08:00
bunnie
ec5435bd58 add basis cache clear on basis change callback as well 2023-01-04 04:15:44 +08:00
bunnie
57254ce47c clear local caches when basis state changes 2023-01-04 04:13:14 +08:00
bunnie
c3ecaa00eb refactor: remove allocs from vault inner loop
`vault` is changed so that instead of clearing the list of
data each time the screen is updated, it tries to compare it
against the existing data and modifies the record if it needs to,
or leaves it untouched.

Furthermore, at least in the password path, temporary strings
are pre-allocated and re-used, instead of freed and re-allocated
every time through the main loop.

The combination of these optimzations reduces the time to re-parse
a couple hundred records from about 1000ms to 200ms, reducing the
overall time to retrieve the database from 1.8s to 1.0s. It also
makes the loop much more stable over time; previously, as the heap
fragmented, performance would slowly degrade. Now that most
records are static and re-used, the performance seems to stay
constant.

The framwork is also put in place to re-use TOTP/U2F records,
but the code still uses the legacy method of clearing the
entire stored list and rebuilding it. However, it wasn't deemed
a priority to fix this because generally I haven't seen use cases
where users have hundreds of tokens or TOTP's; so long as the
number is about 20 or so, the performance difference should
be imperceptible with or without optimization.
2023-01-04 03:03:19 +08:00
bunnie
10b921e4e8 cleanup another format, add some more analytics 2023-01-03 23:36:46 +08:00
bunnie
59f06ff16f retrofit repl to use table cosine lookups, so it links with lto="fat" 2023-01-02 17:50:06 +08:00
bunnie
36398810dd bump version numbers to absorb new syscalls 2022-12-30 15:24:36 +08:00
bunnie
8d42feb051 increase heap for mtxcli; add memory usage reporting 2022-12-28 19:48:40 +08:00
bunnie
5370ce396d bump all revs due to SoC artifact update 2022-12-12 16:07:20 +08:00
bunnie
53c9af1033 bump readme's 2022-12-02 23:00:38 +08:00
bunnie
c8ec87b2d6 apply persistent field to other authentication methods 2022-11-30 15:11:56 +08:00
bunnie
d7a3f8962d update vault's password edit to use the new persistent field 2022-11-30 15:00:20 +08:00
bunnie
e8671650e3 add more test cases 2022-11-30 12:13:27 +08:00