Browse Source

wip: secret aggregation

Signed-off-by: Moritz Johner <beller.moritz@googlemail.com>
Moritz Johner 3 years ago
parent
commit
d695383543

+ 2 - 1
Dockerfile

@@ -2,7 +2,8 @@ FROM gcr.io/distroless/static
 ARG TARGETOS
 ARG TARGETARCH
 COPY bin/external-secrets-${TARGETOS}-${TARGETARCH} /bin/external-secrets
-COPY bin/providers /bin
+COPY bin/external-secrets-${TARGETOS}-${TARGETARCH}-providerless /bin/external-secrets-providerless
+COPY bin/providers/${TARGETARCH} /bin
 
 # Run as UID for nobody
 USER 65534

+ 9 - 2
Makefile

@@ -109,7 +109,7 @@ test.e2e.managed: generate ## Run e2e tests managed
 	@$(OK) go test e2e-tests-managed
 
 .PHONY: build
-build: $(addprefix build-,$(ARCH)) ## Build binary
+build: $(addprefix build-,$(ARCH)) $(addprefix build-providerless-,$(ARCH)) build-provider ## Build binary
 
 .PHONY: build-provider
 build-provider: $(addprefix build-provider-,$(ARCH)) ## Build binary
@@ -121,6 +121,13 @@ build-%: generate ## Build binary for the specified arch
 		go build -o '$(OUTPUT_DIR)/external-secrets-linux-$*' main.go
 	@$(OK) go build $*
 
+.PHONY: build-providerless-%
+build-providerless-%: generate ## Build binary for the specified arch
+	@$(INFO) go build $*
+	$(BUILD_ARGS) GOOS=linux GOARCH=$* \
+		go build -tags providerless -o '$(OUTPUT_DIR)/external-secrets-linux-$*-providerless' main.go
+	@$(OK) go build $*
+
 .PHONY: build-provider-%
 build-provider-%: generate ## Build binary for the specified arch
 	@$(INFO) go build $*
@@ -241,7 +248,7 @@ docker.image:
 docker.tag:
 	@echo $(IMAGE_TAG)
 
-docker.build: $(addprefix build-,$(ARCH)) $(addprefix build-provider-,$(ARCH)) ## Build the docker image
+docker.build: build ## Build the docker image
 	@$(INFO) docker build
 	@docker build -f $(DOCKERFILE) . $(DOCKER_BUILD_ARGS) -t $(IMAGE_NAME):$(IMAGE_TAG)
 	@$(OK) docker build

+ 0 - 1
cmd/provider/client.go

@@ -43,7 +43,6 @@ func main() {
 }
 
 func reflector() {
-
 	ns := "bar"
 	prov := &v1beta1.SecretStoreProvider{
 		Kubernetes: &v1beta1.KubernetesProvider{

+ 16 - 0
deploy/charts/external-secrets/templates/_helpers.tpl

@@ -118,3 +118,19 @@ Create the name of the service account to use
 {{- end }}
 {{- end }}
 
+{{/*
+template for provider sidecar
+*/}}
+{{- define "external-secrets.provider-sidecar" -}}
+- name: "provider-{{ .Name }}"
+  image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+  command: ["/bin/provider-{{ .Name }}"]
+  args: []
+  {{- with .Values.providers.sidecar.securityContext }}
+  securityContext:
+  {{- toYaml . | nindent 4 }}
+  {{- end }}
+  volumeMounts:
+    - name: provider-uds
+      mountPath: /var/run/eso/provider/sockets
+{{- end }}

+ 25 - 2
deploy/charts/external-secrets/templates/deployment.yaml

@@ -48,6 +48,9 @@ spec:
           image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
           imagePullPolicy: {{ .Values.image.pullPolicy }}
           {{- if or (.Values.leaderElect) (.Values.scopedNamespace) (.Values.processClusterStore) (.Values.processClusterExternalSecret) (.Values.concurrent) (.Values.extraArgs) }}
+          {{- if .Values.providers.sidecar.enabled }}
+          command: ["/bin/external-secrets-providerless"]
+          {{- end }}
           args:
           {{- if .Values.leaderElect }}
           - --enable-leader-election=true
@@ -95,21 +98,41 @@ spec:
           resources:
             {{- toYaml . | nindent 12 }}
           {{- end }}
-          {{- if .Values.extraVolumeMounts }}
+          {{- if or .Values.providers.sidecar.enabled .Values.extraVolumeMounts  }}
           volumeMounts:
+          {{- if .Values.providers.sidecar.enabled }}
+          - name: provider-uds
+            mountPath: /var/run/eso/provider/sockets
+          {{- end }}
+          {{- if .Values.extraVolumeMounts }}
           {{- toYaml .Values.extraVolumeMounts | nindent 12 }}
           {{- end }}
+          {{- end }}
         {{- if .Values.extraContainers }}
           {{ toYaml .Values.extraContainers | nindent 8}}
         {{- end }}
+        {{- if .Values.providers.sidecar.enabled }}
+        {{ $valuesCtx := .Values }}
+        {{ $chartCtx := .Chart }}
+        {{- range $key, $value := .Values.providers.sidecar.providers }}
+        {{- $data := dict "Values" $valuesCtx "Chart" $chartCtx "Name" $value "Index" $key }}
+        {{- include "external-secrets.provider-sidecar" $data | nindent 8 }}
+        {{- end -}}
+        {{- end }}
       {{- if .Values.dnsConfig }}
       dnsConfig:
           {{- toYaml .Values.dnsConfig | nindent 8 }}
       {{- end }}
-      {{- if .Values.extraVolumes }}
+      {{- if or .Values.extraVolumes .Values.providers.sidecar.enabled }}
       volumes:
+      {{- if .Values.providers.sidecar.enabled }}
+      - name: provider-uds
+        emptyDir: {}
+      {{- end }}
+      {{- if .Values.extraVolumes }}
       {{- toYaml .Values.extraVolumes | nindent 8 }}
       {{- end }}
+      {{- end }}
       {{- with .Values.nodeSelector }}
       nodeSelector:
         {{- toYaml . | nindent 8 }}

+ 20 - 1
deploy/charts/external-secrets/values.yaml

@@ -10,7 +10,7 @@ image:
   # There are different image flavours available, like distroless and ubi.
   # Please see GitHub release notes for image tags for these flavors.
   # By default the distroless image is used.
-  tag: ""
+  tag: "prov"
 
 # -- If set, install and upgrade CRDs through helm chart.
 installCRDs: true
@@ -26,6 +26,25 @@ crds:
   conversion:
     enabled: true
 
+providers:
+  sidecar:
+    enabled: true
+    providers:
+    - aws
+    - gcp
+    - vault
+    - webhook
+    securityContext:
+      allowPrivilegeEscalation: false
+      capabilities:
+        drop:
+          - ALL
+      readOnlyRootFilesystem: true
+      runAsNonRoot: true
+      runAsUser: 1000
+      seccompProfile:
+        type: RuntimeDefault
+
 imagePullSecrets: []
 nameOverride: ""
 fullnameOverride: ""

+ 26 - 3
e2e/go.mod

@@ -4,6 +4,28 @@ go 1.18
 
 replace github.com/external-secrets/external-secrets => ../
 
+replace (
+	github.com/external-secrets/external-secrets-provider-akeyless => ../pkg/provider/akeyless
+	github.com/external-secrets/external-secrets-provider-alibaba => ../pkg/provider/alibaba
+	github.com/external-secrets/external-secrets-provider-aws => ../pkg/provider/aws
+	github.com/external-secrets/external-secrets-provider-azure => ../pkg/provider/azure
+	github.com/external-secrets/external-secrets-provider-doppler => ../pkg/provider/doppler
+	github.com/external-secrets/external-secrets-provider-fake => ../pkg/provider/fake
+	github.com/external-secrets/external-secrets-provider-gcp => ../pkg/provider/gcp
+	github.com/external-secrets/external-secrets-provider-gitlab => ../pkg/provider/gitlab
+	github.com/external-secrets/external-secrets-provider-grpc => ../pkg/provider/grpc
+	github.com/external-secrets/external-secrets-provider-ibm => ../pkg/provider/ibm
+	github.com/external-secrets/external-secrets-provider-keepersecurity => ../pkg/provider/keepersecurity
+	github.com/external-secrets/external-secrets-provider-kubernetes => ../pkg/provider/kubernetes
+	github.com/external-secrets/external-secrets-provider-onepassword => ../pkg/provider/onepassword
+	github.com/external-secrets/external-secrets-provider-oracle => ../pkg/provider/oracle
+	github.com/external-secrets/external-secrets-provider-scaleway => ../pkg/provider/scaleway
+	github.com/external-secrets/external-secrets-provider-senhasegura => ../pkg/provider/senhasegura
+	github.com/external-secrets/external-secrets-provider-vault => ../pkg/provider/vault
+	github.com/external-secrets/external-secrets-provider-webhook => ../pkg/provider/webhook
+	github.com/external-secrets/external-secrets-provider-yandex => ../pkg/provider/yandex
+)
+
 replace (
 	github.com/external-secrets/external-secrets v0.0.0 => ../
 	github.com/go-check/check => github.com/go-check/check v0.0.0-20180628173108-788fd7840127
@@ -42,8 +64,9 @@ require (
 	github.com/akeylesslabs/akeyless-go-cloud-id v0.3.4
 	github.com/akeylesslabs/akeyless-go/v3 v3.3.5
 	github.com/aliyun/alibaba-cloud-sdk-go v1.62.271
-	github.com/aws/aws-sdk-go v1.44.268
-	github.com/external-secrets/external-secrets v0.0.0
+	github.com/aws/aws-sdk-go v1.44.270
+	github.com/external-secrets/external-secrets v0.8.3
+	github.com/external-secrets/external-secrets-provider-gcp v0.8.3
 	github.com/fluxcd/helm-controller/api v0.22.2
 	github.com/fluxcd/pkg/apis/meta v0.14.2
 	github.com/fluxcd/source-controller/api v0.25.11
@@ -52,7 +75,7 @@ require (
 	github.com/onsi/ginkgo/v2 v2.9.5
 	github.com/onsi/gomega v1.27.7
 	github.com/oracle/oci-go-sdk/v56 v56.1.0
-	github.com/scaleway/scaleway-sdk-go v1.0.0-beta.16
+	github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17
 	github.com/xanzy/go-gitlab v0.83.0
 	golang.org/x/oauth2 v0.8.0
 	google.golang.org/api v0.124.0

+ 5 - 5
e2e/go.sum

@@ -87,8 +87,8 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd
 github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
 github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
 github.com/aws/aws-sdk-go v1.41.13/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
-github.com/aws/aws-sdk-go v1.44.268 h1:WoK20tlAvsvQzTcE6TajoprbXmTbcud6MjhErL4P/38=
-github.com/aws/aws-sdk-go v1.44.268/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
+github.com/aws/aws-sdk-go v1.44.270 h1:fRdrwRVO0PpRSks/bNFXSRexA7Zm+k6pvKRpnrpAmeg=
+github.com/aws/aws-sdk-go v1.44.270/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
 github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
 github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
 github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
@@ -365,8 +365,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR
 github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
 github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk=
 github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
-github.com/scaleway/scaleway-sdk-go v1.0.0-beta.16 h1:Ted1/3BGV1d0c7J+69N+brveAgJNWZlWnI8iYP3dZMs=
-github.com/scaleway/scaleway-sdk-go v1.0.0-beta.16/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
+github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17 h1:1WuWJu7/e8SqK+uQl7lfk/N/oMZTL2NE/TJsNKRNMc4=
+github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
 github.com/sony/gobreaker v0.4.2-0.20210216022020-dd874f9dd33b/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
 github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg=
 github.com/sony/gobreaker v0.5.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
@@ -387,8 +387,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
 github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
 github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
-github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
 github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY=
 github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM=
 github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
 github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=

+ 1 - 1
e2e/suites/provider/cases/gcp/provider.go

@@ -34,9 +34,9 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
 
 	"github.com/external-secrets/external-secrets-e2e/framework"
+	gcpsm "github.com/external-secrets/external-secrets-provider-gcp/secretmanager"
 	esv1beta1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1"
 	esmeta "github.com/external-secrets/external-secrets/apis/meta/v1"
-	gcpsm "github.com/external-secrets/external-secrets/pkg/provider/gcp/secretmanager"
 )
 
 // nolint // Better to keep names consistent even if it stutters;

+ 1 - 1
pkg/generator/vault/vault.go

@@ -41,7 +41,7 @@ const (
 )
 
 func (g *Generator) Generate(ctx context.Context, jsonSpec *apiextensions.JSON, kube client.Client, namespace string) (map[string][]byte, error) {
-	c := &provider.Provider{NewVaultClient: provider.NewVaultClient}
+	c := &provider.Provider{}
 
 	// controller-runtime/client does not support TokenRequest or other subresource APIs
 	// so we need to construct our own client and use it to fetch tokens

+ 191 - 142
pkg/plugin/grpc/provider.pb.go

@@ -42,7 +42,8 @@ type GetSecretRequest struct {
 
 	Store     []byte     `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"`
 	Namespace string     `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
-	RemoteRef *RemoteRef `protobuf:"bytes,3,opt,name=remoteRef,proto3" json:"remoteRef,omitempty"`
+	Objects   []byte     `protobuf:"bytes,3,opt,name=objects,proto3" json:"objects,omitempty"`
+	RemoteRef *RemoteRef `protobuf:"bytes,4,opt,name=remoteRef,proto3" json:"remoteRef,omitempty"`
 }
 
 func (x *GetSecretRequest) Reset() {
@@ -91,6 +92,13 @@ func (x *GetSecretRequest) GetNamespace() string {
 	return ""
 }
 
+func (x *GetSecretRequest) GetObjects() []byte {
+	if x != nil {
+		return x.Objects
+	}
+	return nil
+}
+
 func (x *GetSecretRequest) GetRemoteRef() *RemoteRef {
 	if x != nil {
 		return x.RemoteRef
@@ -160,8 +168,9 @@ type PushSecretRequest struct {
 
 	Store     []byte         `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"`
 	Namespace string         `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
-	Secret    []byte         `protobuf:"bytes,3,opt,name=secret,proto3" json:"secret,omitempty"`
-	RemoteRef *PushRemoteRef `protobuf:"bytes,4,opt,name=remoteRef,proto3" json:"remoteRef,omitempty"`
+	Objects   []byte         `protobuf:"bytes,3,opt,name=objects,proto3" json:"objects,omitempty"`
+	Secret    []byte         `protobuf:"bytes,4,opt,name=secret,proto3" json:"secret,omitempty"`
+	RemoteRef *PushRemoteRef `protobuf:"bytes,5,opt,name=remoteRef,proto3" json:"remoteRef,omitempty"`
 }
 
 func (x *PushSecretRequest) Reset() {
@@ -210,6 +219,13 @@ func (x *PushSecretRequest) GetNamespace() string {
 	return ""
 }
 
+func (x *PushSecretRequest) GetObjects() []byte {
+	if x != nil {
+		return x.Objects
+	}
+	return nil
+}
+
 func (x *PushSecretRequest) GetSecret() []byte {
 	if x != nil {
 		return x.Secret
@@ -278,7 +294,8 @@ type DeleteSecretRequest struct {
 
 	Store     []byte         `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"`
 	Namespace string         `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
-	RemoteRef *PushRemoteRef `protobuf:"bytes,3,opt,name=remoteRef,proto3" json:"remoteRef,omitempty"`
+	Objects   []byte         `protobuf:"bytes,3,opt,name=objects,proto3" json:"objects,omitempty"`
+	RemoteRef *PushRemoteRef `protobuf:"bytes,4,opt,name=remoteRef,proto3" json:"remoteRef,omitempty"`
 }
 
 func (x *DeleteSecretRequest) Reset() {
@@ -327,6 +344,13 @@ func (x *DeleteSecretRequest) GetNamespace() string {
 	return ""
 }
 
+func (x *DeleteSecretRequest) GetObjects() []byte {
+	if x != nil {
+		return x.Objects
+	}
+	return nil
+}
+
 func (x *DeleteSecretRequest) GetRemoteRef() *PushRemoteRef {
 	if x != nil {
 		return x.RemoteRef
@@ -388,7 +412,8 @@ type GetSecretMapRequest struct {
 
 	Store     []byte     `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"`
 	Namespace string     `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
-	RemoteRef *RemoteRef `protobuf:"bytes,3,opt,name=remoteRef,proto3" json:"remoteRef,omitempty"`
+	Objects   []byte     `protobuf:"bytes,3,opt,name=objects,proto3" json:"objects,omitempty"`
+	RemoteRef *RemoteRef `protobuf:"bytes,4,opt,name=remoteRef,proto3" json:"remoteRef,omitempty"`
 }
 
 func (x *GetSecretMapRequest) Reset() {
@@ -437,6 +462,13 @@ func (x *GetSecretMapRequest) GetNamespace() string {
 	return ""
 }
 
+func (x *GetSecretMapRequest) GetObjects() []byte {
+	if x != nil {
+		return x.Objects
+	}
+	return nil
+}
+
 func (x *GetSecretMapRequest) GetRemoteRef() *RemoteRef {
 	if x != nil {
 		return x.RemoteRef
@@ -506,7 +538,8 @@ type GetAllSecretsRequest struct {
 
 	Store     []byte              `protobuf:"bytes,1,opt,name=store,proto3" json:"store,omitempty"`
 	Namespace string              `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
-	RemoteRef *ExternalSecretFind `protobuf:"bytes,3,opt,name=remoteRef,proto3" json:"remoteRef,omitempty"`
+	Objects   []byte              `protobuf:"bytes,3,opt,name=objects,proto3" json:"objects,omitempty"`
+	RemoteRef *ExternalSecretFind `protobuf:"bytes,4,opt,name=remoteRef,proto3" json:"remoteRef,omitempty"`
 }
 
 func (x *GetAllSecretsRequest) Reset() {
@@ -555,6 +588,13 @@ func (x *GetAllSecretsRequest) GetNamespace() string {
 	return ""
 }
 
+func (x *GetAllSecretsRequest) GetObjects() []byte {
+	if x != nil {
+		return x.Objects
+	}
+	return nil
+}
+
 func (x *GetAllSecretsRequest) GetRemoteRef() *ExternalSecretFind {
 	if x != nil {
 		return x.RemoteRef
@@ -843,146 +883,155 @@ var File_pkg_plugin_grpc_provider_proto protoreflect.FileDescriptor
 var file_pkg_plugin_grpc_provider_proto_rawDesc = []byte{
 	0x0a, 0x1e, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70,
 	0x63, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
-	0x12, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x22, 0x77, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53,
-	0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05,
-	0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x6f,
-	0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
-	0x12, 0x2f, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x18, 0x03, 0x20,
-	0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6d,
-	0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65,
-	0x66, 0x22, 0x3e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65,
-	0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65,
-	0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f,
-	0x72, 0x22, 0x94, 0x01, 0x0a, 0x11, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74,
-	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65,
-	0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x0a,
-	0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73,
-	0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x65, 0x63,
-	0x72, 0x65, 0x74, 0x12, 0x33, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66,
-	0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
-	0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x09, 0x72,
-	0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x22, 0x27, 0x0a, 0x0f, 0x50, 0x75, 0x73, 0x68,
-	0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65,
-	0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f,
-	0x72, 0x22, 0x7e, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65,
-	0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72,
-	0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1c,
-	0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x09,
-	0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x12, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x22, 0x91, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74,
+	0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a,
+	0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74,
+	0x6f, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
+	0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x0c, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x72,
+	0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11,
+	0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65,
+	0x66, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x22, 0x3e, 0x0a, 0x0e,
+	0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16,
+	0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06,
+	0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xae, 0x01, 0x0a,
+	0x11, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
+	0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x0c, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65,
+	0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d,
+	0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74,
+	0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73,
+	0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c,
+	0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x33, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x6f,
+	0x74, 0x65, 0x52, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x6c,
+	0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52,
+	0x65, 0x66, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x22, 0x27, 0x0a,
+	0x0f, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79,
+	0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x98, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74,
+	0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14,
+	0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73,
+	0x74, 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
+	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
+	0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x09,
+	0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
 	0x15, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x6d,
 	0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65,
 	0x66, 0x22, 0x29, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65,
 	0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18,
-	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x7a, 0x0a, 0x13,
-	0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75,
-	0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d,
-	0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61,
-	0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74,
-	0x65, 0x52, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x6c, 0x75,
-	0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x09, 0x72,
-	0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x22, 0x9b, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74,
-	0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x37,
-	0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70,
-	0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4d,
-	0x61, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72,
-	0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x37, 0x0a,
-	0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
-	0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
-	0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c,
-	0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x84, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x6c,
-	0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
-	0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05,
-	0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
-	0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
-	0x61, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
-	0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x46, 0x69,
-	0x6e, 0x64, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x22, 0x9d, 0x01,
-	0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52,
-	0x65, 0x70, 0x6c, 0x79, 0x12, 0x38, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03,
-	0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41,
-	0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x44,
-	0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14,
-	0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65,
-	0x72, 0x72, 0x6f, 0x72, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72,
-	0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
-	0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
-	0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd7, 0x01,
-	0x0a, 0x09, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x12, 0x10, 0x0a, 0x03, 0x6b,
-	0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a,
-	0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50,
-	0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
-	0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74,
-	0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x12, 0x63,
-	0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67,
-	0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
-	0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x2a, 0x0a, 0x10, 0x64,
-	0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18,
-	0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x53,
-	0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x22, 0x49, 0x0a, 0x0d, 0x50, 0x75, 0x73, 0x68, 0x52,
-	0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x6f,
-	0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x6d,
-	0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
-	0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72,
-	0x74, 0x79, 0x22, 0x9f, 0x02, 0x0a, 0x12, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53,
-	0x65, 0x63, 0x72, 0x65, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74,
-	0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x26, 0x0a,
-	0x0e, 0x66, 0x69, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x69, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x52,
-	0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20,
-	0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x74,
-	0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x2e,
-	0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12,
-	0x2e, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72,
-	0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6f, 0x6e,
-	0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12,
-	0x2a, 0x0a, 0x10, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74,
-	0x65, 0x67, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x63, 0x6f, 0x64,
-	0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x1a, 0x37, 0x0a, 0x09, 0x54,
-	0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
-	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
-	0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
-	0x3a, 0x02, 0x38, 0x01, 0x32, 0xf5, 0x02, 0x0a, 0x0d, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73,
-	0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63,
-	0x72, 0x65, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74,
-	0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
-	0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74,
-	0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0a, 0x50, 0x75, 0x73, 0x68, 0x53,
-	0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x19, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50,
-	0x75, 0x73, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
-	0x1a, 0x17, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65,
-	0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0c, 0x44,
-	0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x6c,
-	0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65,
-	0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
-	0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65,
-	0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72,
-	0x65, 0x74, 0x4d, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47,
-	0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65,
-	0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53,
-	0x65, 0x63, 0x72, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12,
-	0x4b, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73,
-	0x12, 0x1c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c,
-	0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a,
-	0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x53, 0x65,
-	0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x87, 0x01, 0x0a,
-	0x23, 0x69, 0x6f, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2d, 0x73, 0x65, 0x63,
-	0x72, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x6c,
-	0x75, 0x67, 0x69, 0x6e, 0x42, 0x13, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x6c,
-	0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74,
-	0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
-	0x2d, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
-	0x6c, 0x2d, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x6c,
-	0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
-	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x94, 0x01, 0x0a,
+	0x13, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71,
+	0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61,
+	0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e,
+	0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65,
+	0x63, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63,
+	0x74, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x18,
+	0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52,
+	0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65,
+	0x52, 0x65, 0x66, 0x22, 0x9b, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65,
+	0x74, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x37, 0x0a, 0x04, 0x64, 0x61, 0x74,
+	0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+	0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x70,
+	0x6c, 0x79, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61,
+	0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61,
+	0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
+	0x01, 0x22, 0x9e, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72,
+	0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74,
+	0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x73, 0x74, 0x6f, 0x72, 0x65,
+	0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18,
+	0x0a, 0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52,
+	0x07, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x6f,
+	0x74, 0x65, 0x52, 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x6c,
+	0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x63,
+	0x72, 0x65, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52,
+	0x65, 0x66, 0x22, 0x9d, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x63,
+	0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x38, 0x0a, 0x04, 0x64, 0x61, 0x74,
+	0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+	0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65,
+	0x70, 0x6c, 0x79, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64,
+	0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74,
+	0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
+	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02,
+	0x38, 0x01, 0x22, 0xd7, 0x01, 0x0a, 0x09, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66,
+	0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
+	0x65, 0x79, 0x12, 0x26, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x6f,
+	0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x61,
+	0x64, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72,
+	0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72,
+	0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+	0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+	0x12, 0x2e, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74,
+	0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6f,
+	0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79,
+	0x12, 0x2a, 0x0a, 0x10, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61,
+	0x74, 0x65, 0x67, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x63, 0x6f,
+	0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x22, 0x49, 0x0a, 0x0d,
+	0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x66, 0x12, 0x1c, 0x0a,
+	0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x09, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70,
+	0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70,
+	0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0x9f, 0x02, 0x0a, 0x12, 0x45, 0x78, 0x74, 0x65,
+	0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x12, 0x12,
+	0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61,
+	0x74, 0x68, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x69, 0x6e, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65,
+	0x67, 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x69, 0x6e, 0x64,
+	0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x70, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x61,
+	0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
+	0x6e, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74,
+	0x46, 0x69, 0x6e, 0x64, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04,
+	0x74, 0x61, 0x67, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69,
+	0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x12, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x61,
+	0x74, 0x65, 0x67, 0x79, 0x12, 0x2a, 0x0a, 0x10, 0x64, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67,
+	0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10,
+	0x64, 0x65, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79,
+	0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
+	0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
+	0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+	0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xf5, 0x02, 0x0a, 0x0d, 0x53, 0x65,
+	0x63, 0x72, 0x65, 0x74, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x3f, 0x0a, 0x09, 0x47,
+	0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x18, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
+	0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
+	0x73, 0x74, 0x1a, 0x16, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53,
+	0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x0a,
+	0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x19, 0x2e, 0x70, 0x6c, 0x75,
+	0x67, 0x69, 0x6e, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65,
+	0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x50,
+	0x75, 0x73, 0x68, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00,
+	0x12, 0x48, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74,
+	0x12, 0x1b, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+	0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e,
+	0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63,
+	0x72, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0c, 0x47, 0x65,
+	0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x70, 0x6c, 0x75,
+	0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4d, 0x61, 0x70,
+	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+	0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x70,
+	0x6c, 0x79, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x53, 0x65,
+	0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47,
+	0x65, 0x74, 0x41, 0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x47, 0x65, 0x74,
+	0x41, 0x6c, 0x6c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
+	0x00, 0x42, 0x87, 0x01, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
+	0x6c, 0x2d, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
+	0x65, 0x72, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x13, 0x50, 0x72, 0x6f, 0x76, 0x69,
+	0x64, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
+	0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x78, 0x74,
+	0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2d, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x65, 0x78,
+	0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2d, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x70,
+	0x6b, 0x67, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70,
+	0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f,
+	0x74, 0x6f, 0x33,
 }
 
 var (

+ 11 - 6
pkg/plugin/grpc/provider.proto

@@ -44,7 +44,8 @@ service SecretsClient {
 message GetSecretRequest {
   bytes store = 1;
   string namespace = 2;
-  RemoteRef remoteRef = 3;
+  bytes objects = 3;
+  RemoteRef remoteRef = 4;
 }
 
 message GetSecretReply {
@@ -55,8 +56,9 @@ message GetSecretReply {
 message PushSecretRequest {
   bytes store = 1;
   string namespace = 2;
-  bytes secret = 3;
-  PushRemoteRef remoteRef = 4;
+  bytes objects = 3;
+  bytes secret = 4;
+  PushRemoteRef remoteRef = 5;
 }
 
 message PushSecretReply { string error = 1; }
@@ -64,7 +66,8 @@ message PushSecretReply { string error = 1; }
 message DeleteSecretRequest {
   bytes store = 1;
   string namespace = 2;
-  PushRemoteRef remoteRef = 3;
+  bytes objects = 3;
+  PushRemoteRef remoteRef = 4;
 }
 
 message DeleteSecretReply { string error = 1; }
@@ -72,7 +75,8 @@ message DeleteSecretReply { string error = 1; }
 message GetSecretMapRequest {
   bytes store = 1;
   string namespace = 2;
-  RemoteRef remoteRef = 3;
+  bytes objects = 3;
+  RemoteRef remoteRef = 4;
 }
 
 message GetSecretMapReply {
@@ -83,7 +87,8 @@ message GetSecretMapReply {
 message GetAllSecretsRequest {
   bytes store = 1;
   string namespace = 2;
-  ExternalSecretFind remoteRef = 3;
+  bytes objects = 3;
+  ExternalSecretFind remoteRef = 4;
 }
 
 message GetAllSecretsReply {

+ 15 - 0
pkg/provider/register/noprovider.go

@@ -0,0 +1,15 @@
+/*
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+	http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package register

+ 25 - 21
pkg/provider/register/register.go

@@ -1,3 +1,6 @@
+//go:build !providerless
+// +build !providerless
+
 /*
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
@@ -16,24 +19,25 @@ limitations under the License.
 package register
 
 // packages imported here are registered to the controller schema.
-
-// _ "github.com/external-secrets/external-secrets-provider-akeyless"
-// _ "github.com/external-secrets/external-secrets-provider-alibaba"
-// _ "github.com/external-secrets/external-secrets-provider-aws"
-// _ "github.com/external-secrets/external-secrets-provider-azure/keyvault"
-// _ "github.com/external-secrets/external-secrets-provider-doppler"
-// _ "github.com/external-secrets/external-secrets-provider-fake"
-// _ "github.com/external-secrets/external-secrets-provider-gcp/secretmanager"
-// _ "github.com/external-secrets/external-secrets-provider-gitlab"
-// _ "github.com/external-secrets/external-secrets-provider-grpc"
-// _ "github.com/external-secrets/external-secrets-provider-ibm"
-// _ "github.com/external-secrets/external-secrets-provider-keepersecurity"
-// _ "github.com/external-secrets/external-secrets-provider-kubernetes"
-// _ "github.com/external-secrets/external-secrets-provider-onepassword"
-// _ "github.com/external-secrets/external-secrets-provider-oracle"
-// _ "github.com/external-secrets/external-secrets-provider-scaleway"
-// _ "github.com/external-secrets/external-secrets-provider-senhasegura"
-// _ "github.com/external-secrets/external-secrets-provider-vault"
-// _ "github.com/external-secrets/external-secrets-provider-webhook"
-// _ "github.com/external-secrets/external-secrets-provider-yandex/certificatemanager"
-// _ "github.com/external-secrets/external-secrets-provider-yandex/lockbox"
+import (
+	_ "github.com/external-secrets/external-secrets-provider-akeyless"
+	_ "github.com/external-secrets/external-secrets-provider-alibaba"
+	_ "github.com/external-secrets/external-secrets-provider-aws"
+	_ "github.com/external-secrets/external-secrets-provider-azure/keyvault"
+	_ "github.com/external-secrets/external-secrets-provider-doppler"
+	_ "github.com/external-secrets/external-secrets-provider-fake"
+	_ "github.com/external-secrets/external-secrets-provider-gcp/secretmanager"
+	_ "github.com/external-secrets/external-secrets-provider-gitlab"
+	_ "github.com/external-secrets/external-secrets-provider-grpc"
+	_ "github.com/external-secrets/external-secrets-provider-ibm"
+	_ "github.com/external-secrets/external-secrets-provider-keepersecurity"
+	_ "github.com/external-secrets/external-secrets-provider-kubernetes"
+	_ "github.com/external-secrets/external-secrets-provider-onepassword"
+	_ "github.com/external-secrets/external-secrets-provider-oracle"
+	_ "github.com/external-secrets/external-secrets-provider-scaleway"
+	_ "github.com/external-secrets/external-secrets-provider-senhasegura"
+	_ "github.com/external-secrets/external-secrets-provider-vault"
+	_ "github.com/external-secrets/external-secrets-provider-webhook"
+	_ "github.com/external-secrets/external-secrets-provider-yandex/certificatemanager"
+	_ "github.com/external-secrets/external-secrets-provider-yandex/lockbox"
+)

+ 3 - 6
pkg/provider/vault/vault.go

@@ -189,7 +189,7 @@ func getVaultClient(c *Provider, store esv1beta1.GenericStore, cfg *vault.Config
 		}
 	}
 
-	client, err := c.NewVaultClient(cfg)
+	client, err := NewVaultClient(cfg)
 	if err != nil {
 		return nil, fmt.Errorf(errVaultClient, err)
 	}
@@ -201,7 +201,6 @@ func getVaultClient(c *Provider, store esv1beta1.GenericStore, cfg *vault.Config
 }
 
 type Provider struct {
-	NewVaultClient func(c *vault.Config) (util.Client, error)
 }
 
 // Capabilities return the provider supported capabilities (ReadOnly, WriteOnly, ReadWrite).
@@ -250,7 +249,7 @@ func (c *Provider) NewGeneratorClient(ctx context.Context, kube kclient.Client,
 		return nil, err
 	}
 
-	client, err := c.NewVaultClient(cfg)
+	client, err := NewVaultClient(cfg)
 	if err != nil {
 		return nil, err
 	}
@@ -1680,9 +1679,7 @@ func init() {
 		Initialize: lateInit,
 	})
 
-	esv1beta1.Register(&Provider{
-		NewVaultClient: NewVaultClient,
-	}, &esv1beta1.SecretStoreProvider{
+	esv1beta1.Register(&Provider{}, &esv1beta1.SecretStoreProvider{
 		Vault: &esv1beta1.VaultProvider{},
 	})
 }

+ 1 - 1
pkg/provider/webhook/webhook.go

@@ -112,7 +112,7 @@ func (w *WebHook) getStoreSecret(ctx context.Context, ref esmeta.SecretKeySelect
 	}
 	secret := &corev1.Secret{}
 	if err := w.kube.Get(ctx, ke, secret); err != nil {
-		return nil, fmt.Errorf("failed to get clustersecretstore webhook secret %s: %w", ref.Name, err)
+		return nil, fmt.Errorf("failed to get clustersecretstore webhook secret %s: %w", ke.String(), err)
 	}
 	return secret, nil
 }

+ 132 - 0
pkg/remote/aggregator.go

@@ -0,0 +1,132 @@
+package remote
+
+import (
+	"context"
+	"errors"
+	"log"
+	"reflect"
+
+	esapi "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1"
+	v1 "github.com/external-secrets/external-secrets/apis/meta/v1"
+	corev1 "k8s.io/api/core/v1"
+	"k8s.io/apimachinery/pkg/runtime/schema"
+	"k8s.io/apimachinery/pkg/types"
+	"sigs.k8s.io/controller-runtime/pkg/client"
+	"sigs.k8s.io/yaml"
+)
+
+type AggregateResult struct {
+	SecretKeySelectors      []v1.SecretKeySelector
+	ServiceAccountSelectors []v1.ServiceAccountSelector
+	CAProviders             []esapi.CAProvider
+}
+
+func aggregateObjects(ctx context.Context, store esapi.GenericStore, kube client.Client, namespace string) ([]byte, error) {
+	if store == nil {
+		return nil, errors.New("store can not be nil")
+	}
+	res := &AggregateResult{}
+	storeSpec := store.GetSpec()
+	iterate(storeSpec.Provider, res)
+
+	var objects []byte
+	for _, sel := range res.SecretKeySelectors {
+		var secret corev1.Secret
+		key := types.NamespacedName{
+			Name:      sel.Name,
+			Namespace: namespace,
+		}
+		if store.GetKind() == esapi.ClusterSecretStoreKind && sel.Namespace != nil {
+			key.Namespace = *sel.Namespace
+		}
+		err := kube.Get(ctx, key, &secret)
+		if err != nil {
+			return nil, err
+		}
+		secret.SetGroupVersionKind(schema.GroupVersionKind{
+			Kind:    "Secret",
+			Version: "v1",
+		})
+		secretBytes, err := yaml.Marshal(secret)
+		if err != nil {
+			return nil, err
+		}
+		objects = append(objects, secretBytes...)
+		objects = append(objects, []byte("\n---\n")...)
+	}
+
+	return objects, nil
+}
+
+func iterate(data interface{}, res *AggregateResult) {
+	if reflect.ValueOf(data).Kind() == reflect.Slice {
+		d := reflect.ValueOf(data)
+		for i := 0; i < d.Len(); i++ {
+			val := d.Index(i)
+			analyse(val, res)
+			iterate(reflect.Indirect(d.Index(i)).Interface(), res)
+		}
+	} else if reflect.ValueOf(data).Kind() == reflect.Map {
+		d := reflect.ValueOf(data)
+		for _, k := range d.MapKeys() {
+			typeOfValue := reflect.TypeOf(d.MapIndex(k).Interface()).Kind()
+			if typeOfValue == reflect.Map || typeOfValue == reflect.Slice {
+				val := d.MapIndex(k)
+				analyse(val, res)
+				iterate(reflect.Indirect(val).Interface(), res)
+			} else {
+				log.Printf("val not map or slice: %#v", typeOfValue)
+			}
+		}
+	} else if reflect.ValueOf(data).Kind() == reflect.Pointer {
+		originalValue := reflect.ValueOf(data).Elem()
+		if !originalValue.IsValid() {
+			return
+		}
+		iterate(reflect.Indirect(originalValue).Interface(), res)
+	} else if reflect.ValueOf(data).Kind() == reflect.Struct {
+		v := reflect.ValueOf(data)
+		for _, f := range reflect.VisibleFields(v.Type()) {
+			val := v.FieldByIndex(f.Index)
+			analyse(val, res)
+			vv := reflect.Indirect(val)
+			if vv.IsValid() {
+				iterate(vv.Interface(), res)
+			}
+		}
+	}
+}
+
+func analyse(val reflect.Value, res *AggregateResult) {
+	if val.Kind() == reflect.Pointer {
+		originalValue := val.Elem()
+		if !originalValue.IsValid() {
+			return
+		}
+		analyse(reflect.Indirect(originalValue), res)
+		return
+	}
+
+	secretSelT := reflect.TypeOf(v1.SecretKeySelector{})
+	if val.Type().AssignableTo(secretSelT) {
+		sel := val.Interface().(v1.SecretKeySelector)
+		res.SecretKeySelectors = append(res.SecretKeySelectors, sel)
+		return
+	}
+
+	serviceAccSelT := reflect.TypeOf(v1.ServiceAccountSelector{})
+	if val.Type().AssignableTo(serviceAccSelT) {
+		sel := val.Interface().(v1.ServiceAccountSelector)
+		res.ServiceAccountSelectors = append(res.ServiceAccountSelectors, sel)
+		return
+	}
+
+	caProviderT := reflect.TypeOf(esapi.CAProvider{})
+	if val.Type().AssignableTo(caProviderT) {
+		sel := val.Interface().(esapi.CAProvider)
+		res.CAProviders = append(res.CAProviders, sel)
+		return
+	}
+
+	// TODO: add more types that are of interest...
+}

+ 36 - 1
pkg/remote/client.go

@@ -3,18 +3,21 @@ package remote
 import (
 	"context"
 	"encoding/json"
+	"errors"
 	"fmt"
 	"log"
 
 	esv1beta1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1"
 	pb "github.com/external-secrets/external-secrets/pkg/plugin/grpc"
 	"google.golang.org/grpc"
+	"sigs.k8s.io/controller-runtime/pkg/client"
 )
 
 // Client is a small wrapper to map ESO SecretsClient to gRPC calls
 type Client struct {
 	store     esv1beta1.GenericStore
 	namespace string
+	kube      client.Client
 
 	conn       *grpc.ClientConn
 	grpcClient pb.SecretsClientClient
@@ -25,9 +28,15 @@ func (s *Client) GetSecret(ctx context.Context, ref esv1beta1.ExternalSecretData
 	if err != nil {
 		return nil, err
 	}
+	objects, err := aggregateObjects(ctx, s.store, s.kube, s.namespace)
+	if err != nil {
+		return nil, err
+	}
+	log.Printf("rpc sending objects=%s", string(objects))
 	res, err := s.grpcClient.GetSecret(ctx, &pb.GetSecretRequest{
 		Store:     storeBytes,
 		Namespace: s.namespace,
+		Objects:   objects,
 		RemoteRef: &pb.RemoteRef{
 			Key:                ref.Key,
 			Property:           ref.Property,
@@ -41,6 +50,13 @@ func (s *Client) GetSecret(ctx context.Context, ref esv1beta1.ExternalSecretData
 		return nil, fmt.Errorf("unable to rpc: %w", err)
 	}
 	log.Printf("rpc secret=%s, err=%s", string(res.Secret), res.Error)
+	if res.Error != "" {
+		nse := esv1beta1.NoSecretError{}
+		if res.Error == nse.Error() {
+			return nil, nse
+		}
+		return nil, errors.New(res.Error)
+	}
 	return res.Secret, nil
 }
 
@@ -49,9 +65,14 @@ func (s *Client) PushSecret(ctx context.Context, value []byte, remoteRef esv1bet
 	if err != nil {
 		return err
 	}
+	objects, err := aggregateObjects(ctx, s.store, s.kube, s.namespace)
+	if err != nil {
+		return err
+	}
 	res, err := s.grpcClient.PushSecret(ctx, &pb.PushSecretRequest{
 		Store:     storeBytes,
 		Namespace: s.namespace,
+		Objects:   objects,
 		Secret:    value,
 		RemoteRef: &pb.PushRemoteRef{
 			RemoteKey: remoteRef.GetRemoteKey(),
@@ -72,9 +93,14 @@ func (s *Client) DeleteSecret(ctx context.Context, remoteRef esv1beta1.PushRemot
 	if err != nil {
 		return err
 	}
+	objects, err := aggregateObjects(ctx, s.store, s.kube, s.namespace)
+	if err != nil {
+		return err
+	}
 	res, err := s.grpcClient.DeleteSecret(ctx, &pb.DeleteSecretRequest{
 		Store:     storeBytes,
 		Namespace: s.namespace,
+		Objects:   objects,
 		RemoteRef: &pb.PushRemoteRef{
 			RemoteKey: remoteRef.GetRemoteKey(),
 			Property:  remoteRef.GetProperty(),
@@ -98,9 +124,14 @@ func (s *Client) GetSecretMap(ctx context.Context, ref esv1beta1.ExternalSecretD
 	if err != nil {
 		return nil, err
 	}
+	objects, err := aggregateObjects(ctx, s.store, s.kube, s.namespace)
+	if err != nil {
+		return nil, err
+	}
 	res, err := s.grpcClient.GetSecretMap(ctx, &pb.GetSecretMapRequest{
 		Store:     storeBytes,
 		Namespace: s.namespace,
+		Objects:   objects,
 		RemoteRef: &pb.RemoteRef{
 			Key:                ref.Key,
 			Property:           ref.Property,
@@ -124,7 +155,6 @@ func (s *Client) GetAllSecrets(ctx context.Context, ref esv1beta1.ExternalSecret
 	if err != nil {
 		return nil, err
 	}
-
 	findRef := &pb.ExternalSecretFind{
 		Tags:               ref.Tags,
 		ConversionStrategy: string(ref.ConversionStrategy),
@@ -136,9 +166,14 @@ func (s *Client) GetAllSecrets(ctx context.Context, ref esv1beta1.ExternalSecret
 	if ref.Name != nil {
 		findRef.FindNameRegexp = ref.Name.RegExp
 	}
+	objects, err := aggregateObjects(ctx, s.store, s.kube, s.namespace)
+	if err != nil {
+		return nil, err
+	}
 	res, err := s.grpcClient.GetAllSecrets(ctx, &pb.GetAllSecretsRequest{
 		Store:     storeBytes,
 		Namespace: s.namespace,
+		Objects:   objects,
 		RemoteRef: findRef,
 	})
 	if err != nil {

+ 1 - 0
pkg/remote/generator.go

@@ -0,0 +1 @@
+package remote

+ 2 - 1
pkg/remote/provider.go

@@ -39,7 +39,7 @@ func (p *Provider) NewClient(ctx context.Context, store esapi.GenericStore, kube
 
 	log.Printf("remote provider found providerName=%s\n", providerName)
 
-	addr := fmt.Sprintf("unix:///tmp/eso-%s.sock", providerName)
+	addr := fmt.Sprintf("unix:///var/run/eso/provider/sockets/%s.sock", providerName)
 
 	// Set up a connection to the server.
 	conn, err := grpc.Dial(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
@@ -51,6 +51,7 @@ func (p *Provider) NewClient(ctx context.Context, store esapi.GenericStore, kube
 	return &Client{
 		store:      store,
 		namespace:  namespace,
+		kube:       kube,
 		conn:       conn,
 		grpcClient: grpcClient,
 	}, nil

+ 202 - 23
pkg/remote/shell/shell.go

@@ -16,34 +16,40 @@ limitations under the License.
 package shell
 
 import (
+	"bufio"
+	"bytes"
 	"context"
 	"errors"
 	"fmt"
+	"io"
 	"net"
 	"os"
 	"os/signal"
 	"syscall"
 
+	esv1alpha1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1alpha1"
 	esapi "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1"
 	pb "github.com/external-secrets/external-secrets/pkg/plugin/grpc"
 	"github.com/go-logr/logr"
 	"google.golang.org/grpc"
+	corev1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/apimachinery/pkg/runtime/serializer"
+	"k8s.io/apimachinery/pkg/util/yaml"
 	clientgoscheme "k8s.io/client-go/kubernetes/scheme"
 	ctrl "sigs.k8s.io/controller-runtime"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 	ctrlcfg "sigs.k8s.io/controller-runtime/pkg/client/config"
+	"sigs.k8s.io/controller-runtime/pkg/client/fake"
 	ctrllog "sigs.k8s.io/controller-runtime/pkg/log"
 	"sigs.k8s.io/controller-runtime/pkg/log/zap"
 )
 
 type Server struct {
 	pb.UnimplementedSecretsClientServer
-	provider   esapi.Provider
-	scheme     *runtime.Scheme
-	kubeClient client.Client
-	log        logr.Logger
+	provider esapi.Provider
+	scheme   *runtime.Scheme
+	log      logr.Logger
 }
 
 func init() {
@@ -60,24 +66,14 @@ func RunServer(provider esapi.Provider) error {
 	scheme := runtime.NewScheme()
 	esapi.AddToScheme(scheme)
 	clientgoscheme.AddToScheme(scheme)
-	restCfg, err := ctrlcfg.GetConfig()
-	if err != nil {
-		return err
-	}
-	kubeClient, err := client.New(restCfg, client.Options{
-		Scheme: scheme,
-	})
-	if err != nil {
-		return err
-	}
 
 	pluginServer := &Server{
-		provider:   provider,
-		scheme:     scheme,
-		kubeClient: kubeClient,
-		log:        log,
+		provider: provider,
+		scheme:   scheme,
+		log:      log,
 	}
-	sockAddr := fmt.Sprintf("/tmp/eso-%s.sock", providerName)
+	sockAddr := fmt.Sprintf("/var/run/eso/provider/sockets/%s.sock", providerName)
+	_ = os.Remove(sockAddr)
 	lis, err := net.Listen("unix", sockAddr)
 	if err != nil {
 		return fmt.Errorf("failed to listen: %v", err)
@@ -109,15 +105,18 @@ func (s *Server) GetSecret(ctx context.Context, req *pb.GetSecretRequest) (*pb.G
 	if err != nil {
 		return nil, err
 	}
-	s.log.Info("GetSecret()", "namespace", req.Namespace, "name", store.GetObjectMeta().Name)
-
-	secretsClient, err := s.provider.NewClient(ctx, store, s.kubeClient, req.Namespace)
+	kubeClient, err := s.getClient(req.Objects)
+	if err != nil {
+		return nil, err
+	}
+	s.log.Info("GetSecret() request", "namespace", req.Namespace, "name", store.GetObjectMeta().Name)
+	secretsClient, err := s.provider.NewClient(ctx, store, kubeClient, req.Namespace)
 	if err != nil {
 		return nil, err
 	}
 	secret, err := secretsClient.GetSecret(ctx, remoteRef(req.RemoteRef))
+	s.log.Info("GetSecret() response", "namespace", req.Namespace, "name", store.GetObjectMeta().Name, "secret", secret, "err", err)
 	if err != nil {
-		// TODO: handle NoSecret error on the client side
 		return &pb.GetSecretReply{
 			Error: err.Error(),
 		}, nil
@@ -126,6 +125,129 @@ func (s *Server) GetSecret(ctx context.Context, req *pb.GetSecretRequest) (*pb.G
 		Secret: secret,
 	}, nil
 }
+
+func (s *Server) GetSecretMap(ctx context.Context, req *pb.GetSecretMapRequest) (*pb.GetSecretMapReply, error) {
+	store, err := s.decodeStore(req.Store)
+	if err != nil {
+		return nil, err
+	}
+	s.log.Info("GetSecretMap()", "namespace", req.Namespace, "name", store.GetObjectMeta().Name)
+	kubeClient, err := s.getClient(req.Objects)
+	if err != nil {
+		return nil, err
+	}
+	secretsClient, err := s.provider.NewClient(ctx, store, kubeClient, req.Namespace)
+	if err != nil {
+		return nil, err
+	}
+	secret, err := secretsClient.GetSecretMap(ctx, remoteRef(req.RemoteRef))
+	if err != nil {
+		return &pb.GetSecretMapReply{
+			Error: err.Error(),
+		}, nil
+	}
+	return &pb.GetSecretMapReply{
+		Data: secret,
+	}, nil
+}
+
+func (s *Server) GetAllSecrets(ctx context.Context, req *pb.GetAllSecretsRequest) (*pb.GetAllSecretsReply, error) {
+	store, err := s.decodeStore(req.Store)
+	if err != nil {
+		return nil, err
+	}
+	s.log.Info("GetAllSecrets()", "namespace", req.Namespace, "name", store.GetObjectMeta().Name)
+	kubeClient, err := s.getClient(req.Objects)
+	if err != nil {
+		return nil, err
+	}
+	secretsClient, err := s.provider.NewClient(ctx, store,
+		kubeClient, req.Namespace)
+	if err != nil {
+		return nil, err
+	}
+	secret, err := secretsClient.GetAllSecrets(ctx, externalSecretFind(req.RemoteRef))
+	if err != nil {
+		return &pb.GetAllSecretsReply{
+			Error: err.Error(),
+		}, nil
+	}
+	return &pb.GetAllSecretsReply{
+		Data: secret,
+	}, nil
+}
+
+func (s *Server) PushSecret(ctx context.Context, req *pb.PushSecretRequest) (*pb.PushSecretReply, error) {
+	store, err := s.decodeStore(req.Store)
+	if err != nil {
+		return nil, err
+	}
+	s.log.Info("PushSecret()", "namespace", req.Namespace, "name", store.GetObjectMeta().Name)
+	kubeClient, err := s.getClient(req.Objects)
+	if err != nil {
+		return nil, err
+	}
+	secretsClient, err := s.provider.NewClient(ctx, store, kubeClient, req.Namespace)
+	if err != nil {
+		return nil, err
+	}
+	err = secretsClient.PushSecret(ctx, req.Secret, pushRemoteRef(req.RemoteRef))
+	if err != nil {
+		return &pb.PushSecretReply{
+			Error: err.Error(),
+		}, nil
+	}
+	return &pb.PushSecretReply{}, nil
+}
+
+func (s *Server) DeleteSecret(ctx context.Context, req *pb.DeleteSecretRequest) (*pb.DeleteSecretReply, error) {
+	store, err := s.decodeStore(req.Store)
+	if err != nil {
+		return nil, err
+	}
+	s.log.Info("DeleteSecret()", "namespace", req.Namespace, "name", store.GetObjectMeta().Name)
+	kubeClient, err := s.getClient(req.Objects)
+	if err != nil {
+		return nil, err
+	}
+	secretsClient, err := s.provider.NewClient(ctx, store, kubeClient, req.Namespace)
+	if err != nil {
+		return nil, err
+	}
+	err = secretsClient.DeleteSecret(ctx, pushRemoteRef(req.RemoteRef))
+	if err != nil {
+		return &pb.DeleteSecretReply{
+			Error: err.Error(),
+		}, nil
+	}
+	return &pb.DeleteSecretReply{}, nil
+}
+
+func externalSecretFind(ref *pb.ExternalSecretFind) esapi.ExternalSecretFind {
+	find := esapi.ExternalSecretFind{
+		Tags:               ref.Tags,
+		ConversionStrategy: esapi.ExternalSecretConversionStrategy(ref.ConversionStrategy),
+		DecodingStrategy:   esapi.ExternalSecretDecodingStrategy(ref.GetDecodingStrategy()),
+	}
+
+	if ref.Path != "" {
+		find.Path = &ref.Path
+	}
+	if ref.FindNameRegexp != "" {
+		find.Name = &esapi.FindName{
+			RegExp: ref.FindNameRegexp,
+		}
+	}
+	return find
+}
+
+func pushRemoteRef(ref *pb.PushRemoteRef) esapi.PushRemoteRef {
+	return esv1alpha1.PushSecretRemoteRef{
+		RemoteKey: ref.RemoteKey,
+		Property:  ref.Property,
+	}
+}
+
 func remoteRef(ref *pb.RemoteRef) esapi.ExternalSecretDataRemoteRef {
 	return esapi.ExternalSecretDataRemoteRef{
 		Key:                ref.Key,
@@ -158,3 +280,60 @@ func (s *Server) decodeStore(data []byte) (esapi.GenericStore, error) {
 	}
 	return nil, errors.New("unexpected store data")
 }
+
+func (s *Server) decodeObjects(data []byte) ([]client.Object, error) {
+	s.log.Info("decoded data", "data", data)
+	decode := serializer.NewCodecFactory(s.scheme).UniversalDeserializer().Decode
+	reader := yaml.NewYAMLReader(bufio.NewReader(bytes.NewReader(data)))
+	var objects []client.Object
+	for {
+		buf, err := reader.Read()
+		if err != nil {
+			if err == io.EOF {
+				s.log.Error(err, "found EOF")
+				break
+			}
+			s.log.Error(err, "unable to read buf")
+			return nil, err
+		}
+		s.log.Error(err, "decoding buf", "buf", buf)
+		obj, gvk, err := decode(buf, nil, nil)
+		if err != nil {
+			return nil, err
+		}
+		s.log.Info("decoded object", "object", obj)
+
+		switch item := obj.(type) {
+		case *corev1.Secret:
+			objects = append(objects, item)
+		case *corev1.ConfigMap:
+			objects = append(objects, item)
+		default:
+			return nil, fmt.Errorf("unexpected object type: %s", gvk)
+		}
+	}
+	return objects, nil
+}
+
+func (s *Server) getClient(data []byte) (client.Client, error) {
+	objects, err := s.decodeObjects(data)
+	if err != nil {
+		return nil, err
+	}
+	restCfg, err := ctrlcfg.GetConfig()
+	if err != nil {
+		return nil, err
+	}
+	// TODO: do not log secrets
+	s.log.Info("creating client with cached objects", "objects", objects)
+	kubeClient, err := client.New(restCfg, client.Options{
+		Cache: &client.CacheOptions{
+			Reader: fake.NewClientBuilder().WithScheme(s.scheme).WithObjects(objects...).Build(),
+		},
+		Scheme: s.scheme,
+	})
+	if err != nil {
+		return nil, err
+	}
+	return kubeClient, nil
+}