Commit Graph
14682 Commits
Author SHA1 Message Date
Prageeth Panicker 408026bf7f fix(pihole): trust self-signed platform CA for sso-proxy OIDC discovery
oauth2-proxy (quay.io/oauth2-proxy/oauth2-proxy) is a distroless image
with no /bin/sh, so the platform's CA-trust wrapper (with-ca-trust.sh,
applied by compose_ca.py for services with a shell) is skipped for this
container. Go binaries ignore SSL_CERT_FILE/REQUESTS_CA_BUNDLE and use
only the OS system cert pool, so on self-signed TLS setups oauth2-proxy
fails OIDC discovery against Keycloak with
'x509: certificate signed by unknown authority'. nginx then falls back
to pihole's native /admin/login instead of redirecting to Keycloak,
breaking SSO entirely in CI and on any self-signed deployment.

Fix: append provider_ca_file to the rendered sso-proxy config after
web-app-keycloak/tasks/sso_proxy.yml renders it and before compose up
runs. oauth2-proxy loads this CA explicitly for the OIDC provider
connection, bypassing the system cert pool entirely.

Scoped to this role: avoids touching the shared
oauth2-proxy-keycloak.cfg.j2 template (would affect every
flavor: oauth2 role platform-wide). No-op on production
(TLS_MODE=letsencrypt).
2026-06-24 03:46:11 +02:00
Prageeth Panicker e5058549a2 fix(pihole): inject CA cert for sso-proxy on self-signed TLS
oauth2-proxy is a distroless Go binary — the platform CA wrapper
(with-ca-trust.sh) is skipped because there is no /bin/sh, and Go
ignores SSL_CERT_FILE. Pass the CA cert directly via --provider-ca-file
so oauth2-proxy trusts the internal Keycloak OIDC endpoint.

Follows the penpot pattern of inline command override in compose.yml.j2
conditioned on TLS_MODE == self_signed. No-op on production (letsencrypt).
2026-06-24 03:46:11 +02:00
Prageeth Panicker cea4905572 fix(pihole): trust self-signed CA for sso-proxy OIDC connection
oauth2-proxy is distroless (no /bin/sh), so the platform CA wrapper
entrypoint is skipped. Go binaries ignore SSL_CERT_FILE and use the
system cert pool only, causing x509 errors on self-signed TLS setups.

Override sso-proxy command in compose.override.yml.j2 to append
--provider-ca-file pointing to the platform CA cert
(/tmp/infinito/ca/root-ca.crt, always bind-mounted by compose_ca.py)
when TLS_MODE is self_signed. No-op on production (letsencrypt).
2026-06-24 03:46:11 +02:00
Prageeth Panicker 3daa60b7c0 fix(web-app-pihole): add compose_handlers_flush and increase wait_for timeout to 300s 2026-06-24 03:46:11 +02:00
Prageeth Panicker f6c54b39af fix(web-app-pihole): restore correct PORT_BANDS mariadb entry, remove legacy database band 2026-06-24 03:46:11 +02:00
Prageeth Panicker d6fcccb178 fix(web-app-pihole): fix nested template literal syntax error in playwright spec 2026-06-24 03:46:11 +02:00
Prageeth Panicker c9b31d7a73 fix(web-app-pihole): fix string concatenation lint error in playwright spec 2026-06-24 03:46:10 +02:00
Prageeth Panicker c8e36de178 fix(web-app-pihole): fix SSO port collision - use 16506 instead of 16505 2026-06-24 03:46:10 +02:00
Prageeth Panicker 3e964ffd31 fix(web-app-pihole): address reviewer feedback - SSO/native password, split tests, remove schema 2026-06-24 03:46:10 +02:00
Prageeth Panicker 089a99275e fix(web-app-pihole): fix bare URL in README 2026-06-24 03:46:10 +02:00
Prageeth Panicker 2746654d36 fix(web-app-pihole): migrate to v9.x SSO pattern and fix compose_volumes 2026-06-24 03:46:10 +02:00
Prageeth Panicker 23d8374bcf fix(web-app-pihole): fix dynamic flags, port, personas, block size, docker exec, README 2026-06-24 03:46:10 +02:00
Prageeth Panicker 02e6c36aba fix(web-app-pihole): resolve CI lint failures and test compliance 2026-06-24 03:46:10 +02:00
Prageeth Panicker ddb281067f ci: retrigger CI after rebase on main 2026-06-24 03:46:10 +02:00
Prageeth Panicker 88c19badda fix(web-app-pihole): remove duplicate TEST_E2E_PLAYWRIGHT_WAIT_ENABLED constant
Already defined in test-e2e-playwright/defaults/main.yml.
HTTP wait accepts 100-499 range including oauth2-proxy 403.
2026-06-24 03:46:10 +02:00
Prageeth Panicker 97529ef784 fix(web-app-pihole): fix oauth2-proxy deployment and javascript injection
- Fix oauth2.enabled: replace Jinja2 group_names expression with literal true
- Set oauth2.shared: false to deploy role-local oauth2-proxy instance
- Add allowed_groups for RBAC administrator access control
- Add javascript service for logout button injection
- Remove variant 1 (standalone mode) - pihole always requires Keycloak
- Delete compose.override.yml.j2 (--ssl-insecure-skip-verify no longer needed)
- Fix javascript.js.j2: wrap redirect in DOMContentLoaded to fix DOM timing
- Add TEST_E2E_PLAYWRIGHT_WAIT_ENABLED: false for oauth2-protected app
2026-06-24 03:46:10 +02:00
Prageeth Panicker 4f046f29cf fix(web-app-pihole): restore oauth2_proxy_cookie_secret to schema.yml
inventory.py auto-generation only triggers when oauth2.enabled is a literal
boolean True. Pihole uses a Jinja2 expression for enabled, so auto-generation
does not trigger. The credential must be defined in schema.yml explicitly.
2026-06-24 03:46:10 +02:00
Prageeth Panicker c1cbf7e2a7 fix(web-app-pihole): remove oauth2_proxy_cookie_secret from schema.yml
Other OAuth2-protected apps (decidim, espocrm, etc.) do not define this
credential in their schema.yml and work correctly. The platform handles
the cookie_secret for all apps through the web-app-oauth2-proxy role.
Defining it per-role was causing oauth2-proxy to crash on startup in CI
because the credential was not properly generated in the CI environment.
2026-06-24 03:46:10 +02:00
Prageeth Panicker 64faee4ac6 fix(web-app-pihole): skip TLS verification for oauth2-proxy OIDC discovery
oauth2-proxy cannot verify Keycloak's self-signed certificate during OIDC
discovery because the platform CA cert is injected via env vars but Go's
TLS stack doesn't pick it up reliably in the DinD environment.

Adding --ssl-insecure-skip-verify allows oauth2-proxy to complete OIDC
discovery and serve requests instead of crash-looping with certificate errors.
This is acceptable for a self-signed lab environment.
2026-06-24 03:46:10 +02:00
Prageeth Panicker 2ec86ee841 fix(web-app-pihole): add compose.override.yml.j2 to fix oauth2-proxy DNS resolution
oauth2-proxy cannot resolve auth.infinito.example from inside Docker in CI
environments where CoreDNS does not have this entry. Adding extra_hosts via
compose.override.yml.j2 (auto-included by compose_file_args lookup) maps
the Keycloak domain to host-gateway so OIDC discovery succeeds.
2026-06-24 03:46:10 +02:00
Prageeth Panicker 835333d658 fix(web-app-pihole): wait for Keycloak OIDC endpoint before setup
Pi-hole deploys immediately after Keycloak but Keycloak needs time to
initialize OIDC. Adding explicit wait for Keycloak OIDC discovery endpoint
ensures oauth2-proxy can complete OIDC discovery and serve 302 redirects
instead of 500 errors when the platform Playwright wait check runs.
2026-06-24 03:46:10 +02:00
Prageeth Panicker f79a7350c3 fix(web-app-pihole): fix lint errors and add HTTPS health check
- meta/services.yml: add noqa comment for email integration
- tasks/01_setup.yml: use uri_retry instead of legacy uri module
- tasks/01_setup.yml: add HTTPS endpoint check to prevent 500 in CI wait check
- tasks/01_setup.yml: increase oauth2-proxy wait timeout to 300s with ignore_errors
2026-06-24 03:46:10 +02:00
Prageeth Panicker 29948cac9d fix(web-app-pihole): add ignore_errors to oauth2-proxy wait task
oauth2-proxy requires Keycloak to complete OIDC discovery before binding its port.
If Keycloak is still warming up, oauth2-proxy may not be ready within the timeout.
Playwright tests validate the actual functionality end-to-end.
2026-06-24 03:46:09 +02:00
Prageeth Panicker 772e92cf03 fix(web-app-pihole): increase oauth2-proxy wait timeout to 300s
oauth2-proxy needs time to complete OIDC discovery against Keycloak in CI.
120s was insufficient - increased to 300s to allow for slower CI environments.
2026-06-24 03:46:09 +02:00
Prageeth Panicker e3b76e81c0 fix(web-app-pihole): address reviewer feedback and fix CI failures
- tasks/01_core.yml: set docker_compose_flush_handlers: true, remove manual flush_handlers task
- tasks/01_setup.yml: add wait for oauth2-proxy port to fix HTTP 500 in CI wait check
- meta/services.yml: use NETWORK_PUBLIC_DNS_RESOLVERS SPOT for upstream_dns
- vars/main.yml: remove default from upstream_dns lookup, join list with semicolon
2026-06-24 03:46:09 +02:00
Prageeth Panicker e11223e389 fix(web-app-pihole): remove host port 53 binding to fix CI on Fedora
Port 53 is already in use by systemd-resolved on Fedora CI runners.
Pi-hole DNS still works within the Docker network without host binding.
Playwright tests don't require DNS functionality on the host.
2026-06-24 03:46:09 +02:00
Prageeth Panicker 5b716c15c6 fix(web-app-pihole): remove duplicate TEST_E2E_PLAYWRIGHT_WAIT_ENABLED constant
Variable is already defined platform-wide in test-e2e-playwright/defaults/main.yml.
Redefining it in vars/main.yml violates the project-wide constant uniqueness rule.
2026-06-24 03:46:09 +02:00
Prageeth Panicker b6ff073136 fix(web-app-pihole): fix playwright logout test, remove duplicate oauth2-proxy block, add playwright wait flag
- Update logout test to navigate directly to oauth2/sign_out endpoint with Keycloak logout redirect
- Remove duplicate oauth2-proxy service definition from compose.yml.j2 (was causing duplicate key error)
- Add TEST_E2E_PLAYWRIGHT_WAIT_ENABLED: false to vars/main.yml (oauth2-proxy returns 403 before redirect)
2026-06-24 03:46:09 +02:00
Prageeth Panicker 7bfc09a8d7 fix(web-app-pihole): resolve CI failures - subnet, port, resource limits
- Change subnet from 192.168.102.240/28 to 192.168.103.80/28 (overlap with web-app-fediwall)
- Change local.oauth2 port from 16493 to 16500 (collision with web-svc-libretranslate)
- Extend PORT_BANDS.local.oauth2 band from 16499 to 16514 (band exhausted)
- Add missing resource limits to meta/services.yml (cpus, mem_reservation, mem_limit, min_storage, pids_limit)
2026-06-24 03:46:09 +02:00
Prageeth Panicker c2dc33a252 fix(web-app-pihole): add schema.yml with oauth2_proxy_cookie_secret credential 2026-06-24 03:46:09 +02:00
Prageeth Panicker b9cf770578 fix(web-app-pihole): wrap javascript.js.j2 in raw block to prevent Jinja2 parsing 2026-06-24 03:46:09 +02:00
Prageeth Panicker f4c68301e4 fix(web-app-pihole): fix config path for upstream_dns lookup 2026-06-24 03:46:09 +02:00
Prageeth Panicker 0c91412727 fix(web-app-pihole): add variants, javascript injection, fix oauth2 DNS, update playwright tests 2026-06-24 03:46:09 +02:00
Prageeth Panicker 2c1d0cbd28 fix(web-app-pihole): restore PIHOLE_VOLUME_DATA and PIHOLE_VOLUME_DNSMASQ vars 2026-06-24 03:46:09 +02:00
Prageeth Panicker 3baaa1a948 fix(web-app-pihole): fix CI lint and integration test failures 2026-06-24 03:46:09 +02:00
Prageeth Panicker 470118494a fix(web-app-pihole): migrate to meta/services.yml, fix domain resolution, disable native password 2026-06-24 03:46:09 +02:00
Prageeth Panicker 786bda0bfb fix(web-app-pihole): fix compose template, RBAC group, playwright env and wait flag 2026-06-24 03:46:09 +02:00
Prageeth Panicker 49d039acfb fix(web-app-pihole): add sys-svc-compose networks include to compose template 2026-06-24 03:46:09 +02:00
kevinveenbirkenbach 62ebbdc018 Merge pull request #333 from infinito-nexus/update/docker-image-versions-20260623-52b17c5
update(images): update Docker image versions
2026-06-24 03:46:08 +02:00
kevinveenbirkenbach 7b532b6378 Update services.yml 2026-06-24 03:46:08 +02:00
Prageeth Panicker 3112bb6402 fix(web-app-pihole): fix CI lint failures
- Add tasks/01_core.yml with run_once guard (test_service_core_first_task_run_once)
- Update tasks/main.yml to load 01_core.yml with run_once guard
- Add '# noqa: shared' comment on oauth2 config (test_service_shared_consistency)
- Remove unused PIHOLE_PORT variable from vars/main.yml (test_variable_usage)
2026-06-24 03:46:08 +02:00
kevinveenbirkenbach 74d4eb26d4 Merge pull request #332 from infinito-nexus/dependabot/npm_and_yarn/globals-17.7.0
chore(deps-dev): bump globals from 15.15.0 to 17.7.0
2026-06-24 03:46:08 +02:00
kevinveenbirkenbach 354722dfd0 Update services.yml 2026-06-24 03:46:08 +02:00
infinito-nexus-updater[bot] d13dc474ef update(images): update Docker image versions 2026-06-24 03:46:08 +02:00
Prageeth Panicker 561db31693 feat(web-app-pihole): add Pi-hole role with OAuth2/Keycloak RBAC
- Deploy Pi-hole as web app with NGINX proxy and OAuth2 protection
- Only web-app-pihole-administrators group can access the dashboard
- DNS port 53 (TCP/UDP) exposed for network-wide ad blocking
- Upstream DNS configurable per inventory (default: Cloudflare 1.1.1.1)
- Redis session store for OAuth2 proxy
- Timezone from HOST_TIMEZONE platform variable
- Port bindings use DOCKER_BIND_HOST platform variable
- Register subnet 192.168.102.240/28 in networks
- Register ports 8070 (http) and 16493 (oauth2) in ports
- Playwright tests: oauth2 protection, admin login, biber denied (3/3 passing)

Known limitations:
- Pi-hole v6 gravity blocklist requires manual setup via admin UI
- Internal *.infinito.example DNS forwarding to CoreDNS planned as follow-up
2026-06-24 03:46:08 +02:00
kevinveenbirkenbach 560c3414a3 Merge pull request #329 from infinito-nexus/update/docker-image-versions-20260619-0762d5d
update(images): update Docker image versions
2026-06-24 03:46:08 +02:00
dependabot[bot] 50f417006f chore(deps-dev): bump globals from 15.15.0 to 17.7.0
Bumps [globals](https://github.com/sindresorhus/globals) from 15.15.0 to 17.7.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v15.15.0...v17.7.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.7.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-24 03:46:08 +02:00
infinito-nexus-updater[bot] 483322b718 update(images): update Docker image versions 2026-06-24 03:46:08 +02:00
kevinveenbirkenbachandClaude Opus 4.8 a8b420f22e Release version 10.0.1
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 03:46:08 +02:00
kevinveenbirkenbach ebce8a7d05 Update services.yml 2026-06-24 03:46:08 +02:00