Skip to main content

Remove secrets from logging

Project description

Project generated with PyScaffold

securelogging

Remove secrets from logging

This project enables redaction in logs based on a global set of secrets. These secrets are managed by add_secret and remove_secret.

In this example, we have a key that we want to have a key redacted from the log. To accomplish this, we need to define the key and add it to secret. When we generate our logger, we do it within UseLoggingRedactor. When the message is logged, it will appear as beanbean - Assigned key: JH***QE

Since the log record is modified, propagation still occurs as expected, but will do so with the redacted message. The output of this will be

beanbean - Assigned key: JH***QE
bean - Assigned key: JH***QE

You can also redact a single message. This could be useful if you normally do not want something redacted, but in specific use-cases you need it to be redacted. The output of this will be

Assigned non-redacted key: JHKLASDJKQWEBBNMASDHJK:LGHJKWQE
Assigned non-redacted key: JH***QE

Note

This project has been set up using PyScaffold 4.6. For details and usage information on PyScaffold see https://pyscaffold.org/.

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

securelogging-1.0.1.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

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

securelogging-1.0.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file securelogging-1.0.1.tar.gz.

File metadata

  • Download URL: securelogging-1.0.1.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for securelogging-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9ddd7f9d387536e2a19648c8e68de973b95bfef828e3c0a824c510710313fdc7
MD5 b96561a6ce12a67af6903605795514da
BLAKE2b-256 4d9e6c68009da6a3021a3629e91056198cebd44f3ee57a57a16e2f78999a6e7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for securelogging-1.0.1.tar.gz:

Publisher: release.yaml on Expl0dingBanana/securelogging

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file securelogging-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: securelogging-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for securelogging-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1445f92a5555d94702eec07ff253ee17bd63aba5bdd3e6af1ec3f7b29e1a50c
MD5 751a2fda6cbd1d2325502b0e782dadf9
BLAKE2b-256 b535ccc85faccc16b81523b1e170ab2a703e7b1333b4a9805f546c5c79414326

See more details on using hashes here.

Provenance

The following attestation bundles were made for securelogging-1.0.1-py3-none-any.whl:

Publisher: release.yaml on Expl0dingBanana/securelogging

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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