secret icon indicating copy to clipboard operation
secret copied to clipboard

Throw a warning if users with identical fingerprint exist?

Open s-fleck opened this issue 5 years ago • 3 comments

I recently had a very stupid bug in one of my packages. I had a duplicated user in vault/users with two identical .pem files with different filenames (the username was misspelled in one).

The result was that the user got "access denied" for the secret he wanted to access, despite the secret being correctly shared with him. Obviously this was my mistake, but it was pretty hard to debug. I think it would be cool if secret:::lookup_user() issued a warning (or threw an error?) on duplicate key files in /users

s-fleck avatar May 08 '20 10:05 s-fleck

Good idea. Do you want to submit a PR?

gaborcsardi avatar May 08 '20 10:05 gaborcsardi

Yes! sure! :) It would probably have slightly negative impact on performance because you would now have to read all keyfiles instead of stop on the first matching one.

s-fleck avatar May 08 '20 10:05 s-fleck

I think that is fine. If somebody complains then we can make it optional.

gaborcsardi avatar May 08 '20 10:05 gaborcsardi