Issue a Passport
Passport issuance is an admin operation that creates JWT tokens for agents to authenticate with Eunomia. These tokens can contain the agent's attributes and can be used during permission checks.
Prerequisites
- Eunomia server running with the Passport fetcher configured
- Admin API access
- If
requires_registry
is enabled, the agent must be registered in the registry first
Issue a Passport via API
Endpoint
Request Body
{
"uri": "agent://my-ai-agent",
"attributes": {
"role": "assistant",
"department": "customer-service",
"capabilities": ["chat", "search"]
},
"ttl": 3600
}
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
uri |
string | Yes | The unique identifier for the agent |
attributes |
object | No | Additional attributes to embed in the passport |
ttl |
integer | No | Token lifetime in seconds (defaults to configured jwt_default_ttl ) |
Response
Example Usage
Using the Passport
Once issued, agents can use the passport token as their URI when making permission checks:
# Agent uses the passport token as their URI
result = eunomia.check(
principal_uri=passport_token,
resource_uri="customer_data",
action="read",
)
Registry Integration
When requires_registry = true
is set in the server settings, the passport issuer will:
- Check if the agent URI exists in the registry
- Automatically include registry attributes in the passport
- Deny issuance if the agent is not registered