Skip to content

Package UI approval

This page is the reference for approving package web user interfaces (UIs), which are web interfaces stored in a package. For the author and Administrator workflow, see Package UIs.

A package UI's scripts run only for an approved version. Approval is bound to one package version and to its exact stored content. This page lists the approval states, the commands that manage approvals, and the Administrator content security policy (CSP).

Approval commands require the Administrator role. Refer to Roles for details.

Approval states

Run kxi pm config list-ui to see the approval state of each package version.

Status Meaning
approved The version is approved, and its scripts run. The stored content matches the fingerprint recorded at approval.
approval ended The version was approved, but its content changed after approval. The UI is served static only until you approve it again.
package not found The approved version no longer exists, for example because it was removed. Revoke the stale entry.

Unapproved versions are not listed as approved. They are served with Content-Security-Policy: sandbox, so their scripts and forms do not run.

Commands

Command Does
kxi pm config approve-ui <package> --version <version> Approves a version. Without --version, the latest version is approved.
kxi pm config list-ui Lists the approval state of each version.
kxi pm config revoke-ui <package> --version <version> Removes the approval of a version.

Approving records a fingerprint of the package's stored files. Any later change to those files, including adding or removing one, ends the approval. Approval and revocation are recorded in the journal as CONFIGURE events. See Package Manager journaling.

Configure the Administrator CSP

The PACKAGE_UI_CSP setting holds the content security policy that an approved UI is served with. Set it with the Package Manager configuration command:

kxi pm config set PACKAGE_UI_CSP "<policy>"

A strict policy, such as script-src 'self', blocks inline scripts and eval. A UI that follows the build guidance works under it. If your UI needs a request to another host, add that host to the policy, and review the reason before you do.

Authors need the policy to build their UI. Ask an Administrator for the current value.

Back to top