LoginSignup
0
0

More than 1 year has passed since last update.

【Azure】Application Gateway と Key Vault を統合したら直接アップロードのSSL証明書の更新が失敗するようになった

Posted at

Application Gateway で TLS終端をする際、SSL証明書を Application Gateway にインポートする方法が2通りあります。

  • SSL証明書のファイルをローカル端末から直接アップロードする
  • 既存の Key Vault の証明書を参照するように指定する(本記事では「Key Vault 統合」と呼ぶことにします)

今回、Key Vault 統合を行ったあと、直接アップロードのSSL証明書を Azure Portal から更新しようとしたところ、「関連付けられた KeyVault シークレットのアクセスと検証中に問題が発生しました。」というエラーが出て失敗しました。
Key Vault とは関係ないSSL証明書の更新でしたが、なぜかうまくいかないようです。
おそらくバグだと思われます。
https://github.com/MicrosoftDocs/azure-docs/issues/33157

今回の対処法としては、登録しただけで使用していなかった Kwy Vault 統合の証明書を削除することで解決しました。
Azure Portal からでは Application Gateway 内の証明書を削除できないようですが、 Azure CLI 等を使うことで削除できます。

ApplicationGatewayの証明書を削除するコマンド例.sh
# Azure AD サインイン
az login

# 現在のサブスクリプション確認
az account show -o table

# 操作できるサブスクリプション一覧確認
az account list -o table

# サブスクリプションのセット
az account set -s {your-subscription}
az account show -o table

# アプリケーションゲートウェイに登録されている証明書一覧確認
appgwName="{your-ApplicationGateway}"
appgwResgp="{your-ResourceGroup}"
az network application-gateway ssl-cert list -g $appgwResgp --gateway-name $appgwName

# Key Vault 統合のSSL証明書削除
deleteCert="{削除するKeyVault統合の証明書名}"
az network application-gateway ssl-cert delete -g $appgwResgp --gateway-name $appgwName -n $deleteCert
az network application-gateway ssl-cert list -g $appgwResgp --gateway-name $appgwName

ちなみに、更新対象が Key Vault 統合の証明書であれば、 Azure Portal から問題なく更新できるようです。

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0