Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

ACCESS level is reproted as INTERNAL #998

Closed
amanenk opened this issue Jun 3, 2022 · 0 comments · Fixed by #999
Closed

ACCESS level is reproted as INTERNAL #998

amanenk opened this issue Jun 3, 2022 · 0 comments · Fixed by #999
Labels
bug Something isn't working

Comments

@amanenk
Copy link
Contributor

amanenk commented Jun 3, 2022

Describe the bug

errors like below

Type: Internal Severity: Error
        Summary: failed to retrieve credentials for account default. AWS Error: failed to refresh cached credentials, operation error STS: AssumeRole
, https response error StatusCode: 403, RequestID: xxxxxxxxxxxxxxxxxx, api error AccessDenied: User: xxxxxxxxxxxxxxxxxxxxxxxx is not authorized to perform: sts:AssumeRole on resource: xxxxxxxxxxxxxxxxxxxxxxxx, detecte
d aws env variables: AWS_ROLE_ARN: You are not authorized to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.

are classified as INTERNAL but they should have ACCESS level

Expected Behavior

errors like below
the error should be:

Type: Access Severity: Error
        Summary: failed to retrieve credentials for account default. AWS Error: failed to refresh cached credentials, operation error STS: AssumeRole
, https response error StatusCode: 403, RequestID: xxxxxxxxxxxxxxxxxx, api error AccessDenied: User: xxxxxxxxxxxxxxxxxxxxxxxx is not authorized to perform: sts:AssumeRole on resource: xxxxxxxxxxxxxxxxxxxxxxxx, detecte
d aws env variables: AWS_ROLE_ARN: You are not authorized to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.

Steps to Reproduce

run cloudquery fetch with config that has role_arn set.
example:

provider "aws" {
  configuration {
    accounts "default" {
      role_arn = "arn:aws:iam::test:role/service-role/test"
    }
  }
...

Possible Solution

remove over severity overwriting after configureAwsClient func

Provider and CloudQuery version

aws 0.12.4

Additional Context

No response

@amanenk amanenk added the bug Something isn't working label Jun 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant