meta/schema.yml became meta/secrets.yml, but its content still landed at
applications.<app>.credentials — the one meta file whose payload did not sit
under a root named after the file. Every other topic obeys that rule:
meta/volumes.yml goes to volumes, meta/rbac.yml to rbac. Credentials now go to
secrets.credentials.
The path exists exactly once, in utils/manager/credential_key.py, and
OVERRIDE_SECTION is derived from its two segments rather than spelled beside
them, so the dotted form used by --set and the nested form used by the
inventory cannot drift. Six consumers read it: the loader, the generator, the
CLI override parser, the two emit helpers, and the four lookup validators.
--set now accepts exactly one key shape,
applications.<app>.secrets.credentials.<key>. The three short forms are
rejected instead of guessed at: the same short key names different credentials
on different apps. That also retired primary_app_id, which only existed to
disambiguate them.
Three defects surfaced while wiring this up. _apply_one_role_schema still wrote
to the old root, so an app's own credentials would have moved while its
providers' stayed behind. web-app-pgadmin reads through
lookup('applications', ...).credentials.<key>, an access path no regex over
lookup('config', ...) could see, and would have deployed with an empty postgres
password. And _META_NON_GENERIC_TOPICS still listed 'schema' — a bare topic
name, invisible to any path search — so the generic file-root loop assigned the
raw schema under secrets and the follow-up write landed inside the cached
document, truncating keycloak's four credentials to one for every later
reader.
tests/integration/ansible/lookups/config/test_credentials_roundtrip.py pins both
directions of the seam and the cache invariant that last defect broke.
Existing inventories still carry the pre-rename root; migrating them is
deliberately out of scope here.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
taiga-back sets SESSION_COOKIE_SECURE and CSRF_COOKIE_SECURE to True in
settings/common.py:198-200, and the image re-reads them at docker/config.py:83-84
via os.getenv(..., 'True') == 'True'. With neither variable set, Django stamped
Secure on the session cookie even over a plaintext http://<onion> origin.
Chromium does not treat .onion as trustworthy and drops it.
Taiga 0 of run 31340965955: the trace carries
'Set-Cookie: sessionid=370jln...; HttpOnly; Path=/; SameSite=Lax; Secure', and
grep -c sessionid over the whole network log is 1 -- set once, never sent back.
Without a session mozilla_django_oidc finds no oidc_states at the callback and
takes login_failure(), whose redirect carries a literal error=None, so Keycloak
had returned no error at all.
The filter chain is load-bearing: Django compares literally against 'True', so
the value must render True/False, not true/false. Copying the pixelfed line
(correct for Laravel) would render 'true', resolve to False, and strip Secure
from every CLEARNET Taiga session -- turning a fix into a security defect. The
expression therefore lives once in vars/main.yml as TAIGA_COOKIE_SECURE rather
than twice in the template.
env.j2 rather than the settings append: the image on hand still carries the
getenv pair, and env.j2 avoids un-grandfathering six unrelated comments in
config.append.py.j2. If a future image drops the hook, the same Playwright job
goes red again and says so.
Third instance of this class in this run, after pixelfed (Laravel) and joomla's
fallback cookie. Everything behind the cookie -- verify_token, get_userinfo,
user creation, taiga-front consuming the auth_token -- has never executed in
this stack, so the job is not expected to go green on this alone.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
taiga-events fell back to the image default 'taiga-events-rabbitmq' because the role set no host. That name exists only under compose, where compose.yml.j2 emits container_name via lookup('compose_only', ...); swarm drops the key, so only 'events-rabbitmq' resolves. The container logged 'getaddrinfo ENOTFOUND taiga-events-rabbitmq' and exited 1 on every start, and swarm restarted it every 15-20 s.
Each restart churns veth and bridge ports in the manager's network namespace, which is the namespace Chromium runs in: 02_run_one.yml passes --network host in swarm mode. Chromium's NetworkChangeNotifier then aborts in-flight requests, and when that lands on Taiga's bootstrap XHRs the SPA drops into its generic error view and the route heading never renders. The gateway logged 499 with UpstreamTime 0.010 on the same request the browser recorded as net::ERR_NETWORK_CHANGED - the client hung up, the backend was fine.
Variant-independent: the variable is absent unconditionally and container_name is dropped for every swarm variant. What varies is exposure. Within web-app-taiga 2 alone the same suite ran 19.3s, 17.8s, 88.3s, 17.3s, 17.3s, 87.0s, 18.7s, 212.6s - five clean, three hit. Jobs 0 and 1 invoked it twice each and got away with it.
events-rabbitmq resolves in both modes: compose registers the service name as a network alias, swarm publishes it as the stack DNS name.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
New roles/sys-svc-container/templates/env.j2 sets TZ={{ HOST_TIMEZONE }} and LANG=C.UTF-8. Every role env.j2 includes it at the top; it renders via stack_host_template, the same engine that resolves the includes in compose.yml.j2, so it works in both compose and swarm. TZ/LANG are removed from the individual role env.j2 so each value stays single-source.
New lint tests/lint/ansible/test_env_base_include.py verifies every role env.j2 includes the base and never re-sets a base-owned key (keys derived from the base file).
mattermost and gitea meta/volumes.yml drop the /etc/timezone host-path bind: swarm hard-rejects a task whose bind source is missing on the node (Debian-trixie nodes have no /etc/timezone). TZ now comes from the base env. /etc/localtime bind also dropped; the container timezone follows TZ.
Non-directive comments were removed from the touched env.j2 (banners, restatements, reference URLs, narration) so the changed files pass the comment-lint; only tool directives remain.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
docker stack deploy passes env-file values verbatim, including outer
double quotes - the container reads KEY="value" instead of KEY=value
and DB auth, URL parsers, and int(os.environ['KEY']) consumers break.
Compose keeps stripping the quotes as before.
- plugins/filter/dotenv.py: read DEPLOYMENT_MODE from the render
context via @jinja2.pass_context. compose mode keeps the old quoting
(escape $$, \, "). swarm mode passes the value through verbatim.
Missing or unknown mode falls back to compose quoting so a typo
never silently leaks unquoted values into compose. Direct Python
callers without a Jinja context keep the compose-style default.
- tests/unit/plugins/filter/test_dotenv_quote.py: keep the 12
direct-call cases, add 8 TestDotenvQuoteModeAware cases rendering
the filter through a real jinja2.Environment.
- 4 OIDC_TITLE templates (bookwyrm, confluence, jira, pretix): replace
the manual "{{ X | replace('\"','\\\"') }}" Compose-only escape
with {{ X | dotenv_quote }}.
- 3 env.j2 templates (nextcloud, taiga, wordpress): drop literal
outer quotes that were Compose-only decoration; keep | dotenv_quote
on the password / token assignments.
- sys-svc-rdbms/templates/env/mariadb.env.j2: strip literal quotes
unconditionally - the file name is not env.j2 so the dotenv-quote
integration test does not require the filter and the generated DB
passwords are alphanumeric.
Moves the SYSTEM_EMAIL_* resolution logic out of group_vars/all/03_email.yml
into a dedicated Ansible lookup plugin, so every role template reads outgoing
mail settings via lookup('email') (global) or lookup('email', application_id)
(per-app). Per-app compose.services.email is merged on top of the resolved
defaults; SYSTEM_EMAIL_* variables remain usable as an inventory escape hatch.
Also splits the email docs: administrator-facing configuration stays under
docs/administration/configuration/, plugin contract and extension rules move
to docs/contributing/design/services/email.md. services.md is relocated to
services/base.md so the services/ subtree can host per-service design pages.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replaces inline `applications`/`users` merging with dedicated lookup
plugins and runtime hydration. Introduces `add_csp_hash` filter,
integrates sort into `find_dock_val_by_bkp_entr`, splits the Keycloak
one-shot realm import into `05a_realm_import_run.yml`, and fixes the
Mastodon administrator task YAML. Removes obsolete `csp_hashes` filter,
`sys-token-store` Jinja filter, and empty CLI setup modules.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add OAuth2 Proxy in front of Taiga (port 16491) as access guard
- Add OIDC login via Keycloak→LDAP using taiga-contrib-oidc-auth (default on)
- Custom multi-stage Docker build compiles CoffeeScript/Gulp frontend plugin
- Build context fixed to docker_repository_path (not directories.instance)
- pip install via git+https:// (not PyPI, package not published there)
- Settings rendered as Python literals in config.append.py (not os.getenv)
- urls.py uses re_path() (Django 4+ compatible, url() was removed)
- Add LDAP direct login via taiga-contrib-ldap-auth-ext (default off)
- LDAP_SERVER strips port via regex_replace (host-only required by plugin)
- LDAP_MAP_USERNAME_TO_UID = None (prevents plugin crash)
- Both plugins append to config.py at container startup via cat >>
- Remove broken robrotheram image variants and dead TAIGA_SETTING_FILES loop
- Remove broken oidc/local.py.j2 (local.py is not imported by taiga-back)
- Add conf.json template for taiga-front (loginFormType / contribPlugins)
- Add oauth2_proxy_cookie_secret to schema
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace usages of the get_app_conf filter with the config lookup plugin
across roles and templates. Adjust quoting where required to keep YAML
and Jinja syntax valid. No functional changes intended.
https://chatgpt.com/share/69860678-cef8-800f-8402-7fe6231fdc2d
The TLS lookup has been renamed from `tls_resolve` to `tls` to better
reflect its responsibility as a strict TLS state resolver.
This refactor updates all usages across the codebase, including:
- lookup plugins and internal helpers
- roles, vars, tasks, and templates
- tests, stubs, and error messages
- documentation and changelog references
Behavior, lookup API, and semantics remain unchanged.
https://chatgpt.com/share/6985e635-5a94-800f-b794-937e566ee308
- Remove deprecated filter_plugins/tls.py and all dependent filters
- Introduce strict lookup plugin lookup_plugins/tls_resolve.py as single TLS authority
- Migrate all roles, templates, vars, and tasks to use tls_resolve (protocols, ports, URLs, cert paths)
- Enforce explicit TLS context (domains, applications, TLS_ENABLED, TLS_MODE)
- Support letsencrypt and self_signed with SAN handling and per-app overrides
- Update TLS provider roles to assert resolver state instead of setting facts
- Add comprehensive unit tests for tls_resolve lookup
https://chatgpt.com/share/6972b49b-b074-800f-a323-dd9fe69d02eb
with explicit per-application TLS resolution.
Key changes:
- Introduce sys-front-tls-layer as the single TLS abstraction
- Centralize certificate paths via TLS_CERT_FILE / TLS_KEY_FILE / TLS_CA_FILE
- Replace sys-svc-letsencrypt SSL templates with generic TLS layer includes
- Add tls_* Jinja filters (enabled, mode, protocol, port, websocket)
- Resolve TLS mode per application (letsencrypt | self_signed | off)
- Remove implicit defaults and WEB_* globals to fail fast on misconfiguration
- Support self-signed certificates with SAN awareness
- Make TLS behavior explicit and consistent across all roles
This decouples application logic from certificate providers and
allows switching TLS flavor without touching app roles.
https://chatgpt.com/share/69727c61-8e68-800f-a267-473a7e627978
- Replace DEFAULT_SYSTEM_EMAIL merge with flat SYSTEM_EMAIL_* variables
- Update templates across apps to new variable names
- Fix msmtp health check to use -t and local username fallback
- Improve postfix localhost config (localdomain, mydestination, timeouts)
- Extend sys-hostname to ensure /etc/hosts mapping once
https://chatgpt.com/share/695e8f39-0694-800f-b91c-a74f4b78d7c8
- Migrate Mailu credentials from legacy mailu_token to tokens['web-app-mailu']
- Update all affected application templates to use the new token structure
- Adjust inventory validation to no longer special-case mailu_token
- Minor typing and formatting cleanups in inventory creation and tests
https://chatgpt.com/share/69554915-87c8-800f-afd5-12118dbb1107
- Introduced dedicated variables in vars/main.yml:
* TAIGA_FLAVOR_TAIGAIO
* TAIGA_TAIGAIO_ENABLED
- Replaced inline Jinja2 get_app_conf checks with TAIGA_TAIGAIO_ENABLED for
consistency in tasks, docker-compose template and env file.
- Adjusted env.j2 to use TAIGA_TAIGAIO_ENABLED instead of direct flavor checks.
- Enabled css by default (true instead of false).
- Cleaned up spacing/indentation in config and env.
This improves readability, reduces duplicated logic, and makes it easier to
maintain both OIDC flavors (robrotheram, taigaio).
Conversation: https://chatgpt.com/share/68af65b3-27c0-800f-964f-ff4f2d96ff5d
- Introduce WEBSOCKET_PROTOCOL derived from WEB_PROTOCOL (wss if https, else ws).
- Replace hardcoded websocket URLs in EspoCRM, Nextcloud and Taiga with {{ WEBSOCKET_PROTOCOL }}.
- Fix mautrix-imessage to use ws:// for internal synapse:8008.
- Standardize Pixelfed OIDC env spacing.
- Refactor Taiga variables to TAIGA_* naming convention and clean up EMAIL_BACKEND definition.
See: https://chatgpt.com/share/68af62fa-4dcc-800f-9aaf-cff746daab1e