| 1 |
# |
| 2 |
# MDEV-35507 and MDEV-35522 |
| 3 |
# |
| 4 |
install plugin ed25519 soname 'auth_ed25519'; |
| 5 |
install plugin server_audit soname 'server_audit'; |
| 6 |
set global server_audit_file_path='server_audit.log'; |
| 7 |
set global server_audit_output_type=file; |
| 8 |
set global server_audit_logging=on; |
| 9 |
# unsafe to log passwords (pwd-123) |
| 10 |
CREATE USER u1 IDENTIFIED BY 'pwd_123'; |
| 11 |
create user u2 IDENTIFIED VIA ed25519 USING PASSWORD('pwd_123'); |
| 12 |
CREATE OR REPLACE USER u1 IDENTIFIED BY 'pwd_123'; |
| 13 |
SET PASSWORD FOR u1 = PASSWORD('pwd_123'); |
| 14 |
ALTER USER u1 IDENTIFIED BY 'pwd_123'; |
| 15 |
ALTER USER if exists u1 IDENTIFIED BY 'pwd_123'; |
| 16 |
SET STATEMENT max_statement_time=10 FOR ALTER USER u1 IDENTIFIED BY 'pwd_123'; |
| 17 |
alter user u2 identified VIA ed25519 USING password('pwd_123'); |
| 18 |
GRANT ALL ON test TO u1 IDENTIFIED BY "pwd_123"; |
| 19 |
GRANT ALL ON test TO u1 identified VIA ed25519 as password('pwd_123') or ed25519 using password('pwd_123'); |
| 20 |
CREATE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123"); |
| 21 |
CREATE OR REPLACE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123"); |
| 22 |
CREATE OR REPLACE SERVER s1 FOREIGN DATA WRAPPER mariadb OPTIONS ( PASSWORD "pwd_123"); |
| 23 |
# pattern should not be found |
| 24 |
NOT FOUND /pwd_123/ in server_audit.log |
| 25 |
# pattern should not be found |
| 26 |
# cleaunup |
| 27 |
DROP SERVER s1; |
| 28 |
DROP USER u1; |
| 29 |
DROP USER u2; |
| 30 |
set global server_audit_logging=off; |
| 31 |
UNINSTALL PLUGIN ed25519; |
| 32 |
UNINSTALL PLUGIN server_audit; |
| 33 |
# |
| 34 |
# MDEV-35604: SIGSEGV in filter_query_type | log_statement_ex / auditing |
| 35 |
# |
| 36 |
INSTALL PLUGIN server_audit SONAME 'server_audit'; |
| 37 |
SET GLOBAL server_audit_logging=ON; |
| 38 |
SET STATEMENT max_error_count=1 SELECT 1; |
| 39 |
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1' at line 1 |
| 40 |
SET GLOBAL server_audit_logging=OFF; |
| 41 |
UNINSTALL SONAME 'server_audit'; |
| 42 |
# end of 10.5 tests |