ReferenceArtifacts

Artifacts permissions and lifecycle

Reference Artifacts organization scope, owner management, grants, immutable versions, themes, sandboxing, and response hardening.

Artifacts is an authenticated private-document service. Every artifact is organization-scoped and requires active organization membership, but access still belongs to one user account and one artifact: ownership or an explicit grant permits viewing, while only the owner may manage that artifact. Organization roles and copied links are not access grants.

Routes

PurposeCurrent route
Choose an eligible organizationhttps://artifacts.infra.one/
List artifacts visible in one organizationhttps://artifacts.infra.one/:org_slug
View one artifacthttps://artifacts.infra.one/:org_slug/a/:artifact_slug
Load one immutable version inside the viewerhttps://artifacts.infra.one/:org_slug/a/:artifact_slug/versions/:version/content
List artifacts owned by the signed-in accounthttps://artifacts.infra.one/:org_slug/manage
Manage one owned artifacthttps://artifacts.infra.one/:org_slug/manage/:artifact_slug

The root is an organization selector: it redirects directly when exactly one eligible organization exists, shows a choice when several are eligible, and returns not found when none are eligible. Older unscoped artifact URLs run the same authorization check and then redirect to the canonical organization route. Do not build new links from those redirect-only paths.

The version content route is the viewer’s internal frame source, not a public or shareable document URL. Artifacts routes are host-specific and do not become available on another Infra One host. An organization slug that does not match the authorized artifact returns the same not-found boundary as other access misses.

Access model

Account stateSupported behavior
Artifact owner with active organization membershipList, view, and manage the owned artifact. Manage opens the owner-only authoring, publication-history, and grant controls.
Explicit per-user grantee with active organization membershipList and view that artifact while the grant is active. A grantee cannot manage the artifact or its grants.
Organization Admin or member without ownership or a grantNo artifact access. Membership and role alone do not satisfy the artifact permission check.
Platform administrator without ownership or a grantAdministrator status does not grant access to another owner’s artifact and does not bypass artifact-level authorization.
Signed-out visitorRedirected through the standard sign-in flow before any artifact content is returned.

The host exists for an ordinary signed-in user only while that account owns or is granted at least one artifact in an organization where its membership remains active. A user with no visible artifact receives a not-found response for the host.

For an individual URL, owner or active-grantee access is checked against stored data. An unknown slug, an existing but ungranted artifact, and a revoked grant all return the same not-found boundary, including the response body. This prevents a URL from confirming whether a private artifact exists.

Grant lifecycle

An artifact has one owner and may have one grant for each additional active user account. On the owner-only management page, Grant access by email and Look up user resolve an existing account. The owner must answer Grant access to this account? and select Grant access before the grant is created. Revoke access uses a separate confirmation. Creating a grant does not notify the grantee or deliver a link, so the owner shares the viewer link separately through a private channel.

When a grant is revoked:

  • the artifact is removed from subsequent visible-list queries for that account;
  • a fresh page or content request returns the same not-found boundary as an unknown artifact;
  • the latest payload is re-authorized in the same database statement that reads it, so a revoked grant cannot pass an earlier check and receive the payload from a later read; and
  • if it was the account’s last visible artifact, a new visit to the host is also denied.

Revocation does not erase content that a person already viewed, copied, or retained outside Infra One. Close an already open page, do not forward its content, and use the approved private incident process if access was granted to the wrong account.

Owner authoring and publication

The management page for an owned artifact exposes a reviewed publication sequence:

  1. Under Compile a draft, paste Markdown source or upload one .md or .markdown file. Optional assets accept PNG or JPEG files. Set the displayed title, description, favicon emoji, language, and classification as needed.
  2. Select Compile draft. A successful compile creates an immutable owner-only draft; it does not change the published viewer. Resolve any diagnostics under The draft could not be compiled before continuing.
  3. Under Compiled drafts, choose Select for the intended draft and use Preview to inspect it in a new tab.
  4. Under Review publication, choose Keep the current audience or Replace the audience. Replacement recipients must be existing confirmed account email addresses.
  5. Select Review publication and verify the draft, target version, output SHA-256, metadata changes, audience changes, and review expiry in Confirm publication.
  6. Select Publish version only when the review is correct. Publication appends the reviewed immutable version and applies its metadata and audience changes atomically.

If any relevant draft, metadata, audience, expected-version, or review-expiry value changes, prepare a new review instead of relying on an older confirmation. The published-version list is history, not a version selector for viewers.

Versions and payload boundaries

Each published artifact version is immutable. Publishing new content appends a higher version position; it does not edit the prior row. The viewer selects the newest stored version and updates the artifact’s list ordering when new content is added.

ContractCurrent behavior
Markdown sourceOwner authoring accepts GitHub Flavored Markdown by paste or one .md or .markdown upload. Compilation rejects invalid UTF-8, null bytes, raw HTML, unsafe links, missing image alt text, and unsupported or unreferenced assets.
Optional assetsOwner authoring accepts static PNG and JPEG assets. The UI reports limit or format violations as compilation diagnostics.
Compiled documentA successful draft stores normalized source provenance and deterministic compiled output for review before publication.
Maximum published payload5 MiB (5,242,880 bytes). A larger compiled or legacy payload is rejected before it becomes a version.
Legacy HTML compatibilityExisting legacy HTML versions remain supported inside their organization-scoped artifacts; new owner authoring compiles Markdown rather than accepting raw HTML.
Explicit themeLight or Dark can add a root theme marker to supported output, so the served response can differ from the stored bytes. The document’s CSS must implement the requested state.
Artifact with no versionThe content request returns not found; a grantee cannot create or repair a version. The owner must publish through the management workflow.

The published version checksum verifies the stored output rather than every themed response. Draft provenance separately records source, manifest, asset, compiler, style, and output fingerprints. A matching checksum does not make document code trusted.

Themes

The viewer offers exactly three controls:

  • System omits an explicit theme and leaves the document’s own system-color behavior in control.
  • Light requests theme=light and adds data-theme="light" to a recognized document root.
  • Dark requests theme=dark and adds data-theme="dark" to a recognized document root.

Any other theme value falls back to System. A document without a recognized root may safely ignore an explicit theme instead of being rewritten into an invalid document. Theme selection does not guarantee a visible color change because the document owns its styles.

Isolation and response headers

The viewer frame uses sandbox="allow-scripts" without allow-same-origin and uses the artifact title as its accessible name. Document-owned scripts can run inside an opaque origin, but they cannot inherit the Artifacts host’s cookies, storage, or parent DOM.

The document response replaces the platform CSP with a restrictive policy:

  • sandbox allow-scripts and default-src 'none' are the baseline;
  • style-src 'unsafe-inline' https://fonts.googleapis.com, font-src https://fonts.gstatic.com, and script-src 'unsafe-inline' allow only the document’s inline styles and scripts plus Google Fonts;
  • img-src data: permits embedded data images while ordinary connection, media, and image subresources remain denied by default; the two Google Fonts origins above are explicit external exceptions;
  • base-uri 'none', object-src 'none', and form-action 'none' disable base URLs, embedded objects, and form submissions; and
  • frame-ancestors https://artifacts.infra.one allows only the exact Artifacts origin to frame the document.

The response also sets X-Robots-Tag: noindex, nofollow, Referrer-Policy: no-referrer, X-Content-Type-Options: nosniff, and Cache-Control: private, no-store. These controls reduce unintended disclosure and reuse, but they do not make document code trusted or guarantee zero outbound requests: inline document scripts still run, an artifact can contact the permitted Google Fonts services, and it can navigate its own frame. Never enter credentials, secrets, or customer data into the document. Use an approved non-artifact workflow when the confidentiality requirement forbids external requests.

The controls also do not revoke information that was already displayed or copied.