Patchwork logo

Patchwork

A simple communication backend for scripts and other small applications.

Usage

Patchworks data model is based on Patchbay.pub's approach. The service provides a nearly unlimited amount of virtual "channels" represented by a path. Data POSTed to a channel can be received by clients doing GET requests, the exact behaviour depends on the type (specified with the "type" query parameter). The Mime content-type can also be specified with the "mime" query parameter.

The available types are:

Authentication and Authorization

The server is partionend by namespaces. Each namespace has different rules for auth:

Token Format

Tokens are url-safe base64-encoded, gzipped json objects with two keys: "signature" and "data". The "signature" is an openssh signature of the "data". The "data" key is a json object with the following keys:

    {
    "AllowedWritePaths": ["/some-path/*", "!/some-path/forbidden/*"],
    "AllowedReadPaths": [],
    "ValidBefore": -1,
    "ValidAfter": -1,
    }
  

AllowedWritePaths and AllowedReadPaths are OpenSSH style pattern lists (essentially a list of globs), while the ValidBefore and ValidAfter fields specify a unix time after/before which the token is invalid. If it's -1, there is no expiry.

Tools

You can download a bash based client here.