security
Hardening, boundaries, and being honest about what a control actually protects.
-
Running a Self-Hosted Tailscale Control Server Behind a Reverse Proxy
Headscale behind Traefik: tls.options=no-h2@file with alpnProtocols http/1.1, because the Tailscale noise handshake breaks when ALPN negotiates h2.
-
One Local Endpoint for Every Agent Session
OPENAI_BASE_URL=http://localhost:8080/v1 for every AI tool: one local FastAPI proxy that logs each request and refuses internal-only projects.
-
Treating Issue Bodies as Untrusted Input
Prompt injection via GitHub issue bodies: fence untrusted text and accept model output only as a fixed JSON action schema, tested without a model.
-
From a Large Allowlist to Three Denials: Permissions for a Coding Agent
bwrap --unshare-net --cap-drop ALL instead of a command allowlist: sandboxing a coding agent's shell so rm -rf and curl cannot leave the workspace.
-
Self-Hosted LLM Inference: Serving, Benchmarking and Agent Guardrails
Ollama OpenAI-compatible /v1/chat/completions: a repeatable benchmark on your own tasks and a dry-run plus --approve guardrail for infrastructure agents.
-
The Label as Contract: Consent and Priority as the Whole Queue
agent-ready label as the only consent gate for a coding agent: FIFO order by label time and a re-read-then-swap claim so two runs never share an issue.
-
Self-Hosted Identity with Keycloak: Central Offboarding and Forward Auth
Keycloak "invalid_grant" "Account disabled": one admin API call disables a user for every OIDC client, plus oauth2-proxy forward auth for apps without login.
-
Forward Auth: Putting Real Authentication in Front of Software That Has None
Traefik forwardAuth with X-Auth-Request-User: strip the header first or clients can spoof it. oauth2-proxy and Keycloak in front of apps with no login.
-
Enforcing Client Identity Alongside Realm Roles
Keycloak azp claim: a realm role does not show which client the token was issued to. Enforcing azp next to role checks in a FastAPI dependency.
-
OIDC Client Shapes: A Token-Validating API Is Not a Login Client
Keycloak directAccessGrantsEnabled on a token-validating API lets it mint tokens. bearerOnly client, oidc-audience-mapper and a PyJWT aud check.
-
Realm-as-Code: Reconciling Clients and Roles But Never Users or Signing Keys
kc.sh import with --override=true recreates the realm, dropping users and signing keys. Reconciling only clients and roles via the Keycloak Admin REST API.
-
External Secrets with Offline JWT Validation When Vault Cannot Reach the Cluster
Vault kubernetes auth "failed to validate token" tokenreviews i/o timeout: jwt auth with jwt_validation_pubkeys from sa.pub for External Secrets.
-
Overlay Mesh Networking with NetBird: Peer Addressing and the Public DNS Fallthrough
NetBird mesh hostnames resolve to the public host via a zone wildcard when the mesh resolver is down. Fix: a *.mesh blackhole record and accept-new.
-
Rootless BuildKit: What fuse-overlayfs Costs on a Cold Cache
Rootless BuildKit with --oci-worker-snapshotter=fuse-overlayfs needs no --privileged, but cold-cache builds pay a FUSE round-trip per file. Measuring it.
-
Trusting an Internal and a Public Certificate Authority in One Process
curl: (60) SSL certificate problem after SSL_CERT_FILE points at an internal CA: it replaces the trust store. Append with update-ca-certificates instead.
-
A Confidential OIDC Client That Exists Only to Introspect Tokens
invalid_client "Parameter client_secret is missing" on Keycloak token introspection for a public SPA client: add a confidential introspection-only client.
-
Auto-Unsealing Vault Without Cloud KMS or a TPM, Using Tang and Clevis
clevis encrypt sss with Tang pins to auto-unseal Vault without cloud KMS or a TPM: binding Shamir key shares, a systemd unit, and the t threshold.
-
Runtime Secret Injection with a Vault Agent Sidecar and a Wrapped AppRole
secret_id_response_wrapping_path in Vault Agent approle auto_auth: a sidecar that bootstraps from a single-use wrapped secret_id and renders secrets to a file.
-
Vault KV-v2: Why put Silently Wipes Every Sibling Field
vault kv put wipes sibling fields and -cas fails with "check-and-set parameter did not match the current version": why, and how patch avoids it.
-
Replacing Distributed SSH Keys with a Vault Certificate Authority
TrustedUserCAKeys with the Vault ssh secrets engine: short-lived SSH user certificates limited by allowed_users and ttl instead of authorized_keys.
-
Reasserting Kernel Sysctls That Docker Silently Reverts
net.ipv4.ip_forward = 1 although sysctl.d says 0: dockerd rewrites it at start. A oneshot unit After=docker.service reruns sysctl --system.
-
Migrating the SSH Port Mid-Playbook Without Locking Ansible Out
Ansible meta: reset_connection after changing the sshd Port: validate with sshd -t, flush_handlers, and ping before closing the old port.