Skip to content

feat: add jwt auth for ateapi#248

Open
Eitan Yarmush (EItanya) wants to merge 1 commit into
agent-substrate:mainfrom
kagent-dev:feat/jwt-ateapi-auth
Open

feat: add jwt auth for ateapi#248
Eitan Yarmush (EItanya) wants to merge 1 commit into
agent-substrate:mainfrom
kagent-dev:feat/jwt-ateapi-auth

Conversation

@EItanya

@EItanya Eitan Yarmush (EItanya) commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Description

Closes #222.

Adds a portable JWT authentication path for ateapi clients while keeping the
existing mTLS mode as the default.

What changed

  • Added internal/ateapiauth with:
    • mtls and jwt auth modes
    • server-side JWT gRPC interceptors
    • client-side dial options for projected ServiceAccount tokens
  • Wired JWT auth into:
    • ate-api-server
    • ate-controller
    • atenet router
    • kubectl-ate port-forward client path
  • Updated Kubernetes JWT verification to support custom HTTP clients for
    OIDC/JWKS discovery.
  • Added JWT install overlays:
    • manifests/ate-install/jwt
    • manifests/ate-install/kind-jwt
  • Updated hack/install-ate.sh to opt into JWT mode with:
    • ATE_API_AUTH_MODE=jwt
    • --auth-mode=jwt

Notes

  • Default install behavior remains mtls. I think this deserves a second look as JWT will support more clusters.

  • The JWT overlay projects short-lived ServiceAccount tokens with audience
    api.ate-system.svc and mounts the service-DNS trust bundle for ateapi TLS
    verification.

  • The current discovery mechanism for JWT mode involves reading the deployment which I really don't like, but we don't have a "config file" concept so that bit is a massive TODO.

    Validation

KIND_CLUSTER_NAME=substrate-jwt ./hack/create-kind-cluster.sh

KO_DOCKER_REPO=localhost:5001 \
ATE_INSTALL_KIND=true \
./hack/install-ate.sh --auth-mode=jwt --deploy-ate-system

Validation results:

kubectl config current-context
# kind-substrate-jwt

kubectl get pods -n ate-system
# all runtime pods Running; init jobs Completed

go run ./cmd/kubectl-ate --context kind-substrate-jwt get actors
# succeeded, empty actor list

@EItanya Eitan Yarmush (EItanya) marked this pull request as ready for review June 16, 2026 13:17
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.

Support portable JWT auth for system components

1 participant