CSP editor icon
Module Id
csp-editor
Group Id
org.jahia.community
Updated
Requires Jahia
8.2.2.1
Author
Florent BOURASSE
Category
Templating and extensions
Status
COMMUNITY info

CSP editor group_work

A Jahia module that registers a custom CspPolicyEditor selectorType in jContent, providing a purpose-built field for editing Content Security Policy directives.

This module is a companion to the content-security-policy module, which enforces CSP headers at runtime. The editor replaces the default textarea on the policy property of both jmix:siteContentSecurityPolicy and jmix:pageContentSecurityPolicy nodes with a richer editing experience.

Dependencies & Dependants

Dependencies
Dependants
  • NONE

FAQ

How it works

On initialization, the module fetches the current page ID via GraphQL and registers a callback with the Jahia UI Extender registry (target jahiaApp-init:60). That callback creates a fixed-position iframe pointing to https://<pageId>.statuspage.io/embed/frame and appends it to the document body. The iframe communicates with the host page via postMessage to show or dismiss itself depending on the current status.

The same logic is available as a website component through the jnt:statuspageIoWidget nodetype and its JSP view, which reads the pageId property set on the node and injects the iframe directly into the rendered page.

Requirements

  • Jahia 8.2.2.1 or later
  • Jahia modules: graphql-dxm-provider

Configuration

The Statuspage.io page ID is stored in the OSGi configuration PID org.jahia.community.statuspageio.

Default configuration file (META-INF/configurations/org.jahia.community.statuspageio.cfg):

pageId=

To override it at runtime, edit or create the file on the Jahia server:

<karaf-home>/etc/org.jahia.community.statuspageio.cfg

The change takes effect immediately without redeploying the module.

The page ID can also be updated through the GraphQL mutation (see GraphQL API) or through the Administration panel.

GraphQL API

The module extends the Jahia GraphQL API with a query and a mutation.

Query — retrieve the current configuration:

query {
  statuspageIo {
    pageId
  }
}

Mutation — update the page ID (requires admin permission):

mutation {
  updateStatuspageIoConfig(pageId: "newPageId")
}

Administration panel

A configuration panel is available in the Jahia administration under Configuration → Statuspage.io Configuration. It allows administrators to view and update the page ID through a form backed by the GraphQL mutation above.

How To Install

Deploy this module alongside the content-security-policy module.

License

MIT License

Copyright (c) 2026 - present Florent BOURASSÉ

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.