@@ -13,6 +13,7 @@ To setup Akeyless secret store create a component of type `secretstores.akeyless
1313## Component Format
1414
1515``` yaml
16+ # yaml-language-server: $schema=../../component-metadata-schema.json
1617schemaVersion : v1
1718type : secretstores
1819name : akeyless
@@ -22,67 +23,6 @@ title: "Akeyless Secret Store"
2223urls :
2324 - title : Reference
2425 url : https://docs.dapr.io/reference/components-reference/supported-secret-stores/akeyless/
25- authenticationProfiles :
26- - title : API Key
27- description : Authenticate using an API key.
28- metadata :
29- - name : accessId
30- required : true
31- description : The Akeyless Access ID.
32- example : " p-123456780wm"
33- type : string
34- - name : accessKey
35- required : true
36- description : The Akeyless API key.
37- example : " ABCD1233...="
38- type : string
39- sensitive : true
40- - title : JWT
41- description : Authenticate using a JSON Web Token.
42- metadata :
43- - name : accessId
44- required : true
45- description : The Akeyless Access ID.
46- example : " p-123456780wm"
47- type : string
48- - name : jwt
49- required : true
50- description : The JSON Web Token.
51- example : " eyJ..."
52- type : string
53- sensitive : true
54- - title : AWS IAM
55- description : Authenticate using AWS IAM.
56- metadata :
57- - name : accessId
58- required : true
59- description : The Akeyless Access ID.
60- example : " p-123456780wm"
61- type : string
62- - title : Kubernetes
63- description : Authenticate using Kubernetes.
64- metadata :
65- - name : accessId
66- required : true
67- description : The Akeyless Access ID.
68- example : " p-123456780wm"
69- type : string
70- - name : k8sAuthConfigName
71- required : true
72- description : The name of the k8s auth config.
73- example : " k8s-auth-config"
74- type : string
75- - name : k8sGatewayUrl
76- required : true
77- description : The gateway URL that where the k8s auth config is located.
78- example : " http://gw.akeyless.svc.cluster.local:8000"
79- type : string
80- - name : k8sServiceAccountToken
81- required : true
82- description : The service account token.
83- example : " eyJ..."
84- type : string
85- sensitive : true
8626metadata :
8727 - name : gatewayUrl
8828 required : false
@@ -91,6 +31,46 @@ metadata:
9131 default : " https://api.akeyless.io"
9232 example : " https://your.akeyless.gw"
9333 type : string
34+ - name : accessId
35+ required : true
36+ description : |
37+ The Akeyless Access ID. Currently supported authentication methods are: API keys (`access_key`, default), JWT (`jwt`) and AWS IAM (`aws_iam`).
38+ example : " p-123456780wm"
39+ type : string
40+ - name : jwt
41+ required : false
42+ description : |
43+ If using the JWT authentication method, specify it here.
44+ example : " eyJ..."
45+ type : string
46+ sensitive : true
47+ - name : accessKey
48+ required : false
49+ description : |
50+ If using the API key (access_key) authentication method, specify it here.
51+ example : " ABCD1233...="
52+ type : string
53+ sensitive : true
54+ - name : k8sAuthConfigName
55+ required : false
56+ description : |
57+ If using the k8s auth method, specify the name of the k8s auth config.
58+ example : " k8s-auth-config"
59+ type : string
60+ - name : k8sGatewayUrl
61+ required : false
62+ description : |
63+ The gateway URL that where the k8s auth config is located.
64+ example : " http://gw.akeyless.svc.cluster.local:8000"
65+ type : string
66+ - name : k8sServiceAccountToken
67+ required : false
68+ description : |
69+ If using the k8s auth method, specify the service account token. If not specified,
70+ we will try to read it from the default service account token file.
71+ example : " eyJ..."
72+ type : string
73+ sensitive : true
9474` ` `
9575
9676## Spec metadata fields
@@ -112,8 +92,6 @@ We currently support the following authentication methods:
11292
11393# ## [API Key](https://docs.akeyless.io/docs/api-key)
11494
115-
116-
11795` ` ` yaml
11896apiVersion: dapr.io/v1alpha1
11997kind: Component
@@ -197,13 +175,50 @@ The above examples use secrets as plain strings. It is recommended to use a loca
197175
198176# # Retrieve secrets
199177
200- You can retrieve secrets from Akeyless using the Dapr secrets API :
178+ Once configured, you can retrieve secrets using the Dapr secrets API :
201179
202180` ` ` bash
181+ # Get a single secret
203182curl http://localhost:3500/v1.0/secrets/akeyless/my-secret
183+
184+ # Get all secrets (static, dynamic, rotated) from root (/) path
185+ curl http://localhost:3500/v1.0/secrets/akeyless/bulk
186+
187+ # Get all secrets static secrets
188+ curl http://localhost:3500/v1.0/secrets/akeyless/bulk?metadata.secrets_type=static
189+
190+ # Get all static and dynamic secrets from a specific path (/my/org)
191+ curl http://localhost:3500/v1.0/secrets/akeyless/bulk?metadata.secrets_type=static,dynamic&metadata.path=/my/org
204192` ` `
205193
206- This returns the secret value stored in Akeyless with the name `my-secret`.
194+ Or using the Dapr SDK. The example below retrieves all static secrets from path `/path/to/department` :
195+
196+ ` ` ` go
197+ log.Println("Starting test application")
198+ client, err := dapr.NewClient()
199+ if err != nil {
200+ log.Printf("Error creating Dapr client: %v\n ", err)
201+ panic(err)
202+ }
203+ log.Println("Dapr client created successfully")
204+ const daprSecretStore = "akeyless"
205+
206+ defer client.Close()
207+ ctx := context.Background()
208+ akeylessBulkMetadata := map[string]string{
209+ "path": "/path/to/department",
210+ "secrets_type": "static",
211+ }
212+ secrets, err := client.GetBulkSecret(ctx, daprSecretStore, akeylessBulkMetadata)
213+ if err != nil {
214+ log.Printf("Error fetching secrets: %v\n ", err)
215+ panic(err)
216+ }
217+ log.Printf("Found %d secrets: ", len(secrets))
218+ for secretName, secretValue := range secrets {
219+ log.Printf("Secret: %s, Value: %s", secretName, secretValue)
220+ }
221+ ` ` `
207222
208223# # Setup Akeyless instance
209224
0 commit comments