Skip to content

Commit ddb594b

Browse files
committed
Mask both Auth Key and Signing Secret
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent b0e9bca commit ddb594b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/frequenz/client/dispatch/__main__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,15 @@ async def cli(
201201
ctx.obj = {}
202202

203203
click.echo(f"Using API URL: {url}", err=True)
204-
click.echo(f"Using API Key: {api_key}", err=True)
204+
click.echo(f"Using API Auth Key: {api_key[:4]}{'*' * 8}", err=True)
205+
205206
if sign_secret:
206-
click.echo(f"Using API Secret: {sign_secret}", err=True)
207+
if len(sign_secret) > 8:
208+
click.echo(
209+
f"Using API Signing Secret: {sign_secret[:4]}{'*' * 8}", err=True
210+
)
211+
else:
212+
click.echo("Using API Signing Secret (not shown).", err=True)
207213

208214
ctx.obj["client"] = DispatchApiClient(
209215
server_url=url,

0 commit comments

Comments
 (0)