EgressPolicy: option to add a credential header when the request has none
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go, kubernetes, yaml
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Go
- スター
- 4.2k
- フォーク
- 890
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 171
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
kagent-dev/kagent のほかの issue
-
skills-init: commit-SHA skill refs never start (git checkout -- <sha> reads the SHA as a pathspec)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
kagent-dev/kagent#3571 ·
メンテナーはふだん 1 日以内に返信
-
Gemini catalogs omit gemini-4-argon and gemini-3.8-flash対応中かも @jayunit100 が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
kagent-dev/kagent#3524 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Don't add the provider's public host to egress when a ModelConfig sets baseUrl対応中かも @lakshyab20 が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 81/100
kagent-dev/kagent#3507 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] OpenAI and Ollama adapters send an empty tool message when a tool returns a dict対応中かも @helloxjade が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
kagent-dev/kagent#3462 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
kagent-dev/kagent#3428 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
kagent-dev/kagent の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
prime-radiant-inc/evener#5901 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
kyma-project/serverless#2769 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hexlet-basics/hexlet-basics#962 ·
メンテナーはふだん 1 日以内に返信
-
imapproxy closeForMaintenance grace timer calls clientConn.Close() before closeMaintenanceTransport対応中かも @dejanstrbac が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信