Test
4a34c8e672
feat: add AssumeRoleActivity for temporary LLM API token grants
Implements AWS AssumeRole-like pattern for Poimen:
- User/service requests temporary access with identity + scope
- AssumeRoleActivity exchanges credentials with OAuth2 auth server
- Returns JWT token valid for limited time (default: 1hr, max: 24hrs)
- Token used in all subsequent LLM API calls to api.riotpiao.com
Key features:
- Credentials from vault/K8s secrets (never hardcoded)
- Scope-based access control (llm:read, llm:read llm:write, llm:admin)
- Automatic token expiration tracking
- Retry support for transient auth failures (2x, 1.5s backoff)
- Configurable auth server endpoint
Usage pattern:
1. AssumeRoleActivity(identity, scope) → JWT token
2. LLMRouter uses token in LLMAuth config
3. All activity calls validated against token + scopes
4. Workflow optionally refreshes token before expiry
Security:
- No credentials in code/logs (env or vault only)
- Short-lived tokens (1hr default, 24hr max)
- Server-enforced scope validation
- Token revocation support
Activity registered: #10 (authentication category)
Knowledge base updated with full activity spec
New file: action/assume_role.go (5.2 KB)
2026-09-04 14:11:58 -07:00
..
2026-08-23 18:02:39 -07:00
2026-09-03 09:10:37 -07:00
2026-08-23 17:48:15 -07:00
2026-08-23 17:23:35 -07:00
2026-08-23 16:49:25 -07:00
2026-08-23 17:15:10 -07:00
2026-08-23 18:02:39 -07:00
2026-08-23 17:48:15 -07:00
2026-08-21 21:57:01 -07:00
2026-08-23 18:01:18 -07:00
2026-08-23 18:01:18 -07:00
2026-08-23 18:02:39 -07:00
2026-08-23 17:17:51 -07:00
2026-08-23 17:48:15 -07:00
2026-08-23 17:32:55 -07:00
2026-08-23 16:33:49 -07:00
2026-08-23 17:24:46 -07:00
2026-08-23 17:21:23 -07:00
2026-08-23 17:48:15 -07:00
2026-08-21 15:58:46 -07:00
2026-08-23 17:25:52 -07:00
2026-08-23 16:33:49 -07:00
2026-09-02 19:21:53 -07:00
2026-08-23 16:33:49 -07:00
2026-08-23 17:11:56 -07:00
2026-08-23 17:30:05 -07:00
2026-08-23 18:02:39 -07:00
2026-08-23 16:43:30 -07:00
2026-09-04 14:11:58 -07:00
2026-08-23 18:01:18 -07:00
2026-08-23 17:31:37 -07:00
2026-08-23 16:47:31 -07:00
2026-08-23 18:01:18 -07:00