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

Annotation support for temporary password and encrypted secrets #218

Closed
credmond-git opened this issue Oct 2, 2024 · 1 comment
Closed
Assignees
Milestone

Comments

@credmond-git
Copy link
Collaborator

credmond-git commented Oct 2, 2024

Currently to setup a temporary password or an encrypted password you need to use a builder.
For example:

Map<String, String> configs = new HashMap<>();
configs.put("my.password", "abcdef");

GestaltBuilder builder = new GestaltBuilder();
Gestalt gestalt = builder
  .addSource(MapConfigSourceBuilder.builder()
    .setCustomConfig(configs)
    .build())
  .addTemporaryNodeAccessCount("password", 1)
  .build();

Annotation support for temporary password and encrypted secrets

configs.put("my.password", "abcdef@{temporary:4}");

configs.put("my.password", "abcdef@{encrypt}");

The annotation will be removed from the configuration.
So after processing it would look like my.password ="abcdef"

For this to work, with the no cache feature, leaf nodes need to support metadata. Then we add a metadata to not cache the result. We then need to pass up the metadata with a decoded value.

So internally we would wrap all results in a container config object that returns the decoded value with any meta data.
For complex types like classes and records, the meta data will contain all the meta data of the leaf nodes.

@credmond-git credmond-git self-assigned this Oct 2, 2024
@credmond-git
Copy link
Collaborator Author

Fixed in: #225

@credmond-git credmond-git added this to the Gestalt 1.0 milestone Oct 31, 2024
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

No branches or pull requests

1 participant