Skip to content

Add Panther Plugin Framework - #1

Draft
adammcdonagh wants to merge 6 commits into
OpenAnswers:masterfrom
adammcdonagh:feat/plugin-framework
Draft

adammcdonagh wants to merge 6 commits into
OpenAnswers:masterfrom
adammcdonagh:feat/plugin-framework

Conversation

@adammcdonagh

@adammcdonagh adammcdonagh commented Aug 31, 2026 •

Copy link
Copy Markdown

Draft PR looking for any comments before submitting.

The primary purpose of this PR is to add a mechanism to extend Panther with custom plugins that impact the core functionality. This includes adding SSO, editing the alert schema with custom columns, injecting actions into the insert/update/delete events.

SSO has been tested and validated with Google SAML auth - See https://github.com/adammcdonagh/panther-sso-saml
Example plugin for adding custom columns to the schema can be found here - https://github.com/adammcdonagh/panther-custom-columns

Changes

  • Console startup now loads configured plugins and lets them run applyConsole(...).
  • Console startup also exposes auth helpers so plugins can register SSO providers and disable built-in local auth before Express boot. (currently untested)
  • A second hook, applyConsoleAuth(...), runs after Express creation so plugins can register Passport strategies and auth routes. (currently untested)
  • Plugins can register admin sections, which are rendered into the admin page.
  • Login views now render configured auth providers, and POST /login falls through when local auth is disabled so a plugin can own that path. (currently untested)
  • Console config now has a first-class auth section with local.enabled and providers defaults.
  • Console config now allows a plugins section.
  • Field.extend(...) lets plugins add field definitions/default visible fields.
  • Server startup now loads configured plugins and runs applyServer(...) before alert schema registration.
  • The alert loader can now append column definitions, create indexes, and backfill defaults for new columns.
  • Container entrypoints can now perform runtime plugin installs for stock images using PANTHER_PLUGIN_INSTALL and PANTHER_PLUGIN_DIR.
  • Repository docs now describe the generic plugin contract, recommended naming, source-build flow, and stock-image runtime install flow.
  • Modified some of the Docker build scripts to allow full local builds using Docker, and include new plugin loading mechanism when plugins are hosted on public Git repos.

First attempt at adding plugin framework and supporting document updates

Signed-off-by: Adam McDonagh <adam@elitemonkey.net>
Signed-off-by: Adam McDonagh <adam@elitemonkey.net>
Signed-off-by: Adam McDonagh <adam@elitemonkey.net>
Signed-off-by: Adam McDonagh <adam@elitemonkey.net>
Signed-off-by: Adam McDonagh <adam@elitemonkey.net>
@adammcdonagh adammcdonagh changed the title WIP: Add Panther Plugin Framework Aug 31, 2026
Signed-off-by: Adam McDonagh <adam@elitemonkey.net>
@adammcdonagh
adammcdonagh force-pushed the feat/plugin-framework branch from c94b0da to fff4163 Compare August 31, 2026 23:56
@vinceoa

vinceoa commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Hi Adam,
Welcome to the Panther project and thank you for the very first PR.

There are a few suggestions and alterations that would make merging this easier, generally along the lines of splitting it up into smaller reviewable chunks:

  • OA_CONFIG_FILE renaming, having that on its own would help us align our internal builds.
  • Core plugin framework, this being more targeted would make it easier to review on its own.
  • Alert schema extensions, looks handy, there is an existing (albeit simple) migration setup using migrate-mongo, this would be the preferred route for schema changes at present. (from within the event-server's entrypoint)

Things we'd decline right now:

  • SSO login changes. We are looking at providing this in the future as part of a gated feature.
  • Docker container runtime setup, npm install / git clone'ing should be kept out of runtime, it makes it harder to run the security scanners as deps are not known ahead of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants