Verified Commit 3ebd00fd authored by Martin Abbrent's avatar Martin Abbrent 💬
Browse files

Censor confidential data when logging them

parent 15439794
......@@ -66,10 +66,14 @@ class Mc:
return json.loads(ret.stdout)
def user_add(self, access_key: str, secret_key: str):
self._command(
ret = self._command(
['admin', 'user', 'add', self.alias, access_key, secret_key],
confidential=True
)
# manually remove confidential parts before logging
ret['secretKey'] = '*****'
logging.info(ret)
def policy_add(self, policy_name: str, policy: dict):
policy_file = tempfile.NamedTemporaryFile(mode='w+')
......
......@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
setuptools.setup(
name='minio_cli_wrapper',
version='0.0.2',
version='0.0.3',
author='Martin Abbrent',
author_email='martin.abbrent@ufz.de',
description='Wrapper to control MinIO commands that are not covered by the MinIO Python SDK',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment