{"id":348,"date":"2020-11-23T12:11:00","date_gmt":"2020-11-23T18:11:00","guid":{"rendered":"http:\/\/www.polysyncronism.com\/wordpress\/?p=348"},"modified":"2020-11-25T10:35:26","modified_gmt":"2020-11-25T16:35:26","slug":"apache-ad-linux","status":"publish","type":"post","link":"http:\/\/www.polysyncronism.com\/wordpress\/2020\/11\/23\/apache-ad-linux\/","title":{"rendered":"Apache &#8211; AD &#8211; Linux"},"content":{"rendered":"\n<p>I have recently started to experiment with getting a linux webserver to allow for Active Directory users to connect with their own username passed to the web server.<\/p>\n\n\n\n<p>This is proving to be very difficult.  It shouldn&#8217;t be that hard to get the username in the linux server for the windows intranet user that is connecting.<\/p>\n\n\n\n<p>One of the challenges is that there are so many variables to consider.  Version of OS, Version of apache.  <\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\"><div class=\"wp-block-group__inner-container\"><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">What is my linux version?<\/h2>\n\n\n\n<p>I&#8217;m currently using Centos 8.1.  I was able to determine this because I did the install, but if you did it a while ago, or did several other servers since then and you are not sure what version you are on, then use this command.<\/p>\n\n\n\n<p><a href=\"https:\/\/linuxconfig.org\/how-to-check-centos-version\">https:\/\/linuxconfig.org\/how-to-check-centos-version<\/a><\/p>\n\n\n\n<p><strong>cat \/etc\/centos-release<\/strong><\/p>\n\n\n\n<p>CentOS Linux release 8.1.1911 (Core)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is my Apache version?<\/h2>\n\n\n\n<p><strong>httpd -v<\/strong><\/p>\n\n\n\n<p>Server version: Apache\/2.4.37 (centos)<br>Server built: Sep 15 2020 15:41:16<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What Apache modules are needed for HTTP Authentication?<\/h2>\n\n\n\n<p>This might not be correct, but all indicators seem to point to this.<\/p>\n\n\n\n<p>I have gone down a lot of  rabbit holes.  I don&#8217;t know whether every avenue that I explored is necessary or not.<\/p>\n\n\n\n<p><a href=\"https:\/\/computingforgeeks.com\/install-apache-with-ssl-http2-on-rhel-centos\/\">https:\/\/computingforgeeks.com\/install-apache-with-ssl-http2-on-rhel-centos\/<\/a><\/p>\n\n\n\n<p>The&nbsp;<code><strong>mod_auth_kerb<\/strong><\/code>&nbsp;module has been replaced by the&nbsp;<code><strong>mod_auth_gssapi<\/strong><\/code>&nbsp;module.<\/p>\n\n\n\n<p><a href=\"http:\/\/www.jfcarter.net\/~jimc\/documents\/bugfix\/41-auth-kerb.html\">http:\/\/www.jfcarter.net\/~jimc\/documents\/bugfix\/41-auth-kerb.html<\/a><\/p>\n\n\n\n<p>Apache2-mod_auth_kerb Is Dead, Use Mod_auth_gssapi<\/p>\n\n\n\n<p><a href=\"https:\/\/jaosorior.dev\/2018\/keberos-for-keystone-with-mod_auth_gssapi\/\">https:\/\/jaosorior.dev\/2018\/keberos-for-keystone-with-mod_auth_gssapi\/<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where can I find documentation for mod_auth_gssapi?<\/h2>\n\n\n\n<p><a href=\"https:\/\/github.com\/gssapi\/mod_auth_gssapi\">https:\/\/github.com\/gssapi\/mod_auth_gssapi<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is the difference between HTTP Auth and Web Application Login?<\/h2>\n\n\n\n<p>I do not want Web Application logon, I want HTTP Auth to populate the user variable so that the user does not need to enter their username as long as they are logged into their windows machine.  <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What does the Apache Documenation say about Authentication and Authorization?<\/h2>\n\n\n\n<p><a href=\"http:\/\/httpd.apache.org\/docs\/current\/howto\/auth.html\">http:\/\/httpd.apache.org\/docs\/current\/howto\/auth.html<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Do I really need SSL in order to get the AD username on the web server?<\/h2>\n\n\n\n<p>I sure hope not!  Still looking into this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A very dark place&#8230;<\/h2>\n\n\n\n<p><a href=\"http:\/\/modauthkerb.sourceforge.net\/configure.html\">http:\/\/modauthkerb.sourceforge.net\/configure.html<\/a><\/p>\n\n\n\n<p>I probably should read this page, but I&#8217;m not ready to understand that yet&#8230;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is the difference between HOST and HTTP Service Principals?<\/h2>\n\n\n\n<p><a href=\"https:\/\/sssd.io\/docs\/users\/ldap_with_ad.html\">https:\/\/sssd.io\/docs\/users\/ldap_with_ad.html<\/a><\/p>\n\n\n\n<p>This is still a big mystery to me&#8230;  I believe that HTTP is for the web server authentication and HOST is for users on the machine.  I&#8217;m concerned with HTTP authentication.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is SetSpn for Windows Active Directory?<\/h2>\n\n\n\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/previous-versions\/windows\/it-pro\/windows-server-2012-r2-and-2012\/cc731241(v=ws.11)\">https:\/\/docs.microsoft.com\/en-us\/previous-versions\/windows\/it-pro\/windows-server-2012-r2-and-2012\/cc731241(v=ws.11)<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a Active Directory SPN?<\/h2>\n\n\n\n<p>A Service Principal Name (<strong>SPN<\/strong>) is a name in&nbsp;<strong>Active Directory<\/strong>&nbsp;that a client uses to uniquely identify an instance of a service. An&nbsp;<strong>SPN<\/strong>&nbsp;combines a service name with a computer and user account to form a type of service ID.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How can I use VBScript to list all my SPNs?<\/h2>\n\n\n\n<p><a href=\"https:\/\/github.com\/nidem\/kerberoast\/blob\/master\/GetUserSPNs.vbs\">https:\/\/github.com\/nidem\/kerberoast\/blob\/master\/GetUserSPNs.vbs<\/a><\/p>\n\n\n\n<p>Yes.  This script works.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Display the Keylist (Principals) in a Keytab File<\/h2>\n\n\n\n<p>This may be a bit early, but I&#8217;ll move it later.  The keytab file can be viewed on Linux using ktutil.<\/p>\n\n\n\n<p>The command to start ktutil to get to the ktutil prompt.<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.oracle.com\/cd\/E19683-01\/806-4078\/6jd6cjs1q\/index.html\">https:\/\/docs.oracle.com\/cd\/E19683-01\/806-4078\/6jd6cjs1q\/index.html<\/a><\/p>\n\n\n\n<pre>denver # \/usr\/bin\/ktutil\nktutil: read_kt \/etc\/krb5\/krb5.keytab \nktutil: list\nslot KVNO Principal \n---- ---- ---------------------------------------\n 1 5 host\/denver@EXAMPLE.COM ktutil: \nquit<\/pre>\n\n\n\n<p>Are there any good walkthroughs that come close?<\/p>\n\n\n\n<p><a href=\"https:\/\/imatviyenko.github.io\/blog\/2018\/09\/11\/Apache-AD-kerberos\">https:\/\/imatviyenko.github.io\/blog\/2018\/09\/11\/Apache-AD-kerberos<\/a><\/p>\n\n\n\n<p>This one comes very close, but I&#8217;m still having trouble getting it working.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting <\/h2>\n\n\n\n<p><a href=\"https:\/\/serverfault.com\/questions\/680289\/kerberos-kdc-has-no-support-for-encryption-type-while-getting-credentials\">https:\/\/serverfault.com\/questions\/680289\/kerberos-kdc-has-no-support-for-encryption-type-while-getting-credentials<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/23801169\/kdc-has-no-support-for-encryption-type-14\">https:\/\/stackoverflow.com\/questions\/23801169\/kdc-has-no-support-for-encryption-type-14<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What encryption types can windows do?<\/h2>\n\n\n\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-server\/administration\/windows-commands\/ktpass\">https:\/\/docs.microsoft.com\/en-us\/windows-server\/administration\/windows-commands\/ktpass<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Random kerberos links<\/h2>\n\n\n\n<p><a href=\"https:\/\/active-directory-wp.com\/docs\/Networking\/Single_Sign_On\/Kerberos_SSO_with_Apache_on_Linux.html\">https:\/\/active-directory-wp.com\/docs\/Networking\/Single_Sign_On\/Kerberos_SSO_with_Apache_on_Linux.html<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/community.spiceworks.com\/how_to\/91377-implementing-single-sign-on-on-windows-with-apache\">https:\/\/community.spiceworks.com\/how_to\/91377-implementing-single-sign-on-on-windows-with-apache<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/nextcloud\/user_saml\/issues\/250\">https:\/\/github.com\/nextcloud\/user_saml\/issues\/250<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">If I cannot get SSO working, I&#8217;ll use a logon page&#8230; :\/<\/h2>\n\n\n\n<p><a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_auth_form.html\">https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_auth_form.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have recently started to experiment with getting a linux webserver to allow for Active Directory users to connect with their own username passed to the web server. This is proving to be very difficult. It shouldn&#8217;t be that hard to get the username in the linux server for the windows intranet user that is &hellip; <a href=\"http:\/\/www.polysyncronism.com\/wordpress\/2020\/11\/23\/apache-ad-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Apache &#8211; AD &#8211; Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-348","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.polysyncronism.com\/wordpress\/wp-json\/wp\/v2\/posts\/348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.polysyncronism.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.polysyncronism.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.polysyncronism.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.polysyncronism.com\/wordpress\/wp-json\/wp\/v2\/comments?post=348"}],"version-history":[{"count":19,"href":"http:\/\/www.polysyncronism.com\/wordpress\/wp-json\/wp\/v2\/posts\/348\/revisions"}],"predecessor-version":[{"id":375,"href":"http:\/\/www.polysyncronism.com\/wordpress\/wp-json\/wp\/v2\/posts\/348\/revisions\/375"}],"wp:attachment":[{"href":"http:\/\/www.polysyncronism.com\/wordpress\/wp-json\/wp\/v2\/media?parent=348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.polysyncronism.com\/wordpress\/wp-json\/wp\/v2\/categories?post=348"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.polysyncronism.com\/wordpress\/wp-json\/wp\/v2\/tags?post=348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}