{"id":1029,"date":"2012-04-03T15:41:57","date_gmt":"2012-04-03T19:41:57","guid":{"rendered":"http:\/\/www.matthewgkeller.com\/blog\/?p=1029"},"modified":"2012-04-03T15:41:57","modified_gmt":"2012-04-03T19:41:57","slug":"nconf-1-3-0-pass-through-httpd-auth","status":"publish","type":"post","link":"http:\/\/www.matthewgkeller.com\/blog\/2012\/04\/03\/nconf-1-3-0-pass-through-httpd-auth\/","title":{"rendered":"NConf 1.3.0 Pass-through HTTPD Auth"},"content":{"rendered":"<p>If you&#8217;d like to use <a href=\"http:\/\/www.nconf.org\">NConf<\/a>, but want your HTTPD, e.g. <a href=\"http:\/\/httpd.apache.org\/\">Apache<\/a>, to do the auth for it, apply the below patch to set the <a href=\"http:\/\/www.nconf.org\">NConf<\/a> user to the currently authenticated user.<\/p>\n<pre>--- include\/head.php.orig\u00c2\u00a0\u00c2\u00a0 \u00c2\u00a02012-04-03 19:34:13.774594705 +0000\r\n+++ include\/head.php\u00c2\u00a0\u00c2\u00a0 \u00c2\u00a02012-04-03 19:21:39.470169672 +0000\r\n@@ -70,7 +70,12 @@\r\n\u00c2\u00a0}else{\r\n\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 \/\/ NO authentication\r\n\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 $_SESSION['group'] = GROUP_ADMIN;\r\n-\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 $_SESSION[\"userinfos\"]['username'] = GROUP_ADMIN;\r\n+\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 # M@\r\n+\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 if( isset($_SERVER['REMOTE_USER']) ){\r\n+\u00c2\u00a0\u00c2\u00a0 \u00c2\u00a0$_SESSION[\"userinfos\"]['username'] = $_SERVER['REMOTE_USER'];\r\n+\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 }else{\r\n+\u00c2\u00a0\u00c2\u00a0 \u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 \u00c2\u00a0$_SESSION[\"userinfos\"]['username'] = GROUP_ADMIN;\r\n+\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 }\r\n\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 message($debug, 'authentication is disabled');\r\n\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 message($debug, $_SESSION[\"group\"].' access granted');\r\n\u00c2\u00a0}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;d like to use NConf, but want your HTTPD, e.g. Apache, to do the auth for it, apply the below patch to set the NConf user to the currently authenticated user. &#8212; include\/head.php.orig\u00c2\u00a0\u00c2\u00a0 \u00c2\u00a02012-04-03 19:34:13.774594705 +0000 +++ include\/head.php\u00c2\u00a0\u00c2\u00a0 \u00c2\u00a02012-04-03 &hellip; <a href=\"http:\/\/www.matthewgkeller.com\/blog\/2012\/04\/03\/nconf-1-3-0-pass-through-httpd-auth\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/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":[5,10,17],"tags":[],"class_list":["post-1029","post","type-post","status-publish","format-standard","hentry","category-general-coding","category-linuxy","category-work"],"_links":{"self":[{"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/posts\/1029","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/comments?post=1029"}],"version-history":[{"count":0,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/posts\/1029\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/media?parent=1029"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/categories?post=1029"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.matthewgkeller.com\/blog\/wp-json\/wp\/v2\/tags?post=1029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}