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

[RBAC KeyVault] Azure Arc enabled servers

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

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

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

2025年5月23日 から。

  • #245 @adrianms509 による — オープン

評価

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

説明

feature
Is there an existing issue for this?
  • I have searched the existing issues
Microhack

03-Azure/01-03-Infrastructure/02_Hybrid_Azure_Arc_Servers

Feature Description

The challenge on managed identity and key vault integration uses access policy which is a legacy setting for KeyVault RBAC is now recommended and can be used with Azure Arc.

I have created or changed the current script to call the corresponding API and get the token once RBAC is set up

CHALLENGE_TOKEN_PATH=$(curl -s -D - -H Metadata:true "http://127.0.0.1:40342/metadata/identity/oauth2/token?api-version=2021-02-01&resource=https://vault.azure.net" | grep -i "Www-Authenticate" | cut -d "=" -f 2 | tr -d "[:cntrl:]")

CHALLENGE_TOKEN=$(cat "$CHALLENGE_TOKEN_PATH")
if [ -z "$CHALLENGE_TOKEN" ]; then
echo "Could not retrieve challenge token. Are you running as root?"
exit 1
fi

ACCESS_TOKEN_RESPONSE=$(curl -s -H Metadata:true -H "Authorization: Basic $CHALLENGE_TOKEN" "http://127.0.0.1:40342/metadata/identity/oauth2/token?api-version=2021-02-01&resource=https://vault.azure.net")

ACCESS_TOKEN=$(echo "$ACCESS_TOKEN_RESPONSE" | jq -r '.access_token')

if [ -z "$ACCESS_TOKEN" ] || [ "$ACCESS_TOKEN" == "null" ]; then
echo "Failed to retrieve access token:"
echo "$ACCESS_TOKEN_RESPONSE"
exit 1
else
echo "Access token retrieved successfully."
echo "$ACCESS_TOKEN"
fi

VAULT_NAME="mh-arc-servers-kv11"
SECRET_NAME="asas"

curl -s -H "Authorization: Bearer $ACCESS_TOKEN"
https://${VAULT_NAME}.vault.azure.net/secrets/${SECRET_NAME}?api-version=7.3

Anything else?

https://learn.microsoft.com/en-us/azure/azure-arc/servers/managed-identity-authentication
https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-access-policy

主要言語
Jupyter Notebook
スター
198
フォーク
184
平均マージ
1日 25分
マージ済み PR(30日)
51

環境構築

はじめの一歩

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

microsoft/MicroHack のほかの issue

microsoft/MicroHack の issue をすべて見る

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

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