You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2020/11/18 21:31:11 UTC
[GitHub] [accumulo] milleruntime opened a new issue #1788: Ability to update password hash
milleruntime opened a new issue #1788:
URL: https://github.com/apache/accumulo/issues/1788
Updating the password hash to use something stronger than SHA-256 is problematic for existing users.
Expanding on the technique described on this JIRA issue: https://issues.apache.org/jira/browse/ACCUMULO-4044
Ideally, we would have a utility (maybe something similar to [ChangeSecret](https://github.com/apache/accumulo/blob/f88cb3bcebb744d7d1f3150877243c756d717ddb/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java#L53) ) which would allow an admin to update all passwords with a different hash, storing the algorithm with the password as the JIRA ticket describes. This would give users the most flexibility to chose a hash for their passwords. Accumulo would then be modified to check for this new type of password first, falling back to the legacy hash. This could then be used again in future releases for even stronger hashes.
An alternative approach would be to update the hardcoded hash in the next version, updating all the password on upgrade. This is less flexible for the users but improves security with a stronger hash.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] BukrosSzabolcs commented on issue #1788: Ability to update password hash
Posted by GitBox <gi...@apache.org>.
BukrosSzabolcs commented on issue #1788:
URL: https://github.com/apache/accumulo/issues/1788#issuecomment-730441425
The crypt hash results has very rigid format with fixed id and salt length (if the default salt is used) so recognizing a crapt hash is very easy. Theoretically I think an overlap with the old hash format is possible but highly unlikely.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] BukrosSzabolcs edited a comment on issue #1788: Ability to update password hash
Posted by GitBox <gi...@apache.org>.
BukrosSzabolcs edited a comment on issue #1788:
URL: https://github.com/apache/accumulo/issues/1788#issuecomment-730441425
The crypt hash results has very rigid format with fixed id and salt length (if the default salt is used) so recognizing a crypt hash is very easy. Theoretically I think an overlap with the old hash format is possible but highly unlikely.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] BukrosSzabolcs commented on issue #1788: Ability to update password hash
Posted by GitBox <gi...@apache.org>.
BukrosSzabolcs commented on issue #1788:
URL: https://github.com/apache/accumulo/issues/1788#issuecomment-730485876
> > The crypt hash results has very rigid format with fixed id and salt length (if the default salt is used) so recognizing a crypt hash is very easy. Theoretically I think an overlap with the old hash format is possible but highly unlikely.
>
> I initially came to the same conclusion. However, the length of our current salt + sha-256 hash should be 40 bytes, exactly, and it's not possible for any of the algorithms supported by commons-codec to produce an encrypted String of that length. So, if we check the length, we can guarantee no overlap.
My solution was to try matching the zkData to "^\\$([56])\\$(rounds=(\\d+)\\$)?([\\.\\/a-zA-Z0-9]{1,16})\\$(.*)", to see if it was created by Crypt, but checking the length seems simpler.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on issue #1788: Ability to update password hash
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on issue #1788:
URL: https://github.com/apache/accumulo/issues/1788#issuecomment-730437715
For reference, commons-digest can perform crypt(3)-compatible hashing: https://commons.apache.org/proper/commons-codec/apidocs/org/apache/commons/codec/digest/Crypt.html
I suspect our custom algorithm is not possible to convert into something that is crypt(3)-compatible. However, if it is, then the ideal solution on upgrade is to convert our existing ZooKeeper stored hashes into this format. If that is not possible, then the next best solution would be to warn on startup and then do the convert-on-authentication, as described in https://github.com/apache/accumulo/pull/1787#issuecomment-729251958
The startup warning could look something like: `The password hash for user X is stored in an older format. It is recommended that X authenticate and change their password to convert to the new format.`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] BukrosSzabolcs commented on issue #1788: Ability to update password hash
Posted by GitBox <gi...@apache.org>.
BukrosSzabolcs commented on issue #1788:
URL: https://github.com/apache/accumulo/issues/1788#issuecomment-730443985
I would also prefer to rely on the default algorithm and use no custom hash, since the default is the most robust solution. Any change the customer could do would only weaken the hash.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on issue #1788: Ability to update password hash
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on issue #1788:
URL: https://github.com/apache/accumulo/issues/1788#issuecomment-730441145
Once the format is written in a way that we can detect the algorithm used to hash when we authenticate, then it will be safe to make the default algorithm configurable. However, it might make more sense to prefer the default algorithm of commons-codec (currently SHA-512).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on issue #1788: Ability to update password hash
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on issue #1788:
URL: https://github.com/apache/accumulo/issues/1788#issuecomment-730474608
Also, I was able to verify that we cannot naively convert our existing hashes to the crypt(3) format on upgrade, because we use an unconstrained 8 byte salt, but the crypt(3) format (at least, as implemented by commons-codec) is constrained to choosing a salt from the B64T character set. We could, in theory, encode our current hashes to the proper String encoding, but the constraint on the salt bytes is a blocker. So, the only path forward would be to convert on authenticate, and generate a new salt. At least, we can use the same ZooKeeper node, since we now know the length will be different, and there won't be any overlap with the old format.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii edited a comment on issue #1788: Ability to update password hash
Posted by GitBox <gi...@apache.org>.
ctubbsii edited a comment on issue #1788:
URL: https://github.com/apache/accumulo/issues/1788#issuecomment-730468559
> The crypt hash results has very rigid format with fixed id and salt length (if the default salt is used) so recognizing a crypt hash is very easy. Theoretically I think an overlap with the old hash format is possible but highly unlikely.
I initially came to the same conclusion. However, the length of our current salt + sha-256 hash should be 40 bytes, exactly, and it's not possible for any of the algorithms supported by commons-codec to produce an encrypted String of that length. So, if we check the length, we can guarantee no overlap.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on issue #1788: Ability to update password hash
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on issue #1788:
URL: https://github.com/apache/accumulo/issues/1788#issuecomment-729977155
This seems to be in high demand, so I'll mark this as something to do for 2.1.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii commented on issue #1788: Ability to update password hash
Posted by GitBox <gi...@apache.org>.
ctubbsii commented on issue #1788:
URL: https://github.com/apache/accumulo/issues/1788#issuecomment-730468559
> The crypt hash results has very rigid format with fixed id and salt length (if the default salt is used) so recognizing a crypt hash is very easy. Theoretically I think an overlap with the old hash format is possible but highly unlikely.
I initially came to the same conclusion. However, the length of our current salt + sha-256 hash should be 40 bytes, exactly, and it's not possible for any of the algorithms supported by commons-codec to produce an encrypted String of that length.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] BukrosSzabolcs commented on issue #1788: Ability to update password hash
Posted by GitBox <gi...@apache.org>.
BukrosSzabolcs commented on issue #1788:
URL: https://github.com/apache/accumulo/issues/1788#issuecomment-731198138
Created #1798
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [accumulo] ctubbsii closed issue #1788: Ability to update password hash
Posted by GitBox <gi...@apache.org>.
ctubbsii closed issue #1788:
URL: https://github.com/apache/accumulo/issues/1788
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org