Skip to content
pi-c Artifact [542442b514]
Login

Artifact [542442b514]

Artifact 542442b514e0603801f07214f1c20f539b6433f008de38c283061877ce29179d:


The credential project (planned; starts after pic stage 2)

Status: proposed. pic's own sealed key store (pic login, see credentials) shipped first and does not depend on it.

A separate small C project that stores and manages credentials for pic and any other tool, under the same constraints as pic: C core and tests, Make/POSIX shell, vendored libfossil/SQLite, zlib and BearSSL only, crash tests at every commit boundary, sanitizers, fuzzing, Fil-C nightly, fastest native build in production.

Decisions (2026-11-18)

Shape

Stages

  1. Sealed store. cred put|get|ls|rm|log|exec, no daemon. Crash suite at each commit boundary; sentinel test that plaintext never reaches the database, WAL or output.
  2. Broker. Daemon, socket, peer credentials, grants, SSH stdio access. Fuzz the wire parser; kill the daemon mid-request.
  3. OAuth lifecycle. Device code (RFC 8628) and PKCE loopback, refresh, revoke; first provider zeitforge or GitHub. A fake token server in C; crashes before and after the token response.
  4. Many machines. Encrypted offline read cache, machine enrolment and revocation, master-key rotation.

pic's side

pic_cred_get(name, buf, cap, err, errcap) in src/cred.c is pic's only credential code. Today it reads the environment; later it runs a helper command (cred get NAME) and reads its stdout, the way git uses credential helpers. Nothing is linked between the projects.