Skip to content

Conversation

@chulanovskyi-bs
Copy link
Contributor

@chulanovskyi-bs chulanovskyi-bs commented Apr 1, 2025

Sub-taskHCK-10566 Add connection info in logs: credentials file used?  Session token used?

Technical details

  • extended the mechanism of getting AWS credentials, making it more explicit in the logs:

    • when there were no AWS credentials in Connection Config:
    2025-04-01T16:55:16.268Z Retrieving databases and collections information:
    'Access Key ID' or 'Secret Access Key' were not specified, checking system AWS credentials...
    
    2025-04-01T16:55:16.270Z Retrieving databases and collections information:
    AWS credentials were successfully obtained from the file.
    
    • when there were no AWS credentials in Connection Config and the AWS credential file is not recognized:
    2025-04-01T16:58:19.617Z Retrieving databases and collections information:
    'Access Key ID' or 'Secret Access Key' were not specified, checking system AWS credentials...
    
    2025-04-01T16:58:19.619Z Retrieving databases and collections information:
    {
    "message": "Could not resolve credentials using profile: [default] in configuration/credentials file(s).",
    "stack": "CredentialsProviderError: Could not resolve credentials using profile: [default] in configuration/credentials file(s).
      at resolveProfileData (/home/oleg/.hackolade/plugins/DocumentDB/node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js:246:9)
      at /home/oleg/.hackolade/plugins/DocumentDB/node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js:263:10
      at async getCredentials (/home/oleg/.hackolade/plugins/DocumentDB/shared/getDocDbClientInstance.js:16:24)
      at async getDocDbClientInstance (/home/oleg/.hackolade/plugins/DocumentDB/shared/getDocDbClientInstance.js:48:16)
      at async Object.getDbCollectionsNames (/home/oleg/.hackolade/plugins/DocumentDB/reverse_engineering/api.js:57:4)
      at async callApiHandler (/home/oleg/Documents/hackolade/studio/dist-dev/reWorker.js:92:3)
      at async EventEmitter.<anonymous> (/home/oleg/Documents/hackolade/studio/dist-dev/reWorker.js:219:5)"
    }
    
    • when everything, related to AWS credentials, were provided, including the session token:
    2025-04-01T17:00:32.618Z Retrieving databases and collections information:
    AWS session token provided, including it into credentials.
    

@chulanovskyi-bs chulanovskyi-bs self-assigned this Apr 1, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 1, 2025

@taras-dubyk taras-dubyk merged commit 33dcc3c into develop Apr 2, 2025
9 checks passed
@taras-dubyk taras-dubyk deleted the feat/HCK-10566-aws-creds-logging branch April 2, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants