I have been learning hadoop for a while, and I wrote a lot of demos during this period, all of which are for verification of a single knowledge point. Today I am writing a complete application-hadoop-based password security level verification.
When a user is registered on many websites, the password security level is displayed below the password. As shown in:
Generally, the password security level is obtained through algorithms, but passw0rd is recognized as the least secure password! It is also considered safe.
I think of a Forum Password Leak several years ago, so I found the data from the Internet (all text files, one record per line, which can be processed by hadoop ), start to develop this program.
The program is divided into three parts:
- The hadoop cluster analyzes the usage of each password and saves the result to the hbase database in the form of <password, number of times>.
- Java WebService provides the interface for querying the password usage. The input parameter is the password string and the output parameter is the number of times. This interface calls the hbase API to query the number of times from the above hbase library and return it.
- You can call the Java WebService interface on the webpage to obtain the number of user-entered passwords and display the password security level according to custom rules.
The procedure is roughly as follows:
Some code of the program has been uploaded to GitHub.
Https://github.com/dipwater/HadoopProject/tree/master/PasswordCheck