Skip to content

IAM, STS | Improve Log Printing Before Throw Error of NotImplemented #8903

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

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

shirady
Copy link
Contributor

@shirady shirady commented Mar 26, 2025

Describe the Problem

Currently, when using an action that is not listed in the actions supported in IAM (which is based on STS implementation) we don't have a log printing, and it is harder to debug if external application uses the code base without us knowing exactly what it is performing.

Explain the Changes

  1. In the function parse_op_name add log printing with additional info to help debugging (in IAM and STS).

Issues:

  1. The printing of IAM REQUEST is printed after parsing, so we will not see all the information when using a supported action (link).

Testing Instructions:

  1. Create an account with noobaa CLI: sudo node src/cmd/manage_nsfs account add --name <account-name> --new_buckets_path /Users/buckets/ --access_key <access-key> --secret_key <secret-key> --uid <uid> --gid <gid>
    Note: before creating the account need to give permission to the new_buckets_path: chmod 777 /Users/buckets/.
  2. Start the NSFS server (using debug mode and the port for IAM): sudo node src/cmd/nsfs --debug 5 --https_port_iam 7005
  3. Create the alias for IAM service:
    alias nc-user-1-iam='AWS_ACCESS_KEY_ID=<access-key> AWS_SECRET_ACCESS_KEY=<secret-key> aws --no-verify-ssl --endpoint-url https://localhost:7005'
  4. Use unsupported action: nc-user-1-iam iam create-group --group-name Admins expect to see:

"[ERROR] core.endpoint.iam.iam_rest:: IAM parse_op_name - NotImplemented CreateGroup post /"

  • Doc added/updated
  • Tests added

@shirady shirady changed the title IAM, STS | Improve log printing before throw error of NotImplemented IAM, STS | Improve Log Printing Before Throw Error of NotImplemented Mar 26, 2025
@shirady shirady self-assigned this Mar 26, 2025
@shirady shirady requested review from Neon-White and romayalon March 26, 2025 11:34
@shirady shirady merged commit 4264c90 into noobaa:master Mar 26, 2025
11 checks passed
@shirady shirady deleted the iam-sts-improve-log-message branch April 3, 2025 08:23
@romayalon romayalon mentioned this pull request May 22, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants