Commit Graph
24 Commits
Author SHA1 Message Date
kevinveenbirkenbachandClaude Opus 5 50b9f60c43 fix(prometheus): resolve the native-metrics scrape target per deployment mode
`native_metrics_target` was a Jinja filter, so it could not read
DEPLOYMENT_MODE: filters see no Ansible variables. It returned
`<services.<key>.name>:<port>` unconditionally, which is `matrix-synapse:9000`
for matrix. Compose serves that name; swarm does not, because `docker stack
deploy` ignores `container_name` and the alias never exists. This repository
says as much itself, through `lookup('compose_only', 'container_name', ...)`.
The target was therefore scraped and refused, and `playwright.spec.js:274`
reported `web-app-matrix: 1 matching target(s) reporting up != 1`, meaning one
matching target whose `up` value is not 1.

It becomes a lookup that delegates host resolution to `scrape_target`, which
was already mode-aware, so exactly one plugin knows the difference between the
two modes. The port has to be handed over explicitly: matrix exposes metrics on
9000 while `services.synapse.ports.internal.http` is 8008, so the existing
internal-port lookup cannot serve this case on its own.

`scrape_target` now refuses `port` together with an explicit `port_kind`.
Before, `port` won silently and the error text still named the
`ports.internal.<port_kind>` path that the call had never consulted.

`native_metrics_apps` drops an app that pins itself to compose through
`compose_mode_force` while the cluster runs swarm, because the scrape target
would then name the wrong object. Only the literal case: matrix declares that
override as a Jinja expression over its flavour, which this lookup cannot
resolve from the scraping role's variable scope, so variant 0 on swarm stays a
latent mismatch.

The two comment lines claiming `container_name:port` went with the change;
after it they state the opposite of what the code does.

Verified by mutation: with the swarm branch of `scrape_target` disabled, the
new test emits `matrix-synapse:9000`, the exact string CI reported.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-08 08:57:13 +02:00
kevinveenbirkenbachandClaude Opus 5.5 c925150848 fix(web-app-openbao): ship the LDAP auth method as an external plugin
OpenBao 2.7 removed the builtin LDAP auth engine from the server binary
(openbao/openbao GH-3882). `bao auth enable ldap` answered
"plugin not found in the catalog: ldap" and the deploy stopped there.

The role now builds its own image. A multi-stage Dockerfile copies the
openbao-plugin-auth-ldap binary out of the image declared as the
`auth-ldap` service entry into /opt/openbao/plugins. A second server
config file, plugins.hcl, names that directory and registers the plugin
declaratively. It sets plugin_auto_register = true explicitly: the image
starts the server with a config directory, and on that path 2.7.1 does
not apply the documented default, so without the line the catalog stays
empty. The Dockerfile sets the file mode in a helper stage instead of
COPY --chmod, which only BuildKit accepts.

The mount is enabled with -plugin-version=latest, so it follows whichever
plugin version the image ships. A mount created by the former builtin
engine is tuned and reloaded onto the plugin, which needs `update` on
sys/plugins/reload/backend in the ansible-admin policy.

The LDAP tasks move into tasks/addons/auth-ldap.yml and the plugin is
declared under meta/addons as a required addon bridged to `ldap`. Its
Playwright spec logs in through the mount and asserts that sys/auth
reports an external running plugin version.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-04 13:25:17 +02:00
evangelostsak 71e4437634 refactor(openbao): drop the activation guard from the alert fragment
The lookup now returns only scraped roles, so the fragment is rules and
nothing else.
2026-09-21 17:45:13 +02:00
evangelostsak e06a62e19b style(openbao): drop the narrative exception comments
Review had these removed across the role once already, and the 11 September
pass cleared every file that was flagged. The seal-key pin and the
recovery-key work then reintroduced the same pattern in nine new places.

Also removes two that predate the review and were never flagged: the
healthcheck note in meta/services.yml and the entrypoint note in
compose.yml.j2. Both are the same narrative-exception shape.

Param docs, file headers and the plain contract notes in the Playwright specs
stay: separate categories, none of them objected to. What the deleted
comments recorded lives in the role README.
2026-09-21 00:29:15 +02:00
evangelostsak 1a2bbb3c97 feat(openbao): export the previous seal key to the container while rotating
The seal stanza resolves both keys through env://, so the previous one has to
reach the container's environment for the rotation to resolve at all.
2026-09-15 02:14:59 +02:00
evangelostsak 4046dd2a0a feat(openbao): offer the previous seal key while the key is rotating
The static seal supports n-1 to n rotation. Emitting the previous pair only
while the two keys differ lets the node unseal with the old key and rewrap to
the new one; a first deploy still renders a single-key stanza.
2026-09-15 02:14:48 +02:00
evangelostsak 15ad629375 test(web-app-openbao): expose LAM and the RBAC DN templates to Playwright 2026-09-12 10:22:41 +02:00
evangelostsak df4be52aa6 test(web-app-openbao): drop the env keys the retired tier spec consumed 2026-09-12 00:17:42 +02:00
evangelostsak a9afc5b45c style(web-app-openbao): drop the narrative comments from the server config template 2026-09-11 18:37:19 +02:00
evangelostsak 793b32f742 style(web-app-openbao): drop the narrative comment from the reader policy 2026-09-11 18:37:14 +02:00
evangelostsak 2f1db60f14 style(web-app-openbao): drop the narrative comment from the operator policy 2026-09-11 18:37:09 +02:00
evangelostsak 6cd99b402f style(web-app-openbao): drop the narrative comment from the administrator policy 2026-09-11 18:37:05 +02:00
evangelostsak 136c28f15d test(web-app-openbao): expose the RBAC account credentials and the KV mount to Playwright 2026-09-11 18:35:31 +02:00
evangelostsak 4296fbc487 feat(web-app-openbao): move the seal alert into the role that owns the metric 2026-09-11 18:35:23 +02:00
evangelostsak bd81005a87 feat(web-app-openbao): add read-only reader policy 2026-09-07 00:34:48 +02:00
evangelostsak f5ce342266 feat(web-app-openbao): add operator policy without administrative capabilities 2026-09-07 00:34:33 +02:00
evangelostsak 199fcb894f feat(web-app-openbao): add administrator policy 2026-09-07 00:34:12 +02:00
evangelostsak 8415090b4c feat(web-app-openbao): add ansible-admin reconciliation policy 2026-09-07 00:33:56 +02:00
evangelostsak 55785b65cc feat(web-app-openbao): expose the Playwright env contract 2026-09-07 00:33:42 +02:00
evangelostsak 55b35a9f02 feat(web-app-openbao): add native metrics scrape job 2026-09-07 00:33:29 +02:00
evangelostsak 54ece0aeff fix(web-app-openbao): deny /v1/sys/metrics on the public vhost 2026-09-07 00:33:15 +02:00
evangelostsak 66e7503f7c feat(web-app-openbao): inject the seal key through the container environment 2026-09-07 00:32:57 +02:00
evangelostsak ab19d6eb4d feat(web-app-openbao): add compose service with stop-first update order 2026-09-07 00:32:24 +02:00
evangelostsak 783d13190b feat(web-app-openbao): add server config with raft storage and static seal 2026-09-07 00:32:10 +02:00