mariadb/plugin/auth_gssapi/mysql-test/auth_gssapi/basic.test
Vladislav Vaintroub 125e172a2b MDEV-26715 Windows/installer - allow passwordless login for root
Allow passwordless login in addition to usual login with password, when
creating 'root' user during install.

The effect of that change is that "local administrators" group are
allowed to connect as root user. This is done via gssapi authentication
plugin.

Clients that are not aware of gssapi client plugin, can still login with
password credentials.
2022-11-08 14:58:47 +01:00

41 lines
1.2 KiB
Text

#
# CREATE USER without 'AS' clause
#
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
eval CREATE USER '$GSSAPI_SHORTNAME' IDENTIFIED WITH gssapi;
connect (con1,localhost,$GSSAPI_SHORTNAME,,);
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
SELECT USER(),CURRENT_USER();
disconnect con1;
connection default;
--replace_result $GSSAPI_SHORTNAME GSSAPI_SHORTNAME
eval DROP USER '$GSSAPI_SHORTNAME';
CREATE USER nosuchuser IDENTIFIED WITH gssapi;
--disable_query_log
--replace_regex /actual name '.*'/actual name 'GSSAPI_SHORTNAME'/
--error ER_ACCESS_DENIED_ERROR
connect (con1,localhost,nosuchuser,,);
--enable_query_log
DROP USER nosuchuser;
#
# CREATE USER with 'AS' clause
#
--replace_result $GSSAPI_FULLNAME GSSAPI_FULLNAME
eval CREATE USER usr1 IDENTIFIED WITH gssapi as '$GSSAPI_FULLNAME';
connect (con1,localhost,usr1,,);
--replace_result $GSSAPI_FULLNAME GSSAPI_FULLNAME
SELECT USER(),CURRENT_USER();
disconnect con1;
connection default;
DROP USER usr1;
CREATE USER nosuchuser IDENTIFIED WITH gssapi AS 'nosuchuser@EXAMPLE.COM';
--disable_query_log
--replace_regex /actual name '.*'/actual name 'GSSAPI_FULLNAME'/
--error ER_ACCESS_DENIED_ERROR
connect (con1,localhost,nosuchuser,,);
--enable_query_log
DROP USER nosuchuser;