yaiam: web sign-in (Web) and admin API reads (Admin)
Web signs the users of a web application in with the code flow and PKCE: state, nonce and verifier in a short-lived __Host- cookie, the ID token checked per OIDC Core 3.1.3.7, profile, groups and roles from UserInfo, and the RP-initiated logout URL. Admin reads users, groups and group members from yaiam's admin API with a client credentials token. Toolchain go1.27.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4bff8798e5
commit
a3e8f9bb3b
10 files changed
+1183
-16
No files matched your search
@@ -45,9 +45,15 @@ Tests use `httptest` servers only -- never a live Atlassian site.
|
||||
## 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
|
||||
refresh, revocation, UserInfo), and a web application's users (`Web`:
|
||||
code flow with PKCE, state and nonce in a short browser cookie). It
|
||||
verifies no token signature -- no crypto here: a web sign-in's ID token
|
||||
comes straight from the token endpoint over TLS (OpenID Connect Core
|
||||
3.1.3.7) and its claims are checked (iss, aud/azp, exp, iat, nonce);
|
||||
never take an ID token from anywhere else, and never let `Callback`
|
||||
return without the state check. Client secrets (`Web`, `Admin`) go only
|
||||
in the Authorization header to the token endpoint. 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
|
||||
|
||||
Reference in new issue
Block a user