aep-core
Transport-independent models, validation, identity, assertion, and HTTP-binding primitives for the Agent Enrollment Protocol.
Install
[]
= "0.1"
Parse protocol documents
Parsing applies AEP's bounded native validation and preserves well-formed additive members and advertisements:
use ;
let document = parse_inspect_document?;
assert_eq!;
# Ok::
The crate provides equivalent parse and validation functions for claims, enrollment, status, grant, revoke, Problem Details, idempotency metadata, credential responses, client assertions, and OpenAPI AEP security metadata.
Assertions and identity
sign_client_assertion and verify_client_assertion support the required EdDSA and ES256
algorithms. decode_jwt_unverified exposes the JOSE header before verification so a Service can
select the advertised algorithm and resolve the kid. did_web_document_url and
resolve_did_web_public_key implement the did:web resolution rules, including the HTTPS default,
the one-mebibyte document limit, exact verification-method selection, and redirect rejection.
Keys use AEP-owned types rather than exposing the underlying JSON Web Token library. Ed25519 seeds, PKCS #8 PEM private keys, raw Ed25519 public keys, ES256 private scalars, PKCS #8 PEM private keys, and SEC1 ES256 public keys are supported:
use ;
let key = ed25519_from_seed;
assert_eq!;
let public_key = key.verifying_key;
# let _ = public_key;
Both algorithms use pure-Rust cryptographic implementations. A signing key selects the JOSE algorithm, which prevents an algorithm option from disagreeing with the supplied key.
HTTP access remains injectable through HttpTransport; the Core crate does not select an async
runtime or networking client. The Agent, Service, and Platform crates provide the role-level
composition.
HTTP and OpenAPI
The Core helpers normalize command paths, parse and render protected-resource authorization, resolve OpenAPI references, and deterministically select the most specific matching OpenAPI path template. Plaintext HTTP is rejected except when a caller explicitly enables the loopback-only development option.
See the workspace guide and the AEP specifications.