Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[FEATURE REQ] Provide native support for API key–based authentication, similar to other SDKs.

オープン
#48,868 コメント 1 件 リアクション 0 件 担当者 5 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@trrwilson がすでに取り組んでいます。

2026年8月8日 から。

評価

この issue はまだ評価されていません。

説明

AI Agents customer-reported feature-request needs-team-attention Service Attention

Currently, the com.azure:azure-ai-agents:2.0.1 SDK enforces a Bearer token–based authentication model via TokenCredential.
However, when using Azure API Management (APIM) in front of Azure OpenAI/Agents endpoints, authentication is commonly handled using API Key headers (e.g., x-api-key), not Bearer tokens.

At the moment, there is no first-class support to pass API key–based credentials. Even when attempting to override the pipeline manually (as shown below), the SDK still expects a credential and does not provide a clean or supported way to use API key authentication.

val builder = AgentsClientBuilder()
builder.endpoint(baseUrl)
builder.httpLogOptions(HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS))

val httpClient = HttpClient.createDefault()
val headers = HttpHeaders()
headers.set(credentials.keyName, credentials.keyValue)

val pipeline = HttpPipelineBuilder()
    .policies(AddHeadersPolicy(headers))
    .httpClient(httpClient)
    .build()

builder.pipeline(pipeline)

// Forced workaround
builder.credential(null)

val client = builder.buildAgentsClient()

This approach is fragile and not officially supported, making integration with APIM cumbersome.

Describe the solution

For example:
Add a method like:

builder.apiKeyCredential(ApiKeyCredential("key-name", "key-value"))

Alternatively, allow:

Custom headers to be injected without requiring TokenCredential
A dedicated AzureApiKeyCredential or similar abstraction
This would make it seamless to integrate with Azure APIM endpoints.

主要言語
Java
スター
2.6k
フォーク
2.2k
平均マージ
1日 22時間
マージ済み PR(30日)
213

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/azure-sdk-for-java のほかの issue

Azure/azure-sdk-for-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。