Skip to content

atenet: add agentgateway egress support - #909

Open
Eitan Yarmush (EItanya) wants to merge 3 commits into
agent-substrate:mainfrom
kagent-dev:agentgateway-egress
Open

atenet: add agentgateway egress support#909
Eitan Yarmush (EItanya) wants to merge 3 commits into
agent-substrate:mainfrom
kagent-dev:agentgateway-egress

Conversation

@EItanya

@EItanya Eitan Yarmush (EItanya) commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add agentgateway support to the actor egress gateway. --atenet-router=agentgateway now selects
agentgateway for both ingress and egress, while Envoy remains the default.

What changed

  • Configure agentgateway to:
    • terminate downstream mTLS using the actor-identity CA
    • accept HTTP CONNECT
    • authorize each CONNECT through the existing egress ext_proc handler
    • dynamically connect to the requested IP:port
  • Pass agentgateway’s verified source.certificate to ext_proc.
  • Preserve the existing certificate re-verification and actor identity/status checks.
  • Add agentgateway egress Kustomize and targeted deployment support.
  • Make the egress demo verifier dataplane-neutral.
  • Keep the existing Envoy path unchanged.

@LiorLieberman

Copy link
Copy Markdown
Collaborator

looking at this today!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall. left a few comments.

)

const (
// ClientCertificateAttribute is the PEM peer certificate agentgateway

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this only relevant for agentgateway?

If yes, maybe you call that agentgatewayClientCertificateAttribute?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also is this dynamic metadata? just curios how you compare that vs the forwarded Client Cert Header ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this attribute is agentgateway-specific. I renamed it to agentgatewayClientCertificateAttribute and made it unexported. It is an ext_proc request attribute, not dynamic metadata: agentgateway evaluates source.certificate from the verified downstream TLS connection into ProcessingRequest.attributes. Envoy continues to use the sanitized XFCC header. The handler independently re-verifies the certificate in both cases.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cant see the rename, did you commit it?


const (
// DirectionAttribute is set from a dataplane expression, not a client
// header, by dataplanes without Envoy filter chains.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by dataplanes without Envoy filter chains.

who sets this request attribute, agw? Also I think we probably want some more specific namespace like ate.calllout(maybe a better key name?).direction

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, agentgateway sets this through the extProc requestAttributes config. I renamed the key to the more specific ate.extproc.direction.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cant see the rename, did you commit it?

Comment thread hack/install-ate.sh
echo " --delete-all Delete core system and all registered demos"
echo " --ateapi-client-auth=cert|token Select how in-cluster clients authenticate to ateapi for --deploy-ate-system (default: cert; the server always accepts both)"
echo " --atenet-router=envoy|agentgateway Select the atenet router dataplane (default: envoy)"
echo " --atenet-router=envoy|agentgateway Select the ingress and egress dataplane (default: envoy)"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm dont we want separate flags for that..? atenet-egress|atenet-ingress?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to keep one flag initially. We do not currently have a use case for mixing Envoy ingress with agentgateway egress or vice versa, and separate flags add configuration combinations we would need to support and test. We can split it later if that need appears.

@LiorLieberman

Copy link
Copy Markdown
Collaborator

ok, lgtm. But lets wait until #715 is merged since it touches a few parts that your are touching here

@LiorLieberman

Copy link
Copy Markdown
Collaborator

(will get merged today, pending on a few last touchups from keith)

Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>

# Conflicts:
#	cmd/atenet/internal/router/egress/egress_test.go
#	cmd/atenet/internal/router/extproc/metadata.go
#	cmd/atenet/internal/router/ingress/ingress_test.go
#	manifests/ate-install/components/agentgateway/configmap.yaml
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>

# Conflicts:
#	hack/install-ate.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants