[BUG] Removing Backend credentials not working
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
调研方向
首先跟踪 publisher.Program 中的后端 PUT 请求,以及发送到 Azure API Management backends 终结点的凭据 payload。复现从证书更新为空凭据的操作,并验证发布成功,且不会保留旧证书或返回验证错误。
由索引模型根据 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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/apiops 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 3/5 1-2 天 新手友好度 70/100
-
难度 4/5 3-5 天 新手友好度 55/100
-
难度 3/5 1-2 天 新手友好度 45/100
-
难度 5/5 一周以上 新手友好度 35/100
相似的 Issue
-
bug frontend good first issue
难度 2/5 1-3 小时 新手友好度 75/100
-
NavigationViewItemAutomationPeer implements IInvokeProvider but never advertises the Invoke pattern 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
unoplatform/uno#24629 ·
-
agentic-workflows Needs: Triage :mag: State: In-PR
难度 2/5 1-3 小时 新手友好度 70/100
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
-
Type: enhancement
难度 2/5 1-3 小时 新手友好度 65/100
apache/arrow-adbc#4809 ·