Skip to content

Conversation

cwadhwani-splunk
Copy link
Contributor

@cwadhwani-splunk cwadhwani-splunk commented Oct 15, 2025

Description

Handled the creation and deletion of secrets from docker entrypoint using json file, instead of executing manage_secrets.py for each secrets before installation.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • New feature
  • Refactor/improvement
  • This change requires a documentation update

How Has This Been Tested?

Tested locally

Checklist

  • My commit message is conventional
  • I have run pre-commit on all files before creating the PR
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

@cwadhwani-splunk cwadhwani-splunk force-pushed the fix/manage_v3_secret_from_docker_entrypoint branch from 83b7a51 to c4c8a89 Compare October 16, 2025 08:11
Copy link
Contributor

@omrozowicz-splunk omrozowicz-splunk left a comment

Choose a reason for hiding this comment

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

this approach indeed looks easier, but I'm wondering what would be the consequence if they run it with the previously generated secrets? is there any option to smooth it out?

From SC4SNMP 1.15.0, this process has been simplified and can manage all SNMPv3 secrets using a single secrets.json file.

#### 1. For setups not yet migrated to latest version
First, delete all existing secrets from docker-compose.yaml using manage_secrets.py with the following flags:
Copy link
Contributor

Choose a reason for hiding this comment

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

will it fail if the user won't do it? I'm afraid nobody's reading the documentation 😂

| `--path_to_compose` | Absolute path to directory with docker compose files |
| `--delete` | Set this flag to true to delete the secret |

This will delete the secret with a given name from all docker compose files. If this secret hasn't been deleted from `.env`
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there an option to delete all?

--contextEngineId 090807060504037
```
To create a new secret,
create secrets.json file inside folder (at SECRET_FOLDER_PATH), add entry for the new secrets with all the details.
Copy link
Contributor

Choose a reason for hiding this comment

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

let's add `` to secrets.json

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants