<?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>LI Tech Blog &#187; Servers</title>
	<atom:link href="http://techblog.lucidillusion.org/category/servers/feed/" rel="self" type="application/rss+xml" />
	<link>http://techblog.lucidillusion.org</link>
	<description>Tech Notes and Problem Solutions</description>
	<lastBuildDate>Mon, 02 Jan 2012 03:54:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>PostgreSQL 9 bytea_output and CGI::Session</title>
		<link>http://techblog.lucidillusion.org/2012/01/01/postgresql-9-bytea_output-and-cgisession/</link>
		<comments>http://techblog.lucidillusion.org/2012/01/01/postgresql-9-bytea_output-and-cgisession/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 03:53:08 +0000</pubDate>
		<dc:creator>jgraham</dc:creator>
				<category><![CDATA[Servers]]></category>
		<category><![CDATA[bytea]]></category>
		<category><![CDATA[CGI::Session]]></category>
		<category><![CDATA[escape]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://techblog.lucidillusion.org/2012/01/01/postgresql-9-bytea_output-and-cgisession/</guid>
		<description><![CDATA[PostgreSQL 9 introduces a new bytea output format, hex. This new format can cause problems for programs expecting the traditional output format. I ran into this problem with several perl scripts using CGI::Application::Plugin::Session. I had just upgraded a database server from PostgreSQL 8.3 to 9.1. The scripts could connect to the but would report errors [...]]]></description>
			<content:encoded><![CDATA[<p>PostgreSQL 9 introduces a new bytea output format, hex.  This new format can cause problems for programs expecting the traditional output format.</p>
<p><span id="more-33"></span>
<p>I ran into this problem with several perl scripts using CGI::Application::Plugin::Session.  I had just upgraded a database server from PostgreSQL 8.3 to 9.1.  The scripts could connect to the but would report errors like the following:</p>
<pre>
	Error executing class callback in prerun stage: No session object!
	This module depends on CGI::Application::Plugin::Session!
	(or you need to use the -dont_use_session config parameter) at ...
</pre>
<p>It turns out that the culprit was the new hex output format used by PostgreSQL 9.x.  CGI::Session was unable to decode the resulting data and would fail to load existing sessions.</p>
<p>The fix is easy.  Simply use the following command to set the bytea output format for a given database:</p>
<pre>
	ALTER DATABASE database SET bytea_output = 'escape';
</pre>
<p>Additional details can be found in the <a href="http://www.postgresql.org/docs/9.1/static/runtime-config-client.html#GUC-BYTEA-OUTPUT">Client Connection Defaults</a> section of the PostgreSQL documentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.lucidillusion.org/2012/01/01/postgresql-9-bytea_output-and-cgisession/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OS X DirectoryService UUID case sensitivity</title>
		<link>http://techblog.lucidillusion.org/2010/08/19/os-x-directoryservice-uuid-case-sensitivity/</link>
		<comments>http://techblog.lucidillusion.org/2010/08/19/os-x-directoryservice-uuid-case-sensitivity/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 16:42:50 +0000</pubDate>
		<dc:creator>jgraham</dc:creator>
				<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://techblog.lucidillusion.org/2010/08/19/os-x-directoryservice-uuid-case-sensitivity/</guid>
		<description><![CDATA[I recently ran into an issue where some new users with LDAP based accounts did not see any CUPS shared printers. The solution turned out to be case sensitivity of the apple-generateduid attribute. Launching the Console application would result in a continuous stream of Error: failed to register for new message notifications messages. To fix [...]]]></description>
			<content:encoded><![CDATA[<p>I recently ran into an issue where some new users with LDAP based accounts did not see any CUPS shared printers.<br />
The solution turned out to be case sensitivity of the <tt>apple-generateduid</tt> attribute.</p>
<p><span id="more-26"></span><br />
Launching the Console application would result in a continuous stream of <tt>Error: failed to register for new message notifications</tt> messages.</p>
<p>To fix this I just wrote up a quick perl script that scanned for <tt>apple-generateduid</tt> attributes in LDAP that were not up-cased and the issues vanished.</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.lucidillusion.org/2010/08/19/os-x-directoryservice-uuid-case-sensitivity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checking for DNS Poisoning Vulnerability</title>
		<link>http://techblog.lucidillusion.org/2008/07/15/checking-for-dns-poisoning-vulnerability/</link>
		<comments>http://techblog.lucidillusion.org/2008/07/15/checking-for-dns-poisoning-vulnerability/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 23:45:28 +0000</pubDate>
		<dc:creator>jgraham</dc:creator>
				<category><![CDATA[Servers]]></category>
		<category><![CDATA[BIND]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[ISC]]></category>
		<category><![CDATA[Poison]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[Vulnerability]]></category>

		<guid isPermaLink="false">http://techblog.lucidillusion.org/2008/07/15/checking-for-dns-poisoning-vulnerability/</guid>
		<description><![CDATA[Just a quick way to test and see if your DNS servers are vulnerable to the latest DNS Cache Poisoning vulnerability (CVE-2008-1447). From: https://www.dns-oarc.net/oarc/services/porttest $ dig @4.2.2.3 +short porttest.dns-oarc.net TXT Replacing 4.2.2.3 with the IP address of your DNS server(s).]]></description>
			<content:encoded><![CDATA[<p>Just a quick way to test and see if your DNS servers are vulnerable to the latest DNS Cache Poisoning vulnerability (<a href="http://nvd.nist.gov/nvd.cfm?cvename=CVE-2008-1447">CVE-2008-1447</a>).</p>
<p>From: <a href="https://www.dns-oarc.net/oarc/services/porttest">https://www.dns-oarc.net/oarc/services/porttest</a></p>
<p><tt>$ dig @4.2.2.3 +short porttest.dns-oarc.net TXT</tt></p>
<p>Replacing 4.2.2.3 with the IP address of your DNS server(s).</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.lucidillusion.org/2008/07/15/checking-for-dns-poisoning-vulnerability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSL Certificates with DNS Aliases</title>
		<link>http://techblog.lucidillusion.org/2007/10/13/ssl-certificates-with-dns-aliases/</link>
		<comments>http://techblog.lucidillusion.org/2007/10/13/ssl-certificates-with-dns-aliases/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 14:33:53 +0000</pubDate>
		<dc:creator>jgraham</dc:creator>
				<category><![CDATA[Servers]]></category>
		<category><![CDATA[Alias]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[Extension]]></category>
		<category><![CDATA[OpenSSL]]></category>
		<category><![CDATA[Secure]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://techblog.lucidillusion.org/2007/10/14/ssl-certificates-with-dns-aliases/</guid>
		<description><![CDATA[At work I have several systems that provide SSL encrypted services but respond to multiple host-names. For instance an LDAP server may be named server1.example.com but have DNS aliases of ldap-1.example.com and directory.example.com. If a client system connects to ldap-1.example.com and the server returns an SSL certificate with a common name of server1.example.com ugliness will [...]]]></description>
			<content:encoded><![CDATA[<p>At work I have several systems that provide SSL encrypted services but respond to multiple host-names.  For instance an LDAP server may be named <tt>server1.example.com</tt> but have DNS aliases of <tt>ldap-1.example.com</tt> and <tt>directory.example.com</tt>.  If a client system connects to <tt>ldap-1.example.com</tt> and the server returns an SSL certificate with a common name of <tt>server1.example.com</tt> ugliness will ensue.</p>
<p>To get around this problem one can install SSL certificates that employ the <strong>subjectAltName</strong> extension.</p>
<p><span id="more-4"></span></p>
<p>To be deployed properly you will need to either be running your own certificate authority (beyond the scope of this document) or using commercially signed certificates.  If you are purchasing certificates you should check with your CA first to see if they are willing to sign certificate requests that employ the <em>subjectAltName</em> extension.</p>
<h4>Generating the Certificate Signing Request (CSR)</h4>
<p>First edit the openss.cnf file (location may vary depending on OS) and add the <strong>v3_req</strong> extension.  Locate the <strong>[ req ]</strong> section and add</p>
<blockquote><p>req_extensions = v3_req</p></blockquote>
<p>Next find the <strong>[ v3_req ]</strong> section and add a <em>subjectAltName</em> line containing the appropriate DNS names (in this case I will be using <tt>server1.example.com</tt>, <tt>ldap-1.example.com</tt> and <tt>directory.example.com</tt>):</p>
<blockquote><p>subjectAltName = &#8220;DNS:server1.example.com, DNS:ldap-1.example.com, DNS: directory.example.com&#8221;</p></blockquote>
<h5>Generate a Private Key</h5>
<p>To generate a CSR we need a private key, generated with the following command.  This file should never be world readable and needs to be carefully protected.</p>
<blockquote><p># ( umask 077; openssl genrsa 2048 &gt; server1-ldap-key.pem )</p></blockquote>
<h5>Generate the CSR</h5>
<blockquote><p># openssl req -nodes -new -key server1-ldap-key.pem -out server1-ldap-req.pem</p></blockquote>
<p>Answer the question prompts.  When prompted for your <em>Common Name</em> enter the primary host-name of the system.</p>
<h4>Signing the CSR</h4>
<p>In order to include the extensions in the signed certificate the CA must be configured to copy extensions from the CSR.  <strong>This is potentially dangerous if you do not fully trust the source of the CSR!  You may want to enable it on a per-signing basis.</strong></p>
<p>Locate the openssl.cnf file on your CA.  Find the appropriate CA section (usually <strong>[ CA_default ]</strong>) and add or un-comment the following line:</p>
<blockquote><p>copy_extensions = copy</p></blockquote>
<p>Copy the <em>server1-ldap-req.pem</em> file to your CA and sign it with the following command:</p>
<blockquote><p># openssl ca -keyfile [path to CA private key] -in server1-ldap-req.pem -out server1-ldap-cert.pem</p></blockquote>
<p>The presence of the <em>subjectAltName</em> extension can be verified using this command:</p>
<blockquote><p># openssl x509 -in server1-ldap-cert.pem -noout -text</p></blockquote>
<p>Look for the <strong>X509v3 Subject Alternative Name:</strong> section.</p>
<p>Now just install the certificate and private key as you would with any other certificate/key pair.</p>
<hr />
<h4>A Few File Locations</h4>
<ul>
<li><strong>openssl.cnf:</strong>
<ul>
<li>Debian Linux: <em>/etc/ssl/openssl.cnf</em></li>
<li>Mac OS X: <em>/System/Library/OpenSSL/openssl.cnf</em></li>
<li>Solaris 10: <em>/etc/sfw/openssl/openssl.cnf</em></li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://techblog.lucidillusion.org/2007/10/13/ssl-certificates-with-dns-aliases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.409 seconds -->

