From 5f8aa3c33ccb9186b482b8c99c118f4cdc991cba Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 10 Jun 2024 23:17:30 +0200 Subject: [PATCH] Added support for various authentication algorithms --- mysql8.0.spec | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/mysql8.0.spec b/mysql8.0.spec index dc835cc..45c6f31 100644 --- a/mysql8.0.spec +++ b/mysql8.0.spec @@ -46,10 +46,21 @@ %bcond config 0 # 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} %bcond fido 1 +%bcond kerberos 1 +%bcond ldap 1 %else %bcond fido 0 +%bcond kerberos 0 +%bcond ldap 0 %endif # For deep debugging we need to build binaries with extra debug info @@ -220,6 +231,10 @@ BuildRequires: systemd # Since MySQL 8.0.28 %{?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: %{pkgname}-common = %{sameevr} @@ -580,6 +595,8 @@ cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} \ -DWITH_MECAB=system \ -DWITH_FIDO=%{?with_fido:system}%{!?with_fido:none} \ -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 \ -DREPRODUCIBLE_BUILD=OFF \ -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 %{?with_fido:%{_libdir}/mysql/plugin/authentication_fido_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_keyring_file.so %{_libdir}/mysql/plugin/component_log_filter_dragnet.so