Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth interface? #73

Open
sckott opened this issue Aug 23, 2024 · 4 comments
Open

Auth interface? #73

sckott opened this issue Aug 23, 2024 · 4 comments
Assignees

Comments

@sckott
Copy link
Member

sckott commented Aug 23, 2024

paws doesn't really have anything that's user facing for peeking at auth creds, which auth is being used, etc. might be worth a user facing function for this

@sckott
Copy link
Member Author

sckott commented Feb 11, 2025

This is not urgent to get down soon - just recording thoughts while they're fresh. ping @seankross - any other ideas? do you like either one of these, or niether?

What i'd like to see is one of the following with the goal of having a good user experience wrt knowing what auth is being used:

.onLoad

in a function .onLoad <- function() { load_auth_details_as_paws_does() }

library(sixtyfour)
#> <sixtyfour aws credentials>
#>   location: env vars # or could be: ~/.aws/credentials, ~/.aws/config, etc.
#>   profile (if any): TEST  
#>   region: us-west-2

cli pkg message on first use of a fxn that requires aws auth

Instead of using onload - or maybe in addition to? - we could print auth details similar to above - but only:

  • the first time auth is needed (i've created a solution for this myself, but tidyverse folks also have a pkg for this), and
  • any time auth is changed - e.g., if a user sets different creds in the same R session

for example:

aws_buckets()
#> <creds- location: ~/.aws/config, profile: TEST, region: us-west-2>
#>
#> # A tibble: 6 × 8
#>   bucket_name           key   uri                               size type   owner etag  last_modified
#>   <chr>                 <chr> <chr>                      <fs::bytes> <chr>  <chr> <chr> <dttm>
#> 1 bucketcipjeuvd        ""    s3://bucketcipjeuvd                  0 bucket ""    ""    NA
#> 2 bucketrcktxshl        ""    s3://bucketrcktxshl                  0 bucket ""    ""    NA

@seankross
Copy link
Member

Do you know how other packages handle this?

@sckott
Copy link
Member Author

sckott commented Feb 11, 2025

i'll have a look

@sckott
Copy link
Member Author

sckott commented Feb 11, 2025

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

No branches or pull requests

2 participants