EgressPolicy: option to add a credential header when the request has none
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- go, kubernetes, yaml
- Área
- backend-api-design, security
Línea de trabajo
Start with substrate/cmd/atenet/internal/router/egress/credentials.go and docs/architecture/egress-policies.md, which the issue names. Trace how applyEffects handles a missing credential header and how destinations[].authentication is represented and validated; then check the egress policy tests. Done means an opt-in inject: Always adds the configured header when absent, replaces it when present, and leaves the default behavior unchanged.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What we're trying to do
We run Kagent agents that work on a git repository. An agent's EgressPolicy
opens https://github.com with authentication that injects a GitHub token as
Authorization: Basic …, so the agent can git clone and git push without
the token ever entering the sandbox.
The problem
The egress gateway only replaces a credential header the request already
carries. It never adds a missing one (applyEffects in
substrate/cmd/atenet/internal/router/egress/credentials.go, and
docs/architecture/egress-policies.md). Plain git, npm, pip or curl send no
Authorization header, so the credential is never used.
Every client then has to be configured to send a placeholder:
- A static placeholder (for example git's
http.<url>.extraHeader) is sent
on every request. Where the agent has no credential, the placeholder goes
out unchanged. GitHub answers a bad credential with 401 even on public
repositories, so anonymous clones break. - A placeholder that is sent only after a 401 (a git credential helper) works
for git, but it's a shell snippet per client, and other clients have no
equivalent. - Neither can be set per agent, because Kagent sets env per Harness, not per
Agent or AgentTemplate.
Proposal
An opt-in setting on destinations[].authentication that makes the gateway
add the header when the request doesn't carry one, and still replace it when
it does. For example:
spec:
destinations:
- origin: https://github.com
authentication:
header: Authorization
prefix: "Basic "
secretKeyRef: {name: repo-token, key: git}
inject: Always # default: IfPresent (today's behavior)
- The default stays as it is, so nothing changes for existing policies.
- The gateway already writes the header with
OVERWRITE_IF_EXISTS_OR_ADD, so
this changes only the check that skips requests without the header. authenticationalready requires an exact origin, soAlwaysonly covers
hosts an administrator named explicitly.
With this, any client in the sandbox authenticates to an allowed origin
without configuration or placeholders. The credential still never enters the
sandbox.
Alternatives considered
- Per-Agent
envon AgentTemplate, which would let each agent get its own
placeholder configuration. It's still per client, and it was deferred
before. - Harness per credential set: it multiplies Harnesses and sandboxes for what
is policy, not runtime.
Happy to contribute a PR if the direction is acceptable.
- Lenguaje dominante
- Go
- Estrellas
- 4.2k
- Forks
- 890
- Merge medio
- 1 d 10 h
- PR fusionados (30 d)
- 171
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de kagent-dev/kagent
-
skills-init: commit-SHA skill refs never start (git checkout -- <sha> reads the SHA as a pathspec)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
kagent-dev/kagent#3571 ·
Los mantenedores suelen responder en 1 día
-
Gemini catalogs omit gemini-4-argon and gemini-3.8-flashPosiblemente ocupada @jayunit100 la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
kagent-dev/kagent#3524 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Don't add the provider's public host to egress when a ModelConfig sets baseUrlPosiblemente ocupada @lakshyab20 la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 81/100
kagent-dev/kagent#3507 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[BUG] OpenAI and Ollama adapters send an empty tool message when a tool returns a dictPosiblemente ocupada @helloxjade la tomó hace 7 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
kagent-dev/kagent#3462 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
kagent-dev/kagent#3428 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de kagent-dev/kagent
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
prime-radiant-inc/evener#5901 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
-
kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
kyma-project/serverless#2769 ·
Los mantenedores suelen responder en 1 día
-
Update the mise toolsAbiertoready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
hexlet-basics/hexlet-basics#962 ·
Los mantenedores suelen responder en 1 día
-
imapproxy closeForMaintenance grace timer calls clientConn.Close() before closeMaintenanceTransportPosiblemente ocupada @dejanstrbac la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día