Skip to content

Add optional status claim to the MSO for revocation support - #140

Open
mepeltier wants to merge 4 commits into
spruceid:mainfrom
Indicio-tech:status-list-support
Open

mepeltier wants to merge 4 commits into
spruceid:mainfrom
Indicio-tech:status-list-support

Conversation

@mepeltier

Copy link
Copy Markdown

Summary

Adds an optional status_list field to Mso, allowing issuers to embed a revocation/status claim (e.g. an IETF draft-ietf-oauth-status-list entry, {"status_list": {"idx": ..., "uri": ...}}, or a W3C BitstringStatusListEntry) directly in the mobile security object at issuance time.

Motivation

There's currently no place in the mdoc issuance API to attach a status/revocation claim without giving up ISO 18013-5-compliant typed encoding of the mDL namespace (dates as CBOR full-date, portrait as bstr, etc.) — the only alternative is a fully generic namespace map, which loses that typing for every other field. The MSO itself is the natural place for this: it's already extensible, and a status claim there doesn't need to be selectively disclosable or per-namespace.

This is motivated by a real integration: an ACA-Py OID4VCI plugin needs to embed a status-list entry in issued mDLs so wallets/verifiers can check revocation, matching the pattern already used for JWT-VC and SD-JWT-VC credential formats in that project.

Changes

  • src/definitions/mso.rs — adds pub status_list: Option<Value> to Mso, with #[serde(skip_serializing_if = "Option::is_none", default)] so the field is entirely absent from the encoded CBOR when unset (no change to existing wire output for anyone not using this).
  • src/issuance/mdoc.rs — threads the new field through Builder, Mdoc::prepare, issue, and issue_async, plus a new Builder::status_list(ciborium::Value) setter mirroring the existing builder API.
  • Two new tests: one confirming the field is fully absent from the encoded MSO when not set (backward compatibility), one confirming a set status claim round-trips correctly through issuance and CBOR encoding.

Compatibility

Fully additive and backward compatible. Existing callers who never call .status_list(...) see no change in behavior or encoded output.

@CLAassistant

CLAassistant commented Sep 2, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@mepeltier

Copy link
Copy Markdown
Author

@sbihel not sure who to tag about this, but is there anyone who can review this?

Tangentially, is there a community space where discussion about this project happens?

@mepeltier
mepeltier force-pushed the status-list-support branch 2 times, most recently from 3341658 to 3f77f9b Compare September 14, 2026 18:48
Adds an `Option<ciborium::Value>` status field to `Mso`, threaded
through `issuance::mdoc::Builder`/`Mdoc::prepare`/`issue`/`issue_async`,
so issuers can embed an IETF draft-ietf-oauth-status-list (or W3C
BitstringStatusListEntry) status claim in the signed MSO for revocation
checking. The field is omitted from the encoded CBOR when unset, so
existing callers are unaffected.

Signed-off-by: Micah Peltier <micah6_8@yahoo.com>
Signed-off-by: Micah Peltier <micah6_8@yahoo.com>
Signed-off-by: Micah Peltier <micah6_8@yahoo.com>
The IETF draft-ietf-oauth-status-list `status` claim is named `status`
and holds a `{"status_list": {"idx": ..., "uri": ...}}` value. The
field was previously named `status_list` itself, which doubly-nested
`status_list` on the wire and required a `#[serde(rename)]` override
to escape `Mso`'s struct-level `camelCase` rule (which had been
silently renaming it to `statusList`, caught by running the existing
test suite). Renaming to `status` fixes both: it matches the actual
claim name and needs no rename override since `status` is unaffected
by the camelCase transform.

Also adds test coverage identified while reviewing PR #1:
- tampered_status_fails_issuer_authentication: the claim is covered by
  the issuer's COSE_Sign1 signature, not just carried alongside it.
- status_survives_prepare_and_complete: the remote-signing path
  (prepare/complete), not just direct issue, threads the claim through.
- malformed_status_value_is_not_rejected: documents that the library
  treats the claim as opaque CBOR without validating its shape.

Signed-off-by: Micah Peltier <micah6_8@yahoo.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants