pub struct CoapEstRouter;Expand description
Routes CoAP URI paths to EST operations.
RFC 9148 §5.1: EST-coaps uses abbreviated path names under
/.well-known/est/ to reduce URI size for constrained devices.
The router strips the well-known prefix and maps the final path
segment to an EstOperation.
Implementations§
Source§impl CoapEstRouter
impl CoapEstRouter
Sourcepub fn route(path: &str) -> CoapResult<EstOperation>
pub fn route(path: &str) -> CoapResult<EstOperation>
Maps a CoAP URI path to an EST operation.
Recognizes both the abbreviated RFC 9148 paths and the full-length path segments from the well-known prefix.
§Path Recognition
The router accepts paths with or without the /.well-known/est/
prefix, recognizing these final segments:
sen→ SimpleEnrollsren→ SimpleReenrollskg→ ServerKeygenatt→ CsrAttrscacertsorcrts→ CaCerts
Sourcepub fn route_with_label(
path: &str,
) -> CoapResult<(Option<String>, EstOperation)>
pub fn route_with_label( path: &str, ) -> CoapResult<(Option<String>, EstOperation)>
Maps a CoAP URI path to an optional EST label and an EST operation.
RFC 7030 §3.2.2 / RFC 9148 §5.1 permit an operator-defined label
between the /.well-known/est/ prefix and the operation segment:
/.well-known/est/{label}/sen -> (Some("{label}"), SimpleEnroll)
/.well-known/est/sen -> (None, SimpleEnroll)The label selects the CA and the per-label access-control policy that is enforced at issuance (NIAP CA PP FDP_ACF.1). Without label support the CoAP transport could only ever hit the unlabeled default endpoint, which carries no policy — so any per-label authorization an operator configured for HTTP would be silently unenforced over CoAP.
Sourcepub fn route_message(message: CoapMessage) -> CoapResult<CoapEstRequest>
pub fn route_message(message: CoapMessage) -> CoapResult<CoapEstRequest>
Routes a full CoAP message to an EST operation.
Extracts the URI path from the message options and resolves the corresponding EST operation. Also validates that the CoAP method is appropriate for the operation.