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

Add new Pin type with secrecy/zeroize wrapper #128

Merged
merged 2 commits into from
Mar 8, 2023
Merged

Add new Pin type with secrecy/zeroize wrapper #128

merged 2 commits into from
Mar 8, 2023

Conversation

sbihel
Copy link
Contributor

@sbihel sbihel commented Feb 16, 2023

Related to #126

In the end, I don't know if it's such a good idea. The code is only handling &str so it is up to you to decide if you think this breaking change is worth it to make users aware that they should be careful with their pins.

@sbihel sbihel changed the title Add new Pin type with secrecy/zeroize wrapper for Add new Pin type with secrecy/zeroize wrapper Feb 16, 2023
@wiktor-k
Copy link
Collaborator

I think it looks mostly OK. I'm a liiiitle bit worried about name confusion with std::pin::Pin struct. At least it confused me initially before I saw the alias 😅

@sbihel
Copy link
Contributor Author

sbihel commented Feb 20, 2023

That's fair, and I mistakenly imported std::pin::Pin a few times... Here are a few options:

  1. PIN but it's not really idiomatic;
  2. UserPin but users might be confused and look for an SOPin;
  3. Pkcs11Pin;
  4. AuthPin;
  5. TokenPin;
  6. LoginPin; or
  7. SecretPin.

I would vote for 2 but I don't have a strong preference.

@ionut-arm
Copy link
Member

Hey, sorry for the long delay.

I think I'd go for something like 4, 5, or 6 from your list, but I don't have any strong feelings between them. The reason I'd avoid 2 is exactly what you mentioned, that it's technically incorrect and perhaps confusing, if it does cover both SO and User PINs.

@wiktor-k
Copy link
Collaborator

wiktor-k commented Mar 8, 2023

Yep. Maybe let's go with AuthPin and that's it. (otherwise the bikeshedding can take forever :D )

Copy link
Member

@ionut-arm ionut-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was fast! Thanks for the patch, I think at least one of your commits is missing a sign-off, though.

Signed-off-by: Simon Bihel <[email protected]>
@sbihel
Copy link
Contributor Author

sbihel commented Mar 8, 2023

Sorry about that, fixed

Copy link
Collaborator

@wiktor-k wiktor-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@wiktor-k wiktor-k merged commit d4fed90 into parallaxsecond:main Mar 8, 2023
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

Successfully merging this pull request may close these issues.

3 participants