Skip to content

Commit a6e29cd

Browse files
WL#15937: Remove authentication_fido plugin
Description: - Removed authentication_fido and authentication_fido_client - Removed MySQL client program option --fido-register-factor - Updated packaging scripts - Removed references to WITH_AUTHENTICATION_FIDO from cmake scripts Change-Id: I57c6993986c058246739a90b0d5f7efea68555d7
1 parent 1e5658f commit a6e29cd

24 files changed

+38
-1010
lines changed

CMakeLists.txt

+3-20
Original file line numberDiff line numberDiff line change
@@ -855,21 +855,15 @@ OPTION(WITH_AUTHENTICATION_KERBEROS
855855
${WITH_AUTHENTICATION_KERBEROS_DEFAULT})
856856

857857
IF(WITH_INTERNAL AND (NOT SOLARIS))
858-
SET(WITH_AUTHENTICATION_FIDO_DEFAULT ON)
859858
SET(WITH_AUTHENTICATION_WEBAUTHN_DEFAULT ON)
860859
ELSE()
861-
SET(WITH_AUTHENTICATION_FIDO_DEFAULT OFF)
862860
SET(WITH_AUTHENTICATION_WEBAUTHN_DEFAULT OFF)
863861
ENDIF()
864862

865863
IF(WITH_INTERNAL)
866864
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/internal/cmake)
867865
ENDIF()
868866

