rustfs/rustfs · error · EnrollmentError

MALFORMED_DOCUMENT

MALFORMED_DOCUMENT

Error message

the offline enrollment document is not well formed

What it means

EnrollmentError::Malformed fires when the artifact cannot be read as a signed enrollment document at all — the envelope, the base64 of the signed octets, or a field the frozen read order touches before the signature is structurally broken.

Source

Thrown at rustfs/src/connect/offline/enrollment.rs:210

    #[error("no issued challenge matches this challengeId")]
    ChallengeUnknown,

    #[error("the challenge is not yet valid at the evaluation time")]
    ChallengeNotYetValid,

    #[error("the challenge has expired at the evaluation time")]
    ChallengeExpired,

    #[error("the response nonce or challengeProof is not the one issued for this challenge")]
    ChallengeProofInvalid,

    #[error("the response does not prove possession of the device key it presents")]
    DeviceProofInvalid,

    #[error("the challenge was already consumed")]
    EnrollmentReplayed,

    #[error("the response names a different organization than the challenge it answers")]
    OrganizationMismatch,

    #[error("the response names a different cluster than the challenge it answers")]
    ClusterMismatch,

    /// The artifact could not be read as a signed enrolment document at all: the
    /// envelope, the base64 of the signed octets, or a field the frozen order
    /// reads before the signature verifies did not parse.
    #[error("the offline enrollment document is not well formed")]
    MalformedDocument,

    /// A fault on this side of the exchange rather than in the artifact: the
    /// device key did not round-trip through its own PKCS#8 encoding, or the
    /// caller named an instant outside the representable calendar. Fails closed
    /// because a half-produced response must never reach removable media.
    #[error("the enrollment response could not be produced on this device")]
    ResponseNotProduced,

View on GitHub (pinned to 5dca076efe)

Solutions

  1. Regenerate or re-download the enrollment artifact
  2. Check the file for transfer corruption (encoding, truncation, line endings)
  3. Verify the producer emits the documented envelope format
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at rustfs/src/connect/offline/enrollment.rs:206 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of rustfs/rustfs@5dca076efe (2026-08-23). Data as JSON: /api/errors/62892cb5093415ec. Report an issue: GitHub.