<?xml version="1.0" encoding="UTF-8" standalone="yes"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us"><id>https://blog.pgxn.org/tags/ssl/</id><title>SSL</title><updated>2010-10-11T15:00:29Z</updated><link rel="self" type="application/atom+xml" href="https://blog.pgxn.org/tags/ssl/feed.xml"/><link rel="alternate" type="text/html" href="https://blog.pgxn.org/tags/ssl/"/><author><name>The PGXN Maintainers</name></author><generator uri="https://gohugo.io/" version="0.167.0">Hugo</generator><entry><id>https://blog.pgxn.org/post/1291485816</id><title type="html">How Can I Detect a Proxied SSL Request?</title><link rel="alternate" type="text/html" href="https://blog.pgxn.org/2010/how-can-i-detect-a-proxied-ssl-request/"/><updated>2026-10-07T16:13:48Z</updated><published>2010-10-11T15:00:29Z</published><author><name>David E. Wheeler</name></author><category scheme="https://blog.pgxn.org/tags" term="mod_proxy" label="mod_proxy"/><category scheme="https://blog.pgxn.org/tags" term="mod_ssl" label="mod_ssl"/><category scheme="https://blog.pgxn.org/tags" term="ssl" label="SSL"/><category scheme="https://blog.pgxn.org/tags" term="proxy" label="Proxy"/><category scheme="https://blog.pgxn.org/tags" term="uri" label="URI"/><category scheme="https://blog.pgxn.org/tags" term="apache" label="Apache"/><category scheme="https://blog.pgxn.org/tags" term="plack" label="Plack"/><category scheme="https://blog.pgxn.org/tags" term="request" label="Request"/><summary type="html"><![CDATA[I&rsquo;ve been thinking about how best to create two sections of the PGXN Manager
site, one that requires authentication and is on SSL and one that&rsquo;s public. So
far, I&rsquo;ve just had all the authenticated stuff go to /auth (because I&rsquo;m using
basic auth), but what I want to do now is require authentication if the
connection is via SSL. However, using a reverse proxy with mod_proxy to map to
the PGXN Manger Plack app running on an internal port, I&rsquo;ve found no
environment variables passed through that would allow me, in code, to
determine whether a request is via a proxied SSL or non-SSL connection. Most
irritating.]]></summary><content type="html" xml:base="https://blog.pgxn.org/" xml:space="preserve"><![CDATA[<p>I&rsquo;ve been thinking about how best to create two sections of the PGXN Manager
site, one that requires authentication and is on SSL and one that&rsquo;s public. So
far, I&rsquo;ve just had all the authenticated stuff go to /auth (because I&rsquo;m using
basic auth), but what I want to do now is require authentication if the
connection is via SSL. However, using a reverse proxy with mod_proxy to map to
the PGXN Manger Plack app running on an internal port, I&rsquo;ve found no
environment variables passed through that would allow me, in code, to
determine whether a request is via a proxied SSL or non-SSL connection. Most
irritating.</p>
<p>So tell me what you think about the alternative plan I&rsquo;ve come up with.</p>
<p>I&rsquo;ll have two plack apps, one mapped to /auth and one mapped to /no-auth. The
former will require authentication and the latter will not. They&rsquo;ll have
separate dispatch tables, of course. Then I&rsquo;ll have the SSL site proxied to
/auth and the non-SSL site proxied to /no-auth. Makes sense, right?</p>
<p>The only hangup I can see (though maybe you can see others?) is that my
current method of generating URIs knows nothing about proxies. So If I link to
/auth/account, when requests come through the proxy, it should actually create
a link to /account. Does it make sense to use relative links instead of
absolute links for all links to avoid this issue? I think it might be kind of
annoying, because not all the code is aware of the current URI, though there
are ways to deal with that.</p>
<p>Thoughts?</p>
<p>I guess I could stick with absolute URLs, and then have the <a href="https://github.com/theory/pgxn-manager/blob/master/lib/PGXN/Manager/Request.pm#L14"><code>uri_for</code></a> use
<code>$req−&gt;uri−&gt;path</code> for a proxied request and <code>$req−&gt;path_info</code> for a
non-proxied request.</p>
<p>Sure would be nice if there was some way to tell from the environment that a
request was forwarded from an SSL connection, though. Alas, there are only
three extra environment variable set by the proxy server:</p>
<ul>
<li>HTTP_X_FORWARDED_FOR</li>
<li>HTTP_X_FORWARDED_HOST</li>
<li>HTTP_X_FORWARDED_SERVER</li>
</ul>
<p>No HTTP_X_FORWARDED_PORT or HTTP_X_FORWARDED_SSL or SSL_ENABLED or anything
like that. Maybe I&rsquo;m missing something in my reading of the <a href="https://httpd.apache.org/docs/2.2/mod/mod_proxy.html">mod_proxy
documentation</a>?</p>
]]></content></entry><entry><id>https://blog.pgxn.org/post/1274234177</id><title type="html">Mail List, SSL</title><link rel="alternate" type="text/html" href="https://blog.pgxn.org/2010/mail-list-ssl/"/><updated>2026-10-07T16:13:48Z</updated><published>2010-10-09T06:01:08Z</published><author><name>David E. Wheeler</name></author><category scheme="https://blog.pgxn.org/tags" term="mail-list" label="Mail List"/><category scheme="https://blog.pgxn.org/tags" term="ssl" label="SSL"/><category scheme="https://blog.pgxn.org/tags" term="basic-auth" label="Basic Auth"/><summary type="html"><![CDATA[I&rsquo;m <em>this</em> close to having PGXN Manager ready for a limited beta. I&rsquo;ve got it
running on <a href="https://kineticode.com/">Kineticode</a>&rsquo;s server, and have been tweaking things here and
there, fixing some bugs and filling in a few missing bits. In the next couple
of days I&rsquo;ll get some more kinks worked out and then start inviting folks in.
If you&rsquo;re interested &ndash; especially if you have an extension you&rsquo;d like to
release, leave a comment here to let me know.]]></summary><content type="html" xml:base="https://blog.pgxn.org/" xml:space="preserve"><![CDATA[<p>I&rsquo;m <em>this</em> close to having PGXN Manager ready for a limited beta. I&rsquo;ve got it
running on <a href="https://kineticode.com/">Kineticode</a>&rsquo;s server, and have been tweaking things here and
there, fixing some bugs and filling in a few missing bits. In the next couple
of days I&rsquo;ll get some more kinks worked out and then start inviting folks in.
If you&rsquo;re interested &ndash; especially if you have an extension you&rsquo;d like to
release, leave a comment here to let me know.</p>
<p>Better yet, sign up for our new <a href="https://groups.google.com/group/pgxn-users">mail list</a>. I&rsquo;ve set this up so that PGXN
users can have a place to meet and discuss things (naturally). I expect
discussion will be about how to create proper distribution archives (hint:
it&rsquo;s all about the <a href="https://github.com/theory/pgxn/wiki/PGXN-Meta-Spec"><code>META.json</code></a> file); issues with PGXN Manager or the
network itself, and directions for ongoing development.</p>
<p>Oh, one thing I wanted to run by you here: I currently have two sections in
PGXN Manager: public and users only. Right now the only difference is that all
the users-only stuff is under the <code>/auth/</code> URI, which is itself limited by a
basic auth challenge. I find this setup a bit hinky, though, because the link
to <code>/about</code>, for example, appears in the nav menu for both sections, and if
you&rsquo;re logged in and click it, it will look like you&rsquo;re logged out.</p>
<p>So I was thinking perhaps that I&rsquo;d change it so that the difference is that
user-only is on port 443 (SSL) and public on port 80. That way I could have
links to <code>about</code> on both and one wouldn&rsquo;t appear to be logged out by clicking
it from the SSL site. Because, you know, they&rsquo;re effectively two different
sites.</p>
<p>Thoughts? Is using the SSL divide perhaps the most natural way to separate
user-only access from public access?</p>
<p>More soon.</p>
]]></content></entry></feed>