Browse Source

Added initial e2e code for secretserver

Signed-off-by: Bill Hamilton <bill.hamilton@delinea.com>
Bill Hamilton 2 năm trước cách đây
mục cha
commit
44b3208ac0

+ 50 - 0
apis/externalsecrets/v1beta1/zz_generated.deepcopy.go

@@ -2042,6 +2042,51 @@ func (in *ScalewayProviderSecretRef) DeepCopy() *ScalewayProviderSecretRef {
 	return out
 }
 
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *SecretServerProvider) DeepCopyInto(out *SecretServerProvider) {
+	*out = *in
+	if in.Username != nil {
+		in, out := &in.Username, &out.Username
+		*out = new(SecretServerProviderRef)
+		(*in).DeepCopyInto(*out)
+	}
+	if in.Password != nil {
+		in, out := &in.Password, &out.Password
+		*out = new(SecretServerProviderRef)
+		(*in).DeepCopyInto(*out)
+	}
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretServerProvider.
+func (in *SecretServerProvider) DeepCopy() *SecretServerProvider {
+	if in == nil {
+		return nil
+	}
+	out := new(SecretServerProvider)
+	in.DeepCopyInto(out)
+	return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *SecretServerProviderRef) DeepCopyInto(out *SecretServerProviderRef) {
+	*out = *in
+	if in.SecretRef != nil {
+		in, out := &in.SecretRef, &out.SecretRef
+		*out = new(metav1.SecretKeySelector)
+		(*in).DeepCopyInto(*out)
+	}
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretServerProviderRef.
+func (in *SecretServerProviderRef) DeepCopy() *SecretServerProviderRef {
+	if in == nil {
+		return nil
+	}
+	out := new(SecretServerProviderRef)
+	in.DeepCopyInto(out)
+	return out
+}
+
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *SecretStore) DeepCopyInto(out *SecretStore) {
 	*out = *in
@@ -2214,6 +2259,11 @@ func (in *SecretStoreProvider) DeepCopyInto(out *SecretStoreProvider) {
 		*out = new(DelineaProvider)
 		(*in).DeepCopyInto(*out)
 	}
+	if in.SecretServer != nil {
+		in, out := &in.SecretServer, &out.SecretServer
+		*out = new(SecretServerProvider)
+		(*in).DeepCopyInto(*out)
+	}
 	if in.Chef != nil {
 		in, out := &in.Chef, &out.Chef
 		*out = new(ChefProvider)

+ 69 - 68
config/crds/bases/external-secrets.io_clustersecretstores.yaml

@@ -2527,74 +2527,6 @@ spec:
                     - clientSecret
                     - tenant
                     type: object
-                  secretserver:
-                    description: |-
-                      Secret Seerver configures this store to sync secrets using
-                      SecretServer provider
-                      https://docs.delinea.com/online-help/secret-server/start.htm
-                    properties:
-                      username:
-                        description: userName is the non-secret part of the credential.
-                        properties:
-                          secretRef:
-                            description: SecretRef references a key in a secret that
-                              will be used as value.
-                            properties:
-                              key:
-                                description: |-
-                                  The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
-                                  defaulted, in others it may be required.
-                                type: string
-                              name:
-                                description: The name of the Secret resource being
-                                  referred to.
-                                type: string
-                              namespace:
-                                description: |-
-                                  Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
-                                  to the namespace of the referent.
-                                type: string
-                            type: object
-                          value:
-                            description: Value can be specified directly to set a
-                              value without using a secret.
-                            type: string
-                        type: object
-                      password:
-                        description: PassWord is the password part of the credential.
-                        properties:
-                          secretRef:
-                            description: SecretRef references a key in a secret that
-                              will be used as value.
-                            properties:
-                              key:
-                                description: |-
-                                  The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
-                                  defaulted, in others it may be required.
-                                type: string
-                              name:
-                                description: The name of the Secret resource being
-                                  referred to.
-                                type: string
-                              namespace:
-                                description: |-
-                                  Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
-                                  to the namespace of the referent.
-                                type: string
-                            type: object
-                          value:
-                            description: Value can be specified directly to set a
-                              value without using a secret.
-                            type: string
-                        type: object
-                      serverURL:
-                        description: URL for your secret server installation.
-                        type: string
-                    required:
-                    - username
-                    - password
-                    - serverURL
-                    type: object
                   doppler:
                     description: Doppler configures this store to sync secrets using
                       the Doppler provider
@@ -3497,6 +3429,75 @@ spec:
                     - region
                     - secretKey
                     type: object
+                  secretserver:
+                    description: |-
+                      SecretServer configures this store to sync secrets using SecretServer provider
+                      https://docs.delinea.com/online-help/secret-server/start.htm
+                    properties:
+                      password:
+                        description: PassWord is the secret server account passWord.
+                        properties:
+                          secretRef:
+                            description: SecretRef references a key in a secret that
+                              will be used as value.
+                            properties:
+                              key:
+                                description: |-
+                                  The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
+                                  defaulted, in others it may be required.
+                                type: string
+                              name:
+                                description: The name of the Secret resource being
+                                  referred to.
+                                type: string
+                              namespace:
+                                description: |-
+                                  Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
+                                  to the namespace of the referent.
+                                type: string
+                            type: object
+                          value:
+                            description: Value can be specified directly to set a
+                              value without using a secret.
+                            type: string
+                        type: object
+                      serverURL:
+                        description: |-
+                          ServerURL
+                          URL to your secret server installation
+                        type: string
+                      username:
+                        description: UserName is the secret server account userName.
+                        properties:
+                          secretRef:
+                            description: SecretRef references a key in a secret that
+                              will be used as value.
+                            properties:
+                              key:
+                                description: |-
+                                  The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
+                                  defaulted, in others it may be required.
+                                type: string
+                              name:
+                                description: The name of the Secret resource being
+                                  referred to.
+                                type: string
+                              namespace:
+                                description: |-
+                                  Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
+                                  to the namespace of the referent.
+                                type: string
+                            type: object
+                          value:
+                            description: Value can be specified directly to set a
+                              value without using a secret.
+                            type: string
+                        type: object
+                    required:
+                    - password
+                    - serverURL
+                    - username
+                    type: object
                   senhasegura:
                     description: Senhasegura configures this store to sync secrets
                       using senhasegura provider

+ 69 - 68
config/crds/bases/external-secrets.io_secretstores.yaml

@@ -2527,74 +2527,6 @@ spec:
                     - clientSecret
                     - tenant
                     type: object
-                  secretserver:
-                    description: |-
-                      Secret Server configures this store to sync secrets using
-                      SecretServer provider
-                      https://docs.delinea.com/online-help/secret-server/start.htm
-                    properties:
-                      username:
-                        description: userName is the non-secret part of the credential.
-                        properties:
-                          secretRef:
-                            description: SecretRef references a key in a secret that
-                              will be used as value.
-                            properties:
-                              key:
-                                description: |-
-                                  The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
-                                  defaulted, in others it may be required.
-                                type: string
-                              name:
-                                description: The name of the Secret resource being
-                                  referred to.
-                                type: string
-                              namespace:
-                                description: |-
-                                  Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
-                                  to the namespace of the referent.
-                                type: string
-                            type: object
-                          value:
-                            description: Value can be specified directly to set a
-                              value without using a secret.
-                            type: string
-                        type: object
-                      password:
-                        description: PassWord is the password part of the credential.
-                        properties:
-                          secretRef:
-                            description: SecretRef references a key in a secret that
-                              will be used as value.
-                            properties:
-                              key:
-                                description: |-
-                                  The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
-                                  defaulted, in others it may be required.
-                                type: string
-                              name:
-                                description: The name of the Secret resource being
-                                  referred to.
-                                type: string
-                              namespace:
-                                description: |-
-                                  Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
-                                  to the namespace of the referent.
-                                type: string
-                            type: object
-                          value:
-                            description: Value can be specified directly to set a
-                              value without using a secret.
-                            type: string
-                        type: object
-                      serverURL:
-                        description: URL for your secret server installation.
-                        type: string
-                    required:
-                    - username
-                    - password
-                    - serverURL
-                    type: object
                   doppler:
                     description: Doppler configures this store to sync secrets using
                       the Doppler provider
@@ -3497,6 +3429,75 @@ spec:
                     - region
                     - secretKey
                     type: object
+                  secretserver:
+                    description: |-
+                      SecretServer configures this store to sync secrets using SecretServer provider
+                      https://docs.delinea.com/online-help/secret-server/start.htm
+                    properties:
+                      password:
+                        description: PassWord is the secret server account passWord.
+                        properties:
+                          secretRef:
+                            description: SecretRef references a key in a secret that
+                              will be used as value.
+                            properties:
+                              key:
+                                description: |-
+                                  The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
+                                  defaulted, in others it may be required.
+                                type: string
+                              name:
+                                description: The name of the Secret resource being
+                                  referred to.
+                                type: string
+                              namespace:
+                                description: |-
+                                  Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
+                                  to the namespace of the referent.
+                                type: string
+                            type: object
+                          value:
+                            description: Value can be specified directly to set a
+                              value without using a secret.
+                            type: string
+                        type: object
+                      serverURL:
+                        description: |-
+                          ServerURL
+                          URL to your secret server installation
+                        type: string
+                      username:
+                        description: UserName is the secret server account userName.
+                        properties:
+                          secretRef:
+                            description: SecretRef references a key in a secret that
+                              will be used as value.
+                            properties:
+                              key:
+                                description: |-
+                                  The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
+                                  defaulted, in others it may be required.
+                                type: string
+                              name:
+                                description: The name of the Secret resource being
+                                  referred to.
+                                type: string
+                              namespace:
+                                description: |-
+                                  Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
+                                  to the namespace of the referent.
+                                type: string
+                            type: object
+                          value:
+                            description: Value can be specified directly to set a
+                              value without using a secret.
+                            type: string
+                        type: object
+                    required:
+                    - password
+                    - serverURL
+                    - username
+                    type: object
                   senhasegura:
                     description: Senhasegura configures this store to sync secrets
                       using senhasegura provider

+ 126 - 136
deploy/crds/bundle.yaml

@@ -2966,70 +2966,6 @@ spec:
                         - clientSecret
                         - tenant
                       type: object
-                    secretserver:
-                      description: |-
-                        Secret Server
-                        https://docs.delinea.com/online-help/secret-server/start.htm
-                      properties:
-                        username:
-                          description: UserName is the non-secret part of the credential.
-                          properties:
-                            secretRef:
-                              description: SecretRef references a key in a secret that will be used as value.
-                              properties:
-                                key:
-                                  description: |-
-                                    The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
-                                    defaulted, in others it may be required.
-                                  type: string
-                                name:
-                                  description: The name of the Secret resource being referred to.
-                                  type: string
-                                namespace:
-                                  description: |-
-                                    Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
-                                    to the namespace of the referent.
-                                  type: string
-                              type: object
-                            value:
-                              description: Value can be specified directly to set a value without using a secret.
-                              type: string
-                          type: object
-                        password:
-                          description: PassWord is the secret part of the credential.
-                          properties:
-                            secretRef:
-                              description: SecretRef references a key in a secret that will be used as value.
-                              properties:
-                                key:
-                                  description: |-
-                                    The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
-                                    defaulted, in others it may be required.
-                                  type: string
-                                name:
-                                  description: The name of the Secret resource being referred to.
-                                  type: string
-                                namespace:
-                                  description: |-
-                                    Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
-                                    to the namespace of the referent.
-                                  type: string
-                              type: object
-                            value:
-                              description: Value can be specified directly to set a value without using a secret.
-                              type: string
-                          type: object
-#                         userName:
-#                           description: Username for secret server.
-#                           type: string
-                        serverURL:
-                          description: URL for your secret server installation.
-                          type: string
-                      required:
-                        - username
-                        - password
-                        - serverURL
-                      type: object
                     doppler:
                       description: Doppler configures this store to sync secrets using the Doppler provider
                       properties:
@@ -3850,6 +3786,69 @@ spec:
                         - region
                         - secretKey
                       type: object
+                    secretserver:
+                      description: |-
+                        SecretServer configures this store to sync secrets using SecretServer provider
+                        https://docs.delinea.com/online-help/secret-server/start.htm
+                      properties:
+                        password:
+                          description: PassWord is the secret server account passWord.
+                          properties:
+                            secretRef:
+                              description: SecretRef references a key in a secret that will be used as value.
+                              properties:
+                                key:
+                                  description: |-
+                                    The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
+                                    defaulted, in others it may be required.
+                                  type: string
+                                name:
+                                  description: The name of the Secret resource being referred to.
+                                  type: string
+                                namespace:
+                                  description: |-
+                                    Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
+                                    to the namespace of the referent.
+                                  type: string
+                              type: object
+                            value:
+                              description: Value can be specified directly to set a value without using a secret.
+                              type: string
+                          type: object
+                        serverURL:
+                          description: |-
+                            ServerURL
+                            URL to your secret server installation
+                          type: string
+                        username:
+                          description: UserName is the secret server account userName.
+                          properties:
+                            secretRef:
+                              description: SecretRef references a key in a secret that will be used as value.
+                              properties:
+                                key:
+                                  description: |-
+                                    The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
+                                    defaulted, in others it may be required.
+                                  type: string
+                                name:
+                                  description: The name of the Secret resource being referred to.
+                                  type: string
+                                namespace:
+                                  description: |-
+                                    Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
+                                    to the namespace of the referent.
+                                  type: string
+                              type: object
+                            value:
+                              description: Value can be specified directly to set a value without using a secret.
+                              type: string
+                          type: object
+                      required:
+                        - password
+                        - serverURL
+                        - username
+                      type: object
                     senhasegura:
                       description: Senhasegura configures this store to sync secrets using senhasegura provider
                       properties:
@@ -8286,78 +8285,6 @@ spec:
                         - clientSecret
                         - tenant
                       type: object
-                    secretserver:
-                      description: |-
-                        Secret Server
-                        https://docs.delinea.com/online-help/secret-server/start.htm
-                      properties:
-                        username:
-                          description: UserName is the non-secret part of the credential.
-                          properties:
-                            secretRef:
-                              description: SecretRef references a key in a secret that will be used as value.
-                              properties:
-                                key:
-                                  description: |-
-                                    The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
-                                    defaulted, in others it may be required.
-                                  type: string
-                                name:
-                                  description: The name of the Secret resource being referred to.
-                                  type: string
-                                namespace:
-                                  description: |-
-                                    Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
-                                    to the namespace of the referent.
-                                  type: string
-                              type: object
-                            value:
-                              description: Value can be specified directly to set a value without using a secret.
-                              type: string
-                          type: object
-                        password:
-                          description: PassWord is the secret part of the credential.
-                          properties:
-                            secretRef:
-                              description: SecretRef references a key in a secret that will be used as value.
-                              properties:
-                                key:
-                                  description: |-
-                                    The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
-                                    defaulted, in others it may be required.
-                                  type: string
-                                name:
-                                  description: The name of the Secret resource being referred to.
-                                  type: string
-                                namespace:
-                                  description: |-
-                                    Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
-                                    to the namespace of the referent.
-                                  type: string
-                              type: object
-                            value:
-                              description: Value can be specified directly to set a value without using a secret.
-                              type: string
-                          type: object
-#                         userName:
-#                           description: URL for your secret server installation.
-#                           type: string
-#                         passWord:
-#                           description: URL for your secret server installation.
-#                           type: string
-                        serverURL:
-                          description: URL for your secret server installation.
-                          type: string
-#                         secretID:
-#                           description: |-
-#                             ID of the secret you wish to access.
-#                           type: integer
-                      required:
-                        - username
-                        - password
-                        - serverURL
-#                         - secretID
-                      type: object
                     doppler:
                       description: Doppler configures this store to sync secrets using the Doppler provider
                       properties:
@@ -9178,6 +9105,69 @@ spec:
                         - region
                         - secretKey
                       type: object
+                    secretserver:
+                      description: |-
+                        SecretServer configures this store to sync secrets using SecretServer provider
+                        https://docs.delinea.com/online-help/secret-server/start.htm
+                      properties:
+                        password:
+                          description: PassWord is the secret server account passWord.
+                          properties:
+                            secretRef:
+                              description: SecretRef references a key in a secret that will be used as value.
+                              properties:
+                                key:
+                                  description: |-
+                                    The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
+                                    defaulted, in others it may be required.
+                                  type: string
+                                name:
+                                  description: The name of the Secret resource being referred to.
+                                  type: string
+                                namespace:
+                                  description: |-
+                                    Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
+                                    to the namespace of the referent.
+                                  type: string
+                              type: object
+                            value:
+                              description: Value can be specified directly to set a value without using a secret.
+                              type: string
+                          type: object
+                        serverURL:
+                          description: |-
+                            ServerURL
+                            URL to your secret server installation
+                          type: string
+                        username:
+                          description: UserName is the secret server account userName.
+                          properties:
+                            secretRef:
+                              description: SecretRef references a key in a secret that will be used as value.
+                              properties:
+                                key:
+                                  description: |-
+                                    The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be
+                                    defaulted, in others it may be required.
+                                  type: string
+                                name:
+                                  description: The name of the Secret resource being referred to.
+                                  type: string
+                                namespace:
+                                  description: |-
+                                    Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults
+                                    to the namespace of the referent.
+                                  type: string
+                              type: object
+                            value:
+                              description: Value can be specified directly to set a value without using a secret.
+                              type: string
+                          type: object
+                      required:
+                        - password
+                        - serverURL
+                        - username
+                      type: object
                     senhasegura:
                       description: Senhasegura configures this store to sync secrets using senhasegura provider
                       properties:

+ 3 - 0
e2e/run.sh

@@ -84,6 +84,9 @@ kubectl run --rm \
   --env="DELINEA_TENANT=${DELINEA_TENANT:-}" \
   --env="DELINEA_CLIENT_ID=${DELINEA_CLIENT_ID:-}" \
   --env="DELINEA_CLIENT_SECRET=${DELINEA_CLIENT_SECRET:-}" \
+  --env="SECRETSERVER_USERNAME=${SECRETSERVER_USERNAME:-}" \
+  --env="SECRETSERVER_PASSWD=${SECRETSERVER_PASSWD:-}" \
+  --env="SECRETSERVER_URL=${SECRETSERVER_URL:-}" \
   --env="VERSION=${VERSION}" \
   --env="TEST_SUITES=${TEST_SUITES}" \
   --overrides='{ "apiVersion": "v1", "spec":{"serviceAccountName": "external-secrets-e2e"}}' \

+ 41 - 0
e2e/suites/provider/cases/secretserver/config.go

@@ -0,0 +1,41 @@
+package secretserver
+
+import (
+	"fmt"
+	"os"
+)
+
+type config struct {
+	username  string
+	password  string
+	serverURL string
+}
+
+func loadConfigFromEnv() (*config, error) {
+	var cfg config
+	var err error
+
+	// Required settings
+	cfg.username, err = getEnv("SECRETSERVER_USERNAME")
+	if err != nil {
+		return nil, err
+	}
+	cfg.password, err = getEnv("SECRETSERVER_PASSWD")
+	if err != nil {
+		return nil, err
+	}
+	cfg.serverURL, err = getEnv("SECRETSERVER_URL")
+	if err != nil {
+		return nil, err
+	}
+
+	return &cfg, nil
+}
+
+func getEnv(name string) (string, error) {
+	value, ok := os.LookupEnv(name)
+	if !ok {
+		return "", fmt.Errorf("environment variable %q is not set", name)
+	}
+	return value, nil
+}

+ 112 - 0
e2e/suites/provider/cases/secretserver/delinea.go

@@ -0,0 +1,112 @@
+package secretserver
+
+import (
+	"context"
+
+	"github.com/external-secrets/external-secrets-e2e/framework"
+	"github.com/external-secrets/external-secrets-e2e/suites/provider/cases/common"
+	esv1beta1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1"
+	esmeta "github.com/external-secrets/external-secrets/apis/meta/v1"
+	"github.com/onsi/ginkgo/v2"
+	"github.com/onsi/gomega"
+	v1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+var _ = ginkgo.Describe("[secretserver]", ginkgo.Label("secretserver"), func() {
+
+	f := framework.New("eso-secretserver")
+
+	// Initialization is deferred so that assertions work.
+	provider := &secretStoreProvider{}
+
+	ginkgo.BeforeEach(func() {
+
+		cfg, err := loadConfigFromEnv()
+		gomega.Expect(err).ToNot(gomega.HaveOccurred())
+
+		provider.init(cfg)
+
+		createResources(context.Background(), f, cfg)
+	})
+
+	ginkgo.DescribeTable("sync secrets", framework.TableFuncWithExternalSecret(f, provider),
+
+		ginkgo.Entry(common.JSONDataWithProperty(f)),
+		ginkgo.Entry(common.JSONDataWithoutTargetName(f)),
+		ginkgo.Entry(common.JSONDataWithTemplate(f)),
+		ginkgo.Entry(common.JSONDataWithTemplateFromLiteral(f)),
+		ginkgo.Entry(common.TemplateFromConfigmaps(f)),
+		ginkgo.Entry(common.JSONDataFromSync(f)),
+		ginkgo.Entry(common.JSONDataFromRewrite(f)),
+		ginkgo.Entry(common.NestedJSONWithGJSON(f)),
+		ginkgo.Entry(common.DockerJSONConfig(f)),
+		ginkgo.Entry(common.DataPropertyDockerconfigJSON(f)),
+		ginkgo.Entry(common.SSHKeySyncDataProperty(f)),
+		ginkgo.Entry(common.DecodingPolicySync(f)),
+
+		// V1Alpha1 is not supported.
+		// ginkgo.Entry(common.SyncV1Alpha1(f)),
+
+		// Non-JSON values are not supported by DSV.
+		// ginkgo.Entry(common.SimpleDataSync(f)),
+		// ginkgo.Entry(common.SyncWithoutTargetName(f)),
+		// ginkgo.Entry(common.SSHKeySync(f)),
+		// ginkgo.Entry(common.DeletionPolicyDelete(f)),
+
+		// FindByName is not supported.
+		// ginkgo.Entry(common.FindByName(f)),
+		// ginkgo.Entry(common.FindByNameAndRewrite(f)),
+		// ginkgo.Entry(common.FindByNameWithPath(f)),
+
+		// FindByTag is not supported.
+		// ginkgo.Entry(common.FindByTag(f)),
+		// ginkgo.Entry(common.FindByTagWithPath(f)),
+	)
+})
+
+func createResources(ctx context.Context, f *framework.Framework, cfg *config) {
+
+	secretName := "secretserver-credential"
+	secretKey := "password
+	// Creating a secret to hold the Delinea client secret.
+	secretSpec := v1.Secret{
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      secretName,
+			Namespace: f.Namespace.Name,
+		},
+		StringData: map[string]string{
+			key: cfg.password,
+		},
+	}
+
+	err := f.CRClient.Create(ctx, &secretSpec)
+	gomega.Expect(err).ToNot(gomega.HaveOccurred())
+
+	// Creating SecretStore.
+	secretStoreSpec := esv1beta1.SecretStore{
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      f.Namespace.Name,
+			Namespace: f.Namespace.Name,
+		},
+		Spec: esv1beta1.SecretStoreSpec{
+			Provider: &esv1beta1.SecretStoreProvider{
+				Delinea: &esv1beta1.SecretServerProvider{
+					ServerURL:      cfg.serverURL,
+					Username: &esv1beta1.SecretServerProviderRef{
+						Value: cfg.username,
+					},
+					Password: &esv1beta1.SecretServerProviderRef{
+						SecretRef: &esmeta.SecretKeySelector{
+							Name: secretName,
+							Key:  secretKey,
+						},
+					},
+				},
+			},
+		},
+	}
+
+	err = f.CRClient.Create(ctx, &secretStoreSpec)
+	gomega.Expect(err).ToNot(gomega.HaveOccurred())
+}

+ 46 - 0
e2e/suites/provider/cases/secretserver/provider.go

@@ -0,0 +1,46 @@
+package delinea
+
+import (
+	"encoding/json"
+
+	"github.com/DelineaXPM/tss-sdk-go/v2/server"
+/*	"github.com/DelineaXPM/dsv-sdk-go/v2/vault"*/
+	"github.com/external-secrets/external-secrets-e2e/framework"
+	"github.com/onsi/gomega"
+)
+
+type secretStoreProvider struct {
+	api *server.Server
+	cfg *config
+}
+
+func (p *secretStoreProvider) init(cfg *config) {
+
+	p.cfg = cfg
+
+	secretserverClient, err := server.New(server.Configuration{
+		Credentials: vault.ClientCredential{
+			Username:     cfg.username,
+			Password: cfg.password,
+		},
+		ServerURL:      cfg.serverURL,
+	})
+	gomega.Expect(err).ToNot(gomega.HaveOccurred())
+
+	p.api = secretserverClient
+}
+
+func (p *secretStoreProvider) CreateSecret(key string, val framework.SecretEntry) {
+	var data map[string]interface{}
+	err := json.Unmarshal([]byte(val.Value), &data)
+	gomega.Expect(err).ToNot(gomega.HaveOccurred())
+	_, err = p.api.CreateSecret(key, &vault.SecretCreateRequest{
+		Data: data,
+	})
+	gomega.Expect(err).ToNot(gomega.HaveOccurred())
+}
+
+func (p *secretStoreProvider) DeleteSecret(key string) {
+	err := p.api.DeleteSecret(key)
+	gomega.Expect(err).ToNot(gomega.HaveOccurred())
+}