3 Commits

Author SHA1 Message Date
mnovak 9b2ea5a384 Merge pull request '[repo] Licence: CPAL-1.0 file headers instead of the MPL-2.0 notice' (#4) from repo/cpal-spdx into main
Merge repo/cpal-spdx: CPAL-1.0 file headers instead of the MPL-2.0 notice (PR #4)
2026-11-23 00:49:52 +01:00
mnovak 5fcae1d152 [repo] Licence: CPAL-1.0 file headers instead of the MPL-2.0 notice
Each source file's three-line MPL-2.0 notice becomes an SPDX CPAL-1.0 header with the copyright
line; the Exhibit A notice itself is in LICENSE (CPAL 3.5). Shell scripts' SPDX ids follow.
Comments only: no code changes.
2026-11-23 00:19:33 +01:00
mnovak cd140117c7 Merge pull request '[repo] Licence: CPAL-1.0 instead of MPL-2.0' (#3) from repo/cpal-licence into main
Merge repo/cpal-licence: CPAL-1.0 instead of MPL-2.0 (PR #3)
2026-11-23 00:04:54 +01:00
34 changed files with 63 additions and 92 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: CPAL-1.0
#
# Pre-commit hook (shared with Ianitor). Rejects staged files that must never be in git:
# - binaries: any NUL byte anywhere in the staged blob (git attributes do not matter)
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: CPAL-1.0
#
# Self-test for .githooks/pre-commit. Creates a throw-away repository, points it at the
# hook and checks that every forbidden case is rejected and normal files are accepted.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! The Fabrica server, as the agent talks to it (docs/02_protocol.md).
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! A small HTTP/1.1 client over rustls: one request per connection, bodies framed by
//! `Content-Length` or chunked encoding, every size bounded. The server's answers are hostile.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! Legatus, the Fabrica Domi agent (docs/01_legatus.md): enroll with a one-time code, then
//! long-poll the Fabrica server over mTLS for jobs, and run them only when the release is signed
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! `legatus`: enroll, run, status.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! One job, start to end: guard, role, signature and manifest, download, size and SHA-256, and
//! only then the target. Every refusal is reported; nothing unsigned reaches a target.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! The agent's state dir: who it is, what it trusts, and the job ids it has seen.
//!
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! The targets this machine offers: Linux (systemd) on Linux, none elsewhere in v0.1.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! TLS to the Fabrica server: the server is accepted only when its chain ends at the pinned Domi
//! root and its leaf is valid for the server's name; the agent presents its own certificate
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! A Domi CA in real time, team release keys, fake targets, and a mock Fabrica server that speaks
//! protocol v1 over real TLS with the reference logic (EnrollmentBook, Registry).
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! End to end over real TLS against a mock Fabrica that uses the reference server logic
//! (mandatory, tests first): the enrollment code is single use; expired, replayed and foreign
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! Nothing unsigned runs (mandatory, tests first): a tampered artifact, a wrong key, a missing or
//! garbled signature, a release of something else: refused and reported, and the target is never
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! TEST ONLY: drives the Linux backend with real systemd for tests/linux (the container test).
//! It skips the signature check on purpose, so it is an example, never part of a release.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! Legatus's Linux (systemd) target (docs/01_legatus.md):
//!
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
#![allow(dead_code, clippy::unwrap_used, clippy::expect_used, clippy::panic)]
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! The Linux target (mandatory, tests first): the atomic symlink switch, the restart, the health
//! check, and auto rollback when the check fails. Real files and symlinks; systemd and the health
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! Unpacking (tests first): a signed archive can still hold a mistake; nothing escapes the
//! release dir, links and special files are refused, and a refused archive leaves nothing behind.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! Archive entries (hostile even when signed: a release key can sign a mistake): what may be
//! unpacked, and where.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! The enrollment code: `lgt1-` and base32 of version, root SHA-256, secret, server URL, checksum.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! The server's side of enrollment codes: issue, and redeem exactly once.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! The agent's job guard: expired, future, too long-lived and replayed jobs are refused.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! The Legatus protocol v1 (docs/02_protocol.md): what Legatus and the Fabrica server say to
//! each other, and the checks both sides make. Pure: no files, no network, no clock; the caller
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! The messages of protocol v1 (docs/02_protocol.md). Strict: unknown fields are refused, every
//! body is bounded, every id and name is checked before anyone acts on it.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! The server's agent registry: which certificate is each agent's current one.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! Nothing unsigned runs: the release manifest, its minisign signature by a pinned team release
//! key, and the artifact's size and SHA-256.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! Agent certificates at the server (mandatory, tests first): expired, replayed and foreign
//! certificates are refused by `Registry::accept`, the check Fabrica runs on every request.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
#![allow(dead_code, clippy::unwrap_used, clippy::expect_used, clippy::panic)]
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! The enrollment code (mandatory, tests first): it round-trips, typos are caught before anything
//! is sent, and it is single use: a second redeem is refused, as are expired and unknown codes.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! Messages and jobs (tests first): strict parsing with limits, the replay guard, roles, safe
//! archive paths, reports.
+2 -3
View File
@@ -1,6 +1,5 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
// SPDX-License-Identifier: CPAL-1.0
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
//! Nothing unsigned runs (mandatory, tests first): a missing or garbled signature, a wrong key, a
//! manifest for another team, app or version, and a tampered artifact are all refused.
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: CPAL-1.0
# Legatus installer, served by the Fabrica server at /legatus/install.sh:
# curl -fsSL https://<fabrica>/legatus/install.sh | sudo sh -s -- lgt1-<code>
# Downloads the Legatus binary for this machine from the same server, checks its SHA-256 against
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: CPAL-1.0
# The Linux target against real systemd, in a container (Docker or Podman).
# tests/linux/run.sh # from anywhere in the repo
# Builds the test-only `deploy` example and a Debian image with systemd as PID 1 (Containerfile, from
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/sh
# SPDX-License-Identifier: MPL-2.0
# SPDX-License-Identifier: CPAL-1.0
# Runs inside the systemd container: four releases of a small web app through the Linux target.
# 1.0.0 healthy, 2.0.0 healthy, 3.0.0 crashes at start, 4.0.0 runs but its health URL fails.
# Expected: 1 and 2 succeed; 3 and 4 are rolled back to 2.0.0, which keeps running.