Add typed account and password settings

- Add admin account list, create, role, delete, and password workflows
- Execute identity-checked mutations through the existing dispatcher
- Bound queued credential lifetime and wipe transient secrets
- Add explicit password generation with saved-value acknowledgement
- Handle self-revocation and uncertain outcomes without automatic
  retries
- Register optional account routes without disrupting terminal
  transports
- Expand host regressions and document contracts and pending target
  checks

Validated host suites and pio run; hardware validation remains pending.
This commit is contained in:
2026-09-08 09:27:02 +02:00
parent 42548f6334
commit 94433ef975
30 changed files with 1864 additions and 48 deletions
+26
View File
@@ -163,6 +163,32 @@ def main():
b, out = span(body), Credentials()
check("login", str(index), lambda: api.web_auth_parse_login(b, size(body), C.byref(out)),
out, expected, decoded)
api.web_auth_parse_json_string.argtypes = [C.c_void_p, C.c_size_t, C.POINTER(C.c_size_t),
C.c_void_p, C.c_size_t, C.POINTER(C.c_size_t)]
api.web_auth_parse_json_string.restype = C.c_bool
strings = [(b' "quote\\\"slash\\\\ space",', 65, b'quote"slash\\ space'),
(b'"\\u0020\\u0022\\u005c"', 4, b' "\\'),
(b'""', 1, b''), (b'"a"', 1, None),
(b'"' + b'\\u0022' * 64 + b'"', 65, b'"' * 64),
(b'"' + b'\\u0022' * 65 + b'"', 65, None),
(b'"\\u0000"', 65, None), (b'"abc\\q"', 65, None),
(b'"abc\\ud800"', 65, None), (b'"abc\xff"', 65, None),
(None, 65, None)]
complete = b'"secret\\\"value"'
strings += [(complete[:i], 65, None) for i in range(len(complete))]
for index, (body, capacity, expected) in enumerate(strings):
prefix = b'prefix:'
raw = None if body is None else prefix + body
data, out = span(raw), C.create_string_buffer(capacity)
position, length = C.c_size_t(len(prefix)), C.c_size_t(999)
check("string", str(index),
lambda: api.web_auth_parse_json_string(data, size(raw), C.byref(position), out, capacity, C.byref(length)),
out, expected, lambda x: x.value)
if expected is None:
if position.value != len(prefix) or length.value != 0:
failures.append(f"string: {index}: failure changed cursor or retained length")
elif length.value != len(expected) or raw[position.value - 1:position.value] != b'"':
failures.append(f"string: {index}: incorrect length/cursor")
for failure in failures:
print("FAIL:", failure)
print(f"{count} cases; {len(failures)} failures")