Fix panic when rotating transit managed keys produces an error (#30214)

* remove extra Unlock call

* add changelog
This commit is contained in:
Rachel Culpepper 2025-04-10 09:34:12 -05:00 committed by GitHub
parent 3f65999d2b
commit 6a3aef7bf5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -70,7 +70,6 @@ func (b *backend) pathRotateWrite(ctx context.Context, req *logical.Request, d *
var keyId string
keyId, err = GetManagedKeyUUID(ctx, b, managedKeyName, managedKeyId)
if err != nil {
p.Unlock()
return nil, err
}
err = p.RotateManagedKey(ctx, req.Storage, keyId)

3
changelog/30214.txt Normal file
View file

@ -0,0 +1,3 @@
```release-note:bug
secrets/transit: fix a panic when rotating on a managed key returns an error
```