Add support for Azure US Government
还没有人认领这个 Issue。
评估
调研方向
Start by locating where azidentity.ClientSecretCredential and armresourcegraph.Client are initialized in the function. Review how credential fields such as activeDirectoryEndpointUrl and resourceManagerEndpointUrl could configure the Azure Government authority and resource-manager endpoint. Done means queries work with Azure US Government credentials as well as the public Azure environment.
由索引模型根据 Issue 内容生成。
描述
What problem are you facing?
When using function-azresourcegraph with credentials for Azure US Government, the function attempts to query the public Azure Resource Graph endpoint (management.azure.com). This results in an error because the Azure Government subscription ID is not recognized by the public Azure endpoint.
The error observed is:
{
"error": {
"code": "BadRequest",
"message": "Please provide below info when asking for support: timestamp = [...], correlationId = [...].",
"details": [
{
"code": "NoValidSubscriptionsInQueryRequest",
"message": "There must be at least one subscription that is eligible to contain resources. Given: '[AzureGovernmentSubscriptionID]'."
}
]
}
}
This happens because the Azure SDK clients (azidentity.ClientSecretCredential and armresourcegraph.Client) within the function are initialized without specific options to target the public Azure Public Cloud, even if the associated Crossplane ProviderConfig specifies a different environment (e.g., usgovernment).
How could this Function help solve your problem?
If function-azresourcegraph could correctly use the endpoints for different Azure environments like Azure US Government, it would work for us without needing custom changes.
A good way to achieve this would be for the function to use the specific endpoint URLs that are often included in the credential files for environments like Azure US Government. These credential files (e.g., from az ad sp create-for-rbac --sdk-auth) can contain:
activeDirectoryEndpointUrl(e.g.,https://login.microsoftonline.us)resourceManagerEndpointUrl(e.g.,https://management.usgovcloudapi.net/)
If the function read these URLs from the credentials it's given and used them to configure the AuthorityHost for azidentity.ClientSecretCredentialOptions and the cloud/service endpoint for arm.ClientOptions (used by armresourcegraph.Client), it should then connect to the correct Azure environment.
This would allow the function to be used in Azure US Government and similar Azure environments directly.
- 主要语言
- Go
- 星标
- 7
- 派生
- 3
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
upbound/function-azresourcegraph 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 15/100
查看 upbound/function-azresourcegraph 的全部 Issue
相似的 Issue
-
Chained slog With calls discard previously bound attributes可能已有人在做 @yuefdev 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
[scanner] TestAgentNowLineStates hard-fails instead of degrading when node is off PATH可能已有人在做 @arteeh 今天认领。 未关闭agent/scanner ci help wanted kind/test
难度 1/5 1 小时以内 新手友好度 90/100
hivecommons/hive#12924 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
Gentleman-Programming/engram#1940 ·
维护者通常 1 天内回复
-
area: go-workers help wanted tech debt
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
[exporter/splunkhec] Oversized metric event causes subsequent valid metrics to be dropped可能已有人在做 @harshkoli1255 今天认领。 未关闭bug exporter/splunkhec needs triage
难度 2/5 1-3 小时 新手友好度 82/100
open-telemetry/opentelemetry-collector-contrib#52142 · 1 条评论 ·
维护者通常 1 天内回复