Skip to content

Tenuo v0.3.9

Choose a tag to compare

@aimable100 aimable100 released this 28 Nov 07:52
172e556

Tenuo 0.3.9 lets agents that already have an identity get task-scoped warrants: workloads with SPIFFE SVIDs, and callers with OAuth tokens from Keycloak, Microsoft Entra ID, GitHub Actions or any RFC 9068 provider. It also adds token budgets per period and ES256 verification for Attenuating Agent Tokens.

Packages: Rust/Python 0.3.9; npm @tenuo/core and @tenuo/mcp 0.3.9-beta.0 on the beta channel; authorizer images and Helm chart 0.3.9.

Upgrade the token-budget lease service before its SDK clients: 0.3.9 clients take leases through a new route, and an older service answers 404 or 403, so model calls are refused with lease_unavailable. Rust users of tenuo::aat have a source migration, below. The TypeScript packages remain beta.

Breaking

  • tenuo::aat: a trust anchor's key and the verified holder key are a VerifyingKey. TrustAnchor.key and Verified.holder were the Ed25519 PublicKey. Build an anchor with key: public_key.into(), and read an Ed25519 holder with verified.holder.as_ed25519(). VerifyOptions gains the field algorithms. VerifyOptions and Verified are now #[non_exhaustive]: build options with VerifyOptions::new and set fields on the value.

Added

  • Python: warrants for SPIFFE workloads (tenuo[spiffe]). A workload proves who it is with the SVID it already has, names a task, and gets a warrant for that task bound to a holder key of its own. Your policy decides what each workload may do. There are three ways in, for three kinds of deployment:

    • mutual TLS with X.509-SVIDs (SpiffeIssuerServer, request_warrant);
    • JWT-SVIDs over HTTPS, where mTLS cannot reach the issuer (tenuo[spiffe-jwt]);
    • identity forwarded by a mesh sidecar, for agents that hold no certificate. Checked against Envoy, and against Istio with its own certificates and with SPIRE's.

    Credentials come straight from the SPIRE Workload API (tenuo[spiffe-workload-api]) or from files, and are renewed without restarting listeners. Federation binds each trust domain to its own bundle. A warrant never outlives the SVID it was issued on. See the SPIFFE guide, which starts with a five-minute demo that needs no SPIRE.

  • Python: warrants for OAuth callers (tenuo[oauth]). A caller presents the token it already has and names an approved task; it gets a warrant for that task alone. Your identity provider, login flow and gateway stay as they are.

    • A Trust says whose tokens are accepted: issuer, audience, claim layout and required claim values. Presets for Keycloak, RFC 9068, GitHub Actions and Microsoft Entra ID are each tested against the real provider in CI. Another provider is a ClaimMap you write from one of its tokens.
    • The endpoint takes a compact JSON request or an OAuth 2.0 Token Exchange (RFC 8693) request.
    • tenuo-python/examples/oauth/quickstart.py runs the whole flow in one file, with no Docker and no identity provider.
    • A recipe adds warrant checks to an Envoy gateway that already validates Keycloak tokens: one route and one filter.
    • When a token is not accepted, the issuer's log says which check failed (audience, client, claim map, scope, key URL). The caller is told the same thing every time.

    See the OAuth guide.

  • Python: token budgets per period. llm_capability(total_tokens=N, period="day", timezone=...) signs an allowance that starts again each hour, day, week or month. The meter counts per warrant and period, and the warrant check verifies the period it counted by. See token budgets.

  • tenuo::aat: verify ES256 signatures (Rust, behind the new aat-es256 feature, which adds the p256 crate). A trust anchor, a holder's cnf.jwk and a PoP JWT may use a P-256 key, alone or beside Ed25519 keys in one chain. An enforcement point permits algorithms by name in VerifyOptions.algorithms. The default is Ed25519 only, so behavior is unchanged until ES256 is listed.

Changed

  • Token budgets: unanswered remote lease requests are retried (Python). A lease request or a return that gets no answer is sent again within timeout, and a lease whose answer was lost is the lease the next request receives, so a dropped connection no longer leaves a lease charged and unused. Leases are now taken through POST /v1/triggers/{id}/acquire. See token budgets.
  • Token budgets: a usage report no call could have is not counted (Python). A reply that reports zero tokens, or more than tenuo.budget.MAX_CALL_TOKENS (a billion) for one call, is treated like a reply without usage: the reservation is the charge, and usage_counts returns None for it. Before, a zero count was charged nothing.

Fixed

  • Python LangGraph: state["warrant"] accepts an encoded WarrantStack or a root-first list and carries its parents into authorization. Ambiguous stack-plus-explicit-chain input is rejected.
  • Python CrewAI: GuardedCrew.with_issuer() carries the issuer warrant and its parents into every agent guard, so delegated calls verify against the trusted root. with_trusted_roots() sets roots for the crew.

Limits worth knowing

  • The SPIFFE and OAuth adapters are Python only in this release.
  • The OAuth adapter is a resource server, not an authorization server. It refuses opaque tokens, sender-constrained tokens (DPoP, mTLS-bound) and tokens with an actor chain. Amazon Cognito access tokens carry no aud claim and are refused.
  • A warrant limits what a call may be, not how many times it is made. Limits such as MaximumFrom are per call; keep running totals and single-use rules in your own service.
  • Revoking a token, an SVID or a task approval does not revoke a warrant already issued. Lifetimes are short for that reason.
  • The mutual-TLS issuer limits open connections. A peer that connects and sends nothing cannot keep agents out, and one workload holds at most a quarter of the places. A workload with a valid SVID that reconnects as fast as it can still slows the issuer for others, so limit connections per source in front of it.
  • In the gateway recipe the authorizer checks the request fields its route maps. A field it does not map reaches the backend unchecked.