Add client support for ephemeral key (ePSKc) credentials sharing - #267
Conversation
Adds get/set_ephemeral_key_enabled, get_ephemeral_key_status, activate_ephemeral_key and deactivate_ephemeral_key, wrapping the /node/ba-epskc/state and /node/ba-epskc/key REST endpoints for Thread 1.4 Credentials Sharing (issue home-assistant-libs#211). These endpoints aren't merged into ot-br-posix yet; the implementation follows puddly's reference branch (openthread/ot-br-posix@main...puddly:epsck-rest). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Test resultsUnit tests ( Live end-to-end test against a real OTBR server, to validate the wire contract (paths,
Both the mocked unit tests and the live hardware round-trip confirm the client and server agree on the REST contract end-to-end. |
|
Working fine with modified OpenThread Border Router M5Stack Example. |
|
The upstream PR has been merged. |
|
@puddly |
|
@puddly Are we implementing API version validation in this PR? |
|
Any operation interacting with ePSKc when the OTBR doesn't support it will throw |
Summary
OTBRmethods:get_ephemeral_key_enabled,set_ephemeral_key_enabled,get_ephemeral_key_status,activate_ephemeral_key,deactivate_ephemeral_keyEphemeralKeyState,EphemeralKeyStatus,EphemeralKeyActivationResultEphemeralKeyNotSupportedError(404),EphemeralKeyConflictError(409)Wraps the
/node/ba-epskc/stateand/node/ba-epskc/keyREST endpoints as implemented in @puddly's reference branch (openthread/ot-br-posix@main...puddly:epsck-rest).See discussion in #211. This PR is here to get early feedback on the client-side API shape; it'll need re-checking once the server-side endpoints actually land upstream (paths/JSON could still change).
Test plan
pytest— full suite passes (90 tests, 16 new)mypy— cleanpylint— 10/10black/flake8— cleanOTBR_ENABLE_EPSKCCloses #211 once server-side support is available.