-
Notifications
You must be signed in to change notification settings - Fork 80
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
NSFS | NC | IAM Service - Root Accounts Manager #8161
Merged
shirady
merged 1 commit into
noobaa:master
from
shirady:nsfs-iam-account-allow_root_account_creation
Jul 3, 2024
Merged
NSFS | NC | IAM Service - Root Accounts Manager #8161
shirady
merged 1 commit into
noobaa:master
from
shirady:nsfs-iam-account-allow_root_account_creation
Jul 3, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shirady
force-pushed
the
nsfs-iam-account-allow_root_account_creation
branch
2 times, most recently
from
June 27, 2024 14:21
338450c
to
b8a42ef
Compare
shirady
changed the title
NSFS | NC | IAM Service - Admin Account
NSFS | NC | IAM Service - Root Accounts Manager
Jun 27, 2024
shirady
force-pushed
the
nsfs-iam-account-allow_root_account_creation
branch
from
June 30, 2024 05:07
b8a42ef
to
6512f6a
Compare
guymguym
approved these changes
Jun 30, 2024
romayalon
reviewed
Jun 30, 2024
shirady
force-pushed
the
nsfs-iam-account-allow_root_account_creation
branch
from
June 30, 2024 12:23
6512f6a
to
5143196
Compare
romayalon
reviewed
Jul 1, 2024
shirady
force-pushed
the
nsfs-iam-account-allow_root_account_creation
branch
2 times, most recently
from
July 2, 2024 08:20
babf3d4
to
baa893a
Compare
…ons using the IAM API) 1. Add more properties to nsfs_account_schema (not required): - iam_operate_on_root_account = boolean (if an account was set with true. then it is a roots accounts manager). 2. Add the option of iam_operate_on_root_account in noobaa cli. 3. Edit all the functions in AccountSpaceFS (CRUD) to operate on root accounts when the requesting account is a root accounts manager. Signed-off-by: shirady <57721533+shirady@users.noreply.github.com>
shirady
force-pushed
the
nsfs-iam-account-allow_root_account_creation
branch
from
July 3, 2024 05:45
baa893a
to
052f158
Compare
2 tasks
2 tasks
This was referenced Aug 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explain the changes
nsfs_account_schema
(not required):iam_operate_on_root_account
= boolean (if an account was set with true. then it is a roots accounts manager).iam_operate_on_root_account
in noobaa cli.AccountSpaceFS
(CRUD) to operate on root accounts when the requesting account is a root accounts manager.Issues:
List of GAPs:
NoobaaEvent
at this point.Testing Instructions:
Unit Tests
Please run:
sudo npx jest test_accountspace_fs.test.js
npx jest test_nc_nsfs_account_schema_validation.test.js
sudo npx jest test_nc_nsfs_account_cli.test.js
sudo npx jest test_nc_nsfs_bucket_cli.test.js
sudo node ./node_modules/.bin/_mocha src/test/unit_tests/test_nc_nsfs_cli.js
Manual Tests
IAM changes in NC NSFS
Currently, we do not validate the input, so the test should use only valid input.
sudo node src/cmd/manage_nsfs account add --name <account-name> --new_buckets_path /tmp/nsfs_root1 --access_key <access-key> --secret_key <secret-key> --uid <uid> --gid <gid> --iam_operate_on_root_account
Note: before creating the account need to give permission to the
new_buckets_path
:chmod 777 /tmp/nsfs_root1
.sudo node src/cmd/nsfs --debug 5 --https_port_iam 7005
Note: before starting the server please add this line:
process.env.NOOBAA_LOG_LEVEL = 'nsfs';
in the endpoint.js (before the conditionif (process.env.NOOBAA_LOG_LEVEL) {
)alias s3-nc-user-manager-iam='AWS_ACCESS_KEY_ID=<acess-key> AWS_SECRET_ACCESS_KEY=<secret-key> aws --no-verify-ssl --endpoint-url https://localhost:7005'
.s3-nc-manager-1-iam iam create-user --user-name Bob-root --path '/division_abc/subdivision_xyz/'
s3-nc-manager-1-iam iam create-access-key --user-name Bob-root
s3-nc-manager-1-iam iam get-access-key-last-used --access-key-id <access-key>
s3-nc-manager-1-iam iam update-access-key --access-key-id <access-key> --user-name Bob-root --status Inactive
s3-nc-manager-1-iam iam delete-access-key --access-key-id <access-key> --user-name Bob-root
s3-nc-manager-1-iam iam list-access-keys --user-name Bob-root
Note: the account created by a root accounts manager using the IAM API is a root account.