<div dir="ltr">On Mon, Nov 11, 2013 at 9:23 AM, Andreas Hasenack <span dir="ltr"><<a href="mailto:andreas@canonical.com" target="_blank">andreas@canonical.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><a href="http://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution" target="_blank"><br>
http://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_hostname_resolution</a><br>
<br>
It's correct policy to have that entry, it seems.<br>
<br></blockquote><div><br></div></div><div>Yeah, maybe. There is also this remark:</div><div>"<span style="font-size:medium;font-family:'Times New Roman'">For a system with a permanent IP address and a</span><span style="font-size:medium;font-family:'Times New Roman'"> </span><a href="http://en.wikipedia.org/wiki/FQDN" style="font-family:'Times New Roman';font-size:medium" target="_blank">fully qualified domain name (FQDN)</a><span style="font-size:medium;font-family:'Times New Roman'"> </span><span style="font-size:medium;font-family:'Times New Roman'">provided by the</span><span style="font-size:medium;font-family:'Times New Roman'"> </span><a href="http://en.wikipedia.org/wiki/Domain_Name_System" style="font-family:'Times New Roman';font-size:medium" target="_blank">Domain Name System (DNS)</a><span style="font-size:medium;font-family:'Times New Roman'">, that canonical <host_name>.<domain_name> should be used instead of just <host_name>."</span></div>
<div class="im">
<div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
The *feels* like a bug in PG or its charm, to me. Having said that I<br>
did suggest once that we return IPs from MAAS's API instead of hostnames<br>
but that was shot down. I can't remember why, though. Gavin?<br>
<span><font color="#888888"><br></font></span></blockquote><div><br></div></div><div>I think it's incorrect to return the CNAME, and have it be the hostname of the machine. It would be like having the <a href="http://www.company.com" target="_blank">www.company.com</a> host have an actual "<a href="http://www.company.com" target="_blank">www.company.com</a>" hostname.</div>
<div><br></div><div>I'll search around what other systems to when hostnames are used for access control, if they do the sort of lookup that postgresql does or not.</div><div class="im"><div><br></div></div></div></div>
</div></blockquote><div><br></div><div>ssh also fails when you use the CNAME in the "host=" parameter in authorized_keys:</div><div><br></div><div>server:</div><div>Nov 11 11:45:49 wfaxq sshd[2332]: Authentication tried for ubuntu with correct key but not from a permitted host (host=10-0-5-103.maaslocal, ip=10.0.5.103).</div>
<div>Nov 11 11:45:49 wfaxq sshd[2332]: Connection closed by 10.0.5.103 [preauth]</div><div><br></div><div>/home/ubuntu/.ssh/authorized_keys:</div><div>from="k8q9m.maaslocal" ssh-rsa AAAAB3NzaC1yc2EA...<br></div>
<div><br></div><div><div>root@wfaxq:~# host k8q9m.maaslocal</div><div>k8q9m.maaslocal is an alias for 10-0-5-103.maaslocal.</div><div>10-0-5-103.maaslocal has address 10.0.5.103</div></div><div><br></div><div>That's exactly what happened with postgresql.</div>
<div><br></div></div></div></div>