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

extended logging of aws authorization error #347

Merged
merged 3 commits into from
Dec 14, 2021

Conversation

amanenk
Copy link
Contributor

@amanenk amanenk commented Dec 13, 2021

fixes #245

Copy link
Contributor

@roneli roneli left a comment

Choose a reason for hiding this comment

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

LGTM, minor changes, would also ask @yevgenypats to review the message if its clearer now

client/client.go Outdated Show resolved Hide resolved
client/client.go Outdated Show resolved Hide resolved
@roneli roneli requested review from yevgenypats and removed request for zagronitay December 13, 2021 15:43
Copy link
Member

@yevgenypats yevgenypats left a comment

Choose a reason for hiding this comment

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

Looks good. One question :

What about if it’s not in an environment variable but just in ~/.aws/credentials ?

@amanenk
Copy link
Contributor Author

amanenk commented Dec 13, 2021

Looks good. One question :

What about if it’s not in an environment variable but just in ~/.aws/credentials ?

there is an creds.Source that tell which authorization way is used.
here is an example of message below with authorization soruce: SharedConfigCredentials: C:\\Users\\user\\.aws\\credentials

{"level":"error","alias":"aws","provider":"aws","version":"unmanaged","error":"rpc error: code = Unknown desc = failed to create aws client for account default. AWS Error: operation error STS: GetCallerIdentity, https response error StatusCode: 403, RequestID: 388b55a6-781e-41fe-bef5-15b0e1121cac, api error SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details., authorization soruce: SharedConfigCredentials: C:\\Users\\user\\.aws\\credentials, detected aws env variables: AWS_PROFILE","time":"2021-12-13T16:23:34+02:00","message":"failed to configure provider"}

Copy link
Contributor

@roneli roneli left a comment

Choose a reason for hiding this comment

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

LGTM

@roneli roneli merged commit eee6086 into cloudquery:main Dec 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add hints if authentication fails
3 participants