Skip to content
ProcurAuthPublic

About

A web console that edits the configuration of services on many hosts and starts Ansible runs and named commands.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Pupitre: configuration and Ansible runs for services on many hosts

CI Latest release Licence: MIT OR Apache-2.0 Static binary for Linux Runs: Ansible, a check first and an apply second Configuration: one HCL file with a closed schema

Website · Docs · Access · Configuration · Security · Downloads

Pupitre

Pupitre is a web console for the configuration of services on many hosts. It keeps the values of each service in layers: the environment, the unit and the host. It starts Ansible runs, a check first and an apply second. It also starts named commands that a person launches by hand.

It is for teams that deploy services with Ansible and want one small server to edit the values and to start the runs. It has one static binary and one configuration file. A folder or a PostgreSQL database keeps the documents. The console runs only the playbooks and the commands that the configuration file lists. No document of the store names a program.

The page of a unit in the light theme: each key with its value and the layer that gives it, the hosts, and the run buttons

How it works

Pupitre is one static binary. It has the page inside. A person edits the values of a unit in the page. The store keeps each version. A check run builds an immutable snapshot of the values, hashes it and runs ansible-playbook --check --diff. An apply run needs a check run of the same snapshot hash with the status passed.

flowchart LR
    B([Browser]) --> E[Edge or proxy<br/>signs the identity token]
    E --> P
    subgraph S[pupitre: one static binary]
        direction TB
        P[HTTP server] --> G{{Access guard, PEP}}
        G --> C[Catalog<br/>documents in memory]
        C --> ST[Store]
        G --> R[Runner node<br/>snapshot and guard]
    end
    G <-. question and decision .-> D{PDP}
    ST --> F[(Folder or PostgreSQL)]
    R --> H([Hosts over SSH])
Loading

Architecture of Pupitre: the browser, the edge, the single binary with the HTTP server, the access guard, the catalog, the store and the runner, and the managed hosts

A document is JSON with a closed schema. The server writes it in one canonical form and keeps its history. Pupitre has no scheduler. No run starts by itself.

Area What Pupitre does
Values Four layers: the schema default, the environment, the unit and the host. Each value has a type and a range from the schema.
Schemas A schema is a file that the configuration names. It lists the keys of a unit. A person who edits values cannot add a key.
Runs A check run builds a snapshot, hashes it and runs ansible-playbook with check and diff. An apply run needs a passed check of the same hash.
Commands Named actions of the configuration file, with typed parameters. A person launches them by hand, on chosen hosts.
Secrets Write-only values with a fingerprint. The runner gives them to a playbook as files on a tmpfs, and it scrubs the output.
Stores A folder (files) with a lock and a history, or PostgreSQL. The commands export and copy-store move documents. The command import makes documents from an Ansible inventory.
Access The mode authzen checks an identity token and asks a PDP. The mode open needs a proxy that signs users in.
Configuration One HCL file. A closed schema. A mistake stops the start. print-config shows each value and its source.
Operation JSON logs, Prometheus metrics, an OTLP exporter of traces and a second port for the probes.
Page Plain JavaScript, HTML and CSS. No framework, no build step and no request to another origin. Light and dark themes.

Example

A unit relay in the environment production gets its values from four layers. The last layer that gives a value wins.

Key Schema default Environment Unit Host host-b Value on host-b
limits.max_clients 100 200 300 500 500 (host)
log.level "info" "info" "info" (environment)
timeouts.connect "5s" "10s" "10s" (unit)

The four layers of a value: the schema default, the environment, the unit and the host. The last layer that gives a value wins.

A command is a named action of the configuration file, with typed parameters:

command "restart-relay" {
  label    = "Restart the relay"
  playbook = "restart-relay"
  target   = "unit"
  check    = false

  param "grace" {
    label        = "Grace period"
    type         = "duration"
    required     = true
    min_duration = "1s"
    max_duration = "5m"
  }
}

The runner starts only the playbook that this block names. The parameters go in a variable file, never on a command line. The command has check = false, so the page asks the person to confirm before it runs.

A run goes in two steps. The check run shows the difference on each host. The apply run starts only when the check run passed on the same snapshot.

The run flow: a request, the queue, the lease, the snapshot and the check run, then the guard and the apply run

In the mode authzen, Pupitre is a PEP of ProcurAuth. The resource tree is service, environment, unit and host. A grant on an environment covers its units and hosts.

The resource tree, the question that Pupitre sends to the PDP and the actions

The PDP answers true or false, with an optional ceiling max_hosts that lowers the number of hosts of a run. An answer of false gives 403. A PDP that does not answer gives 503, never a grant. docs/ACCESS.md has the rules.

See it

The page has one screen for each task.

