Skip to content

carnivore-rb/jackal-webhook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jackal Webhook

Pipeline entry point via HTTP end point. Accepts POST payloads which are automatically packaged into expected payload format and injected into the pipeline.

Configuration

Webhook configuration

This webhook service is built using the Jackal HttpApi utility. It can provide multiple end points and configuration is isolated to a single entry:

{
  "jackal": {
    "http_hook": {
      "bind": "0.0.0.0",
      "port": 9090,
      "ssl": {
        "cert": "/path/to/cert",
        "key": "/path/to/key"
      },
      "authorization": {
        "allowed_origins": [],
        "htpasswd": "/path/to/file",
        "credentials": {
          USER: PASS
        },
        "valid_on": "any" / "all"
      }
    }
  }
}

Payload configuration

The newly created payload can have its name set via configuration:

{
  "jackal": {
    "webhook": {
      "job_name": JOB_NAME
    }
  }
}

Usage

The web hook will accept POST requests to the given path:

/VERSION/ACTION[/EXTRA]
  • VERSION regex format: v[\d]+
  • ACTION regex format: [A-Za-z0-9-_]+
  • EXTRA remaining string

This will result in a new payload injected into the pipeline and sent to the configured output source. The structure of the payload:

{
  "name": JOB_NAME_OR_NAMESPACE,
  "data": {
    ACTION: REQUEST_BODY,
    "webhook": {
      "version": VERSION,
      "action": ACTION,
      "path_extra": EXTRA,
      "headers": HTTP_HEADERS,
      "query": QUERY_PARAMETERS
    }
  }
}

Info

About

Pipeline injection point via webhook

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages