-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathcaching_sha2_password_digest_rounds.result
141 lines (119 loc) · 3.01 KB
/
caching_sha2_password_digest_rounds.result
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
## I. Verify that password hashes created with default digest-rounds
## can be used with X Plugin & X Client
#
# 1. Show that accounts original credentials are working,
# change accounts credentials using (set password, alter user).
# 2. Show that old credentials doesn't work.
# 3. Show that new credentials are working.
#
## II. Verify that password hashes created with default digest-rounds
## and changed with new digest-rounds can be used with X Plugin & X Client
# 1. Change servers digest-rounds
# 2. Show that accounts original credentials are working,
# change accounts credentials to generate a password-hash using new
# digest-rounds (set password, alter user).
# 3. Show that old credentials doesn't work.
# 4. Show that new credentials are working.
#
#
CREATE USER 'change_pwd_alter'@'%' IDENTIFIED WITH caching_sha2_password BY 'alter1';
CREATE USER 'change_pwd_set'@'%' IDENTIFIED WITH caching_sha2_password BY 'set1';
#
# I.1
RUN ALTER USER 'change_pwd_alter'@'%' IDENTIFIED BY 'alter2'
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
RUN SET PASSWORD='set2'
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
#
# I.2
Application terminated with expected error: Access denied for user 'change_pwd_alter'@'localhost' (using password: YES) (code 1045)
ok
Application terminated with expected error: Access denied for user 'change_pwd_set'@'localhost' (using password: YES) (code 1045)
ok
#
# I.3
RUN SELECT 'ok' as THIS_MUST_BE_EXECUTED
THIS_MUST_BE_EXECUTED
ok
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
RUN SELECT 'ok' as THIS_MUST_BE_EXECUTED
THIS_MUST_BE_EXECUTED
ok
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
DROP USER 'change_pwd_alter'@'%';
DROP USER 'change_pwd_set'@'%';
DROP USER IF EXISTS 'create_pwd'@'%';
Warnings:
Note 3162 Authorization ID 'create_pwd'@'%' does not exist.
CREATE USER 'change_pwd_alter'@'%' IDENTIFIED WITH caching_sha2_password BY 'alter1';
CREATE USER 'change_pwd_set'@'%' IDENTIFIED WITH caching_sha2_password BY 'set1';
#
# II.1
# restart: --caching_sha2_password_digest_rounds=10000
CREATE USER 'create_pwd'@'%' IDENTIFIED WITH caching_sha2_password BY 'create2';
#
# II.2
RUN ALTER USER 'change_pwd_alter'@'%' IDENTIFIED BY 'alter2'
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
RUN SET PASSWORD='set2'
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
#
# II.3
Application terminated with expected error: Access denied for user 'change_pwd_alter'@'localhost' (using password: YES) (code 1045)
ok
Application terminated with expected error: Access denied for user 'change_pwd_set'@'localhost' (using password: YES) (code 1045)
ok
#
# II.4
RUN SELECT 'ok' as THIS_MUST_BE_EXECUTED
THIS_MUST_BE_EXECUTED
ok
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
RUN SELECT 'ok' as THIS_MUST_BE_EXECUTED
THIS_MUST_BE_EXECUTED
ok
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
RUN SELECT 'ok' as THIS_MUST_BE_EXECUTED
THIS_MUST_BE_EXECUTED
ok
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
# restart:
DROP USER 'change_pwd_alter'@'%';
DROP USER 'change_pwd_set'@'%';
DROP USER IF EXISTS 'create_pwd'@'%';