Skip to content
Margo dev

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.

  • iframe object

    Optional authorization for canonical standard-HTML iframe embeds.

    • allowedOrigins array required

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

      Constraints
      minItems=1; maxItems=64; uniqueItems=true
    • projections object

      Independent output projection selected for each target.

      Constraints
      default={}
      • deck string

        Embed projection for an interactive-capable target.

        Constraints
        enum=["deny","static-link","interactive"]; default="deny"
      • html string

        Embed projection for an interactive-capable target.

        Constraints
        enum=["deny","static-link","interactive"]; default="deny"
      • pdf string

        Embed projection for a static target.

        Constraints
        enum=["deny","static-link"]; default="static-link"
      • site string

        Embed projection for an interactive-capable target.

        Constraints
        enum=["deny","static-link","interactive"]; default="deny"
    • referrerPolicy string

      Referrer policy Margo places on interactive iframes and static links.

      Constraints
      const="no-referrer"; default="no-referrer"
    • sandbox array

      Sandbox capabilities Margo places on every interactive iframe.

      Constraints
      default=[]; maxItems=2; uniqueItems=true
  • inputBytes integer

    Maximum UTF-8 source bytes accepted for one document.

    Constraints
    default=16777216; minimum=1; maximum=16777216
  • outputBytes integer

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

    Constraints
    default=67108864; minimum=1; maximum=67108864
  • rawHTML string

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

    Constraints
    enum=["deny","sanitized"]; default="deny"
  • schemaVersion value required

    Exact policy contract version.

    Constraints
    const="margo-policy/v1"

Used by