Add agentvault seed-oauth for oauth2-proxy credentials #9
Reference in New Issue
Block a user
Delete Branch "benvin/agentvault-seed-oauth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Seeding an oauth2-proxy secret by hand means an interactive agent plumbing a client secret and a cookie secret through a shell, which the credential classifier blocks.
agentvault seed-oauthis a sibling ofseed-outpostthat does the whole thing in one self-contained invocation: it reads the KV path itself, fills in only what is missing, and prints key names and the new KV version — never a value.How
SeedOAuthininternal/agentis a read-modify-write over the KV-v2 path:client_idcomes from the flag,client_secretandcookie_secretare generated only when absent (or with--rotate), and every other key on the path is written back untouched.crypto/rand;cookie_secretis base64url so it decodes to exactly the 32 bytes oauth2-proxy requires.version: unchangedinstead of cutting a pointless KV version.ReadKVOptional(a missing secret is empty, not an error, so a first seed works) andWriteKVAny(non-string fields survive the round trip).client_secretis kept, other-key preservation,--rotate, idempotence, denials, and that no output or error carries secret material.