869-
OPTION(WITH_AUTHENTICATION_FIDO
870-
"Report error if the FIDO authentication plugin cannot be built."
871-
${WITH_AUTHENTICATION_FIDO_DEFAULT})
872-
873867
OPTION(WITH_AUTHENTICATION_WEBAUTHN
874868
"Report error if the WEBAUTHN authentication plugin cannot be built."
875869
${WITH_AUTHENTICATION_WEBAUTHN_DEFAULT})
@@ -878,7 +872,6 @@ OPTION(WITH_AUTHENTICATION_WEBAUTHN
878872
# Also default ON in pushbuild, for our community builds.
879873
IF(WITH_AUTHENTICATION_KERBEROS OR
880874
WITH_AUTHENTICATION_LDAP OR
881-
WITH_AUTHENTICATION_FIDO OR
882875
WITH_AUTHENTICATION_WEBAUTHN OR
883876
DEFINED ENV{PB2WORKDIR})
884877
SET(WITH_AUTHENTICATION_CLIENT_PLUGINS_DEFAULT ON)
@@ -891,8 +884,6 @@ ENDIF()
891884
# authentication_kerberos_client.so
892885
# The LDAP client authentication plugin
893886
# authentication_ldap_sasl_client.so
894-
# The FIDO client authentication plugin
895-
# authentication_fido_client.so
896887
# The WEBAUTHN client authentication plugin
897888
# authentication_webauthn_client.so
898889
# The OCI client authentication plugin
@@ -902,7 +893,6 @@ OPTION(WITH_AUTHENTICATION_CLIENT_PLUGINS
902893
${WITH_AUTHENTICATION_CLIENT_PLUGINS_DEFAULT})
903894

904895
IF(NOT WITH_AUTHENTICATION_WEBAUTHN AND
905-
NOT WITH_AUTHENTICATION_FIDO AND
906896
NOT WITH_AUTHENTICATION_CLIENT_PLUGINS)
907897
SET(WITH_FIDO "none")
908898
SET(WITH_FIDO "none" CACHE STRING "fido2 is disabled")
@@ -1975,30 +1965,23 @@ IF(APPLE)
19751965
ENDFOREACH()
19761966
ENDIF()
19771967

1978-
IF(WITH_AUTHENTICATION_FIDO OR WITH_AUTHENTICATION_WEBAUTHN OR
1968+
IF(WITH_AUTHENTICATION_WEBAUTHN OR
19791969
WITH_AUTHENTICATION_CLIENT_PLUGINS)
19801970
IF(WITH_FIDO STREQUAL "system" AND
19811971
NOT WITH_SSL STREQUAL "system")
1982-
IF (WITH_AUTHENTICATION_FIDO)
1983-
MESSAGE(WARNING "-DWITH_AUTHENTICATION_FIDO=ON")
1984-
ENDIF()
19851972
IF (WITH_AUTHENTICATION_WEBAUTHN)
19861973
MESSAGE(WARNING "-DWITH_AUTHENTICATION_WEBAUTHN=ON")
19871974
ENDIF()
19881975
MESSAGE(FATAL_ERROR "Inconsistent options for FIDO/SSL")
19891976
ENDIF()
19901977

19911978
# FIDO (or libudev) missing, warn about what is missing, and break the build.
1992-
IF((WITH_AUTHENTICATION_FIDO OR WITH_AUTHENTICATION_WEBAUTHN) AND
1979+
IF(WITH_AUTHENTICATION_WEBAUTHN AND
19931980
NOT FIDO_FOUND)
19941981
SET(UDEV_WARN_MISSING)
19951982
SET(FIDO_WARN_MISSING)
19961983
WARN_MISSING_SYSTEM_UDEV(UDEV_WARN_MISSING)
19971984
WARN_MISSING_SYSTEM_FIDO(FIDO_WARN_MISSING)
1998-
IF (WITH_AUTHENTICATION_FIDO)
1999-
MESSAGE(FATAL_ERROR
2000-
"-DWITH_AUTHENTICATION_FIDO=ON, but missing required libraries")
2001-
ENDIF()
20021985
IF (WITH_AUTHENTICATION_WEBAUTHN)
20031986
MESSAGE(FATAL_ERROR
20041987
"-DWITH_AUTHENTICATION_WEBAUTHN=ON, but missing required libraries")
@@ -2055,7 +2038,7 @@ IF(WITH_PROTOBUF STREQUAL "bundled" OR WITH_FIDO STREQUAL "bundled")
20552038
# Do not break the build here in case of missing libudev on Linux.
20562039
SET(UDEV_WARN_MISSING FALSE)
20572040
WARN_MISSING_SYSTEM_UDEV(UDEV_WARN_MISSING)
2058-
IF((WITH_AUTHENTICATION_FIDO OR WITH_AUTHENTICATION_WEBAUTHN
2041+
IF((WITH_AUTHENTICATION_WEBAUTHN
20592042
OR WITH_AUTHENTICATION_CLIENT_PLUGINS) AND NOT UDEV_WARN_MISSING)
20602043
# Silence warning about CMP0075
20612044
CMAKE_PUSH_CHECK_STATE()

client/common/user_registration.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
4040
#define CAPABILITY_BIT_LENGTH 1
4141

4242
/**
43-
This helper method parses --register-factor/--fido-register-factor
43+
This helper method parses --register-factor
4444
option values, and inserts the parsed values in list.
4545
4646
@param [in] what_factor Comma separated list of values, which specifies
@@ -75,7 +75,7 @@ bool parse_register_option(const char *what_factor,
7575
This helper method is used to perform device registration against a user
7676
account.
7777
78-
Please refer @ref sect_fido_info for more information.
78+
Please refer @ref sect_webauthn_info for more information.
7979
8080
@param [in] mysql_handle mysql connection handle
8181
@param [in] register_option Comma separated list of values, which
@@ -95,7 +95,7 @@ bool user_device_registration(MYSQL *mysql_handle, char *register_option,
9595
ulong *lengths;
9696
uchar *server_challenge = nullptr;
9797
uchar *server_challenge_response = nullptr;
98-
std::string client_plugin_name{"authentication_fido_client"};
98+
std::string client_plugin_name;
9999
struct st_mysql_client_plugin *plugin_handler = nullptr;
100100
std::stringstream err{};
101101

@@ -112,7 +112,7 @@ bool user_device_registration(MYSQL *mysql_handle, char *register_option,
112112
std::vector<unsigned int> factors;
113113
if (parse_register_option(register_option, factors)) {
114114
err << "Incorrect value specified for "
115-
"--register-factor/--fido-register-factor option. "
115+
"--register-factor option. "
116116
"Correct values can be '2', '3', '2,3' or '3,2'.";
117117
print_error(false);
118118
return true;

client/mysql.cc

+2-24
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ static char *shared_memory_base_name = nullptr;
245245
static uint opt_protocol = 0;
246246
static const CHARSET_INFO *charset_info = &my_charset_latin1;
247247

248-
static char *opt_fido_register_factor = nullptr;
249248
static char *opt_oci_config_file = nullptr;
250249
static char *opt_authentication_oci_client_config_profile = nullptr;
251250
static char *opt_register_factor = nullptr;
@@ -2063,11 +2062,6 @@ static struct my_option my_long_options[] = {
20632062
"Directory path safe for LOAD DATA LOCAL INFILE to read from.",
20642063
&opt_load_data_local_dir, &opt_load_data_local_dir, nullptr, GET_STR,
20652064
REQUIRED_ARG, 0, 0, 0, nullptr, 0, nullptr},
2066-
{"fido-register-factor", 0,
2067-
"Specifies authentication factor, for which registration needs to be "
2068-
"done.",
2069-
&opt_fido_register_factor, &opt_fido_register_factor, nullptr, GET_STR,
2070-
REQUIRED_ARG, 0, 0, 0, nullptr, 0, nullptr},
20712065
{"authentication-oci-client-config-profile", 0,
20722066
"Specifies the configuration profile whose configuration options are to "
20732067
"be read from the OCI configuration file. Default is DEFAULT.",
@@ -4995,25 +4989,9 @@ static int sql_real_connect(char *host, char *database, char *user, char *,
49954989
}
49964990

49974991
/* do token device registration */
4998-
if (opt_fido_register_factor || opt_register_factor) {
4992+
if (opt_register_factor) {
49994993
char errmsg[FN_REFLEN + 1]{0};
5000-
if (opt_fido_register_factor) {
5001-
put_info(
5002-
"--fido-register-factor option is deprecreted, instead use "
5003-
"--register-factor.",
5004-
INFO_INFO);
5005-
if (opt_register_factor) {
5006-
put_info(
5007-
"--register-factor is specified. Value of --fido-register-factor "
5008-
"will be ignored.",
5009-
INFO_INFO);
5010-
}
5011-
}
5012-
5013-
if (user_device_registration(&mysql_handle,
5014-
opt_register_factor ? opt_register_factor
5015-
: opt_fido_register_factor,
5016-
errmsg)) {
4994+
if (user_device_registration(&mysql_handle, opt_register_factor, errmsg)) {
50174995
put_info(errmsg, INFO_ERROR);
50184996
return 1;
50194997
}

cmake/fido2.cmake

+1-2
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ FUNCTION(MYSQL_USE_BUNDLED_FIDO)
166166
SET(FIDO_FOUND FALSE)
167167
SET(FIDO_FOUND FALSE PARENT_SCOPE)
168168
ENDIF()
169-
# So that we skip authentication_fido_client.so
169+
# So that we skip authentication_webauthn_client.so
170170
IF(SOLARIS)
171171
SET(FIDO_FOUND FALSE)
172172
SET(FIDO_FOUND FALSE PARENT_SCOPE)
@@ -187,7 +187,6 @@ MACRO(MYSQL_CHECK_FIDO)
187187
SET(OPENSSL_IS_COMPATIBLE_WITH_BUNDLED_FIDO ON)
188188
ELSE()
189189
SET(OPENSSL_IS_COMPATIBLE_WITH_BUNDLED_FIDO OFF)
190-
SET(WITH_AUTHENTICATION_FIDO OFF)
191190
SET(WITH_AUTHENTICATION_WEBAUTHN OFF)
192191
ENDIF()
193192

extra/libfido2/libfido2-1.13.0/src/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ ELSEIF(APPLE)
152152
TARGET_LINK_LIBRARIES(fido2 "-framework CoreFoundation" "-framework IOKit")
153153
ENDIF()
154154

155-
IF(WITH_AUTHENTICATION_FIDO OR WITH_AUTHENTICATION_WEBAUTHN
156-
OR WITH_AUTHENTICATION_CLIENT_PLUGINS)
155+
IF(WITH_AUTHENTICATION_WEBAUTHN OR WITH_AUTHENTICATION_CLIENT_PLUGINS)
157156
INSTALL_PRIVATE_LIBRARY(fido2)
158157
ENDIF()
159158

libmysql/fido_client/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,5 @@
2323
# Common
2424
ADD_SUBDIRECTORY(common)
2525

26-
# FIDO authentication client plugin
27-
ADD_SUBDIRECTORY(authentication_fido)
28-
2926
# FIDO webauthn authentication client plugin
3027
ADD_SUBDIRECTORY(authentication_webauthn)

libmysql/fido_client/authentication_fido/CMakeLists.txt

-67
This file was deleted.

0 commit comments

Comments
 (0)