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

[BUG] Removing Backend credentials not working

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

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

評価

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

調査の方向性

まず、publisher.Program のバックエンド PUT リクエストと、Azure API Management の backends エンドポイントに送信される認証情報ペイロードを追跡します。証明書から空の認証情報への更新を再現し、古い証明書を保持せず、検証エラーも返さずに発行が成功することを確認します。

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

説明

Release version

APIOps latest

Describe the bug

We want to remove the credentials from a backend configuration while puclishing.
So when overwritting the configuration, we set the array to empty for both certificate and certificateIds.

The configuration is set as follows:

backends:
  - name: "my-backend"
    properties:
      url: "https://example.com"
      credentials:
        certificate: []
        certificateIds: []

However, we still get the error of missing certificate when we try to publish this without the certificate.

Expected behavior

Backend created without any credentials and errors

Actual behavior

We are getting validation error.

crit: Publisher[0]
      System.Net.Http.HttpRequestException: HTTP request to URI https://management.azure.com/subscriptions/***/resourceGroups/***/providers/Microsoft.ApiManagement/service/***/backends/my-backend?api-version=2022-04-01-preview failed with status code 400. Content is '{"error":{"code":"ValidationError","message":"One or more fields contain incorrect values:","details":[{"code":"ValidationError","target":"credentials","message":"Certificate with id 'my-cert' not found."}]}}'.
         at common.HttpPipelineExtensions.Validate(Response response, Uri requestUri)
         at common.HttpPipelineExtensions.PutResource(HttpPipeline pipeline, Uri uri, JsonObject resource, CancellationToken cancellationToken)
         at publisher.Program.<>c__DisplayClass12_0.<<GetPutRestResource>b__0>d.MoveNext()

Reproduction Steps

Create a backend with certificate credentials.

and try to publish a new one without certificate credentials.

主要言語
C#
スター
448
フォーク
247
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

Azure/apiops のほかの issue

Azure/apiops の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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