Failed Azure Credential errors not displayed to user without Debug Logging

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

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

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
azure, go

調査の方向性

まず、MAPT の Azure 認証情報の取得処理と、DefaultAzureCredential が失敗したときに使用されるロギング経路を追跡します。デバッグロギングを無効にした状態で、期限切れの認証情報による失敗を再現します。デバッグロギングを有効にせずに、関連する機密性のない認証エラーが標準出力または標準エラーに表示されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

MAPT currently fails to display critical Azure authentication errors to the user unless debug logging is explicitly enabled.

The output shows a generic success-like message (DEBU context initialized for mapt...) followed by a silent failure of DefaultAzureCredential due to an expired client secret (AADSTS7000222: The provided client secret keys for app '***' are expired.).

Impact: Users cannot diagnose the root cause of an apparent application failure without manually enabling verbose logging, leading to poor user experience and increased troubleshooting time.

Required Fix: MAPT should be updated to surface relevant, non-sensitive errors from the underlying Azure (like expired credentials or authorization failures) to the standard output or error stream, regardless of the debug log setting.

Example Log (Requires Debug Mode)
The following log snippet shows the critical error, which was only visible after enabling debug mode:

DEBU context initialized for mapt298473c3 DefaultAzureCredential: failed to acquire a token. Attempted credentials: ClientSecretCredential authentication failed. POST https://login.microsoftonline.com/***/oauth2/v2.0/token -------------------------------------------------------------------------------- RESPONSE 401: 401 Unauthorized -------------------------------------------------------------------------------- { "error": "invalid_client", "error_description": "AADSTS7000222: The provided client secret keys for app '***' are expired. Visit the Azure portal to create new keys for your app: https://aka.ms/NewClientSecret, or consider using certificate credentials for added security: https://aka.ms/certCreds. Trace ID: 20d540d3-389e-4e97-aa72-42c53ac10700 Correlation ID: c704f263-d933-4b48-b46c-04a036f9d060 Timestamp: 2025-12-04 08:33:07Z", "error_codes": [ 7000222 ], "timestamp": "2025-12-04 08:33:07Z", "trace_id": "20d540d3-389e-4e97-aa72-42c53ac10700", "correlation_id": "c704f263-d933-4b48-b46c-04a036f9d060", "error_uri": "https://login.microsoftonline.com/error?code=7000222" } -------------------------------------------------------------------------------- To troubleshoot, visit https://aka.ms/azsdk/go/identity/troubleshoot#client-secret

主要言語
Go
スター
25
フォーク
41
平均マージ
5日 3時間
マージ済み PR(30日)
16

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

redhat-developer/mapt のほかの issue

redhat-developer/mapt の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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