diff --git a/CHANGELOG.md b/CHANGELOG.md index 86c7e40..58d2282 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.8.2 (November 21, 2024). Tested on Artifactory 7.98.8 with Vault v1.18.1 and OpenBao v2.0.0 + +BUG FIXES: + +* Fix concurrency error when refreshing user token. Issue: [#225](https://github.com/jfrog/artifactory-secrets-plugin/issues/225) PR: [#226](https://github.com/jfrog/artifactory-secrets-plugin/pull/226) + ## 1.8.1 (November 8, 2024). Tested on Artifactory 7.98.8 with Vault v1.18.1 and OpenBao v2.0.0 BUG FIXES: diff --git a/artifactory.go b/artifactory.go index bc6599b..303c39e 100644 --- a/artifactory.go +++ b/artifactory.go @@ -216,7 +216,6 @@ func (b *backend) CreateToken(config baseConfiguration, role artifactoryRole) (* return nil, createErr } - //noinspection GoUnhandledErrorResult defer resp.Body.Close() if resp.StatusCode != http.StatusOK { diff --git a/path_config_user_token.go b/path_config_user_token.go index 5e66cc1..f6432b1 100644 --- a/path_config_user_token.go +++ b/path_config_user_token.go @@ -94,6 +94,9 @@ type userTokenConfiguration struct { } func (c *userTokenConfiguration) RefreshAccessToken(ctx context.Context, req *logical.Request, username string, b *backend, adminBaseConfig baseConfiguration) error { + b.configMutex.Lock() + defer b.configMutex.Unlock() + logger := b.Logger().With("func", "RefreshAccessToken") if c.RefreshToken == "" {