- 
                Notifications
    You must be signed in to change notification settings 
- Fork 542
Add Akeyless Secrets Store Component #4036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            kgal-akl
  wants to merge
  29
  commits into
  dapr:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
akeylesslabs:add-akeyless-secretstore
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
      
        
          +2,231
        
        
          −0
        
        
          
        
      
    
  
  
     Open
                    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 8ab2a41
              
                mv metadata validation to parsing func
              
              
                kgal-akl b1bf217
              
                cleanup daprbot (#4033)
              
              
                cicoyle 7ab853b
              
                [1.17] Close file after write (#4034)
              
              
                javier-aliaga d43962a
              
                retrieve static secrets only
              
              
                kgal-akl 046f2cc
              
                cleaned up tests
              
              
                kgal-akl 9ed7741
              
                added support for single static secret json/kv and password type
              
              
                kgal-akl 3307f22
              
                cleaned up getsinglesecretvalue to have one return statement
              
              
                kgal-akl d2ce2dd
              
                added single dynamic secret value support
              
              
                kgal-akl 9c253e5
              
                added single rotated secret value support
              
              
                kgal-akl 1145b60
              
                moved funcs to ak store receiver
              
              
                kgal-akl b56ac12
              
                wip: fix get bulk secret ut
              
              
                kgal-akl 2cbffc0
              
                fix get bulk secret ut
              
              
                kgal-akl 2c0b13d
              
                use item type from list items instead of calling describe item again
              
              
                kgal-akl a661a98
              
                added test for recursivity
              
              
                kgal-akl d5eefe6
              
                mv isactive func to utils
              
              
                kgal-akl e58b3e9
              
                retrieve all details when listing items (for item state)
              
              
                kgal-akl bbb86e4
              
                added k8s auth
              
              
                kgal-akl cd18d5d
              
                added k8s auth conf to example
              
              
                kgal-akl 55c43f4
              
                added k8s auth conf to readme
              
              
                kgal-akl 9751d3b
              
                rm unneeded util func
              
              
                kgal-akl 8f47044
              
                rm example.yaml
              
              
                kgal-akl de52964
              
                generified dynamic/rotated secret values to return json string
              
              
                kgal-akl 17ae7db
              
                updated docs to include response changes
              
              
                kgal-akl a31c98f
              
                shortened consts
              
              
                kgal-akl 5d28332
              
                propagated ctx
              
              
                kgal-akl 8a0522b
              
                validate 200 returned for auth request
              
              
                kgal-akl b2a72bf
              
                mv auth func up
              
              
                kgal-akl bcd16ac
              
                Merge branch 'main' into add-akeyless-secretstore
              
              
                kgal-akl File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              Large diffs are not rendered by default.
      
      Oops, something went wrong.
      
    
  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | 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): | ||
|  | ||
|  | ||
| ## 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:** | ||
|         
                  kgal-akl marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| ```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. | ||
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or something along these lines pls