Screen What it shows
Environments The environments that the person can see, with a search
Unit The values of a unit with their layers, the hosts, the history and the run buttons
Run a unit The hosts, the check, the result of the check, then the apply
Commands The commands that the person can launch, and a form from the parameters
Run The record of a run, one row for each host, the events, the output and the cancel button
The page of a unit in the dark theme The record of a check run: one row for each host, the events and the output
The unit page in the dark theme. The page has a light theme and a dark theme. A check run, with its events and its output.
The page that starts a check: the hosts, and a message The form of a named command with its parameters
The first step of a check, with the choice of hosts. A named command, with typed parameters.
The history of a unit: the versions and the difference of two versions The secrets of an environment: the name and the fingerprint, never the value
The history of a document, with the difference of two versions. The secrets of an environment. The page never shows a value.

The pictures use synthetic data.

Quick start

Download Pupitre and check the archive. The file SHA256SUMS lists the checksum. The commands then print a complete configuration file. The guide docs/GETTING-STARTED.md has the ten-minute test. It needs ansible-playbook of ansible-core 2.19 or later and one test host that accepts an SSH key.

git clone --depth 1 https://github.com/ProcurAuth/pupitre.git
curl -fsSLO https://github.com/ProcurAuth/pupitre/releases/download/v0.1.0/pupitre_0.1.0_linux_amd64.tar.gz
curl -fsSLO https://github.com/ProcurAuth/pupitre/releases/download/v0.1.0/SHA256SUMS
sha256sum --check --ignore-missing SHA256SUMS
tar -xzf pupitre_0.1.0_linux_amd64.tar.gz
pupitre_0.1.0_linux_amd64/pupitre print-reference --format hcl --profile local

The last command prints a complete configuration file of the profile local. The folder pupitre/examples/local has the example schemas and playbooks. docs/GETTING-STARTED.md explains each step: the keys, check-config, migrate, import, serve and the first runs. To build the binary from the source, read docs/DEVELOPMENT.md.

The ProcurAuth family

Pupitre is a program of the ProcurAuth organisation. The organisation holds the open specification and the programs that follow it. The implementations page lists them, with the results of the conformance runs.

The specification defines the protocol, the schemas and the conformance cases. The reference tools read them and test the programs. The portal is a backend, an edge and a PDP. The programs of the family are services that ask the portal.

Part Role Repository Site
procurauth The specification and the reference tools ProcurAuth/procurauth procurauth.github.io/procurauth
portal Backend, edge and PDP ProcurAuth/portal procurauth.github.io/portal
Stowr PEP: a browser for S3, Google Cloud Storage and folders ProcurAuth/stowr procurauth.github.io/stowr
Hune PEP: dashboards over ClickHouse, PostgreSQL and MongoDB ProcurAuth/hune procurauth.github.io/hune
Pupitre PEP: configuration of services and Ansible runs ProcurAuth/pupitre procurauth.github.io/pupitre
ClickHouse Dash PEP and MCP server: a query console for ClickHouse Outside this organisation Implementations page

To add a program to this list, open an issue in the specification repository.

Documentation

Page Content
Getting started The ten-minute test, step by step.
Configuration and reference The rules, the blocks, the keys. The reference comes from the code.
Architecture The documents, the layers, the stores, the runner and the guard of an apply.
Access The modes open and authzen, the resource tree, the actions and the errors.
Security model What Pupitre protects, and how.
Operations Run, network, health, logs, backup, upgrade and troubleshooting.
Specification The eight parts: overview, model, access, runner, API, configuration, security and delivery.
Development The checks, the tests, the dependencies and the release.
Changelog The changes of each version.

The same pages are on the website. The Markdown files are the source.

Build and test

The scripts use Docker. Nothing is installed on the host. The toolchain is fixed in rust-toolchain.toml.

scripts/cargo.sh fmt --all -- --check
scripts/cargo.sh clippy --workspace --all-targets --all-features --locked -- -D warnings
scripts/cargo.sh test --workspace --locked
scripts/static.sh
python3 -I scripts/check-docs.py

The script scripts/check.sh runs the checks of the CI. The workflows in .github/workflows run the same scripts on GitHub. The script tools/release-local.sh makes a release from a local machine.

Security

Do not open a public issue for a vulnerability. Use the private report. SECURITY.md tells the supported versions and the response times. The security model tells what Pupitre protects.

Contribute

Read CONTRIBUTING.md. Open an issue to ask a question or to report a defect. This project follows the code of conduct.

Licence

Pupitre is under the licence MIT OR Apache-2.0. You can use it under the terms of either licence. The files LICENSE-MIT and LICENSE-APACHE hold the two texts. The third-party code keeps its own licence: see THIRD-PARTY-NOTICES.md.

About

A web console that edits the configuration of services on many hosts and starts Ansible runs and named commands.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages