Skip to content

docs: ADR-0025 — service→resource permission grants (#117)#122

Merged
pedromvgomes merged 1 commit into
mainfrom
feature/pki-grants
Jun 15, 2026
Merged

docs: ADR-0025 — service→resource permission grants (#117)#122
pedromvgomes merged 1 commit into
mainfrom
feature/pki-grants

Conversation

@pedromvgomes

Copy link
Copy Markdown
Contributor

Part of #117.

Docs-only slice that gates the code slices of #117 — designs the general capability of granting a service a permission on a resource, materialized as a credential/secret delivered to that service, with its two first consumers landing together.

The model

  • Grant — a service's declared, permissioned access to a Grantable resource, authored as a grants: list on the service manifest. Distinct from the ref: Source DSL (which only reads an existing output) and from mesh pki: membership (intrinsic identity).
  • Grantable interface with two real consumers now — a Database (per-service DB user) and a new PKI resource (the daemon's standalone root-only CA). Two dissimilar consumers (stateful Pulumi user vs. stateless cert; value fields vs. file fields) make the abstraction earn its keep rather than be speculative generality.
  • Universal ro/rw permission, mapped per-resource: DB read-only/read-write user; PKI verify = CA cert vs issue = root signing key.
  • Per-grant outputs: block composes env vars over {FIELD} placeholders. Value fields ride the ADR-0010 env-secret path; file fields ride the existing files:/projectFiles projection — inforge-bootstrap is unchanged.
  • Uniform deploy-time materialization; grant material is long-lived, so no renewal-timer hook. DB users are Pulumi-managed (auto-drop on grant/service removal).
  • The PKI resource is a full resource type (…/pki/<name>/manifest.yaml, root-only), scope/region like any resource, no cross-region. Distinct from the env-root mesh pki.enc.yaml; separation is topology-enforced (grants target only root-only PKIs; pki: membership names only two-tier meshes). Its key is a CLI-generated age-encrypted sidecar, encrypted to the CI recipient ("warm").
  • A Database stops exposing a credential-bearing connectionUrl; DB creds flow only through grants. ref: stays for non-credential outputs.

Files

  • docs/adr/0025-service-resource-permission-grants.md — the decision record.
  • internal/CONTEXT.md — glossary terms: Grant, Grantable, PKI resource, Field, Output, Database credential access.

Gates run clean (build / go test -race / lint) despite being docs-only.

@pedromvgomes pedromvgomes added the pki Service-mesh + daemon PKI work label Jun 15, 2026
@pedromvgomes pedromvgomes merged commit e5b81e0 into main Jun 15, 2026
2 checks passed
@pedromvgomes pedromvgomes deleted the feature/pki-grants branch June 15, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pki Service-mesh + daemon PKI work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant