Commit Graph
3 Commits
Author SHA1 Message Date
kevinveenbirkenbachandClaude Opus 4.7 c55ad69c41 refactor: drop requirement-file references from code, add doc rule + lint
Strip every `req <NNN>`, `req-<NNN>`, `Requirement <NNN>`,
`requirement-<NNN>`, and `docs/requirements/<NNN>-...md` mention from
non-Markdown source files. Comments anchored to requirement numbers
rot when requirements are renumbered or rewritten and conflate
present-state behaviour (which the comment should describe) with the
audit trail of how the code got there (which belongs in commit
messages, PR descriptions, and the requirement file itself).

* Document the rule in `docs/contributing/documentation.md` under
  "Comments". Code MUST describe the *why* in present-state language;
  contract enforcement lives in tests, not folklore.
* Clean 254 source files across `roles/`, `tests/`, `plugins/`,
  `cli/`, `scripts/`, `utils/`, `group_vars/`, and the repo-root
  `eslint.config.js`. Pure comment / docstring / log-message edits;
  no behavioural change.
* Add `tests/lint/repository/test_no_req_references_in_code.py` to
  enforce the rule going forward across `.js`, `.py`, `.yml`,
  `.yaml`, `.j2`, and `.sh` files. The legacy
  `test_no_stale_requirement_refs.py` is exempt as the only file
  whose purpose is to detect these very tokens.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 16:25:22 +02:00
kevinveenbirkenbachandClaude Opus 4.7 951f6d36d2 chore(lint): unify autoformat/galaxy parallelism into one PARALLEL env var
* scripts/lint/autoformat.sh: rename AUTOFORMAT_PARALLEL to PARALLEL,
  declare it at file start with default `true`; still env-overridable.
  Reword the worker comment so the literal `# shellcheck` token no
  longer appears at start-of-line and trips SC1072/SC1073.
* scripts/lint/galaxy.sh: drop the GALAXY_FATAL / GALAXY_NAMESPACE /
  GALAXY_PARALLEL env vars (over-engineered for a single repo). Failure
  is always fatal. NAMESPACE is an internal constant. Add the same
  PARALLEL env var (default `true`, env-overridable); falsy demotes the
  xargs fan-out to one worker.
* docs/contributing/environment/variables.md: collapse the four
  AUTOFORMAT_*/GALAXY_* rows into one `PARALLEL` row covering both
  consumers.
* docs/contributing/tools/make.md: refer to `PARALLEL=0` everywhere;
  add the lint-galaxy parallelism note.

Plus working-tree drift across roles/, group_vars/, inventories/, and
tasks/ that accumulated from the make-test setup phase regenerating
generated artefacts during recent test runs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 00:59:24 +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