Crate coapcore

Source
Expand description

A CoAP security for embedded devices, supporting OSCORE/EDHOC and managing credentials.

The crate is under heavy development: Its API is in flux. So far, it has hidden dependencies on a particular implementation of the [coap-message] provided (it needs to be a [coap_message_implementations::inmemory_write::Message]).

§Logging

Extensive logging is available in this crate through [defmt_or_log], depending on features enabled.

Errors from CoAP are currently logged through its Debug2Format facility, representing a compromise between development and runtime complexity. Should benchmarks show this to be a significant factor in code size in applications that need error handling, more fine grained control can be implemented (eg. offering an option to make Debug2Format merely print the type name or even make it empty).

This crate mainly logs on the trace, debug and error level; the latter provides details when an error is sent over the network and the details are not visible to the peer.

See the book for how defmt is configured in Ariel OS.

Warning: At the Debug level, this module may show cryptographic key material. This will be revised once all components have been interop-tested.

§Cargo features

  • defmt — Sends the output of the crate’s log statements to the defmt ecosystem.
  • log — Sends the output of the crate’s log statements to the log ecosystem.

Modules§

  • An owned heapless container with capacity N that maintains order both through properties of its entries and by time of access – a mix between a priority queue and an LRU cache.
  • Expressions for access policy as evaluated for a particular security context.
  • Descriptions of ACE Authorization Servers (AS) and other trust anchors, as viewed from the Resource Server (RS) which coapcore runs on.

Structs§

  • Error type returned from various functions that ingest any input to an authentication or authorization step.
  • A CoAP handler wrapping inner resources, and adding EDHOC and OSCORE and ACE support.

Enums§