From aff18aae2456f5d2aa4b3f0ceff369ccadee3921 Mon Sep 17 00:00:00 2001 From: John-Michael Faircloth Date: Tue, 15 Oct 2024 10:57:01 -0500 Subject: [PATCH] fix endless loop in logs on login error (#170) * fix endless loop in logs on login error * changelog * Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ path_login.go | 3 +++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e0a4ccb..5bb71d31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## Unreleased +## v0.19.1 + +BUGS: + +* fix an endless loop of warning spamming the logs on login error (https://github.com/hashicorp/vault-plugin-auth-azure/pull/170) + ## v0.19.0 IMPROVEMENTS: diff --git a/path_login.go b/path_login.go index 0fc0c55c..6a7c6984 100644 --- a/path_login.go +++ b/path_login.go @@ -450,6 +450,9 @@ func (b *azureAuthBackend) verifyResource(ctx context.Context, subscriptionID, r if err != nil { // don't fail the whole auth, but note that a page failed to load: b.Logger().Warn("couldn't load next page for", "resource_group", rg, "error", err.Error()) + + // ensure we don't loop forever + break } for _, id := range page.Value { if id.Properties != nil && id.Properties.ClientID != nil {