noobaa-core
noobaa-core copied to clipboard
NC | CLI | Weird behavior of the CLI when adding space before access_key/secret_key flag
Environment info
- NooBaa Version: Master
- Platform: NC
Actual behavior
- On account creation/update - when providing
--access_key
flag and--secret_key
and there is a space before the value, Instead of failing or trimming the space at the beginning, the access key and secret key get generated automatically.
Expected behavior
- Failing or trimming the space at the beginning and create an account with the user's access_key and secret_key.
Steps to reproduce
- Run
sudo node src/cmd/manage_nsfs.js account add --name account15 --user root --new_buckets_path=/private/tmp/dir2/ --access_key= 12345678912345678912 --secret_key= a234567891234567891212345678912345678912 --debug 5
More information - Screenshots / Logs / Other output
sudo node src/cmd/manage_nsfs.js account add --name account15 --user root --new_buckets_path=/private/tmp/dir2/ --access_key= 12345678912345678912 --secret_key= a234567891234567891212345678912345678912 --debug 5
# Output -
{
"response": {
"code": "AccountCreated",
"reply": {
"_id": "66d04174c03e0b51480e4ddd",
"name": "account15",
"email": "account15",
"creation_date": "2024-08-29T09:37:56.615Z",
"access_keys": [
{
"access_key": "QBxpvZvehMsbptZmlauR",
"secret_key": "axXfXsBzpW2VeJ/2VibpioZcC+TLVSpMcTRyivC8"
}
],
"nsfs_account_config": {
"distinguished_name": "root",
"new_buckets_path": "/private/tmp/dir2/"
},
"allow_bucket_creation": true
}
}
}