Source code and setup instructions: darkedges/udap-agent-trust-poc.
An agent can hold a valid credential and still have no permission to read a document.
That distinction is easy to state and surprisingly easy to lose in a demo. A successful signature check becomes a green tick, a token appears, and the audience is left to assume the rest of the trust model works.
I built a certificate-backed OAuth proof of concept to make those decisions visible. An operator enrolls an agent. An authority approves its identity and permissions. The agent proves possession of its private key, obtains a short-lived token, and calls a protected resource. An administrator can then withdraw permission or revoke the credential and observe access fail.
The implementation uses React, TypeScript, FastAPI, PostgreSQL, Docker Compose, real X.509 certificates and signed JWTs. It explores ideas from UDAP while deliberately keeping its trust community small and explicit. It is an identity and access experiment for software agents, not an LLM runtime or a claim of UDAP conformance.
The architecture and its trust boundaries
The application has two human workspaces and three backend services.
The operator workspace manages agents belonging to an organisation. It lets an operator submit enrollment, inspect issued certificates, select an authentication path, request tokens and exercise protected operations. The authority workspace handles approval, current permissions, suspension, reactivation and certificate revocation.
Separating those views matters. The person requesting a credential should not silently become the person approving it. The POC seeds two operator organisations and an authority administrator, then enforces organisation and role checks in the APIs. A hidden button would be insufficient: an operator must also be unable to call the administrator endpoint directly.
Behind the UI, the agent service owns the agent's signing operations. The authority service owns enrollment, issuance, registration, authentication and policy. The resource service serves synthetic documents and accepts recommendations.
Operator browser Authority browser
| |
+----------- HTTPS gateway ------+
|
+------------+------------+
| |
Agent service Authority service
private keys issuer, clients, policy
| |
+--- signed requests -----+
|
+--- bearer token ---> Resource service
|
+--- introspection ---> Authority
The browser never receives an agent's private signing key. It asks the agent service to perform a specific operation. That service constructs and signs the request, then sends it over HTTP to the authority. This creates a real service boundary instead of calling a verification function inside the same process as the client.
The authority stores token hashes. The agent service stores its token copies and private keys encrypted, using a separate key volume. This is useful custody separation for a local experiment; it is not equivalent to hardware-backed, non-exportable key storage. The agent service remains a trusted component capable of using those keys.
PostgreSQL roles own separate service schemas. The current storage model is intentionally simple: each service persists a JSON state document and locks its row for transactional updates. That makes registration and replay decisions serial within that service. It also creates a throughput bottleneck, so I would replace it with normalised tables and explicit constraints before scaling the design.
Docker Compose packages the services, database, gateway and certificate bootstrap. Named volumes preserve identities and keys across restarts. A restart should not create a new trust community by accident.
The two resource operations give the demonstration something concrete to protect: documents.read and recommendations.create. They also let the UI show a more useful outcome than “authentication succeeded”: an agent may be able to read a policy document while being forbidden from creating a recommendation.
Next in the series
The service boundary makes the identity contract explicit: operators request, authorities approve, agents prove key possession and resources enforce permissions. In Part 2, we follow that contract through enrollment and certificate issuance.
Top comments (0)