DEV Community

DarkEdges
DarkEdges

Posted on Edited on

Building Certificate-Backed Agents: Part 2, Enrollment and Activation

Source code and setup instructions: darkedges/udap-agent-trust-poc.

In Part 1, I separated the operator workspace, the authority and the protected resource. This installment follows an agent through enrollment: generating a key, submitting a CSR, obtaining approval and receiving a certificate.

The implementation is a local React and FastAPI POC with two operator organisations and an authority administrator. It explores a fixed trust community; it is not a claim of UDAP conformance. The key question here is what the certificate should mean before anyone asks for an OAuth token.

Enrollment establishes identity and activates the agent

The lifecycle begins before OAuth registration.

An operator creates an agent, and the agent service generates an RSA private key and a certificate signing request, or CSR. The CSR proves possession of the corresponding private key. It does not prove that the requester is entitled to an organisation's identity or to any particular permission.

That approval belongs to the authority. The operator submits a name and requested scopes; the authority derives the agent identity URI from its organisation and agent records. An illustrative identity looks like this:

https://trust.example.test/orgs/partner-a/agents/<agent-id>
Enter fullscreen mode Exit fullscreen mode

The URI identifies the workload in this trust community. It is not an instruction to fetch an arbitrary identity document, and the POC does not implement identity discovery at that address.

An administrator reviews the enrollment and may approve or narrow the requested scope set. On approval, the authority issues a certificate containing the agent's public key, the approved URI in its Subject Alternative Name extension, and a custom extension containing the approved operation ceiling.

The ceiling is encoded as an ASN.1 UTF8String under a documentation-only OID. That encoding is a local agreement between this issuer and authority. It is not a universal X.509 permission format. A real deployment would need an organisation-owned OID, a published schema and defined validation rules.

Here, approval also activates the agent. There is no additional approval gate after registration. Keeping that choice explicit prevents an ambiguous status called “activated” from meaning three different things in the operator portal, authority database and token endpoint.

Enrollment, agent status, certificates and registration are separate concepts. An enrollment can be pending or rejected. An approved agent can later be suspended. A certificate can expire or be revoked. A client may be registered, or the agent may deliberately use the certificate-only path.

The certificate ceiling is also different from current policy. The certificate records what the issuer approved at issuance time. Current policy records what the authority permits now. An administrator can remove a permission immediately without pretending that an already signed certificate has changed.

That separation produces a useful limit: editing policy cannot manufacture a permission outside the certificate's ceiling. Expanding an agent's approved capability requires a credential lifecycle operation, rather than silently treating a broad policy setting as sufficient authority.

Human login is a separate mechanism. Operators and administrators use local accounts and browser sessions with secure HttpOnly cookies and CSRF checks. Those sessions authorise portal actions. They are not the agent's OAuth credentials and do not substitute for a signed client assertion.

Next in the series

At the end of enrollment, the agent has an approved identity and a certificate, but it has not yet proved that identity to the OAuth token endpoint. Part 3 covers the signed statements used for registration and client authentication.

Top comments (0)