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 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it will not fail. Just the undeleted secrets will still be present as secrets inside the container.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok and if somebody migrate to the newest version (both package and images) they need to go through the process of secret creation once again?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes need to create again, as they would have to upgrade the containers after migration.

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