⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.124
Server IP:
50.28.103.30
Server:
Linux host.jcukjv-lwsites.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
Server Software:
nginx/1.28.0
PHP Version:
8.3.12
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
server
/
mysql
/
mysql-test
/
suite
/
x
/
r
/
View File Name :
connection_default_schema.result
# ## Preamble # install plugin mysqlx soname "mysqlx.so"; call mtr.add_suppression("Plugin mysqlx reported: .Failed at SSL configuration: .SSL context is not usable without certificate and private key.."); call mtr.add_suppression("Plugin mysqlx reported: .SSL_CTX_load_verify_locations failed."); # ## Testcase prepare # call mtr.add_suppression("Plugin mysqlx reported: '.*: Unsuccessful login attempt"); CREATE DATABASE xdb; CREATE DATABASE ydb; CREATE USER 'user_with_access_to_xdb'@'%'; CREATE USER 'user_with_access_to_ydb'@'%'; GRANT SELECT ON xdb.* TO 'user_with_access_to_xdb'@'%'; GRANT SELECT ON ydb.* TO 'user_with_access_to_ydb'@'%'; # ## Testcase execute # # ## Test group 1. ## ## Authenticate using an account which has permissions ## to selected schema. # # Using MySQL client # Checking if requested schema was selected. IF(DATABASE()='xdb','Success','Failure') Success # Using mysqlxtest # Checking if requested schema was selected. RUN SELECT IF(DATABASE()='xdb','Success','Failure') IF(DATABASE()='xdb','Success','Failure') Success 0 rows affected Mysqlx.Ok { msg: "bye!" } ok # ## Test group 2. ## ## Authenticate using an account which has not permissions ## to selected schema. # # Using MySQL client # Checking if requested schema was selected. EXPECTED_ERROR_CODE(42000): Access denied for user 'user_with_access_to_xdb'@'%' to database 'ydb' # Using mysqlxtest # Checking if requested schema was selected. in main, line 0:ERROR: Access denied for user 'user_with_access_to_xdb'@'%' to database 'ydb' (EXPECTED_ERROR_CODE) not ok # ## Test group 3. ## ## Authenticate using plain X Protocol flows to schame that: ## ## * account has permissions ## * account has not permissions # connecting... active session is now 'non_roo_user' Login OK closing session non_roo_user Mysqlx.Ok { msg: "bye!" } switched to session default connecting... active session is now 'non_roo_user' Got expected error: Access denied for user 'user_with_access_to_ydb'@'%' to database 'xdb' (code 1044) aborting session non_roo_user switched to session default Mysqlx.Ok { msg: "bye!" } # ## Cleanup # DROP USER 'user_with_access_to_xdb'@'%'; DROP USER 'user_with_access_to_ydb'@'%'; DROP DATABASE xdb; DROP DATABASE ydb; UNINSTALL PLUGIN mysqlx;