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

SecretBuffer must support a password normalization routine like SASLprep and/or PRECIS. #32503

Open
sambitdash opened this issue Jul 5, 2019 · 5 comments

Comments

@sambitdash
Copy link
Contributor

SASLprep can be closely assumed as a :NFKC Unicode normalization with some exclusion of unsupported characters.

There are two challenges wrt Julia here.

  1. All unicode methods take AbstractString as input defeating the purpose of SecretBuffer
  2. SecretBuffer itself does not support the manipulation routines.
@KristofferC
Copy link
Sponsor Member

What purpose do you think SecretBuffer has?

@sambitdash
Copy link
Contributor Author

Is it not supposed to hold the password or other secrets temporarily? When input from a TTY has Unicode characters, how will you manipulate the input? The moment you convert the data to String for Unicode normalization, the purpose of using SecretBuffer is lost. Do you want to restrict the passwords to be within the ASCII range only?

@sambitdash
Copy link
Contributor Author

It may be OK to implement SASLprep in the getpass routine and pass the processed output to a SecretBuffer.

@StefanKarpinski
Copy link
Sponsor Member

The latest RFC along those lines seems to be https://tools.ietf.org/html/rfc8265. I guess the idea is that a username or a password could appear not to match because of inconsistencies in the input method that the user has no control over or visibility into. So the Unicode sequence should be normalized to avoid that problem. The reason the password can't just be normalized by a string function is that then copies are made, allowing the secret to escape.

@sambitdash sambitdash changed the title SecretBuffer must support a password normalization routine like SASLprep. SecretBuffer must support a password normalization routine like SASLprep and/or PRECIS. Jul 6, 2019
@sambitdash
Copy link
Contributor Author

sambitdash commented Jul 6, 2019

Since, SecretBuffer has an IO interface, a character stream based method can be developed for SASLprep or PRECIS as well. It may also require the Unicode.normalize methods to have a character stream interface along with a string interface or any similar approach.

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

3 participants