Skip to content

Commit

Permalink
Merge pull request #4 from valdi-labs/mask-secret-key
Browse files Browse the repository at this point in the history
Mask secret access key input prompt entry using getpass
  • Loading branch information
mharvilla authored Feb 3, 2024
2 parents 45dc939 + f438a5e commit 1b4606c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "valdi"
version = "0.2.4"
version = "0.2.5"
description = "A command-line utility for managing VALDI cloud resources"
authors = [{name = "VALDI", email="contact@valdi.ai"}]
license = { file = "LICENSE" }
Expand Down
3 changes: 2 additions & 1 deletion valdi/cli/volume_manager.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import sys
import getpass
import subprocess
from pathlib import Path
from valdi.config.settings import Config
Expand All @@ -26,7 +27,7 @@ def _volume_access_credentials_are_available(volume_name):
@staticmethod
def _store_volume_access_credentials(volume_name):
access_key = input('Enter access key: ')
secret_key = input('Enter secret access key: ')
secret_key = getpass.getpass('Enter secret access key: ')
goofys_credentials_file = Path(Config.GOOFYS_CREDENTIALS_FILE).expanduser()
with open(goofys_credentials_file, 'a') as f:
f.write(f'[{volume_name}]\naws_access_key_id = {access_key}\naws_secret_access_key = {secret_key}\n')
Expand Down

0 comments on commit 1b4606c

Please sign in to comment.