Skip to content

Managing Secrets with the JSON Editor

The STACKIT Secrets Manager allows you to store complex data structures using the JSON Editor. This is particularly useful for configuration files or nested data that goes beyond simple key-value pairs.

When creating a new secret in the STACKIT Portal, you can choose between the standard Key-Value mode and the JSON Editor.

  1. Navigate to your Secrets Manager instance.
  2. Click on Create Secret.
  3. Toggle the view to JSON.
  4. Enter your valid JSON object (e.g., nested objects or arrays).
  5. Click Order to save the new version.

Every time you save changes in the JSON Editor, a new version of the secret is created. This ensures that you can always audit changes or roll back if a configuration error occurs.

  • Validation: Ensure your JSON is valid; otherwise, the Portal will prevent the creation of a new version.

The Portal allows you to switch between the two modes, but you should be aware of how the data is converted:

  • Simple Pairs: If your JSON only contains top-level keys with string/number values, switching to Key-Value mode and back works seamlessly.
{
"Key_1": "Value_A",
"Key_2": "Value_B"
}
  • Nested Structures & Visual Merging: If your JSON contains nested objects or arrays, the Portal displays them as formatted JSON blocks within the value field. While the structure remains readable, it is treated as a single value rather than individual key-value rows.
{
"Key_1": "Value_A",
"Parent_Group": {
"Child_Key_1": "Value_X",
"Child_Key_2": "Value_Y"
}
}