mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
OpenBao 2.7 removed the builtin LDAP auth engine from the server binary (openbao/openbao GH-3882). `bao auth enable ldap` answered "plugin not found in the catalog: ldap" and the deploy stopped there. The role now builds its own image. A multi-stage Dockerfile copies the openbao-plugin-auth-ldap binary out of the image declared as the `auth-ldap` service entry into /opt/openbao/plugins. A second server config file, plugins.hcl, names that directory and registers the plugin declaratively. It sets plugin_auto_register = true explicitly: the image starts the server with a config directory, and on that path 2.7.1 does not apply the documented default, so without the line the catalog stays empty. The Dockerfile sets the file mode in a helper stage instead of COPY --chmod, which only BuildKit accepts. The mount is enabled with -plugin-version=latest, so it follows whichever plugin version the image ships. A mount created by the former builtin engine is tuned and reloaded onto the plugin, which needs `update` on sys/plugins/reload/backend in the ansible-admin policy. The LDAP tasks move into tasks/addons/auth-ldap.yml and the plugin is declared under meta/addons as a required addon bridged to `ldap`. Its Playwright spec logs in through the mount and asserts that sys/auth reports an external running plugin version. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
60 lines
3.3 KiB
Bash
60 lines
3.3 KiB
Bash
ADMIN_PASSWORD={{ lookup('users', 'administrator').password | dotenv_quote }}
|
|
|
|
ADMIN_USERNAME={{ lookup('users', 'administrator').username | dotenv_quote }}
|
|
|
|
APP_BASE_URL={{ lookup('tls', application_id, 'url.base') }}
|
|
|
|
BIBER_PASSWORD={{ lookup('users', 'biber').password | dotenv_quote }}
|
|
|
|
BIBER_USERNAME={{ lookup('users', 'biber').username | dotenv_quote }}
|
|
|
|
CANONICAL_DOMAIN={{ lookup('domain', application_id) | dotenv_quote }}
|
|
|
|
{% if lookup('config', application_id, 'services.lam.enabled', false) | bool %}
|
|
LAM_BASE_URL={{ lookup('tls', 'web-app-lam', 'url.base') | dotenv_quote }}
|
|
|
|
LAM_OAUTH2_FRONTED={{ lookup('sso', 'web-app-lam', 'is_proxy_gated') | string | lower }}
|
|
|
|
LDAP_ADMIN_PASSWORD={{ LDAP.BIND_CREDENTIAL | dotenv_quote }}
|
|
|
|
LDAP_RBAC_GROUP_DN_TEMPLATE={{ ('cn=' ~ application_id ~ '-<role>,' ~ LDAP.DN.OU.ROLES) | dotenv_quote }}
|
|
|
|
LDAP_USER_DN_TEMPLATE={{ (LDAP.USER.ATTRIBUTES.ID ~ '=<uid>,' ~ LDAP.DN.OU.USERS) | dotenv_quote }}
|
|
|
|
{% endif %}
|
|
LAM_SERVICE_ENABLED={{ lookup('config', application_id, 'services.lam.enabled', false) | string | lower }}
|
|
|
|
# nocheck: playwright-service-gate - CSS injection is asserted by the central CSP helper, not a per-persona surface
|
|
CSS_SERVICE_ENABLED={{ lookup('config', application_id, 'services.css.enabled') | string | lower }}
|
|
|
|
# nocheck: playwright-service-gate - OpenBao has no outbound mail surface at all (see meta/services.yml)
|
|
EMAIL_SERVICE_ENABLED={{ lookup('config', application_id, 'services.email.enabled') | string | lower }}
|
|
|
|
LDAP_SERVICE_ENABLED={{ OPENBAO_LDAP_ENABLED | string | lower }}
|
|
|
|
LOGOUT_SERVICE_ENABLED={{ lookup('config', application_id, 'services.logout.enabled') | string | lower }}
|
|
|
|
# nocheck: playwright-service-gate - Matomo tracking is an injected snippet, not a per-persona surface; covered by Matomo integration tests
|
|
MATOMO_SERVICE_ENABLED={{ lookup('config', application_id, 'services.matomo.enabled') | string | lower }}
|
|
|
|
NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
|
|
OIDC_ISSUER_URL={{ OIDC.CLIENT.ISSUER_URL | dotenv_quote }}
|
|
|
|
OPENBAO_BASE_URL={{ lookup('tls', application_id, 'url.base') | dotenv_quote }}
|
|
|
|
OPENBAO_KV_MOUNT={{ OPENBAO_KV_MOUNT | dotenv_quote }}
|
|
|
|
# nocheck: persona-block-rationale - OpenBao's UI login is not a link-then-Keycloak journey the shared persona helper can drive: the Ember auth form requires selecting the OIDC method, resolving the role through POST /v1/auth/oidc/oidc/auth_url, then completing Keycloak in a popup that posts its result back via postMessage (see upstream ui/app/components/auth-jwt.js). The administrator's full OIDC journey is asserted by the role-local files/playwright/test-oidc-login.js instead; with SSO off there is no human login path at all, since OpenBao offers no username/password auth.
|
|
PERSONA_ADMINISTRATOR_BLOCKED=true
|
|
|
|
# nocheck: persona-block-rationale - biber holds no OpenBao RBAC group, so by design it receives only the `default` policy and reaches no authenticated OpenBao surface; that denial is asserted by test-rbac-denial.js instead of a persona journey.
|
|
PERSONA_BIBER_BLOCKED=true
|
|
|
|
# nocheck: playwright-service-gate - scrape reachability is asserted by the web-app-prometheus spec, not this role's persona surface
|
|
PROMETHEUS_SERVICE_ENABLED={{ lookup('config', application_id, 'services.prometheus.enabled') | string | lower }}
|
|
|
|
SSO_SERVICE_ENABLED={{ OPENBAO_SSO_ENABLED | string | lower }}
|
|
|
|
{{ lookup('addon_env_flags', application_id) }}
|