2 Home
Forgejo Actions edited this page 2026-11-20 00:09:43 +00:00

Pocket ID provider

A deliberately small OpenTofu provider for Pocket ID: OIDC clients and their secrets, nothing else. It replaces the community provider for this homelab because Pocket ID is the identity provider for everything, so its management client has the smallest reasonable attack surface:

  • Go standard library plus HashiCorp's plugin framework only. No SDK, no third-party HTTP or JSON libraries.
  • Built reproducibly in john/tofu-provider-pocketid, signed by the deployer and served from registry.yawn.dev.
  • Client secrets are write-only and never stored in OpenTofu state.
  • Redirects are refused, so the API key is never sent to another host.
terraform {
  required_providers {
    pocketid = { source = "registry.yawn.dev/john/pocketid", version = "= 0.1.0" }
  }
}

provider "pocketid" {
  base_url = "https://auth.yawn.dev"
  # api_token from POCKETID_API_TOKEN
}

Provider arguments

  • base_url: Pocket ID origin, or POCKETID_BASE_URL. https:// only (http:// for loopback); no path.
  • api_token (sensitive): an admin API key, or POCKETID_API_TOKEN. Sent as X-API-Key.

Resources

Checked against Pocket ID 2.19.3. Acceptance tests (yawn run testacc) need a disposable Pocket ID with STATIC_API_KEY; never run them against production.

Resources