Skip to main content

Secure config manager. Access app secrets easily without sharing them to public.

Project description

secure-config-manager

Description

Secure ConfigManager offers splitting your JSON config files into two parts.

We suggest one main config.json file that can be safely checked out to version control system. This can contain default values or a sample config structure for reference. The second one would be config_override.json, containing secret tokens or environment-dependent values.

Data in config_override.json is assumed to be more relevant, hence if the value is present in both configs, we choose config_override.

Usage example

>>> from secure_config_manager import ConfigManager
>>> config_manager = ConfigManager(config_path="tests/test_config.json", config_override_path="tests/test_config_override.json", redacted_keys=("secret", "key"))
>>> config_manager.load_config_with_override()
{'key_a': {'attr1': 'value1', 'attr2': 'new_value', 'attr_secret': 'secret_value'}, 'key_b': {'attr1': 1}, 'key_c': {'app_key': 'sensitive_value'}}
>>> config_manager.redact(config_manager.get_key_a_config())
{'attr1': 'value1', 'attr2': 'new_value', 'attr_secret': '*****'}

Notes:

  • ConfigManager is a singleton class
  • ConfigManager is application-agnostic and can be used in any Python 3.x project of your choice

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

secure-config-manager-0.0.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

secure_config_manager-0.0.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file secure-config-manager-0.0.2.tar.gz.

File metadata

  • Download URL: secure-config-manager-0.0.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for secure-config-manager-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7ae26e09d33952438cddb333d19c6a8eb3de93a99bf4e2b81956116bc88b2251
MD5 df53cd13328ec3796adf41e676c7405b
BLAKE2b-256 ce64d52c06bfe01556671da33b5a1551b56c542cf5c3941e690819921f4aaa2d

See more details on using hashes here.

File details

Details for the file secure_config_manager-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for secure_config_manager-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5499ac73cfdbeb89ca29aded9eb6e06061b5b3949e2ce32dfba43af2ac499255
MD5 bacb0dd9e0860f5f1406bbbcf565f45d
BLAKE2b-256 b6f34ac8c0ee9aec5e43f4e12e80204223adbbf7056e9a9b95ee3f4c5088d094

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page