Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4a14e89
Add Akeyless Secrets Store Component
kgal-akl Sep 19, 2025
8ab2a41
mv metadata validation to parsing func
kgal-akl Sep 24, 2025
b1bf217
cleanup daprbot (#4033)
cicoyle Sep 22, 2025
7ab853b
[1.17] Close file after write (#4034)
javier-aliaga Sep 23, 2025
d43962a
retrieve static secrets only
kgal-akl Sep 24, 2025
046f2cc
cleaned up tests
kgal-akl Sep 26, 2025
9ed7741
added support for single static secret json/kv and password type
kgal-akl Sep 26, 2025
3307f22
cleaned up getsinglesecretvalue to have one return statement
kgal-akl Oct 2, 2025
d2ce2dd
added single dynamic secret value support
kgal-akl Oct 2, 2025
9c253e5
added single rotated secret value support
kgal-akl Oct 2, 2025
1145b60
moved funcs to ak store receiver
kgal-akl Oct 2, 2025
b56ac12
wip: fix get bulk secret ut
kgal-akl Oct 2, 2025
2cbffc0
fix get bulk secret ut
kgal-akl Oct 2, 2025
2c0b13d
use item type from list items instead of calling describe item again
kgal-akl Oct 2, 2025
a661a98
added test for recursivity
kgal-akl Oct 2, 2025
d5eefe6
mv isactive func to utils
kgal-akl Oct 3, 2025
e58b3e9
retrieve all details when listing items (for item state)
kgal-akl Oct 3, 2025
bbb86e4
added k8s auth
kgal-akl Oct 4, 2025
cd18d5d
added k8s auth conf to example
kgal-akl Oct 20, 2025
55c43f4
added k8s auth conf to readme
kgal-akl Oct 20, 2025
9751d3b
rm unneeded util func
kgal-akl Oct 22, 2025
8f47044
rm example.yaml
kgal-akl Oct 22, 2025
de52964
generified dynamic/rotated secret values to return json string
kgal-akl Oct 22, 2025
17ae7db
updated docs to include response changes
kgal-akl Oct 22, 2025
a31c98f
shortened consts
kgal-akl Oct 22, 2025
5d28332
propagated ctx
kgal-akl Oct 22, 2025
8a0522b
validate 200 returned for auth request
kgal-akl Oct 22, 2025
b2a72bf
mv auth func up
kgal-akl Oct 22, 2025
bcd16ac
Merge branch 'main' into add-akeyless-secretstore
kgal-akl Oct 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ require (
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/IBM/sarama v1.45.2
github.com/aerospike/aerospike-client-go/v6 v6.12.0
github.com/akeylesslabs/akeyless-go-cloud-id v0.3.5
github.com/akeylesslabs/akeyless-go/v5 v5.0.8
github.com/alibaba/sentinel-golang v1.0.4
github.com/alibabacloud-go/darabonba-openapi v0.2.1
github.com/alibabacloud-go/oos-20190601 v1.0.4
Expand Down
83 changes: 83 additions & 0 deletions go.sum

Large diffs are not rendered by default.

171 changes: 171 additions & 0 deletions secretstores/akeyless/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# Akeyless Secret Store

This component provides a Dapr secret store implementation for [Akeyless](https://www.akeyless.io/), a cloud-native secrets management platform.

## Configuration

- [API Key](https://docs.akeyless.io/docs/api-key)
- [OAuth2.0/JWT](https://docs.akeyless.io/docs/oauth20jwt)
- [AWS IAM](https://docs.akeyless.io/docs/aws-iam)
- [Kubernetes](https://docs.akeyless.io/docs/kubernetes-auth)

### Authentication

The Akeyless secret store component supports the following configuration options:

| Field | Required | Description | Example |
|-------|----------|-------------|---------|
| `gatewayUrl` | No | The Akeyless Gateway URL. Default is https://api.akeyless.io. | `https://your-gateway.akeyless.io` |
| `accessId` | Yes | The Akeyless authentication access ID. | `p-123456780wm` |
| `jwt` | No | If using an OAuth2.0/JWT access ID, specify the JSON Web Token | `eyJ...` |
| `accessKey` | No | If using an API Key access ID, specify the API key | `ABCD123...=` |
| `k8sAuthConfigName` | No | If using the k8s auth method, specify the name of the k8s auth config. | `k8s-auth-config` |
| `k8sGatewayUrl` | No | The gateway URL that where the k8s auth config is located. | `http://gw.akeyless.svc.cluster.local:8000` |
| `k8sServiceAccountToken` | No | If using the k8s auth method, specify the service account token. If not specified,
we will try to read it from the default service account token file. | `eyJ...` |

We currently support the following [Authentication Methods](https://docs.akeyless.io/docs/access-and-authentication-methods):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We currently support the following [Authentication Methods](https://docs.akeyless.io/docs/access-and-authentication-methods):
While the Akeyless Dapr Secretstore only supports AWS IAM and Kubernetes JWT authentication, Akeyless in general currently supports the following [authentication methods](https://docs.akeyless.io/docs/access-and-authentication-methods).

or something along these lines pls



## Example Configuration: API Key

```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: akeyless-secretstore
spec:
type: secretstores.akeyless
version: v1
metadata:
- name: gatewayUrl
value: "https://your-gateway.akeyless.io"
- name: accessId
value: "p-1234Abcdam"
- name: accessKey
value: "ABCD1233...="
```


## Example Configuration: JWT

```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: akeyless-secretstore
spec:
type: secretstores.akeyless
version: v1
metadata:
- name: gatewayUrl
value: "https://your-gateway.akeyless.io"
- name: accessId
value: "p-1234Abcdom"
- name: jwt
value: "eyJ....."
```

## Example Configuration: AWS IAM

```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: akeyless
spec:
type: secretstores.akeyless
version: v1
metadata:
- name: gatewayUrl
value: "https://your-gateway.akeyless.io"
- name: accessId
value: "p-1234Abcdwm"
```

## Example Configuration: Kubernetes

```yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: akeyless
spec:
type: secretstores.akeyless
version: v1
metadata:
- name: gatewayUrl
value: "https://gw.akeyless.svc.cluster.local"
- name: accessId
value: "p-1234Abcdwm"
- name: k8sAuthConfigName
value: "us-east-1-prod-akeyless-k8s-conf"
- name: k8sGatewayUrl
value: https://gw.akeyless.svc.cluster.local
```

## Usage

Once configured, you can retrieve secrets using the Dapr secrets API/SDK:

```bash
# Get a single secret
curl http://localhost:3500/v1.0/secrets/akeyless/my-secret

# Get all secrets
curl http://localhost:3500/v1.0/secrets/akeyless/bulk
```

## Features

- Supports static, dynamic and rotated secrets.
- **GetSecret**: Retrieve an individual value secret by path.
- **BulkGetSecret**: Retrieve an all secrets from the root path.

## Response Formats

The Akeyless secret store returns different response formats depending on the secret type:

### Static Secrets
Static secrets return their value directly as a string:

```json
{
"my-static-secret": "secret-value"
}
```

### Dynamic Secrets
Dynamic secrets return a JSON string containing the credentials. The exact structure depends on the target system:

**MySQL Dynamic Secret:**
```json
{
"my-mysql-secret": "{\"user\":\"generated_username\",\"password\":\"generated_password\",\"ttl_in_minutes\":\"60\",\"id\":\"username\"}"
}
```

**Azure AD Dynamic Secret:**
```json
{
"my-azure-secret": "{\"user\":{\"id\":\"user_id\",\"displayName\":\"user_name\",\"mail\":\"[email protected]\"},\"secret\":{\"keyId\":\"secret_key_id\",\"displayName\":\"secret_name\",\"tenantId\":\"tenant_id\"},\"ttl_in_minutes\":\"60\",\"id\":\"user_id\",\"msg\":\"User has been added successfully...\"}"
}
```

**GCP Dynamic Secret:**
```json
{
"my-gcp-secret": "{\"encoded_key\":\"base64_encoded_service_account_key\",\"ttl_in_minutes\":\"60\",\"id\":\"service_account_name\"}"
}
```

### Rotated Secrets
Rotated secrets return a JSON object containing all available fields:

```json
{
"my-rotated-secret": "{\"value\":{\"username\":\"rotated_user\",\"password\":\"rotated_password\",\"application_id\":\"1234567890\"}}"
}
```

**Note:** The exact fields in dynamic and rotated secret responses vary by target system and configuration. Applications should parse the JSON string to extract the specific credentials they need.
Loading