awslabs / aws-c-auth

C99 library implementation of AWS client-side authentication: standard credentials providers and signing.
Apache License 2.0
41 stars 32 forks source link

Additional logging for default credentials chain #231

Closed jamesbornholt closed 7 months ago

jamesbornholt commented 7 months ago

We've been finding it difficult to follow the log output of credentials providers when investigating permissions issues. The problem is that the default chain is constructed somewhat dynamically, with some providers only added conditionally, and some dispatching differently depending on environment variables. This patch just adds some more logging in the default chain and in the providers it uses, so we can more easily trace the path of credentials resolution.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

codecov-commenter commented 7 months ago

Codecov Report

Attention: Patch coverage is 70.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 79.55%. Comparing base (0d2aa00) to head (6648ab3).

Files Patch % Lines
source/credentials_provider_default_chain.c 20.00% 4 Missing :warning:
source/credentials_provider_environment.c 66.66% 1 Missing :warning:
source/credentials_provider_imds.c 83.33% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #231 +/- ## ========================================== - Coverage 79.57% 79.55% -0.02% ========================================== Files 33 33 Lines 5841 5860 +19 ========================================== + Hits 4648 4662 +14 - Misses 1193 1198 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.