File: validate_password_component_random_password.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (183 lines) | stat: -rw-r--r-- 7,821 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
CREATE USER 'usr1'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr1	localhost	######	1
CREATE USER 'usr2'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr2	localhost	######	1
GRANT ALL ON mysql.* TO 'usr1'@'localhost';
INSTALL COMPONENT "file://component_validate_password";
# password policy LOW (which only check for password length)
# default case: password length should be minimum 8
SET @@global.validate_password.policy=LOW;
SET @@global.generated_random_password_length = 5;
CREATE USER 'usr3'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr3	localhost	######	1
ALTER USER 'usr1'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr1	localhost	######	1
SET PASSWORD FOR 'usr1'@'localhost' TO RANDOM;
user	host	generated password	auth_factor
usr1	localhost	######	1
DROP USER 'usr3'@'localhost';
SET @@global.generated_random_password_length = 8;
CREATE USER 'usr3'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr3	localhost	######	1
ALTER USER 'usr1'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr1	localhost	######	1
SET PASSWORD FOR 'usr1'@'localhost' TO RANDOM;
user	host	generated password	auth_factor
usr1	localhost	######	1
DROP USER 'usr3'@'localhost';
SET @@global.validate_password.length= 12;
CREATE USER 'usr3'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr3	localhost	######	1
ALTER USER 'usr1'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr1	localhost	######	1
SET PASSWORD FOR 'usr1'@'localhost' TO RANDOM;
user	host	generated password	auth_factor
usr1	localhost	######	1
DROP USER 'usr3'@'localhost';
SET @@global.validate_password.mixed_case_count= 0;
SET @@global.validate_password.number_count= 0;
SET @@global.validate_password.special_char_count= 0;
SET @@global.validate_password.length= 0;
SET @@global.validate_password.length= DEFAULT;
CREATE USER 'usr3'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr3	localhost	######	1
ALTER USER 'usr1'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr1	localhost	######	1
SET PASSWORD FOR 'usr1'@'localhost' TO RANDOM;
user	host	generated password	auth_factor
usr1	localhost	######	1
DROP USER 'usr3'@'localhost';
# password policy MEDIUM (check for mixed_case, digits, special_chars)
# default case : atleast 1 mixed_case, 1 digit, 1 special_char
SET @@global.validate_password.mixed_case_count= 1;
SET @@global.validate_password.number_count= 1;
SET @@global.validate_password.special_char_count= 1;
SET @@global.validate_password.policy=MEDIUM;
SET @@global.validate_password.number_count= 0;
CREATE USER 'usr3'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr3	localhost	######	1
ALTER USER 'usr1'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr1	localhost	######	1
SET PASSWORD FOR 'usr1'@'localhost' TO RANDOM;
user	host	generated password	auth_factor
usr1	localhost	######	1
DROP USER 'usr3'@'localhost';
SET @@global.validate_password.mixed_case_count= 0;
CREATE USER 'usr3'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr3	localhost	######	1
ALTER USER 'usr1'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr1	localhost	######	1
SET PASSWORD FOR 'usr1'@'localhost' TO RANDOM;
user	host	generated password	auth_factor
usr1	localhost	######	1
DROP USER 'usr3'@'localhost';
SET @@global.validate_password.special_char_count= 0;
CREATE USER 'usr3'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr3	localhost	######	1
ALTER USER 'usr1'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr1	localhost	######	1
SET PASSWORD FOR 'usr1'@'localhost' TO RANDOM;
user	host	generated password	auth_factor
usr1	localhost	######	1
DROP USER 'usr3'@'localhost';
SET @@global.validate_password.special_char_count= 1;
SET @@global.validate_password.number_count= 1;
SET @@global.validate_password.mixed_case_count= 1;
CREATE USER 'usr3'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr3	localhost	######	1
ALTER USER 'usr1'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr1	localhost	######	1
SET PASSWORD FOR 'usr1'@'localhost' TO RANDOM;
user	host	generated password	auth_factor
usr1	localhost	######	1
DROP USER 'usr3'@'localhost';
SET @@global.validate_password.number_count= 2;
CREATE USER 'usr3'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr3	localhost	######	1
ALTER USER 'usr1'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr1	localhost	######	1
SET PASSWORD FOR 'usr1'@'localhost' TO RANDOM;
user	host	generated password	auth_factor
usr1	localhost	######	1
DROP USER 'usr3'@'localhost';
SET @@global.validate_password.number_count= 1;
SET @@global.validate_password.mixed_case_count= 2;
CREATE USER 'usr3'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr3	localhost	######	1
ALTER USER 'usr1'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr1	localhost	######	1
SET PASSWORD FOR 'usr1'@'localhost' TO RANDOM;
user	host	generated password	auth_factor
usr1	localhost	######	1
DROP USER 'usr3'@'localhost';
SET @@global.validate_password.mixed_case_count= 1;
SET @@global.validate_password.special_char_count= 2;
SET @@global.validate_password.special_char_count= 1;
# No dictionary file present, no dictionary check
SET @@global.validate_password.policy=STRONG;
CREATE USER 'usr3'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr3	localhost	######	1
ALTER USER 'usr1'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr1	localhost	######	1
SET PASSWORD FOR 'usr1'@'localhost' TO RANDOM;
user	host	generated password	auth_factor
usr1	localhost	######	1
DROP USER 'usr3'@'localhost';
SET @@global.validate_password.dictionary_file="MYSQL_ERRMSG_BASEDIR/dictionary.txt";
# password policy strong
# default_file : dictionary.txt
SET @@global.validate_password.policy=STRONG;
CREATE USER 'usr3'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr3	localhost	######	1
ALTER USER 'usr1'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
user	host	generated password	auth_factor
usr1	localhost	######	1
SET PASSWORD FOR 'usr1'@'localhost' TO RANDOM;
user	host	generated password	auth_factor
usr1	localhost	######	1
DROP USER 'usr3'@'localhost';
DROP USER 'usr1'@'localhost';
DROP USER 'usr2'@'localhost';
SET @@global.validate_password.length=default;
SET @@global.validate_password.number_count=default;
SET @@global.validate_password.mixed_case_count=default;
SET @@global.validate_password.special_char_count=default;
SET @@global.validate_password.policy=default;
SET @@global.validate_password.dictionary_file=default;
SET @@global.generated_random_password_length=default;
SELECT @@validate_password.length,
@@validate_password.number_count,
@@validate_password.mixed_case_count,
@@validate_password.special_char_count,
@@validate_password.policy,
@@validate_password.dictionary_file;
@@validate_password.length	@@validate_password.number_count	@@validate_password.mixed_case_count	@@validate_password.special_char_count	@@validate_password.policy	@@validate_password.dictionary_file
8	1	1	1	MEDIUM	NULL
# Cleanup.
UNINSTALL COMPONENT "file://component_validate_password";
End of tests