Skip to content

Support secret placeholders in generic configuration templates #2156

Description

@Caylipp

Feature idea

As an IDEasy user, I want generic secret placeholders in configuration templates to be resolved during template instantiation, so that project specific settings can safely contain placeholders for user specific secrets without committing real credentials to Git.

For project specific IDEasy settings, shared templates can be provided under templates/conf/. During ide create, these templates are copied into the local conf folder.

For example, a Claude configuration template can be placed under templates/conf/claude/settings.json and is copied to conf/claude/settings.json.

The Claude configuration requires a user specific API key. Currently, the template has to use a static placeholder like INSERT_API_KEY_HERE, and each developer has to manually replace it in the generated local file.

IDEasy should support generic secret placeholders in templates, for example $[secret:ai-api-key].

When IDEasy instantiates templates during ide create, it should detect such placeholders and ask the user interactively for the secret value, similar to the existing Maven secret handling.

Example prompt: Please enter secret value for variable ai-api-key:

Example template value: "ANTHROPIC_API_KEY": "$[secret:ai-api-key]"

Example generated local value after user input: "ANTHROPIC_API_KEY": "<user-provided-secret>"

The entered value should only be written to the generated local configuration file, for example conf/claude/settings.json. It must never be written back to the settings repository.

This should work for generic templates under templates/conf/, not only for Maven specific files.

Additional context

Maven settings already have special secret handling in IDEasy. During setup, IDEasy can prompt for Maven repository credentials and write them only to the local Maven configuration.

This feature request is about providing a similar mechanism for generic non Maven configuration templates, such as:

templates/conf/claude/settings.json

Current workaround:

{
  "env": {
    "ANTHROPIC_API_KEY": "INSERT_API_KEY_HERE"
  }
}

Metadata

Metadata

Assignees

Labels

configurationshould be configurable or configuration changeenhancementNew feature or requestsecurityCVEs or other vulnerabilitiessettingside-settings repo and replated processes and features

Fields

No fields configured for Feature.

Projects

Status
🆕 New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions