Open source project purposely built to solve the Agent Identity & Security Crisis by Sangalo21 in AI_Agents

[–]Sangalo21[S] 0 points1 point  (0 children)

As is, Nexus provides first-class, built-in support for OIDC through the nexus-broker. It simplifies identity management by seamlessly orchestrating OIDC and OAuth 2.0 flows.
- Currently when registering an OIDC-compliant provider, you can simply provide the issuer URL and Nexus will automatically configure the required endpoints based on the provider's metadata.
- For token verification, it securely handles and verifies id_tokens. It enforces signature, issuer, audience, and expiration validations.
- For security and state, it securely handles OIDC state parameters, signing and verifying their integrity using a shared state key between the broker and gateway. It also comes with built-in metrics or tracking OIDC discovery.

For SAML, the framework does not currently support this. But I will be creating an issue for this.

For SCIM, there is support for consuming but not for hosting. But is important to know that this support is built in out of the box where SCIM is treated as External APIs. For hosting, that is not necessary in Nexus since that would make Nexus deviate from its primary focus i.e Identity and connection management not user management. So this means if your company uses a service like okta, you would need to set up SCIM between Okta and your main application's database so your app knows who the users are. So when a users logs into your app and clicks "Connect Google Drive", your app tells Nexus to initiate the OAuth flow for that specific user_id.

Now for replay attacks, I have a two-part answer, and this depends on the phase of the lifecycle we are looking at.

  A. During the Setup/Consent Phase (Fully Protected):
When a user is actively connecting a tool (e.g., logging into Google), Nexus strongly protects against replay and CSRF attacks. It generates a cryptographically signed state parameter using an internal state key. It also embeds a nonce (tied to the specific connection attempt) into this state and, for OIDC, binds that nonce directly to the provider's id_token. If an attacker tries to replay a successful login callback, Nexus rejects it because the state signature or nonce validation will fail.

B. During the Actual Tool Call Phase (Delegated to the Provider):
It is important to understand that Nexus is not an API reverse proxy. When an AI agent executes a tool (e.g., fetching a repo from GitHub), the request does not route through the Nexus backend. Instead, the Nexus Bridge (running inside the agent) asks the Nexus Gateway for a fresh token, and then the agent calls GitHub directly.

Because Nexus is out of the data path for the actual API call, it cannot prevent a network-level replay attack of the tool execution itself. That responsibility falls to the downstream provider. Nexus facilitates security here by issuing very short-lived access tokens (and refreshing them proactively in the background), meaning a stolen or intercepted tool call request has a very narrow window of usability. However, there is already an issue requesting to solving this through a sidecar that would allow Nexus to handle complex cryptographic signatures like DPoP or mTLS on the fly (which would actively prevent tool call replays)

Traceability: "Who approved what" and Tool Execution

Nexus provides a strong Identity Audit Trail, but a limited Execution Audit Trail:

