Browse Source

Adding notes on configuring ClusterSecretStores for every provider

Signed-off-by: Gustavo Carvalho <gustavo.carvalho@container-solutions.com>
Gustavo Carvalho 4 years ago
parent
commit
696a9e9c92

+ 2 - 1
docs/provider-akeyless.md

@@ -40,7 +40,7 @@ Be sure the `akeyless` provider is listed in the `Kind=SecretStore` and the `ake
 ```yaml
 ```yaml
 {% include 'akeyless-secret-store.yaml' %}
 {% include 'akeyless-secret-store.yaml' %}
 ```
 ```
-
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` for `accessID`, `accessType` and `accessTypeParam` with the namespaces where the secrets reside.
 ### Creating external secret
 ### Creating external secret
 
 
 To get a secret from Akeyless and secret it on the Kubernetes cluster, a `Kind=ExternalSecret` is needed.
 To get a secret from Akeyless and secret it on the Kubernetes cluster, a `Kind=ExternalSecret` is needed.
@@ -49,6 +49,7 @@ To get a secret from Akeyless and secret it on the Kubernetes cluster, a `Kind=E
 {% include 'akeyless-external-secret.yaml' %}
 {% include 'akeyless-external-secret.yaml' %}
 ```
 ```
 
 
+
 #### Using DataFrom
 #### Using DataFrom
 
 
 DataFrom can be used to get a secret as a JSON string and attempt to parse it.
 DataFrom can be used to get a secret as a JSON string and attempt to parse it.

+ 1 - 0
docs/provider-aws-parameter-store.md

@@ -11,6 +11,7 @@ way users of the `SecretStore` can only access the secrets necessary.
 ``` yaml
 ``` yaml
 {% include 'aws-parameter-store.yaml' %}
 {% include 'aws-parameter-store.yaml' %}
 ```
 ```
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in `accessKeyIDSecretRef` and `secretAccessKeySecretRef`  with the namespaces where the secrets reside.
 
 
 !!! warning "API Pricing & Throttling"
 !!! warning "API Pricing & Throttling"
     The SSM Parameter Store API is charged by throughput and
     The SSM Parameter Store API is charged by throughput and

+ 1 - 1
docs/provider-aws-secrets-manager.md

@@ -11,7 +11,7 @@ way users of the `SecretStore` can only access the secrets necessary.
 ``` yaml
 ``` yaml
 {% include 'aws-sm-store.yaml' %}
 {% include 'aws-sm-store.yaml' %}
 ```
 ```
-
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in `accessKeyIDSecretRef` and `secretAccessKeySecretRef`  with the namespaces where the secrets reside.
 ### IAM Policy
 ### IAM Policy
 
 
 Create a IAM Policy to pin down access to secrets matching `dev-*`.
 Create a IAM Policy to pin down access to secrets matching `dev-*`.

+ 1 - 0
docs/provider-azure-key-vault.md

@@ -31,6 +31,7 @@ Be sure the `azurekv` provider is listed in the `Kind=SecretStore`
 ```yaml
 ```yaml
 {% include 'azkv-secret-store.yaml' %}
 {% include 'azkv-secret-store.yaml' %}
 ```
 ```
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in `clientId` and `clientSecret`  with the namespaces where the secrets reside.
 
 
 Or in case of Managed Idenetity authentication:
 Or in case of Managed Idenetity authentication:
 
 

+ 1 - 0
docs/provider-gitlab-project-variables.md

@@ -27,6 +27,7 @@ Be sure the `gitlab` provider is listed in the `Kind=SecretStore` and the Projec
 ```yaml
 ```yaml
 {% include 'gitlab-secret-store.yaml' %}
 {% include 'gitlab-secret-store.yaml' %}
 ```
 ```
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in `accessToken` with the namespace where the secret resides.
 
 
 Your project ID can be found on your project's page.
 Your project ID can be found on your project's page.
 ![projectID](./pictures/screenshot_gitlab_projectID.png)
 ![projectID](./pictures/screenshot_gitlab_projectID.png)

+ 2 - 1
docs/provider-google-secrets-manager.md

@@ -84,7 +84,6 @@ You can use [GCP Service Account](https://cloud.google.com/iam/docs/service-acco
 {% include 'gcpsm-credentials-secret.yaml' %}
 {% include 'gcpsm-credentials-secret.yaml' %}
 ```
 ```
 
 
-**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` for `SecretAccessKeyRef` with the namespace of the secret that we just created.
 
 
 #### Update secret store
 #### Update secret store
 Be sure the `gcpsm` provider is listed in the `Kind=SecretStore`
 Be sure the `gcpsm` provider is listed in the `Kind=SecretStore`
@@ -93,6 +92,8 @@ Be sure the `gcpsm` provider is listed in the `Kind=SecretStore`
 {% include 'gcpsm-secret-store.yaml' %}
 {% include 'gcpsm-secret-store.yaml' %}
 ```
 ```
 
 
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` for `SecretAccessKeyRef` with the namespace of the secret that we just created.
+
 #### Creating external secret
 #### Creating external secret
 
 
 To create a kubernetes secret from the GCP Secret Manager secret a `Kind=ExternalSecret` is needed.
 To create a kubernetes secret from the GCP Secret Manager secret a `Kind=ExternalSecret` is needed.

+ 6 - 1
docs/provider-hashicorp-vault.md

@@ -26,7 +26,6 @@ spec:
         # https://www.vaultproject.io/docs/auth/token
         # https://www.vaultproject.io/docs/auth/token
         tokenSecretRef:
         tokenSecretRef:
           name: "vault-token"
           name: "vault-token"
-          namespace: "default"
           key: "token"
           key: "token"
 ---
 ---
 apiVersion: v1
 apiVersion: v1
@@ -36,6 +35,7 @@ metadata:
 data:
 data:
   token: cm9vdA== # "root"
   token: cm9vdA== # "root"
 ```
 ```
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` for `tokenSecretRef` with the namespace of the secret that we just created.
 
 
 Then create a simple k/v pair at path `secret/foo`:
 Then create a simple k/v pair at path `secret/foo`:
 
 
@@ -92,6 +92,7 @@ A static token is stored in a `Kind=Secret` and is used to authenticate with vau
 ```yaml
 ```yaml
 {% include 'vault-token-store.yaml' %}
 {% include 'vault-token-store.yaml' %}
 ```
 ```
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in `tokenSecretRef` with the namespace where the secret resides.
 
 
 #### AppRole authentication example
 #### AppRole authentication example
 
 
@@ -101,6 +102,7 @@ A static token is stored in a `Kind=Secret` and is used to authenticate with vau
 ```yaml
 ```yaml
 {% include 'vault-approle-store.yaml' %}
 {% include 'vault-approle-store.yaml' %}
 ```
 ```
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in `secretRef` with the namespace where the secret resides.
 
 
 #### Kubernetes authentication
 #### Kubernetes authentication
 
 
@@ -115,6 +117,7 @@ options of optaining credentials for vault:
 ```yaml
 ```yaml
 {% include 'vault-kubernetes-store.yaml' %}
 {% include 'vault-kubernetes-store.yaml' %}
 ```
 ```
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in `serviceAccountRef` or in `secretRef`, if used.
 
 
 #### LDAP authentication
 #### LDAP authentication
 
 
@@ -126,6 +129,7 @@ in a `Kind=Secret` referenced by the `secretRef`.
 ```yaml
 ```yaml
 {% include 'vault-ldap-store.yaml' %}
 {% include 'vault-ldap-store.yaml' %}
 ```
 ```
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in `secretRef` with the namespace where the secret resides.
 
 
 #### JWT/OIDC authentication
 #### JWT/OIDC authentication
 
 
@@ -137,6 +141,7 @@ or `Kind=ClusterSecretStore` resource.
 ```yaml
 ```yaml
 {% include 'vault-jwt-store.yaml' %}
 {% include 'vault-jwt-store.yaml' %}
 ```
 ```
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in `secretRef` with the namespace where the secret resides.
 
 
 ### Vault Enterprise and Eventual Consistency
 ### Vault Enterprise and Eventual Consistency
 
 

+ 1 - 0
docs/provider-ibm-secrets-manager.md

@@ -40,6 +40,7 @@ Be sure the `ibm` provider is listed in the `Kind=SecretStore`
 ```yaml
 ```yaml
 {% include 'ibm-secret-store.yaml' %}
 {% include 'ibm-secret-store.yaml' %}
 ```
 ```
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in `secretApiKeySecretRef` with the namespace where the secret resides.
 
 
 To find your serviceURL, under your Secrets Manager resource, go to "Endpoints" on the left.
 To find your serviceURL, under your Secrets Manager resource, go to "Endpoints" on the left.
 Note: Use the url without the `/api` suffix that is presented in the UI.
 Note: Use the url without the `/api` suffix that is presented in the UI.

+ 1 - 0
docs/provider-oracle-vault.md

@@ -38,6 +38,7 @@ Be sure the `oracle` provider is listed in the `Kind=SecretStore`.
 {% include 'oracle-secret-store.yaml' %}
 {% include 'oracle-secret-store.yaml' %}
 ```
 ```
 
 
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in `privatekey` and `fingerprint` with the namespaces where the secrets reside.
 ### Creating external secret
 ### Creating external secret
 
 
 To create a kubernetes secret from the Oracle Cloud Interface secret a`Kind=ExternalSecret` is needed.
 To create a kubernetes secret from the Oracle Cloud Interface secret a`Kind=ExternalSecret` is needed.

+ 4 - 2
docs/provider-webhook.md

@@ -38,6 +38,8 @@ data:
 
 
 NB: This is obviously not practical because it just returns the key as the result, but it shows how it works
 NB: This is obviously not practical because it just returns the key as the result, but it shows how it works
 
 
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in all `secrets` references with the namespaces where the secrets reside.
+
 Now create an ExternalSecret that uses the above SecretStore:
 Now create an ExternalSecret that uses the above SecretStore:
 
 
 ```yaml
 ```yaml
@@ -107,14 +109,14 @@ spec:
       # Use this name to refer to this secret in templating, above
       # Use this name to refer to this secret in templating, above
       - name: <name>
       - name: <name>
         secretRef:
         secretRef:
-          namespace: <namespace>
+          namespace: <namespace> # Only used in ClusterSecretStores
           name: <name>
           name: <name>
       # Add CAs here for the TLS handshake
       # Add CAs here for the TLS handshake
       caBundle: <base64 encoded cabundle>
       caBundle: <base64 encoded cabundle>
       caProvider:
       caProvider:
         type: Secret or COnfigMap
         type: Secret or COnfigMap
         name: <name of secret or configmap>
         name: <name of secret or configmap>
-        namespace: <namespace>
+        namespace: <namespace> # Only used in ClusterSecretStores
         key: <key inside secret>
         key: <key inside secret>
 ```
 ```
 
 

+ 1 - 0
docs/provider-yandex-lockbox.md

@@ -39,6 +39,7 @@ spec:
           key: authorized-key
           key: authorized-key
 ```
 ```
 
 
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in all `authorizedKeySecretRef` with the namespace where the secret resides.
 ### Creating external secret
 ### Creating external secret
 To make External Secrets Operator sync a k8s secret with a Lockbox secret:
 To make External Secrets Operator sync a k8s secret with a Lockbox secret:
 
 

+ 2 - 0
docs/snippets/provider-aws-access.md

@@ -50,6 +50,7 @@ spec:
             name: awssm-secret
             name: awssm-secret
             key: secret-access-key
             key: secret-access-key
 ```
 ```
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` in `accessKeyIDSecretRef`, `secretAccessKeySecretRef`  with the namespaces where the secrets reside.
 
 
 ### EKS Service Account credentials
 ### EKS Service Account credentials
 
 
@@ -86,3 +87,4 @@ spec:
           serviceAccountRef:
           serviceAccountRef:
             name: my-serviceaccount
             name: my-serviceaccount
 ```
 ```
+**NOTE:** In case of a `ClusterSecretStore`, Be sure to provide `namespace` for `serviceAccountRef` with the namespace where the service account resides.

+ 0 - 1
docs/snippets/vault-approle-store.yaml

@@ -21,5 +21,4 @@ spec:
           # Reference to a key in a K8 Secret that contains the App Role SecretId
           # Reference to a key in a K8 Secret that contains the App Role SecretId
           secretRef:
           secretRef:
             name: "my-secret"
             name: "my-secret"
-            namespace: "secret-admin"
             key: "secret-id"
             key: "secret-id"

+ 0 - 1
docs/snippets/vault-jwt-store.yaml

@@ -19,5 +19,4 @@ spec:
           role: "vault-jwt-role"
           role: "vault-jwt-role"
           secretRef:
           secretRef:
             name: "my-secret"
             name: "my-secret"
-            namespace: "secret-admin"
             key: "jwt-token"
             key: "jwt-token"

+ 0 - 2
docs/snippets/vault-kubernetes-store.yaml

@@ -22,10 +22,8 @@ spec:
           # of a kubernetes ServiceAccount
           # of a kubernetes ServiceAccount
           serviceAccountRef:
           serviceAccountRef:
             name: "my-sa"
             name: "my-sa"
-            namespace: "secret-admin"
           # Optional secret field containing a Kubernetes ServiceAccount JWT
           # Optional secret field containing a Kubernetes ServiceAccount JWT
           #  used for authenticating with Vault
           #  used for authenticating with Vault
           secretRef:
           secretRef:
             name: "my-secret"
             name: "my-secret"
-            namespace: "secret-admin"
             key: "vault"
             key: "vault"

+ 0 - 1
docs/snippets/vault-ldap-store.yaml

@@ -19,5 +19,4 @@ spec:
           username: "username"
           username: "username"
           secretRef:
           secretRef:
             name: "my-secret"
             name: "my-secret"
-            namespace: "secret-admin"
             key: "ldap-password"
             key: "ldap-password"

+ 0 - 1
docs/snippets/vault-token-store.yaml

@@ -14,5 +14,4 @@ spec:
         # https://www.vaultproject.io/docs/auth/token
         # https://www.vaultproject.io/docs/auth/token
         tokenSecretRef:
         tokenSecretRef:
           name: "my-secret"
           name: "my-secret"
-          namespace: "secret-admin"
           key: "vault-token"
           key: "vault-token"