Scoped API identities for unattended agent workloads
What problem are you trying to solve?
TrueForge supports OIDC authentication and enforces session ownership through created_by. This works well for interactive users, but API-driven and unattended workloads need a narrower authorization boundary.
For example, an ephemeral development environment may need permission to:
- create and operate only its own sessions;
- use one approved agent configuration;
- use only allowlisted models, skills, and MCP connectors;
- stay within operator-defined execution and lifetime limits;
- never enumerate or modify shared agents or settings.
Today, an authenticated non-admin user can create inline sessions and choose among tenant-configured resources. Session ownership prevents access to another user's sessions, but it does not constrain what a caller may request when creating its own session.
This makes it difficult to grant direct TrueForge API access to short-lived CI jobs, autonomous workers, or per-environment service identities without placing a trusted policy-enforcing service in front of TrueForge.
Proposed solution
Add an operator-controlled authorization seam for API-driven workloads.
The exact mechanism is open for discussion. Possible designs include:
- mapping verified OIDC claims to a server-side workload policy;
- issuing scoped service credentials;
- injecting an authorization/policy provider into session creation and resource resolution.
A workload policy could constrain:
- whether inline agent specifications are permitted;
- allowed named agents;
- allowed models, skills, and MCP servers;
- allowed MCP tools and approval policy;
- session concurrency and lifetime;
- whether shared resources may be listed;
- whether agent and settings mutation APIs are accessible.
The server should enforce these constraints rather than trusting restrictions supplied in the session's agent specification.
A minimal first version could authorize session creation against an operator-defined policy while retaining the existing created_by ownership model for subsequent session and turn operations.
We would be interested in contributing an implementation after agreeing on the preferred architecture and scope.
Alternatives considered
External policy broker
A trusted service can authenticate workloads, validate requests, and call TrueForge with a privileged credential. This works today and is our current likely approach, but every API-driven deployment must then implement session ownership mapping, request validation, lifecycle enforcement, and audit behavior independently.
Dedicated TrueForge deployment per workload
This provides strong isolation but is operationally expensive and does not fit short-lived environments.
OIDC identity per workload only
Unique sub claims provide session ownership isolation, but do not constrain inline agent specifications or access to tenant-configured resources.
Per-tool authorization
Issues #379 and #413 could control tool execution, but do not cover session creation, model/resource selection, or shared API visibility.
Additional context
Related issues:
This request is specifically about authorization at the workload/session API boundary. It is intended to complement rather than duplicate those proposals.
Scoped API identities for unattended agent workloads
What problem are you trying to solve?
TrueForge supports OIDC authentication and enforces session ownership through
created_by. This works well for interactive users, but API-driven and unattended workloads need a narrower authorization boundary.For example, an ephemeral development environment may need permission to:
Today, an authenticated non-admin user can create inline sessions and choose among tenant-configured resources. Session ownership prevents access to another user's sessions, but it does not constrain what a caller may request when creating its own session.
This makes it difficult to grant direct TrueForge API access to short-lived CI jobs, autonomous workers, or per-environment service identities without placing a trusted policy-enforcing service in front of TrueForge.
Proposed solution
Add an operator-controlled authorization seam for API-driven workloads.
The exact mechanism is open for discussion. Possible designs include:
A workload policy could constrain:
The server should enforce these constraints rather than trusting restrictions supplied in the session's agent specification.
A minimal first version could authorize session creation against an operator-defined policy while retaining the existing
created_byownership model for subsequent session and turn operations.We would be interested in contributing an implementation after agreeing on the preferred architecture and scope.
Alternatives considered
External policy broker
A trusted service can authenticate workloads, validate requests, and call TrueForge with a privileged credential. This works today and is our current likely approach, but every API-driven deployment must then implement session ownership mapping, request validation, lifecycle enforcement, and audit behavior independently.
Dedicated TrueForge deployment per workload
This provides strong isolation but is operationally expensive and does not fit short-lived environments.
OIDC identity per workload only
Unique
subclaims provide session ownership isolation, but do not constrain inline agent specifications or access to tenant-configured resources.Per-tool authorization
Issues #379 and #413 could control tool execution, but do not cover session creation, model/resource selection, or shared API visibility.
Additional context
Related issues:
This request is specifically about authorization at the workload/session API boundary. It is intended to complement rather than duplicate those proposals.