Commit Graph

28 Commits (268feaa1f2f5b5f4e2789e97bd0ffbcd9ba9b0b7)

Author SHA1 Message Date
Amir Alexander Abdelbaki 268feaa1f2 feat(ansipa): add Nextcloud, and make FreeIPA the sole identity source
Adds a built-in Nextcloud to the ansipa stack and wires every service's
logins back to FreeIPA, either through Keycloak or directly.

Nextcloud:
  - nextcloud + redis services, sharing the existing postgres server via a
    second database. The initdb hook only fires on an empty data directory,
    so run.sh also creates the role/DB idempotently for stacks that predate
    Nextcloud.
  - served at the /nextcloud subpath of the gateway (OVERWRITEWEBROOT), with
    the /.well-known/* DAV redirects at the server root that sync clients and
    Nextcloud's own setup checks expect.

Identity:
  - keycloak-configure.sh now provisions confidential OIDC clients per relying
    party (nextcloud, proxmox-ve, proxmox-bs, opnsense) plus a realm-wide
    "groups" claim, writing secrets to .oidc-secrets (0600, gitignored).
  - nextcloud-configure.sh binds the IPA LDAP backend as the account source
    and user_oidc for login. The internal username is pinned to the IPA uid
    and unique-uid is disabled, otherwise every SSO login creates a second,
    empty account beside the LDAP one.
  - checkmk-ldap-configure.sh binds CheckMK straight to FreeIPA. CheckMK
    cannot go through Keycloak: SAML is commercial-edition only and no
    edition supports OIDC. The LDAP REST endpoints landed in 2.4 (werk
    #16527) but the stack pins 2.3, so it writes user_connections.mk —
    generated via Python repr() so quotes in a password cannot produce a
    SyntaxError that takes the GUI down, backed up and rolled back if the
    site fails to load it. Directory type is 389directoryserver, which is
    what gives FreeIPA the correct uid/member attribute defaults.

Monitoring:
  - OPNsense local check (gateways, pf state table vs its hard limit,
    firmware, CARP) plus an installer. POSIX sh, since OPNsense is FreeBSD
    with no bash or GNU grep. Transport is agent-over-SSH rather than inetd
    on 6556, because OPNsense regenerates inetd.conf/services/hosts.allow
    from config.xml and silently reverts those edits on reboot.

Fixes found along the way:
  - keycloak-configure.sh used KC_URL without the /auth relative path and
    probed /health/ready, which lives on management port 9000 and is not
    under that path — so it 404'd and timed out on this deployment.
  - .env.example had an unquoted `cn=Directory Manager`, which the shell
    scripts sourcing it parsed as a command named `Manager`.
  - summary heredocs printed raw escape codes; colours now use ANSI-C quoting.

docs/md/ansipa-sso.md covers the identity chain, the per-service support
matrix, Proxmox VE/PBS OpenID realm setup, and why packet captures should
not be tunnelled through the CheckMK API.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWLuyyrydC1u2FjM7naPcz
2026-08-10 14:51:27 +02:00
Amir Alexander Abdelbaki a73bc7cb93 refactor(setup): consolidate build/deploy tooling under setup/tools; docs
Move the build and deployment scripts into setup/tools alongside the existing
generators (proxmox-lxc-gen.sh, freeipa-image.sh, generate-modules.sh):
  - setup/generate-answerfile.sh   -> setup/tools/generate-answerfile.sh
  - setup/archiso/build.sh         -> setup/tools/build.sh
  - setup/archiso/wds-deploy.sh    -> setup/tools/wds-deploy.sh
  - setup/archiso/write-usb.sh     -> setup/tools/write-usb.sh

The archiso overlay/ (profile data: airootfs, profiledef.sh, packages.extra)
stays in setup/archiso/; build.sh now resolves it via an OVERLAY_DIR anchored
at the repo root, and DOTFILES_DIR is corrected for the new two-levels-deep
location. Updated every reference (generate-modules.sh, readme.md,
docs/md/{archiso,installation,index}.md).

generate-answerfile.sh: add linux-hardened to the kernel menu; verified its
emitted answerfile schema still matches every field the installers consume
(drive/kernel/keymap/hostname/username/password/luks_password/encrypt/
fido2_*/run_tui/components/desktop_environment/apps/shell_rc/colors).

Docs: add a dedicated ansipa Setup Guide (docs/md/ansipa-setup.md) covering
architecture, the full port list, the nginx portal + reverse-proxy paths, the
exact upstream reverse-proxy snippets (nginx/Caddy), NAT/push-mode behaviour,
and the Arch autofs/AUR caveat; link it from the index and cross-reference the
CheckMK/nginx ports from freeipa-ansible.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MUhrcFU8J1Hnf7vNqNxZNi
2026-07-02 13:09:18 +02:00
Amir Alexander Abdelbaki 6f2b24c51a docs: update readme and docs for recent changes
- freeipa-ansible.md: expand into full container installation guide
  covering SMB shares (ansipa-scans, ansipa-luks-keys), KeyAdmin access
  control, LUKS_KEY_UPLOAD_PASSWORD env var, updated collect-luks-keys
  flow via SMB, daemon enable/disable policy, security scan + alert
  pipeline, and Keycloak section
- modules.md: add Virtualisation & Remote Desktop section (qemu,
  rdp-client, lamco-rdp-server)
- archiso.md: document system reset mode (reset-arch.sh), launch.sh
  action selection, libfido2 in packages.extra
- readme.md: update Cliff Notes and docs table to reflect all changes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 15:39:38 +02:00
Amir Alexander Abdelbaki 2b282a1565 docs: replace readme with cliff notes and links to full docs
Old readme archived as readme.md.old.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-18 16:00:30 +02:00
Amir Alexander Abdelbaki 86812b76d6 updated readme - 2 2026-03-26 09:43:51 +01:00
Amir Alexander Abdelbaki 85d135bd73 fixed readme for markdown? 2026-03-26 09:40:14 +01:00
Amir Alexander Abdelbaki 8712978eac is my readme a html? 2026-03-26 09:33:16 +01:00
Amir Alexander Abdelbaki e62c934569 Update readme.md 2026-02-23 12:28:17 +01:00
Amir Alexander Abdelbaki 3767601423 Update readme.md 2026-02-23 12:26:41 +01:00
Amir Alexander Abdelbaki 74940097e9 Update readme.md 2025-12-12 13:20:04 +01:00
Amir Alexander Abdelbaki 63b7dc3268 Update readme.md 2025-12-11 08:38:48 +01:00
Amir Alexander Abdelbaki 0e886b69e2 updated readme 2025-09-16 10:30:41 +02:00
Amir Alexander Abdelbaki 99cd53065f updated readme 2025-06-12 20:38:47 +02:00
Amir Alexander Abdelbaki a7c8b95a89 updated readme 2025-05-29 16:37:59 +02:00
Your Name 0dd6c8eeb8 updated readme 2025-05-27 13:14:39 +02:00
Amir Alexander Abdelbaki cd6b0d7b90 updated readme - 2 2025-05-27 10:46:52 +02:00
Amir Alexander Abdelbaki 89125cf011 updated readme 2025-05-27 10:46:04 +02:00
Amir Alexander Abdelbaki 72f8130267 improved installation instructions further 2025-05-27 10:36:00 +02:00
Amir Alexander Abdelbaki 067130e264 fixed type in readme 2025-05-27 10:12:55 +02:00
Amir Alexander Abdelbaki 8f357670d1 updated readme.md 2025-05-27 10:10:25 +02:00
Amir Alexander Abdelbaki bca3d2ab51 updated todos 2025-05-27 10:00:54 +02:00
Amir Alexander Abdelbaki f75f93f2f3 updated installation instructions on readme.md 2025-05-27 09:52:08 +02:00
Amir Alexander Abdelbaki 76bca94078 updated readme 2025-05-25 01:48:02 +02:00
Your Name b6dd074ba9 added some more todos 2025-05-23 15:45:17 +02:00
Amir Alexander Abdelbaki dde52e134f added ongoing tasks 2025-05-23 15:21:37 +02:00
Amir Alexander Abdelbaki 9fb1cf6b04 warning about setup script in red 2025-05-23 15:14:14 +02:00
Amir Alexander Abdelbaki da358072f6 completely new readme .md - now with todo list 2025-05-23 15:11:21 +02:00
Your Name 02c3dc682a added readme 2025-05-23 14:45:20 +02:00