From c337914fb32ea5db09458b32b030dcbcd1bc4674 Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Wed, 18 Nov 2026 19:41:34 -0500 Subject: [PATCH] docs(auth,gitops): update deployments.yaml docstrings to reflect ~/Workloads registry - Update scripts/appctl_auth.py module and load_admitted_workloads docstrings to reference ~/Workloads/deployments.yaml and HOMELAB_DEPLOYMENTS_FILE / WORKLOADS_DIR overrides instead of config/deployments.yaml - Update scripts/gitops_dispatcher.py get_trusted_repository_mapping docstring to reference the ~/Workloads/deployments.yaml admission registry (templated by config/deployments.yaml) --- scripts/appctl_auth.py | 5 +++-- scripts/gitops_dispatcher.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/appctl_auth.py b/scripts/appctl_auth.py index 0d914a5..4764c73 100644 --- a/scripts/appctl_auth.py +++ b/scripts/appctl_auth.py @@ -6,7 +6,7 @@ Implements the zero-trust authorization pipeline for homelab-appctl.service: - Unix domain socket SO_PEERCRED fallback to homelab-viewer for zero-friction local reads - Mandatory Bearer tokens for all network (HTTP) operations and all mutations / sensitive reads - 3-role RBAC enforcement (homelab-admin, homelab-operator, homelab-viewer) -- Workload scope gating against config/deployments.yaml for homelab-operator +- Workload scope gating against ~/Workloads/deployments.yaml (or HOMELAB_DEPLOYMENTS_FILE / WORKLOADS_DIR override) for homelab-operator """ from __future__ import annotations @@ -227,7 +227,8 @@ class TokenStore: def load_admitted_workloads(deployments_path: Path | str | None = None) -> set[str]: """ - Load admitted repository names and aliases from config/deployments.yaml. + Load admitted repository names and aliases from ~/Workloads/deployments.yaml + (or HOMELAB_DEPLOYMENTS_FILE / WORKLOADS_DIR override). Fails closed (empty set) if registry is missing or malformed. """ if deployments_path is not None: diff --git a/scripts/gitops_dispatcher.py b/scripts/gitops_dispatcher.py index a95f6c8..cdb8336 100755 --- a/scripts/gitops_dispatcher.py +++ b/scripts/gitops_dispatcher.py @@ -260,7 +260,7 @@ def get_trusted_repository_mapping() -> dict[str, Path]: """ Build authoritative mapping of logical repository identities to local paths. Webhook payloads can only select repositories defined in this mapping. - Core Authoritative Registry (deployments.yaml) is the sole admission authority. + Workloads admission registry (~/Workloads/deployments.yaml, templated by config/deployments.yaml) is the sole admission authority. Fails closed if the registry is missing, unreadable, or malformed. """ mapping: dict[str, Path] = {}