Release 1.1.0

This release introduces plugin hooks, which are standalone go applications leverage by go-plugin. Plugins Hooks are used to extend the functionalities of hoop, a plugin developer can:

  • Mutate the connection environment variables of a session dynamically
  • Mutate the connection client args of a session dynamically
  • Mutate the connection command of a session dynamically
  • Mutate packet responses of any connection

The following phases are called during the lifecycle of a plugin hook:

  • OnSessionOpen - called every time a new session is open by a client
  • OnReceive - called every time a new packet is received from client/gateway
  • OnSend - called every time a packet is sent by the agent.

Follow the getting started guide to see it in action.

Along with this release, the attribute config, source and priority were added to the plugin API:

# adding plugin configuration
curl https://app.hoop.dev/api/plugins/demo/config -d@ - <<EOF
{
  "MYSECRET": "U0VDUkVULVZBTA=="
}
EOF

The configuration attributes will be show as REDACTED when listing or getting a plugin from the HTTP API for security reasons. Example:

[
  {
    "id": "52acef48-3558-4e52-81e9-213abfaef76d",
    "config": null,
    "source": null,
    "priority": 0,
    "name": "audit",
    "connections": ["bash"]
  },
  {
    "id": "ab7e6e2f-dcc9-49cd-9b15-8f581d41216d",
    "config": {
      "id": "a31811b6-70ba-49eb-ac9f-eefbb8dd0923",
      "envvars": {
        "MYSECRET": "REDACTED"
      }
    },
    "source": "path:/tmp",
    "priority": 0,
    "name": "demo",
    "connections": ["bash"]
  }
]


The source attribute was introduced to indicate where to download the plugin

  • path:/path/to/local/filesystem - load the plugin from the filesystem
  • hoop/<pluginname> - load the plugin from the public s3 registry (s3 public bucket)

    For the public registry, see this example about how to build and deploy packages.

The priority attribute controls which plugin will run first, it defaults to 0, configuring it with a higher value, means it will run first.

References: