Skip to content

Conversation

@kgal-akl
Copy link

@kgal-akl kgal-akl commented Sep 19, 2025

Description

Added a new Secret Store component for Akeyless.

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

Issue reference

#4063

Requirements

  • Code compiles correctly, component loaded successfully after compiling local daprd with added Akeyless Secret Store component, secret retrieved:
image

@kgal-akl kgal-akl mentioned this pull request Oct 4, 2025
7 tasks
@kgal-akl kgal-akl marked this pull request as ready for review October 4, 2025 05:09
@kgal-akl kgal-akl requested review from a team as code owners October 4, 2025 05:09
@kgal-akl kgal-akl requested a review from sicoyle October 22, 2025 17:33
@kgal-akl kgal-akl force-pushed the add-akeyless-secretstore branch from a56fc84 to b2a72bf Compare October 22, 2025 19:17
Copy link
Contributor

@sicoyle sicoyle left a comment

Choose a reason for hiding this comment

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

Thank you for iterating with me on this! Here's another batch of feedback for ya - I still have a bit more to review on this, but this is the main I think so far :) 🙌

Copy link

@tuvia-akeyless tuvia-akeyless left a comment

Choose a reason for hiding this comment

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

LGTM. Please verify (manually/tests) it is working for various types of dynamic and rotated secrets.

@kgal-akl

This comment was marked as outdated.

@kgal-akl kgal-akl requested a review from sicoyle November 11, 2025 18:27
@kgal-akl kgal-akl force-pushed the add-akeyless-secretstore branch 3 times, most recently from bc57bc0 to 2718c8f Compare December 1, 2025 18:38
@kgal-akl
Copy link
Author

kgal-akl commented Dec 1, 2025

@sicoyle - can you please review this again? There were a bunch of merge conflicts and it happens every I update the branch.

@kgal-akl kgal-akl force-pushed the add-akeyless-secretstore branch from 850536c to 4226c9f Compare December 9, 2025 19:33
@sicoyle
Copy link
Contributor

sicoyle commented Dec 9, 2025

@sicoyle - can you please review this again? There were a bunch of merge conflicts and it happens every I update the branch.

Hi! Yes, thank you for your patience 🙏 I've been OOO for the past two weeks on vacation. I'm back now :)

@sicoyle
Copy link
Contributor

sicoyle commented Dec 9, 2025

can you please rebase onto main? There are over 10k lines changed now in this PR with a ton of unrelated changes...

@kgal-akl kgal-akl force-pushed the add-akeyless-secretstore branch from 79d16fc to e7bc2f8 Compare December 9, 2025 22:08
Signed-off-by: Kobbi Gal <[email protected]>
Signed-off-by: Kobbi Gal <[email protected]>
Signed-off-by: Kobbi Gal <[email protected]>
@kgal-akl kgal-akl force-pushed the add-akeyless-secretstore branch from e7bc2f8 to bb84293 Compare December 9, 2025 22:13
@kgal-akl
Copy link
Author

kgal-akl commented Dec 9, 2025

can you please rebase onto main? There are over 10k lines changed now in this PR with a ton of unrelated changes...

@sicoyle should be all cleaned up now. FYI, since your last review I added a few things:

  • Added support for authentication options for k8s, AWS IAM.
  • Added refresh token mechanism
  • Added support for filtering when bulk secret retrieval using path/secret type query params.

Copy link
Contributor

@sicoyle sicoyle left a comment

Choose a reason for hiding this comment

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

few comments so far with the additions. I will circle back again either later today or tomorrow for updates - thank you! :) Also as long as we get this merged sometime this month then this should be in the clear imo to make the next official dapr 1.17 release set for January🎉

// akeylessMetadata contains the metadata for the Akeyless secret store.
type akeylessMetadata struct {
GatewayURL string `json:"gatewayUrl" mapstructure:"gatewayUrl"`
GatewayTLSCA string `json:"gatewayTLSCA" mapstructure:"gatewayTLSCA"`
Copy link
Contributor

Choose a reason for hiding this comment

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

GatewayTLSCA -> GatewayTlsCa please
Also, can any of these become unexported fields instead of exported?

Copy link
Author

@kgal-akl kgal-akl Dec 10, 2025

Choose a reason for hiding this comment

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

GatewayTLSCA -> GatewayTlsCa please

Rename resolved in commit 91b9871.

can any of these become unexported fields instead of exported?
As far as I can tell, metadata fields need to be exported. The fields must remain exported. In metadata/utils.go (lines 219-221):

// fields that are not exported cannot be set via the mapstructure metadata decoding mechanism
if !currentField.IsExported() {
    continue
}

This means:

  • kitmd.DecodeMetadata (used in parseMetadata) uses mapstructure, which requires exported fields for reflection.
  • GetComponentMetadata uses GetMetadataInfoFromStructType, which skips unexported fields.

If we lowercase these fields:

  • parseMetadata would fail to decode metadata from the configuration.
  • GetComponentMetadata would skip them, breaking metadata documentation generation.

So I believe it's better to leave the fields as is.

However, I did find that some of the secret store receiver functions can be unexported since they're only used within the akeyless package (in test and other functions). I unexported them in commit ff08e2a.

Copy link
Author

Choose a reason for hiding this comment

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

Looks like the linter is actually asking me to rename GatewayTlsCa to GatewayTLSCa:

secretstores/akeyless/utils.go:281:22           stylecheck     ST1003: func parameter gatewayTlsCa should be gatewayTLSCa

Should I revert the change or just add annotate/ignore it?

Comment on lines 492 to 494
if reauthErr := a.ensureValidToken(ctx); reauthErr != nil {
return fmt.Errorf("failed to re-authenticate after 401: %w", reauthErr)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

honestly this seems to me like it belongs elsewhere and we should have a dynamic client. Can you reference

func (x *X509) RefreshX509(ctx context.Context) error {

see here using "latest" clients creds https://github.com/dapr/components-contrib/blob/main/common/component/kafka/clients.go#L14

Copy link
Author

Choose a reason for hiding this comment

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

I refactored this method, see #4036.

Are you suggesting that I create a new client in common/akeyless/client.go and move this logic there? Are we expecting other components to utilize Akeyless clients and this is why we want to move this logic to common?

@kgal-akl kgal-akl requested a review from sicoyle December 10, 2025 18:47
@kgal-akl
Copy link
Author

@sicoyle - I've finished going over the PR comments, let me know what you think.

Also, can you please let me know what I need to do to resolve this/(your sister's?) comment?

@sicoyle
Copy link
Contributor

sicoyle commented Dec 10, 2025

@sicoyle - I've finished going over the PR comments, let me know what you think.

Also, can you please let me know what I need to do to resolve this/(your sister's?) dapr/dapr#9181 (comment)?

Hahah yeah she's my twin actually! So after this PR is merged then in your PR in dapr/dapr you have to bump the components-contrib go mod reference and push that as well so dapr/dapr knows about your changes here. Essentially it will be a:

go get github.com/dapr/components-contrib@<grab commit sha from contrib main branch with this PR merged>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants