655 lines
12 KiB
Plaintext
655 lines
12 KiB
Plaintext
call mtr.add_suppression("Capability expired password failed with error: Invalid data, expected numeric type");
|
|
--sleep 2
|
|
--source include/xplugin_preamble.inc
|
|
--source include/xplugin_ssl_warnings_suppression.inc
|
|
--source include/xplugin_create_user.inc
|
|
|
|
--write_file $MYSQL_TMP_DIR/mysqlx-capabilities-get.tmp
|
|
-->import connection.macro
|
|
-->callmacro Verify_its_xprotocol_connection
|
|
Mysqlx.Connection.CapabilitiesGet {
|
|
}
|
|
-->recv
|
|
EOF
|
|
|
|
--write_file $MYSQL_TMP_DIR/mysqlx-capabilities-get-success.tmp
|
|
-->import connection.macro
|
|
-->callmacro Verify_its_xprotocol_connection
|
|
|
|
Mysqlx.Connection.CapabilitiesGet {
|
|
}
|
|
-->recv
|
|
|
|
-->echo setting Not existing capability,expect error
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "NotExistingCapability"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_BOOL
|
|
v_bool: 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
-->recvtype Mysqlx.Error
|
|
|
|
-->echo try setting read only doc.formats capabilities
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "doc.formats"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_STRING
|
|
v_string {
|
|
value: "text"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Error
|
|
|
|
-->echo Try setting auth capabilities which is read only
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "authentication.mechanisms"
|
|
value {
|
|
type: ARRAY
|
|
array {
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_STRING
|
|
v_string {
|
|
value: "MYSQL41"
|
|
}
|
|
}
|
|
}
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_STRING
|
|
v_string {
|
|
value: "PLAIN"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Error
|
|
|
|
-->echo Error when setting a duplicated capability
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "client.interactive"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_BOOL
|
|
v_bool: 1
|
|
}
|
|
}
|
|
}
|
|
capabilities {
|
|
name: "client.interactive"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_BOOL
|
|
v_bool: 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recverror ER_X_DUPLICATED_CAPABILITIES
|
|
-->echo After setting a duplicated capability it should be possible to set valid capability
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "client.interactive"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_BOOL
|
|
v_bool: 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvok
|
|
|
|
-->echo setting Read only message.maxSendLength cap
|
|
-->echo this param is not ready and needs changes in result file once available
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "message.maxSendLength"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_STRING
|
|
v_string {
|
|
value: "int32"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Error
|
|
|
|
-->echo setting Read only message.maxReceiveLength cap
|
|
-->echo this param is not ready and needs changes in result file once available
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "message.maxReceiveLength"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_STRING
|
|
v_string {
|
|
value: "int32"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Error
|
|
|
|
-->echo setting read/write tls param with true while the SSL isn't configured
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_BOOL
|
|
v_bool:1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Error
|
|
|
|
-->echo setting read/write tls param with false while the SSL isn't configured
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_BOOL
|
|
v_bool:0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Error
|
|
EOF
|
|
--write_file $MYSQL_TMP_DIR/mysqlx-capabilities-failure.tmp
|
|
-->import connection.macro
|
|
-->callmacro Verify_its_xprotocol_connection
|
|
|
|
-->echo setting read/write tls param with String type instead of Bool
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_STRING
|
|
v_string {value: "1"}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Error
|
|
EOF
|
|
|
|
--write_file $MYSQL_TMP_DIR/mysqlx-setcapabilities-invalid.tmp
|
|
-->import connection.macro
|
|
-->callmacro Verify_its_xprotocol_connection
|
|
|
|
-->echo setting read/write tls param with possible data types V_SINT,V_UINT ,V_NULL,V_OCTETS ,V_DOUBLE,V_FLOAT,V_STRING types instead of Bool
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_FLOAT
|
|
v_float:19.49
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Error
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_DOUBLE
|
|
v_double:1111111
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Error
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_NULL
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Error
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type:V_OCTETS
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Error
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type:V_UINT
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Error
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type:V_SINT
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Error
|
|
|
|
EOF
|
|
|
|
--write_file $MYSQL_TMP_DIR/mysqlx-check-bool-capabilities.tmp
|
|
-->import connection.macro
|
|
-->callmacro Verify_its_xprotocol_connection
|
|
|
|
-->macro Test_different_values_in_cap_set %NAME%
|
|
-->echo setting %NAME% param with possible invalid data types
|
|
|
|
-->echo setting %NAME% capability
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: %NAME%
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_BOOL
|
|
v_bool: 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Ok
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: %NAME%
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_BOOL
|
|
v_bool: 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Ok
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: %NAME%
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_FLOAT
|
|
v_float:1.0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Ok
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: %NAME%
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_FLOAT
|
|
v_float:0.0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Ok
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: %NAME%
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_DOUBLE
|
|
v_double:1.0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Ok
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: %NAME%
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_DOUBLE
|
|
v_double:0.0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Ok
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: %NAME%
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_UINT
|
|
v_unsigned_int:1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Ok
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: %NAME%
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_UINT
|
|
v_unsigned_int:0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Ok
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: %NAME%
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_SINT
|
|
v_signed_int:1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Ok
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: %NAME%
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_SINT
|
|
v_signed_int:0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recvtype Mysqlx.Ok
|
|
|
|
-->endmacro
|
|
|
|
-->callmacro Test_different_values_in_cap_set "client.pwd_expire_ok"
|
|
-->callmacro Test_different_values_in_cap_set "client.interactive"
|
|
|
|
EOF
|
|
|
|
--write_file $MYSQL_TMP_DIR/mysqlx-setcapabilities-tls-invalid.tmp
|
|
-->import connection.macro
|
|
-->callmacro Verify_its_xprotocol_connection
|
|
|
|
-->echo setting read/write tls param with possible invalid data types V_SINT,V_UINT ,V_NULL,V_OCTETS ,V_DOUBLE,V_FLOAT,V_STRING types instead of Bool
|
|
Mysqlx.Connection.CapabilitiesGet {
|
|
}
|
|
|
|
-->recvtype Mysqlx.Connection.Capabilities
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_BOOL
|
|
v_bool: 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
-->recv
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_FLOAT
|
|
v_float:19.49
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recv
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_DOUBLE
|
|
v_double:1111111
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recv
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type: V_NULL
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recv
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type:V_OCTETS
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recv
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type:V_UINT
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recv
|
|
|
|
Mysqlx.Connection.CapabilitiesSet {
|
|
capabilities {
|
|
capabilities {
|
|
name: "tls"
|
|
value {
|
|
type: SCALAR
|
|
scalar {
|
|
type:V_SINT
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-->recv
|
|
|
|
EOF
|
|
|
|
--exec $MYSQLXTEST -u x_root --password='' -h127.0.0.1 --no-auth --file=$MYSQL_TMP_DIR/mysqlx-capabilities-get-success.tmp 2>&1
|
|
|
|
--exec $MYSQLXTEST -u x_root --password='' -h127.0.0.1 --no-auth --file=$MYSQL_TMP_DIR/mysqlx-capabilities-failure.tmp 2>&1
|
|
|
|
--exec $MYSQLXTEST -u x_root --password='' -h127.0.0.1 --no-auth --file=$MYSQL_TMP_DIR/mysqlx-setcapabilities-invalid.tmp 2>&1
|
|
|
|
--exec $MYSQLXTEST -u x_root --password='' -h127.0.0.1 --no-auth --ssl-key=$MYSQL_TEST_DIR/std_data/server-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server-cert.pem --file=$MYSQL_TMP_DIR/mysqlx-setcapabilities-tls-invalid.tmp 2>&1
|
|
|
|
--exec $MYSQLXTEST -u x_root --password='' -h127.0.0.1 --no-auth --file=$MYSQL_TMP_DIR/mysqlx-setcapabilities-tls-invalid.tmp 2>&1
|
|
|
|
--exec $MYSQLXTEST -u root --password='' -h127.0.0.1 --no-auth --file=$MYSQL_TMP_DIR/mysqlx-check-bool-capabilities.tmp 2>&1
|
|
|
|
#check Get and Set capabilities with invalid user details
|
|
--exec $MYSQLXTEST -u invalid --password='invalid' -h127.0.0.1 --no-auth --file=$MYSQL_TMP_DIR/mysqlx-capabilities-get-success.tmp 2>&1
|
|
|
|
--echo Restart server and verify if ssl callback works
|
|
let $restart_parameters = restart: --ssl=1;
|
|
--source include/restart_mysqld.inc
|
|
|
|
--echo capabilities.result checks the presence of tls cap
|
|
--exec $MYSQLXTEST -u x_root --password='' -h127.0.0.1 --no-auth --file=$MYSQL_TMP_DIR/mysqlx-capabilities-get.tmp 2>&1
|
|
|
|
--remove_file $MYSQL_TMP_DIR/mysqlx-capabilities-get-success.tmp
|
|
--remove_file $MYSQL_TMP_DIR/mysqlx-capabilities-failure.tmp
|
|
--remove_file $MYSQL_TMP_DIR/mysqlx-setcapabilities-invalid.tmp
|
|
--remove_file $MYSQL_TMP_DIR/mysqlx-setcapabilities-tls-invalid.tmp
|
|
--remove_file $MYSQL_TMP_DIR/mysqlx-capabilities-get.tmp
|
|
--source include/xplugin_drop_user.inc
|