easybill / easypwned

offline haveibeenpwned HIBP check and downloader, rest api, easybill
MIT License
24 stars 5 forks source link

Question API Design #4

Closed ellieschieder closed 10 months ago

ellieschieder commented 10 months ago

Hey there,

Thanks for publishing easypwned under MIT. Great help for my own project.

However I have one question because of the design: Why do you send the whole hash or password to the API?

That would open the usage up to errors, because people do log things and logs are wrong configured every so often.

ellieschieder commented 10 months ago

I know it's because of the bloom filter (if I get it right.) But the problems are still valid.

timglabisch commented 10 months ago

Thanks for the question. regarding logging we have added an endpoint that takes the data via POST - tools that log url's by accident like profiler probably won't touch the sensitive data with that (finger crossed). we ourselves run the tool directly on the system, which validates the passwords anyway. locally.

theoretically, the downloader could offer to hash the data again with a salt when creating the bloom filter - this way, if someone wants to build the bloom filter himself, it would hardly be possible for an attacker to deduce the password from a hash without knowing the salt.

But this is only of limited help. If both systems are on the same server and everything necessary can be found in the ram anyway. the price would also be that you have to build your own bloom filter.

But I would be interested in finding solutions here, so I would appreciate any suggestions. But i would like to find something that is easy to use on the part of the client.

i would like to add that the project is mainly about getting the hibp database small enough through the bloom filter that it is practical to run this container as close as possible to where the passwords are anyway (in memory). I wouldn't want to send such sensitive data through the network, for example.

ellieschieder commented 10 months ago

Thanks for the answer, I adhd´ed the issue /o\