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

Hide secrets? #71

Open
sckott opened this issue Jul 31, 2024 · 3 comments
Open

Hide secrets? #71

sckott opened this issue Jul 31, 2024 · 3 comments

Comments

@sckott
Copy link
Member

sckott commented Jul 31, 2024

In making a demo for this pkg, we talked about whether or not to hide secrets in the live demo and video to be made.

It's not terribly difficult to do so, but the big issue is that IF the use case for the function is creating secrets, then you can only see them once, so redacting them when created is a no go.

However, we could redact secrets for functions that may show secrets that already exist. I don't know off hand right now if there are any, but we could make a list of them if we want to do this.

cc @seankross

@seankross
Copy link
Collaborator

This is a good question, I don't know the answer though. Sort of related: is there a good way for an end user to check if sixtyfour is aware of the credentials they're using?

@sckott
Copy link
Member Author

sckott commented Jul 31, 2024

is there a good way for an end user to check if sixtyfour is aware of the credentials they're using?

That's not easy right now. paws supports a bunch of different ways of pulling in credentials, and the package AFAIK doesn't provide a way to easily get those credentials or at least say what credentials are being used, etc.

@sckott
Copy link
Member Author

sckott commented Aug 1, 2024

There is

pkgload::load_all()
sts_con <- con_factory("sts")()
sts_con$get_caller_identity()
$UserId
[1] "xxxx"

$Account
[1] "xxxx"

$Arn
[1] "arn:aws:iam::xxx:user/xxx"

Which answers the question:

Are the credentials sixtyfour knows about valid with AWS?

But does not answer your question of

is there a good way for an end user to check if sixtyfour is aware of the credentials they're using?

There's hacky ways to get credentials that sixtyfour knows about (for any of the various paws R6 clients):

pkgload::load_all()
sts_con <- con_factory("sts")()
sts_con$.internal$config$credentials$provider[[2]]()
$access_key_id
[1] "xxxx"

$secret_access_key
[1] "xxxx"

$session_token
[1] ""

$access_token
[1] ""

$expiration
[1] Inf

$provider_name
[1] ""

attr(,"class")
[1] "struct"

But maybe we can roll that up into a nicer fxn?

I don't know if calling that internal method would cover all credential methods though


Where STS is the Security Token Service, and the caller identity method is at https://www.paws-r-sdk.com/docs/sts_get_caller_identity/

@sckott sckott mentioned this issue Aug 1, 2024
4 tasks
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