Skip to content
Margo v0.0.22

Policy schema

#

This schema describes the trusted host policy passed with --policy. It keeps capabilities and resource ceilings explicit; document content cannot grant itself these permissions.

Margo host policy v1

Trusted host-owned capabilities and resource ceilings for Margo rendering.

  • iframeobject

    Optional authorization for canonical standard-HTML iframe embeds.

    • allowedOriginsarray*

      Exact canonical HTTPS origins allowed in iframe src URLs; paths, wildcards, credentials, queries, and fragments are invalid.

      minItems=1; maxItems=64; uniqueItems=true

    • projectionsobject

      Independent output projection selected for each target.

      default={}

      • deckstring

        Embed projection for an interactive-capable target.

        enum=["deny","static-link","interactive"]; default="deny"

      • htmlstring

        Embed projection for an interactive-capable target.

        enum=["deny","static-link","interactive"]; default="deny"

      • pdfstring

        Embed projection for a static target.

        enum=["deny","static-link"]; default="static-link"

      • sitestring

        Embed projection for an interactive-capable target.

        enum=["deny","static-link","interactive"]; default="deny"

    • referrerPolicystring

      Referrer policy Margo places on interactive iframes and static links.

      const="no-referrer"; default="no-referrer"

    • sandboxarray

      Sandbox capabilities Margo places on every interactive iframe.

      default=[]; maxItems=2; uniqueItems=true

  • inputBytesinteger

    Maximum UTF-8 source bytes accepted for one document.

    default=16777216; minimum=1; maximum=16777216

  • outputBytesinteger

    Maximum semantic HTML bytes produced for one document before page or artifact composition.

    default=67108864; minimum=1; maximum=67108864

  • rawHTMLstring

    Whether documents may use the closed, canonical margo-html-v1 profile.

    enum=["deny","sanitized"]; default="deny"

  • schemaVersionvalue*

    Exact policy contract version.

    const="margo-policy/v1"

Used by