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

Windows: setting / retrieving keys with case differences #155

Open
sambtalcott opened this issue Dec 14, 2024 · 0 comments
Open

Windows: setting / retrieving keys with case differences #155

sambtalcott opened this issue Dec 14, 2024 · 0 comments

Comments

@sambtalcott
Copy link

I'm on Windows, R 4.4.2, keyring v1.3.2

It seems that key_set() and key_get() act unpredictably when the provided service parameter matches a stored value but with different casing.

Reproducible example:

library(keyring)
key_set_with_value("example", password = "pass1")
key_get("example")
# [1] "pass1"

key_set_with_value("EXAMPLE", password = "pass2")
key_get("EXAMPLE")
# [1] "pass1"

Looking in the Windows Credential Manager after running this code, I only see the :example: credential (no :EXAMPLE:). If I remove the :example: credential, THEN I see an :EXAMPLE: credential appear (with password "pass2")

I'm not sure what's possible, but I think the expected behavior would be (in order of desirability):

  1. Service is case-sensitive (so both "example" and "EXAMPLE" can be set/accessed separately). It seems like this may not be possible with Windows
  2. Service is case-insensitive on both set and get (so setting "EXAMPLE" overwrites "example")
  3. key_set() throws an error if attempting to set a credential that is a different casing of a currently stored value
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

1 participant