Browse Source

Change test passwords to pass STRONG validation policy

Jan Uhlig 1 year ago
parent
commit
20e100f167
6 changed files with 14 additions and 14 deletions
  1. 4 4
      .travis.yml
  2. 4 4
      README.md
  3. 2 2
      test/mysql_change_user_tests.erl
  4. 2 2
      test/mysql_tests.erl
  5. 1 1
      test/ssl_tests.erl
  6. 1 1
      test/transaction_tests.erl

+ 4 - 4
.travis.yml

@@ -18,15 +18,15 @@ before_script:
   - (echo '[mysqld]'; echo 'local_infile=ON') | sudo tee -a /etc/mysql/conf.d/my-otp.cnf
   - (echo '[mysqld]'; echo 'local_infile=ON') | sudo tee -a /etc/mysql/conf.d/my-otp.cnf
   - sudo service mysql start
   - sudo service mysql start
   - sleep 5
   - sleep 5
-  - sudo mysql -uroot -e "CREATE USER otptest@localhost IDENTIFIED BY 'otptest';"
+  - sudo mysql -uroot -e "CREATE USER otptest@localhost IDENTIFIED BY 'OtpTest--123';"
   - sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON otptest.* TO otptest@localhost;"
   - sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON otptest.* TO otptest@localhost;"
-  - sudo mysql -uroot -e "CREATE USER otptest2@localhost IDENTIFIED BY 'otptest2';"
+  - sudo mysql -uroot -e "CREATE USER otptest2@localhost IDENTIFIED BY 'OtpTest2--123';"
   - sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON otptest.* TO otptest2@localhost;"
   - sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON otptest.* TO otptest2@localhost;"
   # REQUIRE SSL must be specified only in CREATE USER in MySQL >= 8.0, only in GRANT in MySQL < 5.7;
   # REQUIRE SSL must be specified only in CREATE USER in MySQL >= 8.0, only in GRANT in MySQL < 5.7;
   # MySQL 5.7 allows both variants.
   # MySQL 5.7 allows both variants.
-  - (sudo mysql -uroot -e "CREATE USER otptestssl@localhost IDENTIFIED BY 'otptestssl' REQUIRE SSL;" &&
+  - (sudo mysql -uroot -e "CREATE USER otptestssl@localhost IDENTIFIED BY 'OtpTestSSL--123' REQUIRE SSL;" &&
     sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON otptest.* TO otptestssl@localhost;") ||
     sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON otptest.* TO otptestssl@localhost;") ||
-    (sudo mysql -uroot -e "CREATE USER otptestssl@localhost IDENTIFIED BY 'otptestssl';" &&
+    (sudo mysql -uroot -e "CREATE USER otptestssl@localhost IDENTIFIED BY 'OtpTestSSL--123';" &&
     sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON otptest.* TO otptestssl@localhost REQUIRE SSL;")
     sudo mysql -uroot -e "GRANT ALL PRIVILEGES ON otptest.* TO otptestssl@localhost REQUIRE SSL;")
 script: 'make tests'
 script: 'make tests'
 jobs:
 jobs:

+ 4 - 4
README.md

@@ -122,18 +122,18 @@ start MySQL on localhost and give privileges to the users `otptest`, `otptest2`
 and (for `ssl_tests`) to the user `otptestssl`:
 and (for `ssl_tests`) to the user `otptestssl`:
 
 
 ```SQL
 ```SQL
-CREATE USER otptest@localhost IDENTIFIED BY 'otptest';
+CREATE USER otptest@localhost IDENTIFIED BY 'OtpTest--123';
 GRANT ALL PRIVILEGES ON otptest.* TO otptest@localhost;
 GRANT ALL PRIVILEGES ON otptest.* TO otptest@localhost;
 
 
-CREATE USER otptest2@localhost IDENTIFIED BY 'otptest2';
+CREATE USER otptest2@localhost IDENTIFIED BY 'OtpTest2--123';
 GRANT ALL PRIVILEGES ON otptest.* TO otptest2@localhost;
 GRANT ALL PRIVILEGES ON otptest.* TO otptest2@localhost;
 
 
 -- in MySQL < 5.7, REQUIRE SSL must be given in GRANT
 -- in MySQL < 5.7, REQUIRE SSL must be given in GRANT
-CREATE USER otptestssl@localhost IDENTIFIED BY 'otptestssl';
+CREATE USER otptestssl@localhost IDENTIFIED BY 'OtpTestSSL--123';
 GRANT ALL PRIVILEGES ON otptest.* TO otptestssl@localhost REQUIRE SSL;
 GRANT ALL PRIVILEGES ON otptest.* TO otptestssl@localhost REQUIRE SSL;
 
 
 -- in MySQL >= 8.0, REQUIRE SSL must be given in CREATE USER
 -- in MySQL >= 8.0, REQUIRE SSL must be given in CREATE USER
-CREATE USER otptestssl@localhost IDENTIFIED BY 'otptestssl' REQUIRE SSL;
+CREATE USER otptestssl@localhost IDENTIFIED BY 'OtpTestSSL--123' REQUIRE SSL;
 GRANT ALL PRIVILEGES ON otptest.* TO otptestssl@localhost;
 GRANT ALL PRIVILEGES ON otptest.* TO otptestssl@localhost;
 ```
 ```
 
 

+ 2 - 2
test/mysql_change_user_tests.erl

@@ -22,9 +22,9 @@
 -include_lib("eunit/include/eunit.hrl").
 -include_lib("eunit/include/eunit.hrl").
 
 
 -define(user1,     "otptest").
 -define(user1,     "otptest").
--define(password1, "otptest").
+-define(password1, "OtpTest--123").
 -define(user2,     "otptest2").
 -define(user2,     "otptest2").
--define(password2, "otptest2").
+-define(password2, "OtpTest2--123").
 
 
 %% Ensure that the current user can be changed to another user
 %% Ensure that the current user can be changed to another user
 %% when given correct credentials.
 %% when given correct credentials.

+ 2 - 2
test/mysql_tests.erl

@@ -23,9 +23,9 @@
 -include_lib("eunit/include/eunit.hrl").
 -include_lib("eunit/include/eunit.hrl").
 
 
 -define(user,         "otptest").
 -define(user,         "otptest").
--define(password,     "otptest").
+-define(password,     "OtpTest--123").
 -define(ssl_user,     "otptestssl").
 -define(ssl_user,     "otptestssl").
--define(ssl_password, "otptestssl").
+-define(ssl_password, "OtpTestSSL--123").
 
 
 %% We need to set a the SQL mode so it is consistent across MySQL versions
 %% We need to set a the SQL mode so it is consistent across MySQL versions
 %% and distributions.
 %% and distributions.

+ 1 - 1
test/ssl_tests.erl

@@ -23,7 +23,7 @@
 -include_lib("eunit/include/eunit.hrl").
 -include_lib("eunit/include/eunit.hrl").
 
 
 -define(ssl_user,     "otptestssl").
 -define(ssl_user,     "otptestssl").
--define(ssl_password, "otptestssl").
+-define(ssl_password, "OtpTestSSL--123").
 -define(cacertfile,   "test/ssl/ca.pem").
 -define(cacertfile,   "test/ssl/ca.pem").
 
 
 successful_ssl_connect_test() ->
 successful_ssl_connect_test() ->

+ 1 - 1
test/transaction_tests.erl

@@ -22,7 +22,7 @@
 -include_lib("eunit/include/eunit.hrl").
 -include_lib("eunit/include/eunit.hrl").
 
 
 -define(user,     "otptest").
 -define(user,     "otptest").
--define(password, "otptest").
+-define(password, "OtpTest--123").
 
 
 single_connection_test_() ->
 single_connection_test_() ->
     {setup,
     {setup,