Эх сурвалжийг харах

fix(akeyless): return ReadWrite so PushSecret is routed (#6515)

Co-authored-by: Gergely Bräutigam <gergely.brautigam@sap.com>
Signed-off-by: Alexander Chernov <alexander@chernov.it>
Alexander Chernov 13 цаг өмнө
parent
commit
534a97c887

+ 1 - 1
providers/v1/akeyless/akeyless.go

@@ -99,7 +99,7 @@ type akeylessVaultInterface interface {
 
 
 // Capabilities return the provider supported capabilities (ReadOnly, WriteOnly, ReadWrite).
 // Capabilities return the provider supported capabilities (ReadOnly, WriteOnly, ReadWrite).
 func (p *Provider) Capabilities() esv1.SecretStoreCapabilities {
 func (p *Provider) Capabilities() esv1.SecretStoreCapabilities {
-	return esv1.SecretStoreReadOnly
+	return esv1.SecretStoreReadWrite
 }
 }
 
 
 // NewClient constructs a new secrets client based on the provided store.
 // NewClient constructs a new secrets client based on the provided store.

+ 7 - 0
providers/v1/akeyless/akeyless_test.go

@@ -454,3 +454,10 @@ func TestDeleteSecret(t *testing.T) {
 		})
 		})
 	}
 	}
 }
 }
+
+func TestCapabilities(t *testing.T) {
+	// The provider implements PushSecret, DeleteSecret, and SecretExists, so it
+	// must advertise ReadWrite; otherwise ESO skips push operations entirely.
+	p := &Provider{}
+	require.Equal(t, esv1.SecretStoreReadWrite, p.Capabilities())
+}