|
| 1 | +--- |
| 2 | +type: docs |
| 3 | +title: "Akeyless" |
| 4 | +linkTitle: "Akeyless" |
| 5 | +description: Information about the Akeyless secret store component configuration. |
| 6 | +--- |
| 7 | + |
| 8 | +## Create the Akeyless component |
| 9 | + |
| 10 | +To setup Akeyless secret store create a component of type `secretstores.akeyless`. See [this guide]({{% ref "setup-secret-store.md#apply-the-configuration" %}}) on how to create and apply a secretstore configuration. See this guide on [referencing secrets]({{% ref component-secrets.md %}}) to retrieve and use the secret with Dapr components. |
| 11 | + |
| 12 | + |
| 13 | +## Component Format |
| 14 | + |
| 15 | +```yaml |
| 16 | +schemaVersion: v1 |
| 17 | +type: secretstores |
| 18 | +name: akeyless |
| 19 | +version: v1 |
| 20 | +status: beta |
| 21 | +title: "Akeyless Secret Store" |
| 22 | +urls: |
| 23 | + - title: Reference |
| 24 | + 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 |
| 86 | +metadata: |
| 87 | + - name: gatewayUrl |
| 88 | + required: false |
| 89 | + description: | |
| 90 | + The URL to the Akeyless Gateway API. Default is https://api.akeyless.io. |
| 91 | + default: "https://api.akeyless.io" |
| 92 | + example: "https://your.akeyless.gw" |
| 93 | + type: string |
| 94 | +``` |
| 95 | +
|
| 96 | +## Spec metadata fields |
| 97 | +
|
| 98 | +| Field | Required | Details | Example | |
| 99 | +|--------------------|:--------:|-------------------------------------------------------------------------|---------------------| |
| 100 | +| `gatewayUrl` | N | The Akeyless Gateway API URL. Defaults to https://api.akeyless.io. | `http://gw-release.akeyless.svc.cluster.local:8000/api/v2` | |
| 101 | +| `accessID` | Y | The Akeyless Access ID of the authentication method | `p-1234567890` | |
| 102 | +| `accessKey` | N | Fill in when using an API Key (`access_key`) authentication method. | `ABCD1233...=` | |
| 103 | +| `jwt` | N | Fill in a `base64`-encoded string of the JWT when using OAuth2.0/JWT (`jwt`) authentication method | `eyJ...` | |
| 104 | +| `k8sAuthConfigName` | N | Fill in when using Kubernetes Authentication (`k8s`) authentication method | `my-k8s-auth-conf` | |
| 105 | +| `k8sGatewayUrl` | N | Fill in when using Kubernetes Authentication (`k8s`) authentication method. If not filled in, will default to value set for `akeylessGWApiURL`. | `http://gw-release.akeyless.svc.cluster.local:8000/api/v2` | |
| 106 | +| `k8sServiceAccountToken` | N | Fill in a `base64`-encoded string of the JWT when using Kubernetes Authentication (`k8s`) authentication method. If not filled in, will read from k8s token in container filesystem | `ej...` | |
| 107 | + |
| 108 | + |
| 109 | +## Authentication Methods |
| 110 | + |
| 111 | +We currently support the following authentication methods: |
| 112 | + |
| 113 | +### [API Key](https://docs.akeyless.io/docs/api-key) |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | +```yaml |
| 118 | +apiVersion: dapr.io/v1alpha1 |
| 119 | +kind: Component |
| 120 | +metadata: |
| 121 | + name: akeyless |
| 122 | +spec: |
| 123 | + type: secretstores.akeyless |
| 124 | + version: v1 |
| 125 | + metadata: |
| 126 | + - name: gatewayUrl |
| 127 | + value: "https://api.akeyless.io" |
| 128 | + - name: accessId |
| 129 | + value: "p-123..." |
| 130 | + - name: accessKey |
| 131 | + value: "ABCD1233...=" |
| 132 | +``` |
| 133 | + |
| 134 | +### [AWS IAM](https://docs.akeyless.io/docs/aws-iam) |
| 135 | + |
| 136 | +```yaml |
| 137 | +apiVersion: dapr.io/v1alpha1 |
| 138 | +kind: Component |
| 139 | +metadata: |
| 140 | + name: akeyless |
| 141 | +spec: |
| 142 | + type: secretstores.akeyless |
| 143 | + version: v1 |
| 144 | + metadata: |
| 145 | + - name: gatewayUrl |
| 146 | + value: "https://api.akeyless.io" |
| 147 | + - name: accessId |
| 148 | + value: "p-123..." |
| 149 | +``` |
| 150 | + |
| 151 | +### [OAuth2.0/JWT](https://docs.akeyless.io/docs/oauth20jwt) |
| 152 | + |
| 153 | +```yaml |
| 154 | +apiVersion: dapr.io/v1alpha1 |
| 155 | +kind: Component |
| 156 | +metadata: |
| 157 | + name: akeyless |
| 158 | +spec: |
| 159 | + type: secretstores.akeyless |
| 160 | + version: v1 |
| 161 | + metadata: |
| 162 | + - name: gatewayUrl |
| 163 | + value: "https://api.akeyless.io" |
| 164 | + - name: accessId |
| 165 | + value: "p-123..." |
| 166 | + - name: jwt |
| 167 | + value: "eyJ..." |
| 168 | +``` |
| 169 | + |
| 170 | +### [Kubernetes](https://docs.akeyless.io/docs/kubernetes-auth) |
| 171 | + |
| 172 | +```yaml |
| 173 | +apiVersion: dapr.io/v1alpha1 |
| 174 | +kind: Component |
| 175 | +metadata: |
| 176 | + name: akeyless |
| 177 | +spec: |
| 178 | + type: secretstores.akeyless |
| 179 | + version: v1 |
| 180 | + metadata: |
| 181 | + - name: gatewayUrl |
| 182 | + value: "http://release-gw.akeyless.svc.cluster.local:8000/api/v2" |
| 183 | + - name: accessID |
| 184 | + value: "p-123..." |
| 185 | + - name: k8sAuthConfigName |
| 186 | + value: "my-k8s-auth-config" |
| 187 | + - name: k8sGatewayUrl |
| 188 | + value: "http://release-gw.akeyless.svc.cluster.local:8000/api/v2" |
| 189 | + - name: k8sServiceAccountToken |
| 190 | + value: "eyJ..." |
| 191 | +``` |
| 192 | + |
| 193 | +{{% alert title="Warning" color="warning" %}} |
| 194 | +The above examples use secrets as plain strings. It is recommended to use a local secret store such as [Kubernetes secret store]({{% ref kubernetes-secret-store.md %}}) or a [local file]({{% ref file-secret-store.md %}}) to bootstrap secure key storage. |
| 195 | +{{% /alert %}} |
| 196 | + |
| 197 | + |
| 198 | +## Retrieve secrets |
| 199 | + |
| 200 | +You can retrieve secrets from Akeyless using the Dapr secrets API: |
| 201 | + |
| 202 | +```bash |
| 203 | +curl http://localhost:3500/v1.0/secrets/akeyless/my-secret |
| 204 | +``` |
| 205 | + |
| 206 | +This returns the secret value stored in Akeyless with the name `my-secret`. |
| 207 | + |
| 208 | +## Setup Akeyless instance |
| 209 | + |
| 210 | +To get started with Akeyless: |
| 211 | + |
| 212 | +1. Sign up for an Akeyless account at [https://www.akeyless.io](https://www.akeyless.io) |
| 213 | +2. Create an Access ID and configure your preferred authentication method. |
| 214 | +3. Set up your secrets in the Akeyless. |
| 215 | +4. Configure the Dapr component using one of the authentication methods above. |
| 216 | + |
| 217 | +For more detailed setup instructions, refer to the [Akeyless documentation](https://docs.akeyless.io/). |
| 218 | + |
| 219 | +## Related links |
| 220 | + |
| 221 | +- [Secrets building block]({{% ref secrets %}}) |
| 222 | +- [How-To: Retrieve a secret]({{% ref "howto-secrets.md" %}}) |
| 223 | +- [How-To: Reference secrets in Dapr components]({{% ref component-secrets.md %}}) |
| 224 | +- [Secrets API reference]({{% ref secrets_api.md %}}) |
0 commit comments