File: plugin_auth_password_history.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 (45 lines) | stat: -rw-r--r-- 2,559 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
# Must pass with a warning: syntax accepted but meaningless for plugin auth
CREATE USER pwd_history_plugin@localhost IDENTIFIED WITH 'test_plugin_server' PASSWORD HISTORY 1;
Warnings:
Warning	3639	Non-zero password history clauses ignored for user 'pwd_history_plugin'@'localhost' as its authentication plugin test_plugin_server does not support password history
# Must have default password history
SHOW CREATE USER pwd_history_plugin@localhost;
CREATE USER for pwd_history_plugin@localhost
CREATE USER `pwd_history_plugin`@`localhost` IDENTIFIED WITH 'test_plugin_server' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT
# Must be 0: non-local passwords plugin
SELECT COUNT(*) FROM mysql.password_history WHERE
User='pwd_history_plugin' AND Host='localhost';
COUNT(*)
0
# Must pass: syntax accepted but meaningless for plugin auth
ALTER USER pwd_history_plugin@localhost IDENTIFIED WITH 'test_plugin_server' PASSWORD REUSE INTERVAL 1 DAY;
Warnings:
Warning	3639	Non-zero password history clauses ignored for user 'pwd_history_plugin'@'localhost' as its authentication plugin test_plugin_server does not support password history
# Must have default password reuse interval
SHOW CREATE USER pwd_history_plugin@localhost;
CREATE USER for pwd_history_plugin@localhost
CREATE USER `pwd_history_plugin`@`localhost` IDENTIFIED WITH 'test_plugin_server' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT
# Must be 0: non-local passwords plugin
SELECT COUNT(*) FROM mysql.password_history WHERE
User='pwd_history_plugin' AND Host='localhost';
COUNT(*)
0
DROP USER pwd_history_plugin@localhost;
CREATE USER mohit@localhost IDENTIFIED BY 'mohit_native' PASSWORD HISTORY 1;
# Must be 1: password history on
SELECT COUNT(*) FROM mysql.password_history WHERE
User='mohit' AND Host='localhost';
COUNT(*)
1
ALTER USER mohit@localhost IDENTIFIED WITH 'test_plugin_server' AS 'haha';
# Must have default password reuse interval
SHOW CREATE USER mohit@localhost;
CREATE USER for mohit@localhost
CREATE USER `mohit`@`localhost` IDENTIFIED WITH 'test_plugin_server' AS 'haha' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK PASSWORD HISTORY DEFAULT PASSWORD REUSE INTERVAL DEFAULT PASSWORD REQUIRE CURRENT DEFAULT
# Must be 0: password history on
SELECT COUNT(*) FROM mysql.password_history WHERE
User='mohit' AND Host='localhost';
COUNT(*)
0
DROP USER mohit@localhost;
# End of 8.0 tests