Hook Engine Plugins

Integrate seamlessly with your existing SOC infrastructure using robust, zero-config external extensions perfectly mapped to OpenTicket's sandbox.

The Hybrid Plugin Architecture

OpenTicket plugins operate as dynamic external modules. Since this is an edge-compatible Next.js application, plugins interact purely with the centralized Hook Engine (CorePluginLoader) and EventBus rather than polluting core monolithic logic.

SaaS Orchestration: You no longer need to write code to install plugins into the server! Administrators browse the Plugin Registry inside their dashboard and orchestrate remote capabilities dynamically via our API endpoints.

// v1.0.0-rc.1 Internal Event Bus Pipeline
await eventBus.emit('onIncidentResolved', {  
  targetId: 'inc_992x',
  trigger: 'AUTOMATION'
});
// Handed over securely to isolated plugins

Zero-Trust Standard (API Version 1.4.0)

A plugin is simply a TypeScript object conforming to the OpenTicketPlugin definition. With our hardened architecture, plugins must explicitly declare the privileges they require via the requestedPermissions array, and all network manifests must pass an integritySha256 cryptographic check before loading into memory.

export const jiraSyncPlugin: OpenTicketPlugin = {
  manifest: {
    id: 'jira-bridge',
    name: 'Jira M2M Sync',
    version: '1.0.0',
    supportedPluginApiVersion: ['1.1.0'], // Enforcement Lock
    requestedPermissions: ['VIEW_INCIDENTS_ALL', 'ADD_COMMENTS']
  },
  hooks: {
    onIncidentCreated: async (payload, config, context) => {
      if (payload.severity !== 'CRITICAL') return;
      // Utilizing the strictly scoped context API Sandbox
      await context.api.addComment(payload.id, 'Ticket escalated to SIEM.');
    }
  }
};

Cryptography Engine

You cannot import raw database providers! You are strictly restricted to the context.api module Sandbox. If your plugin calls api.deleteIncident() but lacked DELETE_INCIDENTS consent, the Node Promise will instantly reject.

AES-256-GCM Storage: All user-supplied API credentials configured in the UI are securely encrypted at REST protecting keys during database breaches.

OAuth-style Registry Consent

Administrators will review and actively consent to plugin boundaries dynamically via our built-in OAuth-style UI before anything executes on your Edge.

Settings Injection

Don't force users to write JSON. By declaring ui: { settingsPanels: [...] }, plugins dynamically broadcast their own React form components over the internal APIs. Administrators interface with visual switches, dropping config inputs straight into the securely vaulted DB.

Plugin Settings Panel UI

Permission Matrix Lexicon

Reference these strict identifiers when formatting your network manifest.

Core Incident Scopes
VIEW_INCIDENTS_ALL CREATE_INCIDENTS UPDATE_INCIDENT_STATUS_RESOLVE DELETE_INCIDENTS ADD_COMMENTS

And 12 more granular resolution bindings.

Asset Topology
VIEW_ASSETS UPDATE_ASSETS CREATE_VULNERABILITIES LINK_VULN_TO_ASSET

Allows mapping external SOC IPs directly to internal vectors.

High Privilege Tiers
VIEW_USERS SUSPEND_USERS UPDATE_SYSTEM_SETTINGS ISSUE_API_TOKENS

Requires master admin elevated authorization during Plugin Setup.

V8 Isolate Sandbox Engine

Bad plugins crash mono-repos. To protect the Host container's stability and prevent malicious exploits, OpenTicket executes all plugin scripts inside a V8 Isolate Sandbox using isolated-vm. Plugin code operates within a strict 128MB memory ceiling and is subjected to a 5000ms TTL `Promise.race()` bomb to prevent event-loop hijacking.

Recovery Protocols

If you bypass Node guards and somehow trigger a fatal recursive 502 crash loop locally, run the manual unlinking procedure:

npm run plugin:reset

This isolates corrupt payloads from the Prisma mappings and regenerates clean Node execution clusters.