yaiam: device-flow sign-in for Yetano programs (YAIAM-710)

A shared client for programs that sign in at yaiam (or any OIDC
provider): device flow (RFC 8628), refresh with rotation, revocation
(RFC 7009), UserInfo and a 0600 file store. Standard library only;
https only (http on loopback), exact issuer match, no redirects,
answers capped at 1 MiB, tokens never in errors or fmt output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
terminarandClaude Opus 5.5 committed 2026-11-09 21:40:58 +01:00
1 parent 6a97dbd4c6
commit 4bff8798e5
7 files changed
+1245 -1

No files matched your search

+15 -1
View File
@@ -42,8 +42,22 @@ Tests use `httptest` servers only -- never a live Atlassian site.
- Comments explain why, not what. Every exported identifier has a doc
comment.
## yaiam
`yaiam` signs a CLI in at yaiam over standards only (device flow,
refresh, revocation, UserInfo). It holds no secret and verifies no
token signature -- no crypto here; servers check tokens with yaiam's
`pkg/httpauth`. Never log a token or put one into an error, never follow
a redirect with one, never accept an endpoint that is not https (http
only on loopback), and never send a stored token to another issuer or
client than the one it came from. Tests use a fake provider
(`httptest`); the end-to-end test against a real yaiam-authd is in
yaiam (`internal/oidcprovider/devicelogin_test.go`).
## Consumers
`yareco`, `yabaratla`, `yamcp` (all in the yetano meta-repository). A
`yareco`, `yabaratla`, `yamcp` (Atlassian); `yaiam` (its example and
end-to-end test), next `yasta` (`yaiam`). All in the yetano
meta-repository. A
breaking API change needs a new minor version and the consumers bumped
in the same wave.