aws / aws-secretsmanager-agent

The AWS Secrets Manager Agent is a local HTTP service that you can install and use in your compute environments to read secrets from Secrets Manager and cache them in memory.
Apache License 2.0
611 stars 24 forks source link

Serve cache on transient errors #32

Closed benjaminkz closed 1 month ago

benjaminkz commented 1 month ago

STSGetCallerIdentity, DescribeSecret and GetSecretValue requests may fail because of common network errors like Sdkerror::Timeout and server-side errors like Sdkerror::ServiceError<Box, HttpResponse>. This cr adds a new configurable parameter ignore_transient_errors. With that enabled, the agent will return the cached secret when running into common transient errors like the above.

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

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 82.24852% with 30 lines in your changes missing coverage. Please review.

Project coverage is 70.46%. Comparing base (c604b4b) to head (a8c148e).

Files with missing lines Patch % Lines
aws_secretsmanager_caching/src/lib.rs 82.31% 26 Missing :warning:
aws_secretsmanager_agent/src/config.rs 80.00% 2 Missing :warning:
aws_secretsmanager_caching/src/error.rs 75.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #32 +/- ## ========================================== + Coverage 68.80% 70.46% +1.66% ========================================== Files 14 15 +1 Lines 2885 2834 -51 Branches 10 8 -2 ========================================== + Hits 1985 1997 +12 + Misses 900 837 -63 ```

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