Borrowing it
Nothing to install: this file belongs to Aviator-Coding/home-ops. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Aviator-Coding/home-ops/main/.claude/skills/authentik-terraform/SKILL.mdgit clone --depth 1 https://github.com/Aviator-Coding/home-opsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/aviator-coding/home-ops/authentik-terraform)<a href="https://agentmods.dev/skills/aviator-coding/home-ops/authentik-terraform"><img src="https://agentmods.dev/badge/skills/aviator-coding/home-ops/authentik-terraform.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00091 | $0.02384 |
| Opus 5 | $0.00046 | $0.01192 |
| Sonnet 5 | $0.00018 | $0.00477 |
| Haiku 4.5 | $0.00009 | $0.00238 |
Grade A, and why
authentik-terraform scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 34 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Authentik SSO and the terraform/authentik OpenTofu stack
Relocated verbatim from AGENTS.md on 2026-09-01 so it loads only when this subsystem is in play.
The text below is unchanged; only line breaks were inserted. AGENTS.md keeps a one-sentence pointer.
Add new findings here or to the owning document, not back into AGENTS.md - see its
"Maintaining this file" section for the rule.
-
terraform/authentik/HAS been applied and now holds live state (first apply 2026-08-27:9 imported, 4 added, 4 changed, 0 destroyed; second apply 2026-08-28 landedlitellm_role, the LiteLLM-only invalidation flow, and the provider wiring; third apply the same day setgrant_types = ["authorization_code"]on the created LiteLLM provider after post-merge SSO verification found Authentik rejecting authorize). It owns the remaining adopted apps/providers (coder,pg-admin,echoExtAuth) plus the full LiteLLM SSO surface.open-webuiwas intentionally deleted from Authentik and removed from the stack (tofu state rm). A freshtofu planis empty (-detailed-exitcode0) on the READ-ONLY token, andscopes_supportedincludeslitellm_roleso SSO users land asproxy_admin. Two credentials exist, both least-privilege service accounts minted throughak shell:tofu-readonly(plan) andtofu-writer(apply; fourteen add/change permissions including model-levelchange_flow, no delete on anything, proven by create-then-delete 201/403 and a scope-mapping POST 201).AUTHENTIK_APPLY_TOKENis deliberately ABSENT from 1Password so a straytofu applyfails closed. The state backend is NOT reachable through the gateway: OpenTofu's aws-sdk-go-v2 signsaccept-encoding/amz-sdk-*, Envoy rewrites one of them, and RGW returnsSignatureDoesNotMatch- boto3 and minio-go sign none of those and keep working, so VolSync never noticed. Endpoint is env-supplied viaAWS_ENDPOINT_URL_S3(backend.tofu omitsendpointsso the env var wins): localsecrets.vals.yamluseshttp://127.0.0.1:18081afterkubectl -n rook-ceph port-forward svc/rook-ceph-rgw-ceph-objectstore 18081:80; CIsecrets-ci.vals.yamluses the in-cluster Service DNS because the ARC runner cannot port-forward. Runbook:docs/authentik/terraform.md. -
Four OpenTofu/Authentik traps, none of which
tofu validatecan catch.
(0) grant_types is optional+computed, so omitting it is right for an IMPORTED provider (the read adopts the live set) and wrong for a CREATED one: it writes grant_types = {} and Authentik rejects every authorize with invalid_request / Invalid grant_type for provider. Same shape as client_secret, opposite answer, and a clean plan plus -detailed-exitcode 0 both hold while login is impossible.
(1) authentik_flow's terraform id is the slug, not the UUID, so a provider's invalidation_flow set from .id fails with 400 "<slug>" is not a valid UUID - use .uuid (same for authentik_flow_stage_binding.target).
(2) The S3 backend fails open to real AWS: backend.tofu omits endpoints so AWS_ENDPOINT_URL_S3 can point at the RGW port-forward, and if that variable is unset the SDK silently talks to genuine AWS S3 rather than erroring.
(3) The write role now holds model-level change_flow, which reaches every flow including default-authentication-flow, so verify each apply against a before/after snapshot of all flows and their stage bindings taken from the database, not against terraform's own summary. Evidence and commands: docs/authentik/terraform.md.
terraform/is not Flux-reconciled and nothing applies it automatically. It holds OpenTofu stacks for configuration that lives inside an application's own API, where a chart cannot reach. Today that isterraform/authentik/only..github/workflows/validate.yaml'sterraformjob (scripts/ci/tofu-validate.sh) stays a pure schema check:tofu fmt -checkplustofu validatewith-backend=false, no credentials..github/workflows/terraform-diff.yamlis separate and does carry credentials: on every same-repo PR touchingterraform/**it runs a realtofu init/tofu plan -lock=falseagainst a stack's live state backend (and, for authentik, the live read-only Authentik API) and posts the plan as a PR comment, whenever that stack provides its ownsecrets-ci.vals.yaml(aref+onepasswordconnect://-scheme mirror of itssecrets.vals.yaml, resolved via the in-cluster 1Password Connect since CI has no interactiveopsession) - a stack without one gets schema-only checks. This is a deliberate, captain-approved design (2026-08-27) that consciously reverses an earlier "CI can never reach the live instance" boundary; it never touchestofu apply, which against the Authentik stack changes the cluster's live SSO, including the ExtAuth thatkubernetes/apps/base/network/echo/app/securitypolicy.yamlandkubernetes/apps/base/ai/agentgateway/app/policies/authentik-policy.yamlroute every request on their listeners through, and remains an explicitly approved operator action, never a follow-on to a green PR. Runbook, inventory, the CI credential and its vault-wide read scope, and the apply approval gate:docs/authentik/terraform.md(see section 9 for CI). Conventions:terraform/tofu.md.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 34 lines · 91 tokens per session scan A 8da8ae6d28bf
authentik-terraform is a skill published in the GitHub repository Aviator-Coding/home-ops (2 stars, last pushed today), licensed MIT. It adds 91 tokens to every session and 2,384 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…