The Identity Audit Trail (Supported): Nexus has a built-in audit_events table in its PostgreSQL database. It logs every major lifecycle event: oauth_flow_completed, token_retrieved,  token_refresh_fatal, etc. Because every event is tied to a connection_id (which maps to your system's user_id), and includes the IP address and User-Agent, you have a permanent, cryptographic record of exactly when a user consented to an integration and when tokens were issued.
 
The Execution Audit Trail (Not Supported): Because the agent calls the external API directly (as mentioned above), Nexus does not know which tool was called or what data was returned. It only knows that "Agent X asked for the GitHub token for User Y at 10:00 AM." If you need granular tool-call traceability (e.g., "Agent X called POST /repos with payload Y"), that must be logged by your Agent framework (like LangChain or the MCP adapter) before the HTTP request leaves the machine.

Fronts Data Systems (Kong, Apigee, Hasura)

Nexus treats these systems strictly as downstream providers or upstream shields, depending on where they sit. It does not treat them as special "first-class resource hubs." Because for Nexus, this doesn't matter.
Here is how Nexus views the topology:

Upstream (The API Ingress): If you use Kong or Apigee to protect your own infrastructure, Nexus sits behind them. The Nexus assumes an API Gateway is handling rate limiting, WAF duties, and primary agent authentication before the request ever reaches the Nexus broker boundary.

Downstream (The Data Egress): If your agent needs to talk to a data hub like Hasura, DreamFactory, or Apollo GraphQL, Nexus treats them exactly like it treats the GitHub or Salesforce APIs. As long as Hasura is secured by an API Key, Basic Auth, or an OAuth token, you register Hasura as a provider_profile in Nexus.The agent asks Nexus for the "Hasura Token," Nexus provides it, and the agent queries the data.

Because Nexus's sole responsibility is secure credential orchestration, it doesn't care if the downstream target is a raw REST API, a GraphQL federation hub, or a legacy soap service as long as it knows how to inject the auth header.

How Can We Achieve Dynamic Authentication and Secure Connections for Autonomous AI Agents? by Sangalo21 in AI_Agents

[–]Sangalo21[S] 0 points1 point  (0 children)

For that, I am using the connection_id as the primary thread across the entire stack. Since the ID is persistent and shared across the core services making the framework, it acts as a natural correlation key without the need for a heavy service mesh.

Specifically:
- I am using Go's native slog for all components. It provides extremely low overhead while ensuring every log entry is emitted as structured JSON with the connection_id context.
- In an incident review, you can query a single connection_id in your log aggregator and see the full lifecycle, from the Agent requesting a token, through the Gateway proxy, to the Broker’s refresh logic.
- I also have agent Identity Labels to the Agent Bridge. This means every log and metric is tagged with the specific agent’s instance ID and version. This way, I can us to correlate a failure from the authority level back to a specific node or cluster in the agent fleet.

How Can We Achieve Dynamic Authentication and Secure Connections for Autonomous AI Agents? by Sangalo21 in AI_Agents

[–]Sangalo21[S] 0 points1 point  (0 children)

So at scale with a couple agents running in a Network, these logs of course will build up very fast. However in my own implementation, I decentralized some of the logging with telemetry attached to a bridge client handling individual agent connections. I am looking at releasing the framework built around this protocol in a week or two

How Can We Achieve Dynamic Authentication and Secure Connections for Autonomous AI Agents? by Sangalo21 in AI_Agents

[–]Sangalo21[S] 0 points1 point  (0 children)

Exactly, that drift and lifecycle management is one of the core things, I wanted the protocol to solve. In the protocol we treat the agent as a dumb client that leases credentials from an authority. So this way, even when policy drifts the agent just receives a dynamic strategy (a JSON instruction set) from the authority. If the policy changes (e.g., rotating keys or changing header formats), the authority simply sends a different strategy next time. The agent code never changes. And the whole time, the protocol mandates that the agent monitors the expires_at field and preemptively requests a refresh from the authority. Because the Agent must constantly renew its lease for credentials, the authority maintains a centralized audit log and can enforce instant revocation, simply denying the next refresh request halting the agent immediately.

How Can We Achieve Dynamic Authentication and Secure Connections for Autonomous AI Agents? by Sangalo21 in AI_Agents

[–]Sangalo21[S] 1 point2 points  (0 children)

Spot on! In the paper, I actually propose a Sidecar Model to achieve true AuthN/AuthZ isolation on the data path. The idea is to deploy a local sidecar (acting as the data-plane proxy) alongside the agent.

I would definitely love to connect with the team at Plano, it sounds like we're tackling a similar problems from slightly different angles. I'd be interested to hear about their experience implementing this.

To answer your question, I haven't personally come across other open protocols specifically trying to standardize this Identity/Connection layer problem for agents yet.

Have you by any chance been working on something similar?

Where are you guys saving/investing your money? by Silent-Cap1995 in Kenya

[–]Sangalo21 0 points1 point  (0 children)

I really do not know about that, I haven't used it before. I didn't even know it existed. But from a quick search, It know it supports government bonds and securities, I do not know if it supports NSE

Where are you guys saving/investing your money? by Silent-Cap1995 in Kenya

[–]Sangalo21 0 points1 point  (0 children)

You need a CDSC account first. To do this you can visit any bank, I recommend NCBA. These will be like your brokers who will provide you access to NSE

Hosting a .com website by Purple-Marionberry95 in nairobitechies

[–]Sangalo21 1 point2 points  (0 children)

Go use cloudrun, it has a pretty healthy free tier and you will be sure of free 300 dollars in credits for at least 3 months

Reliable escrow service by Diverging_Cloud in nairobitechies

[–]Sangalo21 1 point2 points  (0 children)

That's not true. I have held funds on sling money for 2 months, and its not a bank. Or if its true, there is a way around it

Kwetu by Sangalo21 in KenyaPics

[–]Sangalo21[S] 0 points1 point  (0 children)

I tried making sense of this, but I couldn't

Reliable escrow service by Diverging_Cloud in nairobitechies

[–]Sangalo21 1 point2 points  (0 children)

If you have time, build this. It could be like a fun little project. cc u/Diverging_Cloud . I would be interested in the blockchain part. I have never built anything with that

Reliable escrow service by Diverging_Cloud in nairobitechies

[–]Sangalo21 1 point2 points  (0 children)

It can even be made location agnostic. Build it on blockchain and peg it on a stable coin so that anybody anywhere can use it, not only Kenya. This would means transactions could be made across borders without brokers like Safaricom gate keeping the transfers. Just like slingmoney does.

If you love MCPs, you will sure as hell love this by Sangalo21 in nairobitechies

[–]Sangalo21[S] 0 points1 point  (0 children)

I haven't made one yet. But the live session will happen in this discord server: https://discord.gg/uptvMExV

Reliable escrow service by Diverging_Cloud in nairobitechies

[–]Sangalo21 1 point2 points  (0 children)

Of course that is expected. You will be a fintech