paws-r / paws

Paws, a package for Amazon Web Services in R
https://www.paws-r-sdk.com
Other
313 stars 37 forks source link

Add support for web token based IAM in config files #695

Closed liuquinlin closed 10 months ago

liuquinlin commented 10 months ago

Adding support for web_identity_token_file in the AWS config file (see https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html#cli-configure-role-oidc) - also opportunistically adding some unit testing in that area.

I need this functionality for a project I'm working on that uses this auth method, let me know if there's anything else I need to do to enable this change (I've successfully tested this for my use case by modifying the source via trace).

DyfanJones commented 10 months ago

Hi @liuquinlin thanks for raising a PR. I really appreciate the contribution. I will look it over :)

DyfanJones commented 10 months ago

It looks all good to me, the only issue i am getting is:

Error (test_credential_providers.R:114:5): config_file_provider
Error in `eval(value, envir = return_values_env)`: object 'profile_creds' not found

When I run the tests locally

liuquinlin commented 10 months ago

Thanks for the review! Yeah sorry about that think that was a mistaken leftover from a rename

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (377e70e) 84.03% compared to head (c707420) 85.27%.

:exclamation: Current head c707420 differs from pull request most recent head 7a51a29. Consider uploading reports for the commit 7a51a29 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #695 +/- ## ========================================== + Coverage 84.03% 85.27% +1.23% ========================================== Files 204 204 Lines 14575 14599 +24 ========================================== + Hits 12248 12449 +201 + Misses 2327 2150 -177 ``` [see 6 files with indirect coverage changes](https://app.codecov.io/gh/paws-r/paws/pull/695/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=paws-r)

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