<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Library Web Chic &#187; ssl</title>
	<atom:link href="http://www.librarywebchic.net/wordpress/tag/ssl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.librarywebchic.net/wordpress</link>
	<description>Resources for librarians who are interested in the application of web design and technologies in libraries</description>
	<lastBuildDate>Thu, 15 Jul 2010 20:13:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Wikiperiments</title>
		<link>http://www.librarywebchic.net/wordpress/2006/04/20/wikiperiments/</link>
		<comments>http://www.librarywebchic.net/wordpress/2006/04/20/wikiperiments/#comments</comments>
		<pubDate>Thu, 20 Apr 2006 19:05:01 +0000</pubDate>
		<dc:creator>Karen</dc:creator>
				<category><![CDATA[Wikis]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[mediawiki]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.librarywebchic.net/wordpress/2006/04/20/wikiperiments/</guid>
		<description><![CDATA[So I&#8217;ve been working on and off for a week and a half trying to figure out how to run a large scale wiki farm for the UH Libraries where all the Wiki&#8217;s would have the same basic template. The problems are similar to what I encountered when I worked on the UH Libraries weblogs [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been working on and off for a week and a half trying to figure out how to run a large scale wiki farm for the UH Libraries where all the Wiki&#8217;s would have the same basic template. The problems are similar to what I encountered when I worked on the UH Libraries weblogs project: scalability, easy of use, and end-user control. The number one issue is scalablity. I really don&#8217;t want to install multiple instances of the same wikis software. To do so would be effective and would create a maintainance nightmare everytime there was an upgrade to the software or we wanted to change the design/look and feel for the wikis.</p>
<p>The second issue with wiki and blog software is finding software which is easy to use both for the end-users and for the systems staff. Right now my department of three is responsible for a host of web-based applications including blogs and our soon to be implemented content management system. I want applications that are easy for us to modify and and maintain. This means leveraging our existing skills to their fullest. So I looked at wiki solutions that are PHP/MySQL-based. This builds on what we learned doing the blogging project. The third issue with installing wikis software is giving complete control to the end users. For me this means not only letting people maintain their own wikis but also be able to create their own wikis. This was a goal we never successfully reached with the blog project (much to my chagrin). I&#8217;m hoping to be able to overcome this barrier with the wiki project.</p>
<p>Last week I started with installing MediaWiki in wiki-farm mode. How does this differ from the standard MediaWiki install? Well for one thing the standard MediaWiki install is for one wiki rather than many. One way to solve this is to have multiple folders with the MediaWiki files and use a different MySQL database for each wiki. The problem with this is that you have to replace all the MediaWiki files in every directory when there is an upgrade. To solve this <a href="http://www.shawndouglas.com/wikifarm/">check out this page which talks about running a MediaWiki wiki-farm</a> on a Mac.
</p>
<p>Once I solve the wiki-farm issue, the next problem I needed to deal with was<br />
  authentication. I really don&#8217;t want my users to have to remember yet another<br />
  username and password. So I started investigating to see if MediaWiki will<br />
  work with LDAP. It will and there are <a href="http://meta.wikimedia.org/wiki/LDAP_Authentication">directions available that will walk you through the process of installation</a>.<br />
  You will need to have PHP must be installed with LDAP and SSL support. The<br />
  site doesn&#8217;t tell you how to tell if this is the case or if these aren&#8217;t installed<br />
  how to do it. So here is my basic run down of how to tell if you have the LDAP<br />
  and SSL support installed. </p>
<ol>
<li>Check to see if PHP is installed with LDAP and SSL support</li>
<li>On your server create a new file name phpinfo.php with the following lines<br />
&lt;?php<br />
phpinfo();<br />
?&gt;</li>
<li>Save the file in your web server directory</li>
<li>Open your web browser to the phpinfo.php file on your server</li>
<li>This will display information about your installation of PHP. Look for LDAP and OpenSSL. if you don&#8217;t see them they are missing and you need to install them</li>
</ol>
<p>I wish I could write a set of instructions on how to install these modules into PHP but every instance is different. Hopefully you won&#8217;t have to install from source. On many Linux systems you can use the package manager (in SUSE this is yast) to install what you need. Look for PHP-LDAP and SSL-PHP. For information on how to install from source a good place to start is <a href="http://us3.php.net/install">http://us3.php.net/install</a>.
</p>
<p>One thing that is essential if you choose to do this is make the usernames<br />
  and passwords being passed from the user to MediaWiki on to the LDAP server<br />
  secure. Sending passwords in the clear is VERY BAD and a BIG security threat.<br />
  This means that in your Local_Settings.php file make sure your wgLDAPUseSSL<br />
  variable is set to true. </p>
<p style="margin-left:2em;">//Use LDAPS (your system may default to using TLS over LDAP instead of LDAPS)<br />
  <br />
  //Recommended!!<br />
  <br />
$wgLDAPUseSSL = true;</p>
<p>Also in addition to follow the directions on the MediaWiki support site you should configure your server with SSL and LDAP installed and properly configured. I&#8217;ve put up <a href="http://www.librarywebchic.net/wordpress/2006/04/20/configuring-apache-for-ssl-and-ldap-authentication/">a set of directions on how to do this in another post</a> because the instruction are long. Once you&#8217;ve followed these steps you need to make sure that every time a user requests the MediaWiki login page that it requested securely. This means a url starting https://. To do this you need to change some settings in Apache. Below are the directions for Apache 2.0 .</p>
<ol>
<li>Open up and edit your default_server.conf file (/etc/apache2/default_server.conf)</li>
<li>Add the following lines<br />
      <br />
      RewriteEngine on<br />
      <br />
      RewriteRule ^/wiki_directory/(.*)/index.php/Special:Userlogin(.*) https://%{SERVER_NAME}/wiki_directory/$1/index.php/Special:Userlogin$2 [L,R]<br />
      <br />
      RewriteCond %{QUERY_STRING} ^title=Special:Userlogin<br />
      <br />
  RewriteRule ^/wiki_directory/(.*)/index.php https://%{SERVER_NAME}/wiki_directory/$1/index.php?%{QUERY_STRING} [L,R]</li>
<li>Save the file</li>
<li>Stop and restart Apache<br />
apache2ctl stop<br />
apache2ctl start</li>
</ol>
<p>This will force all requests for the pages where users login or create logins through a secure connection.
</p>
<p>I&#8217;ve been able to successfully get this running on the test wiki server and<br />
  will likely be porting it to a production environment in the next week. I still<br />
  have several issues to solve: RSS feeds, getting email from the wikis to work,<br />
  and creating my own layout and design for wikis. Overall, this is a good start<br />
  and I&#8217;ll keep writing about the wiki project as I make further headway.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.librarywebchic.net/wordpress/2006/04/20/wikiperiments/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Configuring Apache for SSL and LDAP authentication</title>
		<link>http://www.librarywebchic.net/wordpress/2006/04/20/configuring-apache-for-ssl-and-ldap-authentication/</link>
		<comments>http://www.librarywebchic.net/wordpress/2006/04/20/configuring-apache-for-ssl-and-ldap-authentication/#comments</comments>
		<pubDate>Thu, 20 Apr 2006 19:00:05 +0000</pubDate>
		<dc:creator>Karen</dc:creator>
				<category><![CDATA[Tech Configuration Tidbits]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.librarywebchic.net/wordpress/2006/04/20/configuring-apache-for-ssl-and-ldap-authentication/</guid>
		<description><![CDATA[Imagine you have a directory on your web server you want to protect so that people have to login to see the item in it. You don&#8217;t want to give them a different password to remember but use an existing username/password in an LDAP directory. You want to make sure that when they login that [...]]]></description>
			<content:encoded><![CDATA[<p>Imagine you have a directory on your web server you want to protect so that people have to login to see the item in it. You don&#8217;t want to give them a different password to remember but use an existing username/password in an LDAP directory. You want to make sure that when they login that their username and password are sent encrypted across the network. Below are directions to do exactly what I describe. That is if you have an LDAP server.
</p>
<p>
The Head of Computer and Networking Systems originally wrote these directions (which are amazing and better than most of what I found on the web) when I wanted to password protect our internal blogs. I&#8217;ve updated them to be more generic and posted them because they are relevant if you want to set up LDAP authentication for MediaWiki. Note that steps f to i in the section &#8220;Configure LDAPs authentication for Directory access&#8221;</p>
<h4>Set up SSL on Web Server </h4>
<ol>
<li>On the server where you want to perform SSL, Generate Server Private key (one time)
<ol style="list-style-type:lower-alpha">
<li>Remove default keys<br />
cd /etc/apache2/<br />
rm ssl.key/server.key<br />
rm ssl.crt/server.crt
</li>
<li>Generate new private key<br />
/usr/bin/openssl genrsa 1024 > /etc/apache2/ssl.key/server.key
</li>
<li>Set secure permissions on key file<br />
chmod go-rwx /etc/apache2/ssl.key/server.key</li>
</ol>
</li>
<li>Create self-signed certificate
<ol style="list-style-type:lower-alpha">
<li>Create certificate<br />
        <br />
        /usr/bin/openssl req -new -key /etc/apache2/ssl.key/server.key -x509 -days 365 -out<br />
        /etc/apache2/ssl.crt/server.crt</p>
<p>        You are about to be asked to enter information that will be incorporated<br />
        into your certificate request.<br />
        <br />
        What you are about to enter is what is called a Distinguished Name or a DN.<br />
        <br />
        There are quite a few fields but you can leave some blank<br />
        <br />
        For some fields there will be a default value,<br />
        If you enter &#8216;.&#8217;, the field will be left blank.<br />
        &#8212;&#8211;<br />
        <br />
        Country Name (2 letter code) [AU]:US<br />
        State or Province Name (full name) [Some-State]: State <br />
        Locality Name (eg, city) []: City <br />
        Organization Name (eg, company) [Internet Widgits Pty Ltd]: Some Organization <br />
        Organizational Unit Name (eg, section) []: Some Unit <br />
        Common Name (eg, YOUR name) []: server.webaddress.com<br />
        Email Address []: email@address.com </li>
</ol>
</li>
<li>Configure apache for SSL
<ol style="list-style-type:lower-alpha">
<li>Tell apache SSL port
<ol style="list-style-type:lower-roman">
<li>Edit /etc/apache2/listen.conf and remove # before:<br />
              Listen 443
            </li>
<li>Copy virtual host template file (must end in .conf)<br /> <br />
              cp /etc/apache2/vhosts.d/vhost-ssl.template /etc/apache2/vhosts.d/vhost-ssl.conf
              </li>
<li>Change the following lines in /etc/apache2/vhosts.d/vhost-ssl.conf
<p>                #&lt;IfDefine SSL&gt;<br />
                <br />
                #&lt;IfDefine !NOSSL&gt;</p>
<p>
                &lt;VirtualHost server.webaddress.com:443&gt;</p>
<p>
                DocumentRoot &#8220;/srv/www/htdocs&#8221;<br />
                <br />
                ServerName server.webaddress.com:443<br />
                <br />
                ServerAdmin email@address.com<br />
                <br />
                ErrorLog /var/log/apache2/error_443_log<br />
                <br />
                TransferLog /var/log/apache2/access_443_log<br />
#&lt;/IfDefine&gt;<br />
              <br />
              #&lt;/IfDefine&gt;
            </li>
</ol>
</li>
<li>Restart Apache with new configuration<br />
        <br />
    Apache2ctl stop<br />
    Apache2ctl start </li>
<li>Use Netstat to check to see if httpd is listening on port 443<br />
                          netstat -anp |more </li>
<li>Open port on Firewall for 443</li>
</ol>
</li>
</ol>
<ol style="list-style-type:lower-alpha">
    </ol>
<ol style="list-style-type:lower-roman">
<li>Test in web browser https://server.webaddress.com</li>
</ol>
<h4>Configure LDAPs authentication for Directory access    </h4>
<ol>
<li>Import certificate for ldap server into the web server where you want to authenticate via LDAP</p>
<ol style="list-style-type:lower-alpha">
<li>Export server certificate from your LDAP server
</li>
<li>Open exported certificate file and copy text
</li>
<li>Create file /etc/apache2/server-name.crt
</li>
<li>Paste certificate text into file </li>
<li>Edit /etc/apache2/default-server.conf and add following lines:
<p>
                  LDAPTrustedCAType  &nbsp;&nbsp;&nbsp;BASE64_FILE<br />
                LDAP<br />
                  TrustedCA &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/etc/apache2/server-name.crt
                </li>
<li>Edit /etc/apache2/vhosts.d/vhost-ssl.conf
<ol style="list-style-type:lower-roman">
<li>Add lines following between &lt;VirtualHost&gt;  and &lt;/VirtualHost&gt;<br />
&lt;Directory /srv/www/htdocs/directory_you_want_to_protect_with_ldap&gt;<br />
                      <br />
                      AuthType Basic <br />
                      AuthName &#8220;LDAPs Login&#8221;<br />
                      <br />
                      AuthLDAPEnabled on </p>
<p>                      AuthLDAPURL &#8220;ldaps://ldapserver.domain.edu:ldapport#/OU=usergroup,DC=subdomain,DC=mydomain,DC=edu?sAMAccountName?sub?(objectClass=*)&#8221;<br />
                      <br />
                      AuthLDAPBindDN &#8220;CN=bindaccount,CN=usergroup,DC=subdomain,DC=mydomain,DC=edu&#8221;<br />
                      <br />
                      AuthLDAPBindPassword (bindaccountpassword) <br />
                      AuthLDAPAuthoritative off<br />
                      require valid-user <br />
                      AllowOverride None<br />
                      Order deny,allow <br />
                      Deny from all <br />
                      Allow from IP range you want to allow access from <br />
&lt;/Directory&gt;</li>
</ol>
</li>
<li>Edit /etc/apache2/sysconfig.d/loadmodule.conf and add following<br />
                  lines:</p>
<p>
                    LoadModule ldap_module                    /usr/lib/apache2/mod_ldap.so<br />
                  <br />
                  LoadModule auth_ldap_module               /usr/lib/apache2/mod_auth_ldap.so</li>
<li>Restart Apache with new configuration
<p>
                  Apache2ctl stop<br />
                  Apache2ctl start
                </li>
<li>Test in web browser &#8211; https://server.webaddress.com/directory_you_want_to_protect_with_ldap</li>
</ol>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.librarywebchic.net/wordpress/2006/04/20/configuring-apache-for-ssl-and-ldap-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
