Skip to content
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

Set custom property keys? (repository) #891

Open
StephenOTT opened this issue Dec 30, 2024 · 2 comments
Open

Set custom property keys? (repository) #891

StephenOTT opened this issue Dec 30, 2024 · 2 comments
Labels
type: enhancement A general enhancement

Comments

@StephenOTT
Copy link

StephenOTT commented Dec 30, 2024

Consider a Java class with

Private String connectionUrl

And in vault you want to store it as connection.url

How can this be done using CrudRepository?

Thanks

@StephenOTT StephenOTT changed the title Set custom property keys? Set custom property keys? (repository) Dec 30, 2024
@StephenOTT
Copy link
Author

A nice improvement I think would be allow the crudRepository to use SecretDocument directly so you can do the custom transformations as needed.

Currently if you use a class that extends SecretDocument and then do CrudRepository<ExtendedSecretDocument, String> the transformations treat it as a regular class and not the final SecretDocument to be sent to vault

@mp911de mp911de added the type: enhancement A general enhancement label Jan 13, 2025
@mp911de
Copy link
Member

mp911de commented Jan 13, 2025

Probably it would be the easiest to copy all values from a SecretDocument in MappingVaultConverter upon read/write. Do you want to explore such an approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants