Commit Graph
1042 Commits
Author SHA1 Message Date
kevinveenbirkenbach d239b2ab19 Merge branch 'main' into feature/web-app-fediwall 2026-05-06 18:33:32 +02:00
kevinveenbirkenbach cca665e0d7 Merge branch 'main' into feature/web-app-fediwall 2026-05-06 16:57:00 +02:00
kevinveenbirkenbach 73302cb992 Merge branch 'main' into feature/opencloud-opentalk-iam 2026-05-06 16:56:59 +02:00
kevinveenbirkenbachandClaude Opus 4.7 2a582d3aec feat(ci): diff-driven app whitelist for deploy tests
Narrow the test-deploy-{server,universal,workstation} matrix to roles
actually impacted by the branch's diff against origin/main, expanded
transitively over run_after + dependencies + shared services.

Why: full-matrix deploy CI on every PR is wasteful; explicit per-PR
whitelisting is error-prone. The resolver derives the affected set
automatically while remaining fail-safe.

Behaviour (in resolve_effective_whitelist.sh precedence order):
- whitelist input "__ALL__"  -> empty whitelist (force full deploy)
- whitelist input non-empty  -> verbatim
- whitelist input empty      -> diff vs origin/main
  - empty diff or any path outside roles/<role>/   -> __ALL__
  - all paths under roles/<role>/                  -> reverse closure

Fail-safe: any seed that is not modellable in CombinedResolver
(no application_id and not referenced by any role's run_after) and
any resolver runtime error MUST trigger a fall-back to __ALL__.
The closure never silently shrinks the deploy matrix.

test-deploy-local.yml is intentionally exempt (local/manual dispatch
keeps explicit whitelist semantics).

Documented in pipeline.md and workflows.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 16:56:58 +02:00
kevinveenbirkenbachandClaude Opus 4.7 1d27a34883 fix(iam): make OpenCloud and OpenTalk Playwright OIDC scenarios pass and add OpenTalk recorder
Iterates the role-local Playwright specs from a structural skeleton into
fully green end-to-end scenarios that exercise the SSO handoff for both
the administrator and the biber LDAP persona, against the actual
deployed stack, and adds optional meeting recording for OpenTalk.

OpenCloud (web-app-opencloud)
- Add Keycloak's URL to connect-src and frame-src in the role CSP via
  lookup('tls', 'web-app-keycloak', 'url.base') so the SPA can hit the
  OIDC discovery and authorize endpoints from the browser
- Switch to read-only LDAP semantics: PROXY_AUTOPROVISION_ACCOUNTS=false,
  GRAPH_USERNAME_MATCH removed, GRAPH_ASSIGN_DEFAULT_USER_ROLE=true
- Set OC_LDAP_DISABLE_USER_MECHANISM=none so the user-lookup filter
  stops referencing the OpenCloud-only `openclouduserenabled` attribute
  that the central LDAP schema does not define
- Pin the image to opencloudeu/opencloud:4.0.6
- Spec primes localStorage forceAllowOldBrowser, bypasses the "browser
  not supported" splash, submits via Enter, asserts the Files-view banner

OpenTalk (web-app-opentalk)
- Provision a dedicated confidential Keycloak client `opentalk-controller`
  via kcadm so the controller can introspect access tokens; the shared
  realm client stays public for the browser PKCE flow. The service
  account is granted the realm-management view-users / query-users roles
  for the Keycloak admin Web API user-search backend
- Inject an nginx vhost extension via webserver_extra_configuration that
  routes /v1/, /signaling, and /livekit on open.talk.<DOMAIN> to the
  controller and LiveKit upstreams; the default route stays on the
  frontend
- Fix the frontend env vars to upstream names (OIDC_ISSUER, BASE_URL=""),
  pin the frontend image to v2.8.1
- Spec races between auto-redirect and explicit "Sign in" CTA, submits
  via Enter, asserts the post-login Home-link in the dashboard
- Add OpenTalk recorder (registry.opencode.de/opentalk/recorder v0.16.2)
  plus RabbitMQ broker (rabbitmq:4.2.4); wire the controller to publish
  recording jobs on the `opentalk_recorder` queue and the recorder to
  consume them; provision a dedicated confidential `opentalk-recorder`
  Keycloak client for the recorder service account
- Reference Keycloak and the cross-app domain through lookup('tls', ...)
  and lookup('domain', ...) in meta/server.yml instead of literal
  `auth.<DOMAIN>` / `open.cloud.<DOMAIN>` strings

Cross-cutting
- Rename canonical hostnames to the <vendor>.<category> pattern:
  - web-app-opentalk:    talk.<DOMAIN>  -> open.talk.<DOMAIN>
  - web-app-bigbluebutton: meet.<DOMAIN> -> bbb.talk.<DOMAIN>
- Restructure both READMEs to the per-role README contract; drop emojis
  from headings; strip em dashes / history phrases / self-SPOT
  declarations from IAM.md / LDAP.md / TODO.md
- Replace technical galaxy_info descriptions with user-facing copy so
  the dashboard cards read clearly

Validated end-to-end via the Role Loop (deploy-fresh-kept-apps then
deploy-reuse-kept-apps with SERVICES_DISABLED=matomo,email): all
seven OpenTalk containers + the OpenCloud container come up healthy,
scripts/tests/e2e/rerun-spec.sh web-app-opencloud and
scripts/tests/e2e/rerun-spec.sh web-app-opentalk both finish with
`2 passed`, and `make test` is green (1604 + 162 tests).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 16:56:58 +02:00
kevinveenbirkenbachandClaude Opus 4.7 8b30e66589 feat(iam): add web-app-opencloud and web-app-opentalk with shared OIDC + LDAP
Implements requirement 015. Both new roles join the central Keycloak
realm and consume the central OpenLDAP through the same patterns as
web-app-nextcloud, so users can move between Files (OpenCloud) and
Video (OpenTalk) without separate accounts.

OpenCloud (web-app-opencloud)
- Single-binary deploy of opencloudeu/opencloud:4.0.6 at open.cloud.<DOMAIN>
- External Keycloak as IdP (OC_EXCLUDE_RUN_SERVICES=idp,
  PROXY_AUTOPROVISION_ACCOUNTS=true, PROXY_ROLE_ASSIGNMENT_DRIVER=oidc)
- Direct OpenLDAP user/group source via OC_LDAP_*
- Co-deployable with web-app-nextcloud (next.cloud.<DOMAIN> stays put)
- WEB_OPTION_OPENTALK_URL surfaces the OpenTalk meeting launcher into
  the Files UI when web-app-opentalk is in scope

OpenTalk (web-app-opentalk)
- Controller + LiveKit + web-frontend + dedicated Redis + dedicated MinIO
  (controller refuses to start without an S3 backend) at talk.<DOMAIN>
- Uses shared svc-db-postgres for relational data and shared
  web-svc-coturn for STUN/TURN (no dedicated TURN provisioning)
- Native Keycloak integration via controller.toml [oidc.*] +
  [user_search] backend = "keycloak_webapi"; LDAP is consumed
  transitively through Keycloak's federation
- Frontend env exposes SHARED_FOLDER_OPENCLOUD_URL when web-app-opencloud
  is in scope, wiring the in-meeting OpenCloud file picker
- Bucket bootstrap is idempotent: an Ansible task waits for MinIO and
  creates the configured bucket via mc

Cross-cutting
- Extends PORT_BANDS public.relay to 65535 so LiveKit's media UDP range
  (60000-60999) can coexist with web-svc-coturn (20000-39999),
  web-app-bigbluebutton (40000-49999), and web-app-nextcloud's onboard
  TURN (50000-59999)
- All credentials (OIDC client secrets, LDAP bind, TURN auth_secret,
  MinIO root, LiveKit API, OpenCloud JWT/transfer) are sourced via
  lookup('config', ..., 'credentials.*'); none are committed in plain text
- Each role ships IAM/LDAP docs mirroring web-app-nextcloud and
  role-local Playwright specs that cover the administrator AND biber
  personas through OIDC

Validated end-to-end via the Role Loop (deploy-fresh-purged-apps then
deploy-reuse-kept-apps with SERVICES_DISABLED=matomo,email): all five
OpenTalk containers + the OpenCloud container come up cleanly, the
controller successfully completes OIDC discovery against Keycloak, and
both canonical hostnames return HTTP 200 through the central reverse
proxy. Browser-validated assertions (admin role mapping, full SSO logout
propagation, OpenCloud<->OpenTalk cross-launch from a real LDAP user)
remain as TODOs in each role's TODO.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 16:56:58 +02:00
kevinveenbirkenbachandClaude Opus 4.7 22af634834 docs(requirements): refine 015 with concrete tech choices
- Pin OpenCloud to opencloudeu/opencloud image (Heinlein fork)
- Note OpenCloud uses embedded KV store, no external SQL backend
- Pick LiveKit as OpenTalk signaling backend (upstream default)
- Reuse svc-db-postgres for OpenTalk and web-svc-coturn for STUN/TURN
- Set canonical hostnames: open.cloud.* and talk.*; keep next.cloud.* for Nextcloud (parallel operation)
- Reference svc-db-openldap explicitly and use application_administrators LDAP group per req 004
- Require both roles enabled by default (not in SERVICES_DISABLED)
- Add TURN shared secret to no-plaintext list

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 16:56:58 +02:00
kevinveenbirkenbachandClaude Opus 4.7 3214875eb6 docs(requirements): add 015 OpenCloud + OpenTalk IAM integration
Specifies new web-app-opencloud and web-app-opentalk roles that
integrate with the central Keycloak (OIDC) and OpenLDAP services
analogously to web-app-nextcloud, including SSO, LDAP-driven
auto-provisioning, group-based admin mapping, OpenCloud<->OpenTalk
file/meeting interop, propagated logout, and Playwright coverage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 16:56:58 +02:00
kevinveenbirkenbach f4d33063ae Merge branch 'main' into feature/alpha-to-beta 2026-05-06 16:37:34 +02:00
kevinveenbirkenbach fc826bebc7 Merge pull request #232 from kevinveenbirkenbach/feature/web-app-hugo
feat(web-app-hugo): add static-site role per req-016
2026-05-06 16:32:14 +02:00
kevinveenbirkenbach 8267269b5c Merge branch 'main' into feature/moodle-self-built 2026-05-06 16:09:25 +02:00
kevinveenbirkenbachandClaude Opus 4.7 e6b886e0ae docs(requirements): 015 - KIX Service Management integration
Tracks the realistic scope for a `web-app-kix` role: OAuth2-proxy in
front (Keycloak SSO with realm-level 2FA), header-trust auth into
KIX, LDAP as the user directory, SMTP for outbound, dashboard card,
universal-logout and a Playwright E2E for the gated login/logout
flow. Out-of-scope items (OpenProject/GitLab cross-link, XWiki
content embed, Nextcloud-backed attachments, ActivityPub) are listed
explicitly so future requirements can pick them up individually.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 00:20:40 +02:00
kevinveenbirkenbach c0891bd40a Merge branch 'main' into feature/web-app-fediwall 2026-05-06 00:02:15 +02:00
kevinveenbirkenbachandClaude Opus 4.7 60036a9249 test(lint): forbid raw project-tree walks in tests; route through utils.cache.files
Add tests/lint/repository/test_no_raw_project_walk.py: AST-walks every
.py file under tests/ and flags call expressions matching the forbidden
shapes — `<x>.rglob(...)`, `os.walk(...)`, `glob.glob(...)` — including
their aliased imports. The lint blocks any NEW raw walk from sneaking
in; pre-existing offenders are migrated below.

Background
==========
Pytest runs every test in one process. A raw walk over the repo tree
re-iterates the same paths and re-stats the same inodes for every test
that needs them, so the cost scales linearly with the number of lint /
integration tests doing project scans. Routing every walk through
`utils.cache.files.iter_project_files(...)` (or
`iter_project_files_with_content(...)`, `iter_non_ignored_files(...)`,
`read_text(...)`) shares one filesystem walk + one read per file
across the whole pytest session. See docs/agents/action/testing.md.

Migration
=========
Refactored to the cached helpers (broad project-tree walks):

  Lint
    tests/lint/ansible/test_no_literal_no_log.py
    tests/lint/ansible/test_no_sh_lc_pipefail.py
    tests/lint/ansible/test_run_once_tags.py
    tests/lint/ansible/test_service_shared_consistency.py
    tests/lint/filesystem/test_python_shebangs.py
    tests/lint/repository/test_folder_item_limit.py
    tests/lint/repository/test_markdown_links.py
    tests/lint/repository/test_role_meta_layout.py
    tests/lint/repository/test_todo_transparency.py

  Integration / external / unit
    tests/integration/compose/test_no_raw_docker.py
    tests/integration/config/test_non_empty.py
    tests/integration/roles/includes/test_existence.py
    tests/integration/vars/test_facts_not_overridden.py
    tests/integration/workflows/test_dependabot_coverage.py
    tests/external/repository/test_urls_reachable.py
    tests/unit/cli/deploy/development/test_inventory_vars_file_spot.py

Tagged `# noqa: project-walk` (legacy; future commits migrate them
incrementally — the lint pinpoints each offender and the fail message
points at the cached helpers and explains when noqa is appropriate):

  ~30 further test files (small per-role globs, scripts/utils subtree
  scans, dynamic Jinja-driven globs that need richer refactors).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 23:56:06 +02:00
kevinveenbirkenbach 8543e5694d Merge branch 'main' into feature/opencloud-opentalk-iam 2026-05-05 23:14:59 +02:00
kevinveenbirkenbachandClaude Opus 4.7 c8b635c5e8 feat(ci): diff-driven app whitelist for deploy tests
Narrow the test-deploy-{server,universal,workstation} matrix to roles
actually impacted by the branch's diff against origin/main, expanded
transitively over run_after + dependencies + shared services.

Why: full-matrix deploy CI on every PR is wasteful; explicit per-PR
whitelisting is error-prone. The resolver derives the affected set
automatically while remaining fail-safe.

Behaviour (in resolve_effective_whitelist.sh precedence order):
- whitelist input "__ALL__"  -> empty whitelist (force full deploy)
- whitelist input non-empty  -> verbatim
- whitelist input empty      -> diff vs origin/main
  - empty diff or any path outside roles/<role>/   -> __ALL__
  - all paths under roles/<role>/                  -> reverse closure

Fail-safe: any seed that is not modellable in CombinedResolver
(no application_id and not referenced by any role's run_after) and
any resolver runtime error MUST trigger a fall-back to __ALL__.
The closure never silently shrinks the deploy matrix.

test-deploy-local.yml is intentionally exempt (local/manual dispatch
keeps explicit whitelist semantics).

Documented in pipeline.md and workflows.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 23:14:59 +02:00
kevinveenbirkenbachandClaude Opus 4.7 8cca399c19 feat(ci): diff-driven app whitelist for deploy tests
Narrow the test-deploy-{server,universal,workstation} matrix to roles
actually impacted by the branch's diff against origin/main, expanded
transitively over run_after + dependencies + shared services.

Why: full-matrix deploy CI on every PR is wasteful; explicit per-PR
whitelisting is error-prone. The resolver derives the affected set
automatically while remaining fail-safe.

Behaviour (in resolve_effective_whitelist.sh precedence order):
- whitelist input "__ALL__"  -> empty whitelist (force full deploy)
- whitelist input non-empty  -> verbatim
- whitelist input empty      -> diff vs origin/main
  - empty diff or any path outside roles/<role>/   -> __ALL__
  - all paths under roles/<role>/                  -> reverse closure

Fail-safe: any seed that is not modellable in CombinedResolver
(no application_id and not referenced by any role's run_after) and
any resolver runtime error MUST trigger a fall-back to __ALL__.
The closure never silently shrinks the deploy matrix.

test-deploy-local.yml is intentionally exempt (local/manual dispatch
keeps explicit whitelist semantics).

Documented in pipeline.md and workflows.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 23:06:47 +02:00
kevinveenbirkenbach 041510d193 Merge branch 'main' into feature/alpha-to-beta 2026-05-05 22:59:45 +02:00
kevinveenbirkenbachandClaude Opus 4.7 91fadbdcc5 feat(ci): diff-driven app whitelist for deploy tests
Narrow the test-deploy-{server,universal,workstation} matrix to roles
actually impacted by the branch's diff against origin/main, expanded
transitively over run_after + dependencies + shared services.

Why: full-matrix deploy CI on every PR is wasteful; explicit per-PR
whitelisting is error-prone. The resolver derives the affected set
automatically while remaining fail-safe.

Behaviour (in resolve_effective_whitelist.sh precedence order):
- whitelist input "__ALL__"  -> empty whitelist (force full deploy)
- whitelist input non-empty  -> verbatim
- whitelist input empty      -> diff vs origin/main
  - empty diff or any path outside roles/<role>/   -> __ALL__
  - all paths under roles/<role>/                  -> reverse closure

Fail-safe: any seed that is not modellable in CombinedResolver
(no application_id and not referenced by any role's run_after) and
any resolver runtime error MUST trigger a fall-back to __ALL__.
The closure never silently shrinks the deploy matrix.

test-deploy-local.yml is intentionally exempt (local/manual dispatch
keeps explicit whitelist semantics).

Documented in pipeline.md and workflows.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 22:59:45 +02:00
kevinveenbirkenbach d6cbd9729a Merge branch 'main' into feature/web-app-hugo 2026-05-05 22:50:37 +02:00
kevinveenbirkenbachandClaude Opus 4.7 9524c50928 feat(ci): diff-driven app whitelist for deploy tests
Narrow the test-deploy-{server,universal,workstation} matrix to roles
actually impacted by the branch's diff against origin/main, expanded
transitively over run_after + dependencies + shared services.

Why: full-matrix deploy CI on every PR is wasteful; explicit per-PR
whitelisting is error-prone. The resolver derives the affected set
automatically while remaining fail-safe.

Behaviour (in resolve_effective_whitelist.sh precedence order):
- whitelist input "__ALL__"  -> empty whitelist (force full deploy)
- whitelist input non-empty  -> verbatim
- whitelist input empty      -> diff vs origin/main
  - empty diff or any path outside roles/<role>/   -> __ALL__
  - all paths under roles/<role>/                  -> reverse closure

Fail-safe: any seed that is not modellable in CombinedResolver
(no application_id and not referenced by any role's run_after) and
any resolver runtime error MUST trigger a fall-back to __ALL__.
The closure never silently shrinks the deploy matrix.

test-deploy-local.yml is intentionally exempt (local/manual dispatch
keeps explicit whitelist semantics).

Documented in pipeline.md and workflows.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 22:49:41 +02:00
kevinveenbirkenbachandClaude Opus 4.7 5317c83e37 docs(req-015): suppress url-reachability check on placeholder URLs
The URL extractor truncates `…/stable<MAJOR><MINOR>/…` at the `<` and
treats the bare `…/direct/stable` as a live URL (HTTP 404). The
`api.github.com/repos/.../tags` reference uses a literal `...`
placeholder and 404s for the same reason. Both are illustrative, not
fetchable. Mark them with `<\!-- nocheck: url -->` per the suppression
catalog.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 21:42:55 +02:00
kevinveenbirkenbachandClaude Opus 4.7 c6f4b7fb4b feat(web-app-fediwall): integrate Fediwall as multi-wall public timeline aggregator
New Ansible role rendering one Fediwall instance with one or more
configurable walls under https://fediwall.<DOMAIN_PRIMARY>/<slug>/. Each
wall's `wall-config.json` is forwarded VERBATIM from
meta/services.yml.fediwall.walls[*].config — the YAML there is the
single source of truth, the role's template applies no defaults. Two
matrix-deploy variants ship: variant 0 inherits the services.yml
default (one wall, polls all active Mastodon-API-compatible siblings via
the new `lookup('fediwall_active', ...)` plugin); variant 1 overrides
with two explicitly configured walls (default + mastodon-only) so the
per-wall server scoping is observable end-to-end.

End-to-end Playwright spec drives biber's first OIDC login on Mastodon
and ldapauth-mediated form login on Friendica through the same web UI a
human would use — biber's local accounts come into existence lazily on
first SSO login, exactly as in production. The cross-Fediverse test is
data-driven against each wall's `wall-config.json.servers`: a sibling's
post is visible iff its host is listed there.

Cross-cutting fixes that surfaced during the iteration ship alongside:

- utils/cache + utils/templating: type-preserving render path for
  single-Jinja-expression scalars in `lookup('config', ...)`.
  `_templar_render_best_effort` always coerced its output to `str`, so a
  list-returning lookup like `{{ lookup('fediwall_active', 'domains') }}`
  collapsed to its Python repr. `_render_scalar` now detects the
  `{{ ... }}`-only shape and routes it through the new
  `_templar_render_preserve_type` helper, which returns templar's
  native value (list/dict/etc.) instead of stringifying.

- web-app-friendica/tasks/04_addons.yml: force a `disable` + `enable`
  cycle for enabled addons. Friendica's `addon enable` only fires the
  `_install` hooks on the disabled→enabled transition, so an
  already-enabled-but-broken state (the addon shows up in `list
  enabled` but its `_install`-registered hooks are missing from the
  `hook` DB table) silently rejected every ldapauth login at runtime.
  Cycling through disable+enable reliably re-registers the hooks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 19:50:05 +02:00
kevinveenbirkenbachandClaude Opus 4.7 01e0937240 fix(iam): make OpenCloud and OpenTalk Playwright OIDC scenarios pass and add OpenTalk recorder
Iterates the role-local Playwright specs from a structural skeleton into
fully green end-to-end scenarios that exercise the SSO handoff for both
the administrator and the biber LDAP persona, against the actual
deployed stack, and adds optional meeting recording for OpenTalk.

OpenCloud (web-app-opencloud)
- Add Keycloak's URL to connect-src and frame-src in the role CSP via
  lookup('tls', 'web-app-keycloak', 'url.base') so the SPA can hit the
  OIDC discovery and authorize endpoints from the browser
- Switch to read-only LDAP semantics: PROXY_AUTOPROVISION_ACCOUNTS=false,
  GRAPH_USERNAME_MATCH removed, GRAPH_ASSIGN_DEFAULT_USER_ROLE=true
- Set OC_LDAP_DISABLE_USER_MECHANISM=none so the user-lookup filter
  stops referencing the OpenCloud-only `openclouduserenabled` attribute
  that the central LDAP schema does not define
- Pin the image to opencloudeu/opencloud:4.0.6
- Spec primes localStorage forceAllowOldBrowser, bypasses the "browser
  not supported" splash, submits via Enter, asserts the Files-view banner

OpenTalk (web-app-opentalk)
- Provision a dedicated confidential Keycloak client `opentalk-controller`
  via kcadm so the controller can introspect access tokens; the shared
  realm client stays public for the browser PKCE flow. The service
  account is granted the realm-management view-users / query-users roles
  for the Keycloak admin Web API user-search backend
- Inject an nginx vhost extension via webserver_extra_configuration that
  routes /v1/, /signaling, and /livekit on open.talk.<DOMAIN> to the
  controller and LiveKit upstreams; the default route stays on the
  frontend
- Fix the frontend env vars to upstream names (OIDC_ISSUER, BASE_URL=""),
  pin the frontend image to v2.8.1
- Spec races between auto-redirect and explicit "Sign in" CTA, submits
  via Enter, asserts the post-login Home-link in the dashboard
- Add OpenTalk recorder (registry.opencode.de/opentalk/recorder v0.16.2)
  plus RabbitMQ broker (rabbitmq:4.2.4); wire the controller to publish
  recording jobs on the `opentalk_recorder` queue and the recorder to
  consume them; provision a dedicated confidential `opentalk-recorder`
  Keycloak client for the recorder service account
- Reference Keycloak and the cross-app domain through lookup('tls', ...)
  and lookup('domain', ...) in meta/server.yml instead of literal
  `auth.<DOMAIN>` / `open.cloud.<DOMAIN>` strings

Cross-cutting
- Rename canonical hostnames to the <vendor>.<category> pattern:
  - web-app-opentalk:    talk.<DOMAIN>  -> open.talk.<DOMAIN>
  - web-app-bigbluebutton: meet.<DOMAIN> -> bbb.talk.<DOMAIN>
- Restructure both READMEs to the per-role README contract; drop emojis
  from headings; strip em dashes / history phrases / self-SPOT
  declarations from IAM.md / LDAP.md / TODO.md
- Replace technical galaxy_info descriptions with user-facing copy so
  the dashboard cards read clearly

Validated end-to-end via the Role Loop (deploy-fresh-kept-apps then
deploy-reuse-kept-apps with SERVICES_DISABLED=matomo,email): all
seven OpenTalk containers + the OpenCloud container come up healthy,
scripts/tests/e2e/rerun-spec.sh web-app-opencloud and
scripts/tests/e2e/rerun-spec.sh web-app-opentalk both finish with
`2 passed`, and `make test` is green (1604 + 162 tests).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 17:05:10 +02:00
kevinveenbirkenbachandClaude Opus 4.7 84058f0cba feat(iam): add web-app-opencloud and web-app-opentalk with shared OIDC + LDAP
Implements requirement 015. Both new roles join the central Keycloak
realm and consume the central OpenLDAP through the same patterns as
web-app-nextcloud, so users can move between Files (OpenCloud) and
Video (OpenTalk) without separate accounts.

OpenCloud (web-app-opencloud)
- Single-binary deploy of opencloudeu/opencloud:4.0.6 at open.cloud.<DOMAIN>
- External Keycloak as IdP (OC_EXCLUDE_RUN_SERVICES=idp,
  PROXY_AUTOPROVISION_ACCOUNTS=true, PROXY_ROLE_ASSIGNMENT_DRIVER=oidc)
- Direct OpenLDAP user/group source via OC_LDAP_*
- Co-deployable with web-app-nextcloud (next.cloud.<DOMAIN> stays put)
- WEB_OPTION_OPENTALK_URL surfaces the OpenTalk meeting launcher into
  the Files UI when web-app-opentalk is in scope

OpenTalk (web-app-opentalk)
- Controller + LiveKit + web-frontend + dedicated Redis + dedicated MinIO
  (controller refuses to start without an S3 backend) at talk.<DOMAIN>
- Uses shared svc-db-postgres for relational data and shared
  web-svc-coturn for STUN/TURN (no dedicated TURN provisioning)
- Native Keycloak integration via controller.toml [oidc.*] +
  [user_search] backend = "keycloak_webapi"; LDAP is consumed
  transitively through Keycloak's federation
- Frontend env exposes SHARED_FOLDER_OPENCLOUD_URL when web-app-opencloud
  is in scope, wiring the in-meeting OpenCloud file picker
- Bucket bootstrap is idempotent: an Ansible task waits for MinIO and
  creates the configured bucket via mc

Cross-cutting
- Extends PORT_BANDS public.relay to 65535 so LiveKit's media UDP range
  (60000-60999) can coexist with web-svc-coturn (20000-39999),
  web-app-bigbluebutton (40000-49999), and web-app-nextcloud's onboard
  TURN (50000-59999)
- All credentials (OIDC client secrets, LDAP bind, TURN auth_secret,
  MinIO root, LiveKit API, OpenCloud JWT/transfer) are sourced via
  lookup('config', ..., 'credentials.*'); none are committed in plain text
- Each role ships IAM/LDAP docs mirroring web-app-nextcloud and
  role-local Playwright specs that cover the administrator AND biber
  personas through OIDC

Validated end-to-end via the Role Loop (deploy-fresh-purged-apps then
deploy-reuse-kept-apps with SERVICES_DISABLED=matomo,email): all five
OpenTalk containers + the OpenCloud container come up cleanly, the
controller successfully completes OIDC discovery against Keycloak, and
both canonical hostnames return HTTP 200 through the central reverse
proxy. Browser-validated assertions (admin role mapping, full SSO logout
propagation, OpenCloud<->OpenTalk cross-launch from a real LDAP user)
remain as TODOs in each role's TODO.md.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 09:10:58 +02:00
kevinveenbirkenbachandClaude Opus 4.7 ef13086164 feat(req-016): add web-app-hugo role for static-site hosting
Implements requirement 016: a `web-app-hugo` role that builds and
serves Hugo static sites via a multi-stage Dockerfile (extended Hugo
builder + nginx serve), modeled on `web-app-littlejs` (no DB, single
canonical domain, sys-stk-full + docker_git_repository_* for the
upstream content clone).

Default content source is the official Hugo documentation
(`gohugoio/hugoDocs` pinned to tag `v0.148.0`, commit
36e3d7b7b521a165bdbf8f63cd417720f37832c6) so a fresh deploy renders
a real Hugo site end-to-end. Content repo and ref are
inventory-overridable via `services.hugo.source_repository` /
`services.hugo.source_version`; build env (`hugo_environment`,
`hugo_minify`) are overridable too. `--baseURL` is derived from
`lookup('tls', application_id, 'url.base')`.

Validated end-to-end on the local stack:
- `make deploy-fresh-purged-apps APPS=web-app-hugo FULL_CYCLE=true`
  succeeds (`failed=0`).
- Container `infinito-hugo` reports `Up (healthy)` on the wget
  healthcheck.
- `https://hugo.infinito.example/` serves the rendered hugoDocs
  homepage with HSTS + CSP headers.
- All three Playwright assertions (front-page reachability + HSTS,
  CSP header present, non-empty title with Hugo content sentinel)
  pass under the deploy-time `test-e2e-playwright` runner.
- Second `deploy-reuse-kept-apps` is idempotent: git pull reports
  `changed: false`, no compose-build / compose-up handler fires.

V1 explicitly supports a single canonical domain — asserted in
`tasks/01_core.yml`. Multi-canonical-domain support is out of scope
and deferred to a follow-up. Theme is whatever the upstream content
repo bundles (themes/ or go.mod / Hugo Modules); a separate theme
override is also a follow-up.

The Dockerfile installs Node.js + npm in the builder stage and runs
`npm install` when the upstream repo ships a `package.json` —
hugoDocs uses Hugo's JS pipeline with `import 'alpinejs'`, which
requires `node_modules/`. Skipped silently when no `package.json` is
present, so a custom site without JS deps builds unchanged.

Allocations: local HTTP port 8008 (via
`cli meta ports suggest --scope local --category http`); local
subnet 192.168.102.240/28 (via `cli meta networks suggest --clients 8`).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 21:57:55 +02:00
kevinveenbirkenbachandClaude Opus 4.7 2381352017 docs(requirements): refine 015 with concrete tech choices
- Pin OpenCloud to opencloudeu/opencloud image (Heinlein fork)
- Note OpenCloud uses embedded KV store, no external SQL backend
- Pick LiveKit as OpenTalk signaling backend (upstream default)
- Reuse svc-db-postgres for OpenTalk and web-svc-coturn for STUN/TURN
- Set canonical hostnames: open.cloud.* and talk.*; keep next.cloud.* for Nextcloud (parallel operation)
- Reference svc-db-openldap explicitly and use application_administrators LDAP group per req 004
- Require both roles enabled by default (not in SERVICES_DISABLED)
- Add TURN shared secret to no-plaintext list

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 19:40:23 +02:00
kevinveenbirkenbachandClaude Opus 4.7 704e754f52 docs(requirements): add 015 OpenCloud + OpenTalk IAM integration
Specifies new web-app-opencloud and web-app-opentalk roles that
integrate with the central Keycloak (OIDC) and OpenLDAP services
analogously to web-app-nextcloud, including SSO, LDAP-driven
auto-provisioning, group-based admin mapping, OpenCloud<->OpenTalk
file/meeting interop, propagated logout, and Playwright coverage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 19:03:43 +02:00
kevinveenbirkenbachandClaude Opus 4.7 68a7e7264e docs(req-016): add web-app-hugo role for static-site hosting
Introduces requirement 016 for a `web-app-hugo` role that builds and
serves Hugo static sites — one per canonical domain — with a build /
serve split (one-shot Hugo builder writing to a named volume, nginx
serving the result).

Default content source is `gohugoio/hugoDocs` pinned to tag `v0.148.0`
(commit 36e3d7b7b521a165bdbf8f63cd417720f37832c6) so an out-of-the-box
deploy validates the full pipeline against a real, non-trivial Hugo
project. `source.repo` / `source.ref` are inventory-overridable.

Numbered 016 because 013 (alpha-to-beta promotion), 014 (svc-runner
CI), and 015 (Moodle self-built image) are already reserved on other
branches.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 18:52:46 +02:00
kevinveenbirkenbach 63ddd24aaf feat(req-015): self-built Moodle image, OIDC+LDAP hybrid + LDAP-only variants 2026-05-04 18:37:03 +02:00
kevinveenbirkenbach f6aeb1480e Merge branch 'feature/package-cache-frontend' into feature/alpha-to-beta 2026-05-04 16:57:47 +02:00
kevinveenbirkenbachandClaude Opus 4.7 787be03409 fix(req-013): URL test failures + bluesky V1 cross-variant recovery
URL test fixes (tests.external.repository.test_urls_reachable):
- Delete unused `roles/web-app-bluesky/files/keycloak-bluesky-bridge/`
  Java SPI scaffold (pom.xml carried two unreachable Maven namespace
  URIs `http://maven.apache.org/POM/4.0.0`). The scaffold was never
  built (no Maven build pipeline) and never registered with Keycloak
  as an event listener; runtime impact is zero — the login-broker
  is the actual provisioning agent. The doc 013 Future hardening
  note now describes a fresh design that starts from external
  secrets storage instead of the SPI's old Keycloak-attribute model.
- Add `# nocheck: url` markers on two `scripts/docker/cache/package.sh`
  Nexus proxy `remoteUrl` config strings (`deb.debian.org/debian-security`,
  `repo.packagist.org`) — both return 404 on bare-root GET because
  apt/composer clients always append paths; downstream consumers
  verify reachability of the real paths.

Bluesky V1 cross-variant recovery (deploy-fresh-kept then deploy-reuse-kept):
- Broker now recovers from PDS `Handle already taken` when its
  in-memory cache is empty but the PDS still holds the account from
  a previous broker session. Implementation: catch the createAccount
  error, `pdsResolveHandle()` to get the existing DID, then
  `pdsAdminUpdatePassword()` via the PDS admin Basic-auth API to
  reset the password to a fresh value the broker controls. This
  fixes the V0->V1 cross-variant deploy where the persistent
  `pds_data` volume carries the V0 account into V1.
- New `PDS_ADMIN_PASSWORD` env on the bluesky-broker container,
  sourced from the same `BLUESKY_ADMIN_PASSWORD` the PDS itself
  uses. The value passes through Jinja `replace('$', '$$')` because
  docker-compose interpolates the `environment:` map at parse time
  and would otherwise eat any `$word` substring (silently truncating
  the password to whatever survives interpolation; PDS rejects the
  resulting Basic-auth header with HTTP 401).

Local validation:
- `make test`: 56/57 pass; the one failure is unrelated
  (`test_arrays_are_ascending` on `.claude/settings.json` —
  Claude Code auto-appended WebFetch domains during the iteration
  session, the file is sandbox-write-denied so a manual sort by
  the operator is required to clear that lint).
- `tests.external.repository.test_urls_reachable`: green (was
  failing on the 3 URLs above).
- `VARIANT=0 make deploy-fresh-purged-apps APPS=web-app-bluesky
  FULL_CYCLE=true`: PASS 1 + PASS 2 both `failed=0`, OIDC + baseline
  Playwright tests green.
- `VARIANT=1 make deploy-reuse-kept-apps APPS=web-app-bluesky`:
  `failed=0`, all 3 Playwright tests green (baseline + OIDC variant
  A+ recovery + LDAP).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 12:17:36 +02:00
kevinveenbirkenbachandClaude Opus 4.7 91c57e0471 feat(req-013): alpha-to-beta promotion for 13 in-scope roles
Promote akaunting, baserow, bluesky, bookwyrm, bridgy-fed, flowise,
fusiondirectory, jenkins, joomla, minio, postmarks, libretranslate, xmpp
from `lifecycle: alpha` to `lifecycle: beta` per requirement 013.
socialhome stays alpha (operator-excluded).

SSO/LDAP integration per role:
- minio + jenkins + joomla + fusiondirectory: native first-party paths
  (MINIO_IDENTITY_OPENID/_LDAP, oic-auth + ldap + role-strategy JCasC,
  plg_system_keycloak, LDAP-as-storage). All V0+V1 verified.
- akaunting, baserow, bookwyrm, flowise, postmarks, libretranslate:
  oauth2-proxy perimeter gate as universal glue path. Native in-app
  OIDC integrations deferred to follow-up issues #219 (Baserow),
  #220 (BookWyrm), #221 (Akaunting).
- bluesky: variant A+ login-broker (oauth2-proxy → broker → social-app)
  with AES-256-GCM-encrypted PDS app-passwords cached in-process
  (Keycloak user-attribute storage caused LDAP federation conflicts
  that broke other realm-clients' OIDC logins).
- xmpp: native ejabberd LDAP backend for both variants
  (mod_oauth2_client is contrib-only and deferred).
- bridgy-fed: documented SSO/LDAP/RBAC exception (federated source-
  platform auth, no local user table).

Project-wide bugfixes:
- web-app-oauth2-proxy: propagate X-Forwarded-User /
  -Preferred-Username / -Email / -Groups via auth_request_set bridge
  (set_xauthrequest + pass_user_headers in cfg + nginx headers in
  following_directives.conf). Benefits all 8 oauth2-proxy consumers.
- scripts/tests/deploy/local/deploy/fresh-kept-app.sh: bake
  `RUNTIME=dev` into the matrix-init host vars so the Playwright
  E2E gate fires (was silently skipped on kept-deploys).

From-scratch role implementations: jenkins (JCasC + plugin pre-bake +
JVM cacerts CA-trust entrypoint), fusiondirectory (LDAP-as-storage
compose), xmpp (ejabberd LDAP backend ejabberd.yml).

Verification:
- Per-role baseline: each in-scope role passed standalone V0/V1
  Playwright suites green.
- Multi-app fresh-purged-apps over all 13 in-scope roles
  (FULL_CYCLE=true): Pass 1 sync + Pass 2 async both `failed=0`,
  every role's Playwright suite green.

Doc 013 acceptance section reflects the divergences (oauth2-proxy
glue path, in-memory bluesky cache, deferred contrib modules) with
explicit follow-up issue references.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 12:47:01 +02:00
kevinveenbirkenbach 1e8ea03e63 docs(req-015): self-built Moodle image, OIDC+LDAP hybrid, two variants
Add requirement 015 for replacing the discontinued
``bitnamilegacy/moodle`` image with a self-built one based on
the official ``php:8.3-fpm`` and the floating Moodle stable
tarball, sourced via the ``moodlehq/moodle-docker`` reference
patterns where applicable.

Identity integration is laid out as two role-variant slots
running side-by-side in CI:

* Variant 0 — ``auth_oidc`` (Keycloak SSO) + ``auth_ldap`` in
  sync-only mode for cron-driven attribute propagation.
* Variant 1 — ``auth_ldap`` as the primary login plugin (no
  OIDC), with the same cron-driven sync.

The requirement nails down the source-of-truth hierarchy
(LDAP = canonical store, Keycloak federation mapper = SPOT for
Keycloak ↔ LDAP attribute pairing, Keycloak Account Console =
sole edit surface, Moodle = read-only via locked field-map),
the Keycloak ↔ LDAP federation mode (WRITABLE), the
``auth_ldap`` ``field_lock_<col>=locked`` enforcement, the
custom LDAP schema for the three attributes that have no
core ``inetOrgPerson`` equivalent
(``infinitoNamePhoneticGiven``, ``infinitoNamePhoneticFamily``,
``infinitoTimezone`` under the project's existing
``1.3.6.1.4.1.99999.x`` placeholder OID prefix), and the cron
sidecar that runs Moodle's scheduled tasks on a ≤ 60s loop.

End-to-end coverage is via a Playwright spec that exercises
all three propagation paths per variant: OIDC at login (variant
0 only), ``auth_ldap`` sync without login (both variants), and
direct LDAP-bind login (variant 1 only). Test seeds biber's
profile through the Keycloak Admin REST API in variant 0 or
directly via ``ldapmodify`` in variant 1, mutates ``phone1`` /
``phone2`` server-side, and asserts propagation into Moodle
without an additional login round-trip. Also asserts
read-only enforcement on Moodle's profile-edit form.

The role MUST iterate per the matrix-variant guidance in
``docs/contributing/design/variants.md``: a FULL-matrix baseline
first, then ``VARIANT=<idx>`` pinned reuse-deploy iterations,
``make test`` green before every deploy, ``SERVICES_DISABLED``
``matomo,email`` persisted from the start. The requirement
explicitly forbids intermediate commits; the implementing
agent works the full set of acceptance criteria to completion
and lands the migration as a single commit on
``feature/moodle-self-built``.
2026-05-01 11:40:46 +02:00
kevinveenbirkenbach 3c2c1d1f89 Merge branch 'main' into feature/package-cache-frontend
Adopt the version bumps from #222 against the current
``meta/services.yml`` layout instead of the deprecated
``config/main.yml`` files (post-req-008):

  - roles/web-app-funkwhale/meta/services.yml:
      funkwhale (front): '2'      -> 2.0.2
      api:               '2'      -> 2.0.2
  - roles/web-app-prometheus/meta/services.yml:
      alertmanager:      v0.32.0  -> v0.32.1

Other version bumps from #222 were already applied on this branch
(baserow 2.2.2, prometheus v3.11.3). The three legacy
``config/main.yml`` files restored from the incoming side are
re-deleted because the source-of-truth has moved to ``meta/`` here.

Also picks up:

  - docs/requirements/014-svc-runner-ci.md (new)
  - skills-lock.json (latest hashes)
2026-05-01 10:52:49 +02:00
kevinveenbirkenbachandClaude Opus 4.7 cda998a976 docs(req-014): rewrite three broken relative links as plain code refs
`docs/requirements/014-svc-runner-ci.md` referenced three paths
(`cli/deploy/runner/`, `roles/svc-runner/`) that the document itself
defines as future acceptance criteria — they don't exist yet, so the
markdown-link-resolver test (`test_markdown_relative_links_resolve`)
hard-failed `make test` for the whole repo.

Drop the link syntax, keep the path as inline code. Same meaning, no
broken-link false positives.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 17:47:09 +02:00
kevinveenbirkenbachandClaude Opus 4.7 803ed8451d feat(req-013): variant A+ Bluesky OIDC integration via in-role login-broker
Promotes web-app-bluesky's OIDC integration to a working Keycloak SSO
flow that ends up in the official Bluesky social-app web client
WITHOUT exposing the synthesised PDS app-password to the browser.

* New `login-broker` Node sidecar under
  `roles/web-app-bluesky/files/login-broker/`. The broker sits behind
  `web-app-oauth2-proxy` and in front of the official
  `@bluesky-social/social-app` web client. On a user's first
  OIDC-authenticated visit it:
    1. Looks up the Keycloak user via the Admin REST API.
    2. Provisions a Bluesky PDS account via createAccount if no
       encrypted app-password is recorded yet, encrypts the
       synthesised app-password with AES-256-GCM, and stores the
       ciphertext as the `bluesky_app_password_enc` user attribute.
    3. Decrypts the password and exchanges it for a PDS session via
       createSession.
    4. Renders an HTML handoff page that drops the session JWTs
       into localStorage["BSKY_STORAGE"] (canonical social-app key)
       and redirects to /.
  For subsequent requests carrying the handoff cookie, the broker
  reverse-proxies to the social-app upstream.
* `social-app` is built from a pinned upstream tag (1.121.0) so the
  broker's BSKY_STORAGE schema stays in sync with the upstream
  persistence layer.
* `roles/web-app-bluesky/tasks/05_keycloak_admin_client.yml` adds a
  service-account Keycloak client for the broker (deterministic
  secret from the credentials vault, view-users + manage-users
  realm-management roles). kcadm output is filtered for the JVM
  cgroup-detection warnings on cgroup-v2 hosts.
* `roles/web-app-bluesky/tasks/01_core.yml` switches from
  sys-svc-compose to sys-stk-backend so the oauth2-proxy sidecar is
  auto-included when services.oauth2.enabled is true. A pre-task
  heals the oauth2-proxy bind-mount when a previous deploy left it
  as an empty directory.
* `meta/schema.yml` adds `bridge_encryption_key` (AES-256-GCM key)
  and `kc_admin_client_secret` (broker's KC service-account secret).
* `meta/services.yml` enables oauth2 with origin `bluesky-broker:8080`,
  whitelist for /xrpc/ and /.well-known/ so federation traffic to
  api.bluesky.<domain> stays open.
* `meta/variants.yml` adds the LDAP variant so the matrix-deploy
  exercises both auth-flow legs.
* `templates/extra_locations.conf.j2` uses the new
  NETWORK_PUBLIC_DNS_RESOLVERS SPOT and the on_off filter for the
  nginx resolver directive in front of the public ip.bsky.app /
  bsky.app upstreams.
* Documentation:
  - `roles/web-app-bluesky/README.md` rewritten per documentation.md
    and readme_md.md (software-focused description, current SSO
    flow, no em-dashes, canonical Credits format).
  - `roles/web-app-bluesky/files/login-broker/README.md` covers the
    handoff sequence, env contract, and failure modes.
  - `roles/web-app-bluesky/files/keycloak-bluesky-bridge/README.md`
    cleaned up per documentation.md.
  - `docs/requirements/013-alpha-to-beta-promotion.md` bluesky
    per-role-notes updated to reference the variant A+ broker; new
    "Future hardening" section tracks key rotation, an external
    secrets store, the Joomla `?fallback=local` IP allowlist, and
    the still-source-only Keycloak event-listener SPI.
* `.github/dependabot.yml` adds the npm ecosystem entry that covers
  the broker's package.json metadata stub.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 17:46:30 +02:00
kevinveenbirkenbachandClaude Opus 4.7 084e19202d feat(req-013): native OIDC for web-app-joomla via in-role plg_system_keycloak
Promotes web-app-joomla's OIDC integration from "documented future
work" to a working native plugin shipped inside the role.

* New `plg_system_keycloak` Joomla 6 plugin under
  `roles/web-app-joomla/files/joomla-oidc-plugin/`. The plugin's PHP
  dependency `jumbojett/openid-connect-php` is vendored at deploy time
  inside the Joomla container (Composer is baked into the role's
  custom image), then packaged as a ZIP and installed via the Joomla
  CLI. The repo working tree carries no `vendor/` tree.
* Modus 3 per requirement 013 (Force-Frontend, Local-Backup-Backend):
  every visit to `/` and `/administrator` redirects to Keycloak
  unless the request explicitly carries `?fallback=local` AND the
  env-var `JOOMLA_OIDC_FALLBACK_ENABLED` is `true`. The fallback hatch
  is env-toggleable so high-security deployments can flip to Modus 1
  (no local form).
* RBAC group mapping: the plugin maps the Keycloak `groups` claim
  onto Joomla's standard usergroup IDs:
    /roles/web-app-joomla/administrator -> Super Users (id 8)
    /roles/web-app-joomla/editor        -> Editor      (id 4)
    /roles/web-app-joomla               -> Registered  (id 2)
  Users whose Keycloak groups match none of these paths are refused.
* Matrix-deploy variants flip the auth-flow gate: variant 0 is the
  canonical OIDC variant (this commit's primary path), variant 1
  flips OIDC off and LDAP on so Joomla's core LDAP authentication
  plugin against svc-db-openldap is the exercised auth path.
* Role wiring:
  - `tasks/07_oidc_plugin.yml` builds + installs the plugin idempotently.
  - `templates/env.j2` propagates JOOMLA_OIDC_* env into the container.
  - `meta/services.yml` enables `oidc` with `fallback_enabled: true`.
  - `meta/rbac.yml` declares the `editor` role.
  - `templates/playwright.env.j2` keys `OIDC_SERVICE_ENABLED` off
    `services.oidc.enabled` for the Playwright test gate.
* Playwright e2e covers three scenarios:
  - native OIDC redirect from `/` to Keycloak and back to Joomla,
  - `/administrator?fallback=local` hatch bypassing Keycloak,
  - LDAP variant against the core Joomla LDAP plugin.
* Documentation:
  - `roles/web-app-joomla/README.md` rewritten per documentation.md
    and readme_md.md (software-focused description, no em-dashes,
    canonical Credits format).
  - `roles/web-app-joomla/files/joomla-oidc-plugin/README.md` covers
    plugin build, env contract, claimed routes, and watch points.
  - `docs/requirements/013-alpha-to-beta-promotion.md` joomla
    per-role-notes updated to reference the in-role plugin and the
    Modus 3 fallback contract.
* `.github/dependabot.yml` adds the composer ecosystem entry that
  covers the plugin's `composer.json`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 17:42:35 +02:00
kevinveenbirkenbachandClaude Opus 4.7 6808291b87 docs(req-014): rewrite three broken relative links as plain code refs
`docs/requirements/014-svc-runner-ci.md` referenced three paths
(`cli/deploy/runner/`, `roles/svc-runner/`) that the document itself
defines as future acceptance criteria — they don't exist yet, so the
markdown-link-resolver test (`test_markdown_relative_links_resolve`)
hard-failed `make test` for the whole repo.

Drop the link syntax, keep the path as inline code. Same meaning, no
broken-link false positives.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 17:08:26 +02:00
kevinveenbirkenbachandClaude Opus 4.7 fdb234be1a docs(req-014): add autonomous-execution Procedure to req-014
Mandates iteration via docs/agents/action/iteration/workflow.md +
role.md, batched clarifying questions only at the start, no mid-run
ask prompts, no interruptions, and a single end-of-run commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 16:22:03 +02:00
kevinveenbirkenbachandClaude Opus 4.7 7adbfb863a docs(req-014): add svc-runner CI requirement
New requirements file 014-svc-runner-ci.md scoping a dedicated CI runner
role plus a cli/deploy/runner/ entry point (argparse-based) so CI can
run on a dedicated server instead of being bound by local hardware.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 16:22:03 +02:00
kevinveenbirkenbachandClaude Opus 4.7 621a95510a docs(req-014): add svc-runner CI requirement
New requirements file 014-svc-runner-ci.md scoping a dedicated CI runner
role plus a cli/deploy/runner/ entry point (argparse-based) so CI can
run on a dedicated server instead of being bound by local hardware.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 16:03:38 +02:00
kevinveenbirkenbachandClaude Opus 4.7 e1530c9912 test(docker): scope raw-docker guard to roles/ only
The wrapper convention applies inside Ansible roles. Bootstrap shell
scripts and CI workflows live outside `roles/` and either pre-date the
wrapper's installation or run on hosts that never see it; flagging them
adds noise without protecting the contract. Add a roles/ path-prefix
filter, rename the test method, drop the now-redundant `nocheck:
raw-docker` headers from the 6 GitHub workflows, and rewrite the two
suppression-doc examples on realistic in-scope scenarios (a per-line
marker on an Ansible task, a file-level marker on a role-bundled .sh).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 13:07:40 +02:00
kevinveenbirkenbachandClaude Opus 4.7 c54c40afa8 test(docker): migrate raw-docker guard onto unified suppression grammar
Drop the local `# no-raw-docker: skip` regex in favour of
utils.annotations.suppress.is_suppressed_at / is_suppressed_in_head
under rule key `raw-docker`, gaining per-line opt-outs (`# noqa:
raw-docker` / `# nocheck: raw-docker`) on top of the existing
file-level head suppression. Migrate the 6 GitHub-hosted-runner
workflow markers to the new grammar, lift the head scan to the catalog
default of 30 lines, and add the rule to the suppression catalog with
two examples.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 12:58:11 +02:00
kevinveenbirkenbach aa7f144455 test(suppression): unify # noqa / # nocheck marker grammar
Introduce a single grammar for per-line, per-block, and per-file
suppression markers across the test suite, replacing seven ad-hoc
syntaxes that had drifted apart.

Helper
  utils/annotations/suppress.py exposes is_suppressed_at,
  is_suppressed_in_head, is_suppressed_anywhere, line_has_rule, and
  suppressed_line_numbers. Markers may use either `noqa` or `nocheck`
  (case-insensitive synonyms), live inside `#`, `//`, `{# ... #}`, or
  `<\!-- ... -->` comments, and combine multiple kebab-case rules
  comma-separated. 17 unit tests cover the grammar in isolation.

Refactored consumers
  - tests/external/repository/test_urls_reachable.py (rule: url)
  - tests/external/docker/test_image_versions.py via
    utils/docker/version_updater.py (rule: docker-version)
  - tests/lint/repository/test_no_direct_yaml_calls.py (rule:
    direct-yaml)
  - tests/lint/ansible/test_service_shared_consistency.py (rule:
    shared)
  - tests/lint/ansible/roles/test_web_app_email_integration.py (rule:
    email)
  - tests/lint/repository/test_python_file_size.py (rule: file-size)
  - tests/lint/ansible/test_run_once_tags.py +
    tests/integration/roles/run_once/test_schema.py (rules: run-once,
    run-once-suffix)

Marker migration
  12 role tasks/main.yml files: `# run_once_<key>: deactivated`
  -> `# nocheck: run-once`. roles/web-app-suitecrm/meta/services.yml
  drops a malformed inline `noqa: intentional legacy pin` from a TODO
  comment so the new parser does not pick it up as a stray rule.

Caching wins
  Test files that previously loaded YAML / read files via raw
  yaml.safe_load + Path.read_text now route through utils.cache.yaml
  (load_yaml_any / load_yaml_str) and utils.cache.files.read_text:
    - test_service_shared_consistency.py
    - test_web_app_email_integration.py
    - tests/integration/roles/run_once/test_schema.py
    - utils/docker/version_updater.py
  This both speeds up repeated reads and stays consistent with the
  direct-yaml lint policy.

Documentation
  New SPOT page at docs/contributing/actions/testing/suppression.md
  with grammar, position semantics, the catalog of rules, examples,
  and an "adding a new rule" checklist. lint.md and external.md drop
  their per-rule tables and link to the new page. All touched docs
  conform to docs/contributing/documentation.md (no em-dash thought
  breaks, no SPOT self-labels, RFC-2119 keywords used consistently).

Settings sort tooling
  scripts/lint/sort_claude_settings.sh wraps utils/claude/settings_sort.py
  and is wired into scripts/lint/autoformat.sh. The tooling fixes the
  ASCII-ascending requirement enforced by
  tests/lint/repository/test_claude_settings_sorted.py; the test's
  failure message now points operators at the script. .claude/settings.json
  is committed in sorted form.
2026-04-30 12:51:50 +02:00
kevinveenbirkenbach 837d0c5335 test(suppression): unify # noqa / # nocheck marker grammar
Introduce a single grammar for per-line, per-block, and per-file
suppression markers across the test suite, replacing seven ad-hoc
syntaxes that had drifted apart.

Helper
  utils/annotations/suppress.py exposes is_suppressed_at,
  is_suppressed_in_head, is_suppressed_anywhere, line_has_rule, and
  suppressed_line_numbers. Markers may use either `noqa` or `nocheck`
  (case-insensitive synonyms), live inside `#`, `//`, `{# ... #}`, or
  `<\!-- ... -->` comments, and combine multiple kebab-case rules
  comma-separated. 17 unit tests cover the grammar in isolation.

Refactored consumers
  - tests/external/repository/test_urls_reachable.py (rule: url)
  - tests/external/docker/test_image_versions.py via
    utils/docker/version_updater.py (rule: docker-version)
  - tests/lint/repository/test_no_direct_yaml_calls.py (rule:
    direct-yaml)
  - tests/lint/ansible/test_service_shared_consistency.py (rule:
    shared)
  - tests/lint/ansible/roles/test_web_app_email_integration.py (rule:
    email)
  - tests/lint/repository/test_python_file_size.py (rule: file-size)
  - tests/lint/ansible/test_run_once_tags.py +
    tests/integration/roles/run_once/test_schema.py (rules: run-once,
    run-once-suffix)

Marker migration
  12 role tasks/main.yml files: `# run_once_<key>: deactivated`
  -> `# nocheck: run-once`. roles/web-app-suitecrm/meta/services.yml
  drops a malformed inline `noqa: intentional legacy pin` from a TODO
  comment so the new parser does not pick it up as a stray rule.

Caching wins
  Test files that previously loaded YAML / read files via raw
  yaml.safe_load + Path.read_text now route through utils.cache.yaml
  (load_yaml_any / load_yaml_str) and utils.cache.files.read_text:
    - test_service_shared_consistency.py
    - test_web_app_email_integration.py
    - tests/integration/roles/run_once/test_schema.py
    - utils/docker/version_updater.py
  This both speeds up repeated reads and stays consistent with the
  direct-yaml lint policy.

Documentation
  New SPOT page at docs/contributing/actions/testing/suppression.md
  with grammar, position semantics, the catalog of rules, examples,
  and an "adding a new rule" checklist. lint.md and external.md drop
  their per-rule tables and link to the new page. All touched docs
  conform to docs/contributing/documentation.md (no em-dash thought
  breaks, no SPOT self-labels, RFC-2119 keywords used consistently).

Settings sort tooling
  scripts/lint/sort_claude_settings.sh wraps utils/claude/settings_sort.py
  and is wired into scripts/lint/autoformat.sh. The tooling fixes the
  ASCII-ascending requirement enforced by
  tests/lint/repository/test_claude_settings_sorted.py; the test's
  failure message now points operators at the script. .claude/settings.json
  is committed in sorted form.
2026-04-30 11:54:46 +02:00
kevinveenbirkenbach 4e3ef819d4 Merge branch 'feature/package-cache-frontend' into feature/alpha-to-beta 2026-04-30 08:31:34 +02:00
kevinveenbirkenbachandClaude Opus 4.7 eb45f0ffaf feat(cache): inner-build override + TTL env-var + SPOT docs
Extend the local cache stack with three independent capabilities:

1. Inner-`dockerd` build coverage for HTTP-only package mirrors.
   `roles/sys-svc-compose/files/compose.py` (the runner's `compose`
   wrapper) auto-generates a transient `compose.cache.override.yml`
   per app when `INFINITO_PACKAGE_CACHE_FRONTEND_IP` is exported. The
   override pins `build.extra_hosts` for `deb.debian.org`,
   `archive.ubuntu.com`, and `security.ubuntu.com` to the frontend.
   `pull.py` now delegates to the wrapper so build/pull operations see
   the same `-f` set the wrapper auto-detects. nginx in the frontend
   gains a port-80 listener with path rewrites for those hostnames,
   and `package.sh` registers two new Nexus proxies
   (`apt-debian-security`, `apt-ubuntu-security`) for the security
   suites whose upstream URL prefix differs from the main archive.

   Alpine is intentionally excluded from the inner-build extra_hosts:
   3.18+ defaults to HTTPS, and inner-`dockerd` build containers do
   not import the frontend CA. Routing apk through the frontend would
   trip TLS verification.

2. General cache freshness env-var. `scripts/meta/env/cache/package.sh`
   exports `INFINITO_PACKAGE_CACHE_MAX_AGE_MIN` (default `129600`,
   i.e. 90 days). The bootstrap helper consumes it for every Nexus
   proxy's `contentMaxAge`, `metadataMaxAge`, and
   `negativeCache.timeToLive`, replacing the previous 1440-minute
   literal. Lower the value when chasing fast-moving upstreams.

3. SPOT cache documentation at `docs/contributing/environment/cache.md`.
   `compose.yml.md`, `variables.md`, the per-service READMEs, and
   `requirements/012-...` now link to it instead of restating the
   stack's behaviour. Net documentation lines drop substantially while
   the cache page becomes the single user-facing reference.

Also: code-comment cleanup per `docs/contributing/documentation.md`
guidelines across all touched .py / .sh / .yml files. Multi-paragraph
docstrings, banner separators, and restate-the-obvious comments are
removed; one-line WHY comments remain where the rationale is not
already visible in the code.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 01:08:41 +02:00
kevinveenbirkenbachandClaude Opus 4.7 334c915598 feat(cache): transparent TLS frontend + override-only gating
Add a TLS-terminating reverse proxy in front of the Sonatype Nexus 3 OSS
pull-through cache so the `infinito` runner can hit upstream
package-manager URLs (pypi.org, registry.npmjs.org, rubygems.org,
repo.packagist.org, proxy.golang.org, dl-cdn.alpinelinux.org,
files.pythonhosted.org, raw.githubusercontent.com, codeload.github.com)
unchanged and still flow through Nexus.

Mechanism:
  * scripts/docker/cache/package-frontend-certs.sh — host-side helper,
    idempotently generates a dedicated CA + per-hostname leaf certs.
  * compose/package-cache-frontend/upstreams.conf — nginx server-blocks
    that match SNI per hostname and reverse-proxy onto the matching
    Nexus repo path.
  * compose/cache.override.yml `infinito.extra_hosts` — DNS-hijack so
    the runner's clients resolve each upstream onto the frontend's
    static IP.
  * scripts/docker/cache/package-frontend-ca.sh — runner-side helper,
    drops the CA into the system trust store post-startup so apt/pip/
    curl/etc. accept TLS against the hijacked hostnames.
  * cli/deploy/development/compose.py — orchestrates cert gen before
    compose-up, CA install after health.

Scope today: runner-only. App-service Dockerfile builds executed by
the inner dockerd are NOT routed through the frontend; that requires
build-time CA injection and is deferred.

Also extends scripts/docker/cache/package.sh with five additional
Nexus proxies registered for transparent use: gem-proxy, go-proxy,
yum-rocky, yum-fedora, raw-packagist, raw-alpine, raw-codeload-github.

Refactor: move all cache services + runner-side cache mounts/depends_on/
extra_hosts from compose.yml into compose/cache.override.yml. Base
compose.yml now describes only the bare CI/runtime stack (coredns +
infinito). The override file is the single gate for the cache stack;
`profiles: ["cache"]` attributes and `--profile cache` flag emission
were redundant once file inclusion controls existence and removed
accordingly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 18:26:21 +02:00
kevinveenbirkenbachandClaude Opus 4.7 44d265b9f6 docs(requirements): add 013 alpha-to-beta promotion requirement
Tracks the promotion of 14 sub-beta web-* roles to lifecycle:
beta. Fixes the in-scope set, per-role OIDC/LDAP/RBAC integration
notes, the Playwright testing gate (oidc/ldap variants, multi-app
fresh deploy, capstone full-cycle), and the autonomous execution
procedure with a single final commit on feature/alpha-to-beta.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 01:27:31 +02:00