1.6. Configuring Kerberos authentication for the Apache HTTP web server
To perform Kerberos authentication in the Apache HTTP web server, RHEL 10 uses the mod_auth_gssapi Apache module. The Generic Security Services API (GSSAPI) is an interface for applications that make requests to use security libraries, such as Kerberos. The gssproxy service allows to implement privilege separation for the httpd server, which optimizes this process from the security point of view.
The mod_auth_gssapi module replaces the removed mod_auth_kerb module.
Prerequisites
-
The
httpd,mod_auth_gssapiandgssproxypackages are installed. -
The Apache web server is set up and the
httpdservice is running.
1.6.1. Setting up GSS-Proxy in an IdM environment 复制链接链接已复制到粘贴板!
You can now set up the GSS-Proxy to perform Kerberos authentication in the Apache HTTP web server.
Procedure
Enable access to the
keytabfile ofHTTP/<SERVER_NAME>@realmprincipal by creating the service principal:# ipa service-add HTTP/<SERVER_NAME>Retrieve the
keytabfor the principal stored in the/etc/gssproxy/http.keytabfile:# ipa-getkeytab -s $(awk '/^server =/ {print $3}' /etc/ipa/default.conf) -k /etc/gssproxy/http.keytab -p HTTP/$(hostname -f)This step sets permissions to 400, thus only the
rootuser has access to thekeytabfile. Theapacheuser does not.Create the
/etc/gssproxy/80-httpd.conffile with the following content:[service/HTTP] mechs = krb5 cred_store = keytab:/etc/gssproxy/http.keytab cred_store = ccache:/var/lib/gssproxy/clients/krb5cc_%U euid = apacheRestart and enable the
gssproxyservice:# systemctl restart gssproxy.service # systemctl enable gssproxy.service