You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -58,10 +56,8 @@ The `allowedSecrets` and `deniedSecrets` list values take priority over the `def
58
56
59
57
### Scenario 1: Deny access to all secrets for a secret store
60
58
61
-
In a Kubernetes cluster, the native Kubernetes secret store is added to your Dapr application by default. In some scenarios, it may be necessary to deny access to Dapr secrets for a given application. To add this configuration:
62
59
In a Kubernetes cluster, the native Kubernetes secret store is added to your Dapr application by default. In some scenarios, it may be necessary to deny access to Dapr secrets for a given application. To add this configuration:
63
60
64
-
1. Define the following `appconfig.yaml`.
65
61
1. Define the following `appconfig.yaml`.
66
62
67
63
```yaml
@@ -75,26 +71,8 @@ In a Kubernetes cluster, the native Kubernetes secret store is added to your Dap
75
71
- storeName: kubernetes
76
72
defaultAccess: deny
77
73
```
78
-
```yaml
79
-
apiVersion: dapr.io/v1alpha1
80
-
kind: Configuration
81
-
metadata:
82
-
name: appconfig
83
-
spec:
84
-
secrets:
85
-
scopes:
86
-
- storeName: kubernetes
87
-
defaultAccess: deny
88
-
```
89
-
90
-
1. Apply it to the Kubernetes cluster using the following command:
91
-
92
-
```bash
93
-
kubectl apply -f appconfig.yaml`.
94
-
```
95
74
96
-
For applications that you need to deny access to the Kubernetes secret store, follow [the Kubernetes instructions]({{% ref kubernetes-overview %}}), adding the following annotation to the application pod.
97
-
1. Apply it to the Kubernetes cluster using the following command:
75
+
2. Apply it to the Kubernetes cluster using the following command:
98
76
99
77
```bash
100
78
kubectl apply -f appconfig.yaml`.
@@ -108,7 +86,6 @@ dapr.io/config: appconfig
108
86
109
87
With this defined, the application no longer has access to Kubernetes secret store.
110
88
111
-
### Scenario 2: Allow access to only certain secrets in a secret store
112
89
### Scenario 2: Allow access to only certain secrets in a secret store
113
90
114
91
To allow a Dapr application to have access to only certain secrets, define the following `config.yaml`:
@@ -126,7 +103,6 @@ spec:
126
103
allowedSecrets: ["secret1", "secret2"]
127
104
```
128
105
129
-
This example defines configuration for secret store named `vault`. The default access to the secret store is `deny`. Meanwhile, some secrets are accessible by the application based on the `allowedSecrets` list. Follow [the Sidecar configuration instructions]({{% ref "configuration-overview.md#sidecar-configuration" %}}) to apply configuration to the sidecar.
130
106
This example defines configuration for secret store named `vault`. The default access to the secret store is `deny`. Meanwhile, some secrets are accessible by the application based on the `allowedSecrets` list. Follow [the Sidecar configuration instructions]({{% ref "configuration-overview.md#sidecar-configuration" %}}) to apply configuration to the sidecar.
131
107
132
108
### Scenario 3: Deny access to certain sensitive secrets in a secret store
@@ -151,9 +127,3 @@ This configuration explicitly denies access to `secret1` and `secret2` from the
This configuration explicitly denies access to `secret1` and `secret2` from the secret store named `vault,` while allowing access to all other secrets. Follow [the Sidecar configuration instructions]({{% ref "configuration-overview.md#sidecar-configuration" %}}) to apply configuration to the sidecar.
0 commit comments