Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NC | NSFS | revoking --new_access_key and fixing access key update issues #7697

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

liranmauda
Copy link
Contributor

Explain the changes

  1. revoking --new_access_key
  2. fixing issue where --regenerate did not update the secret_key
  3. fixing an issue where using --access_key without --new_access_key did not updated the symlink
  4. updated the tests.

Issues: Fixed #xxx / Gap #xxx

  1. Fixes: NSFS | NC | CLI | secret_key is not getting updated when using --regenerate flag #7695
  2. Fixes: NSFS | NC | CLI | Account update script change access_key without new_access_key argument in config file. #7683

Testing Instructions:

  1. run sudo npx jest test_nc_nsfs_account_cli.test.js
  2. run sudo node --allow-natives-syntax ./node_modules/.bin/_mocha src/test/unit_tests/test_nc_nsfs_cli.js
  • Doc (help) added/updated
  • Tests added

src/cmd/manage_nsfs.js Outdated Show resolved Hide resolved
src/test/unit_tests/test_nc_nsfs_cli.js Show resolved Hide resolved
src/test/unit_tests/test_nc_nsfs_cli.js Show resolved Hide resolved
@liranmauda liranmauda requested a review from romayalon January 7, 2024 15:36
@liranmauda liranmauda force-pushed the liran-fix-regenerate branch from 0453447 to 2e67829 Compare January 7, 2024 15:39
//fixing the new_account_details for compare.
new_account_details = { ...new_account_details, ...new_account_details.nsfs_account_config };
assert_account(account_symlink, new_account_details);
});

it('should fail - cli update account new access_key wrong complexity', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait but now you don't have a "should fail wrong complexity test"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, as we dont have the --new_access_key flag anymore, we removing this test, and the error is removed with it.

We do have a should fail - cli update account access_key wrong complexity for --access_key
and should fail - cli update account secret_key wrong complexity for --secret_key

src/cmd/manage_nsfs.js Outdated Show resolved Hide resolved
@liranmauda liranmauda requested a review from romayalon January 7, 2024 16:48
…issues

1. revoking `--new_access_key`
2. fixing issue where `--regenerate` did not update the secret_key
3. fixing an issue where using `--access_key` without `--new_access_key` did not updated the symlink
4. updated the tests.

Signed-off-by: liranmauda <liran.mauda@gmail.com>
@liranmauda liranmauda force-pushed the liran-fix-regenerate branch from 2e67829 to 578b7c0 Compare January 7, 2024 17:08
@liranmauda liranmauda merged commit 8721202 into noobaa:master Jan 8, 2024
9 checks passed
@liranmauda liranmauda deleted the liran-fix-regenerate branch January 8, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants