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.0.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.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: securelogging-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 f9c96021e960ce9be0eded13870e7dd27a674b6e1b67eb5873647b306720f216
MD5 b71b9aed1b6d0d24e1f0ae5c762178d2
BLAKE2b-256 365bda594748892a59d5279196d88432a38304b4381ea1862e15385d6dc09d00

See more details on using hashes here.

Provenance

The following attestation bundles were made for securelogging-1.0.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: securelogging-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27c88a68d02cb0fafeda45c78fd49515c6fed84ffed6398642418024fbf7746c
MD5 cc1d6f734b70fb4336d5d5e44fedf53a
BLAKE2b-256 efdaf6778058b9b3623ade44c9632fb298bedd9b41c49c0bdb32dbc7446b3c17

See more details on using hashes here.

Provenance

The following attestation bundles were made for securelogging-1.0.0-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