Added support for various authentication algorithms

This commit is contained in:
Michal Schorm 2024-06-10 23:17:30 +02:00
parent 7831572b3f
commit 5f8aa3c33c

View File

@ -46,10 +46,21 @@
%bcond config 0 %bcond config 0
# Various plugins # Various plugins
# TO-DO:
# Need to check and fix the ON/OFF matrix of those plugins.
# It seems the current implementation is buggy, e.g.:
# - ldap needs krb5-devel too
# - when kr5-devel is part of the buildroot, kerberos plugin is compiled no matter the WITH_AUTHENTICATION_KERBEROS value
# - when fido is disabled but ldap enabled, authentication_oci_client.so is still built
# To avoid issues, leave either all ON or all OFF.
%if 0%{?fedora} %if 0%{?fedora}
%bcond fido 1 %bcond fido 1
%bcond kerberos 1
%bcond ldap 1
%else %else
%bcond fido 0 %bcond fido 0
%bcond kerberos 0
%bcond ldap 0
%endif %endif
# For deep debugging we need to build binaries with extra debug info # For deep debugging we need to build binaries with extra debug info
@ -220,6 +231,10 @@ BuildRequires: systemd
# Since MySQL 8.0.28 # Since MySQL 8.0.28
%{?with_fido:BuildRequires: libfido2-devel} %{?with_fido:BuildRequires: libfido2-devel}
%{?with_kerberos:BuildRequires: krb5-devel}
%{?with_ldap:BuildRequires: openldap-devel cyrus-sasl-devel cyrus-sasl-scram}
Requires: bash coreutils grep Requires: bash coreutils grep
Requires: %{pkgname}-common = %{sameevr} Requires: %{pkgname}-common = %{sameevr}
@ -580,6 +595,8 @@ cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} \
-DWITH_MECAB=system \ -DWITH_MECAB=system \
-DWITH_FIDO=%{?with_fido:system}%{!?with_fido:none} \ -DWITH_FIDO=%{?with_fido:system}%{!?with_fido:none} \
-DWITH_AUTHENTICATION_FIDO=%{?with_fido:ON}%{!?with_fido:OFF} \ -DWITH_AUTHENTICATION_FIDO=%{?with_fido:ON}%{!?with_fido:OFF} \
-DWITH_AUTHENTICATION_KERBEROS=%{?with_kerberos:ON}%{!?with_kerberos:OFF} \
-DWITH_AUTHENTICATION_LDAP=%{?with_ldap:ON}%{!?with_ldap:OFF} \
-DWITH_BOOST=boost \ -DWITH_BOOST=boost \
-DREPRODUCIBLE_BUILD=OFF \ -DREPRODUCIBLE_BUILD=OFF \
-DCMAKE_C_FLAGS="%{optflags}%{?with_debug: -fno-strict-overflow -Wno-unused-result -Wno-unused-function -Wno-unused-but-set-variable}" \ -DCMAKE_C_FLAGS="%{optflags}%{?with_debug: -fno-strict-overflow -Wno-unused-result -Wno-unused-function -Wno-unused-but-set-variable}" \
@ -903,6 +920,8 @@ fi
%{_libdir}/mysql/plugin/auth_socket.so %{_libdir}/mysql/plugin/auth_socket.so
%{?with_fido:%{_libdir}/mysql/plugin/authentication_fido_client.so} %{?with_fido:%{_libdir}/mysql/plugin/authentication_fido_client.so}
%{?with_fido:%{_libdir}/mysql/plugin/authentication_oci_client.so} %{?with_fido:%{_libdir}/mysql/plugin/authentication_oci_client.so}
%{?with_kerberos:%{_libdir}/mysql/plugin/authentication_kerberos_client.so}
%{?with_ldap:%{_libdir}/mysql/plugin/authentication_ldap_sasl_client.so}
%{_libdir}/mysql/plugin/component_audit_api_message_emit.so %{_libdir}/mysql/plugin/component_audit_api_message_emit.so
%{_libdir}/mysql/plugin/component_keyring_file.so %{_libdir}/mysql/plugin/component_keyring_file.so
%{_libdir}/mysql/plugin/component_log_filter_dragnet.so %{_libdir}/mysql/plugin/component_log_filter_dragnet.so