<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:media="http://search.yahoo.com/mrss/"
> <channel><title>Commentaires sur : Tomcat, SSL, communications sécurisées et X-Forwarded-Proto</title> <atom:link href="http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/feed/" rel="self" type="application/rss+xml" /><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/</link> <description>J2EE, Agilité et SOA</description> <lastBuildDate>Fri, 10 Feb 2012 09:50:25 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <item><title>Par : Andrew Swanson</title><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/#comment-50032</link> <dc:creator>Andrew Swanson</dc:creator> <pubDate>Wed, 20 Apr 2011 00:43:44 +0000</pubDate> <guid
isPermaLink="false">http://blog.xebia.fr/?p=3092#comment-50032</guid> <description>Cyrille -
No problem.  I will take this up with the Tomcat folks.  Thanks for your time.
Andrew</description> <content:encoded><![CDATA[<p>Cyrille &#8211;</p><p>No problem.  I will take this up with the Tomcat folks.  Thanks for your time.</p><p>Andrew</p> ]]></content:encoded> </item> <item><title>Par : Cyrille Le Clerc</title><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/#comment-48722</link> <dc:creator>Cyrille Le Clerc</dc:creator> <pubDate>Sun, 10 Apr 2011 20:23:04 +0000</pubDate> <guid
isPermaLink="false">http://blog.xebia.fr/?p=3092#comment-48722</guid> <description>Hello Andrew,
I am sorry but I didn&#039;t have the time to work on this as I would have liked and I will not have the time during the next months.
Can you continue this discussion on the &lt;a href=&quot;http://tomcat.apache.org/lists.html#tomcat-users&quot; rel=&quot;nofollow&quot;&gt;tomcat-users mailing list&lt;/a&gt; as the RemoteIpValve is now a mature part of Tomcat.
I hope you will find people interested in developing such extension.
Cyrille</description> <content:encoded><![CDATA[<p>Hello Andrew,</p><p>I am sorry but I didn&#8217;t have the time to work on this as I would have liked and I will not have the time during the next months.</p><p>Can you continue this discussion on the <a
href="http://tomcat.apache.org/lists.html#tomcat-users" rel="nofollow">tomcat-users mailing list</a> as the RemoteIpValve is now a mature part of Tomcat.</p><p>I hope you will find people interested in developing such extension.</p><p>Cyrille</p> ]]></content:encoded> </item> <item><title>Par : Andrew Swanson</title><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/#comment-47959</link> <dc:creator>Andrew Swanson</dc:creator> <pubDate>Thu, 07 Apr 2011 19:00:21 +0000</pubDate> <guid
isPermaLink="false">http://blog.xebia.fr/?p=3092#comment-47959</guid> <description>Cyrille -
Apologies for the English!
Back in November 2010 we had a discussion about an enhancement to the Tomcat RemoteIpValve (http://www.coderanch.com/t/445496/Tomcat/request-getRemoteAddr).  It went like this:
=========================================================================
Andrew Swanson wrote:
I am using the RemoteIpValve to correctly set request.isSecure and request.scheme but I am using the &quot;ProxyPreserveHost&quot; Apache httpd directive so that request.serverHost and request.serverPort are correctly set in Tomcat. Is there anyway to prevent RemoteIpValve from populating the request.serverPort when it detects the presence of the $protocolHeader http header?
Cyrille Le Clerc wrote:Hello Andrew,
You are right, RemoteIpValve (and RemoteIpFilter) currently override the serverPort when you specify a protocol header (e.g. x-forwarded-proto). Would you like to add a boolean configuration option override-http-server-port-with-protocol-information to disable this behavior for your use case ?
Thanks for your interest in RemoteIpValve,
Cyrille
Andrew Swanson wrote:
Yes, something like that would be most helpful.
=========================================================================
Has this change made it into Tomcat?  If so, what version?  If not, are there any plans to add it?
Thanks for your time.
Andrew Swanson
Caterpillar Inc.</description> <content:encoded><![CDATA[<p>Cyrille &#8211;</p><p>Apologies for the English!</p><p>Back in November 2010 we had a discussion about an enhancement to the Tomcat RemoteIpValve (<a
href="http://www.coderanch.com/t/445496/Tomcat/request-getRemoteAddr" rel="nofollow">http://www.coderanch.com/t/445496/Tomcat/request-getRemoteAddr</a>).  It went like this:<br
/> =========================================================================</p><p>Andrew Swanson wrote:<br
/> I am using the RemoteIpValve to correctly set request.isSecure and request.scheme but I am using the &laquo;&nbsp;ProxyPreserveHost&nbsp;&raquo; Apache httpd directive so that request.serverHost and request.serverPort are correctly set in Tomcat. Is there anyway to prevent RemoteIpValve from populating the request.serverPort when it detects the presence of the $protocolHeader http header?</p><p>Cyrille Le Clerc wrote:Hello Andrew,</p><p>You are right, RemoteIpValve (and RemoteIpFilter) currently override the serverPort when you specify a protocol header (e.g. x-forwarded-proto). Would you like to add a boolean configuration option override-http-server-port-with-protocol-information to disable this behavior for your use case ?</p><p>Thanks for your interest in RemoteIpValve,</p><p>Cyrille</p><p>Andrew Swanson wrote:<br
/> Yes, something like that would be most helpful.<br
/> =========================================================================</p><p>Has this change made it into Tomcat?  If so, what version?  If not, are there any plans to add it?</p><p>Thanks for your time.</p><p>Andrew Swanson<br
/> Caterpillar Inc.</p> ]]></content:encoded> </item> <item><title>Par : Big faille de sécurité sur Apache &#124; Actualité Informatique et Internet</title><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/#comment-22381</link> <dc:creator>Big faille de sécurité sur Apache &#124; Actualité Informatique et Internet</dc:creator> <pubDate>Tue, 09 Mar 2010 13:28:51 +0000</pubDate> <guid
isPermaLink="false">http://blog.xebia.fr/?p=3092#comment-22381</guid> <description>[...] Tomcat, SSL, communications sécurisées et X-Forwarded-Proto &#124; Blog &#8230; [...]</description> <content:encoded><![CDATA[<p>[...] Tomcat, SSL, communications sécurisées et X-Forwarded-Proto | Blog &#8230; [...]</p> ]]></content:encoded> </item> <item><title>Par : Cyrille Le Clerc</title><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/#comment-20515</link> <dc:creator>Cyrille Le Clerc</dc:creator> <pubDate>Sun, 31 Jan 2010 21:45:26 +0000</pubDate> <guid
isPermaLink="false">http://blog.xebia.fr/?p=3092#comment-20515</guid> <description>La version 1.0.2 de xebia-servlet-extras a été publiée pour corriger &lt;a href=&quot;http://code.google.com/p/xebia-france/issues/detail?id=4&quot; rel=&quot;nofollow&quot;&gt;Issue 4: XForwardedFilter : request.secure and request.scheme are not forced to &quot;false&quot; and &quot;http&quot; if X-Forwarded-Proto=http&lt;/a&gt;.</description> <content:encoded><![CDATA[<p>La version 1.0.2 de xebia-servlet-extras a été publiée pour corriger <a
href="http://code.google.com/p/xebia-france/issues/detail?id=4" rel="nofollow">Issue 4: XForwardedFilter : request.secure and request.scheme are not forced to &laquo;&nbsp;false&nbsp;&raquo; and &laquo;&nbsp;http&nbsp;&raquo; if X-Forwarded-Proto=http</a>.</p> ]]></content:encoded> </item> <item><title>Par : Cyrille Le Clerc</title><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/#comment-18382</link> <dc:creator>Cyrille Le Clerc</dc:creator> <pubDate>Mon, 14 Dec 2009 23:30:01 +0000</pubDate> <guid
isPermaLink="false">http://blog.xebia.fr/?p=3092#comment-18382</guid> <description>@Nicolas,
Merci encore, la correction est appliquée : &lt;a href=&quot;http://svn.apache.org/viewvc?view=revision&amp;revision=890483&quot; rel=&quot;nofollow&quot;&gt;Commit 890483 : Make configuration attributes consistent between Filter and Valves&lt;/a&gt;, le paramètre de configuration s&#039;appelle désormais &lt;code&gt;protocolHeaderHttpsValue&lt;/code&gt;.
Cyrille (Xebia)</description> <content:encoded><![CDATA[<p>@Nicolas,</p><p>Merci encore, la correction est appliquée : <a
href="http://svn.apache.org/viewvc?view=revision&#038;revision=890483" rel="nofollow">Commit 890483 : Make configuration attributes consistent between Filter and Valves</a>, le paramètre de configuration s&#8217;appelle désormais <code>protocolHeaderHttpsValue</code>.</p><p>Cyrille (Xebia)</p> ]]></content:encoded> </item> <item><title>Par : Cyrille Le Clerc</title><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/#comment-18358</link> <dc:creator>Cyrille Le Clerc</dc:creator> <pubDate>Mon, 14 Dec 2009 18:30:44 +0000</pubDate> <guid
isPermaLink="false">http://blog.xebia.fr/?p=3092#comment-18358</guid> <description>Merci Nicolas,
Ce sera &lt;a href=&quot;https://issues.apache.org/bugzilla/show_bug.cgi?id=48387&quot; rel=&quot;nofollow&quot;&gt; Bug 48387 -  Make RemoteIpFilter parameters consistent with RemoteIpValve&lt;/a&gt;.
Cyrille (Xebia)</description> <content:encoded><![CDATA[<p>Merci Nicolas,</p><p>Ce sera <a
href="https://issues.apache.org/bugzilla/show_bug.cgi?id=48387" rel="nofollow"> Bug 48387 &#8211;  Make RemoteIpFilter parameters consistent with RemoteIpValve</a>.</p><p>Cyrille (Xebia)</p> ]]></content:encoded> </item> <item><title>Par : Nicolas</title><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/#comment-18231</link> <dc:creator>Nicolas</dc:creator> <pubDate>Fri, 11 Dec 2009 20:29:26 +0000</pubDate> <guid
isPermaLink="false">http://blog.xebia.fr/?p=3092#comment-18231</guid> <description>J&#039;en profite pour signaler une erreur dans ce qui a été commité chez Tomcat :
http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/catalina/filters/RemoteIpFilter.java
La JavaDoc dit :
protocolHeaderHttpsValue: Value of the protocolHeader to indicate that it is an Https request
Le code source dit autre chose :
protected static final String PROTOCOL_HEADER_SSL_VALUE_PARAMETER = &quot;protocolHeaderSslValue&quot;;
Quoi qu&#039;il en soit, merci pour le code de ce filter, il m&#039;est bien utile.</description> <content:encoded><![CDATA[<p>J&#8217;en profite pour signaler une erreur dans ce qui a été commité chez Tomcat :<br
/> <a
href="http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/catalina/filters/RemoteIpFilter.java" rel="nofollow">http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/catalina/filters/RemoteIpFilter.java</a></p><p>La JavaDoc dit :<br
/> protocolHeaderHttpsValue: Value of the protocolHeader to indicate that it is an Https request</p><p>Le code source dit autre chose :<br
/> protected static final String PROTOCOL_HEADER_SSL_VALUE_PARAMETER = &laquo;&nbsp;protocolHeaderSslValue&nbsp;&raquo;;</p><p>Quoi qu&#8217;il en soit, merci pour le code de ce filter, il m&#8217;est bien utile.</p> ]]></content:encoded> </item> <item><title>Par : Cyrille Le Clerc</title><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/#comment-18214</link> <dc:creator>Cyrille Le Clerc</dc:creator> <pubDate>Fri, 11 Dec 2009 11:18:31 +0000</pubDate> <guid
isPermaLink="false">http://blog.xebia.fr/?p=3092#comment-18214</guid> <description>Merci pour ce complément Nicolas,
Je trouve amusant que Squid ait été l&#039;&lt;em&gt;inventeur&lt;/em&gt; du header &lt;a href=&quot;http://en.wikipedia.org/wiki/X-Forwarded-For&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;X-Forwarded-For&lt;/code&gt;&lt;/a&gt; et qu&#039;en revanche, ils aient oublié le header &lt;code&gt;X-Forwarded-Proto&lt;/code&gt; au point ne ne pas le voir et d&#039;intégrer son équivalent &lt;a href=&quot;http://www.visolve.com/squid/squid30/neighboursel.php&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;FRONT_END_HTTPS&lt;/code&gt;&lt;/a&gt; utilisé par Microsoft Outlook Web Access (OWA) :-).
Cyrille (Xebia)</description> <content:encoded><![CDATA[<p>Merci pour ce complément Nicolas,</p><p>Je trouve amusant que Squid ait été l&#8217;<em>inventeur</em> du header <a
href="http://en.wikipedia.org/wiki/X-Forwarded-For" rel="nofollow"><code>X-Forwarded-For</code></a> et qu&#8217;en revanche, ils aient oublié le header <code>X-Forwarded-Proto</code> au point ne ne pas le voir et d&#8217;intégrer son équivalent <a
href="http://www.visolve.com/squid/squid30/neighboursel.php" rel="nofollow"><code>FRONT_END_HTTPS</code></a> utilisé par Microsoft Outlook Web Access (OWA) <img
src='http://blog.xebia.fr/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p><p>Cyrille (Xebia)</p> ]]></content:encoded> </item> <item><title>Par : Nicolas</title><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/#comment-18211</link> <dc:creator>Nicolas</dc:creator> <pubDate>Fri, 11 Dec 2009 09:54:54 +0000</pubDate> <guid
isPermaLink="false">http://blog.xebia.fr/?p=3092#comment-18211</guid> <description>Si on utilise Squid 3 comme frontal à la place de Apache Mod-Proxy, il est très difficile d&#039;appliquer la solution du X-Fowarded-Proto, car squid ne peut pas facilement ajouter des headers.
Par contre, la solution est d&#039;ajouter au niveau du cache_peer la directive front-end-https :
cache_peer localhost parent 8080 0 no-query originserver login=PASS name=tomcat_peer front-end-https=auto
Cela aura pour effet d&#039;ajouter un header
FRONT_END_HTTPS = On
si la requete est en https coté squid, et pas de header dans le cas http.
Il ne reste plus qu&#039;a adapter ensuite le XForwardedFilter ou bien la configuration du serveur Java pour prendre en compte ce header au lieu de X-Forwarded-Proto.</description> <content:encoded><![CDATA[<p>Si on utilise Squid 3 comme frontal à la place de Apache Mod-Proxy, il est très difficile d&#8217;appliquer la solution du X-Fowarded-Proto, car squid ne peut pas facilement ajouter des headers.</p><p>Par contre, la solution est d&#8217;ajouter au niveau du cache_peer la directive front-end-https :</p><p>cache_peer localhost parent 8080 0 no-query originserver login=PASS name=tomcat_peer front-end-https=auto</p><p>Cela aura pour effet d&#8217;ajouter un header<br
/> FRONT_END_HTTPS = On<br
/> si la requete est en https coté squid, et pas de header dans le cas http.</p><p>Il ne reste plus qu&#8217;a adapter ensuite le XForwardedFilter ou bien la configuration du serveur Java pour prendre en compte ce header au lieu de X-Forwarded-Proto.</p> ]]></content:encoded> </item> <item><title>Par : Rediriger le port 8080 de Tomcat vers le port 80 d&#8217;Apache 2 avec un sous-domaine &#8211; 5 Fresh Minutes IT &#8211; Java &#38; IT</title><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/#comment-16906</link> <dc:creator>Rediriger le port 8080 de Tomcat vers le port 80 d&#8217;Apache 2 avec un sous-domaine &#8211; 5 Fresh Minutes IT &#8211; Java &#38; IT</dc:creator> <pubDate>Sun, 15 Nov 2009 17:01:56 +0000</pubDate> <guid
isPermaLink="false">http://blog.xebia.fr/?p=3092#comment-16906</guid> <description>[...] Tomcat, SSL, communications sécurisées et X-Forwarded-Proto (Blog de Xebia qui préfère mod_proxy_http à AJP: le protocole AJP n&#8217;est pas aussi répandu que HTTP) [...]</description> <content:encoded><![CDATA[<p>[...] Tomcat, SSL, communications sécurisées et X-Forwarded-Proto (Blog de Xebia qui préfère mod_proxy_http à AJP: le protocole AJP n&#8217;est pas aussi répandu que HTTP) [...]</p> ]]></content:encoded> </item> <item><title>Par : Cyrille Le Clerc</title><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/#comment-16839</link> <dc:creator>Cyrille Le Clerc</dc:creator> <pubDate>Fri, 13 Nov 2009 23:14:02 +0000</pubDate> <guid
isPermaLink="false">http://blog.xebia.fr/?p=3092#comment-16839</guid> <description>Bonjour Eric,
Nous sommes d&#039;accord. lorsqu&#039;un serveur Apache Httpd est en amont du serveur Tomcat, on peut se permettre de faire écouter le serveur Tomcat sur des ports supérieurs à 1024 (e.g. 8080) ; il n&#039;y a alors pas de problème d&#039;écoute sur les ports 80 et 443 qui requièrent de s&#039;exécuter en &lt;em&gt;root&lt;/em&gt;.
Notre point porte sur un serveur Tomcat seul, sans Apache Httpd en frontal. Faire écouter un serveur sur les ports &lt;1024 comme 80 et 443 requiert de démarrer le processus en &lt;em&gt;root&lt;/em&gt;. Cependant, à la différence d&#039;Apache Httpd qui sait &lt;a href=&quot;http://httpd.apache.org/docs/2.2/misc/security_tips.html#serverroot&quot; rel=&quot;nofollow&quot;&gt;changer de user après son démarrage en &lt;em&gt;root&lt;/em&gt;&lt;/a&gt; pour restreindre ses privilèges, une JVM (Tomcat mais également Glassfish, JBoss, WebSphere, Weblogic, etc) ne sait pas changer de user et devrait donc s&#039;exécuter en &lt;em&gt;root&lt;/em&gt;.
Comme il est le plus souvent incompatible avec les règles de sécurité de s&#039;exécuter en &lt;em&gt;root&lt;/em&gt;, nous avons proposé l&#039;astuce &lt;em&gt;iptables&lt;/em&gt;.
Cyrille (Xebia)</description> <content:encoded><![CDATA[<p>Bonjour Eric,</p><p>Nous sommes d&#8217;accord. lorsqu&#8217;un serveur Apache Httpd est en amont du serveur Tomcat, on peut se permettre de faire écouter le serveur Tomcat sur des ports supérieurs à 1024 (e.g. 8080) ; il n&#8217;y a alors pas de problème d&#8217;écoute sur les ports 80 et 443 qui requièrent de s&#8217;exécuter en <em>root</em>.</p><p>Notre point porte sur un serveur Tomcat seul, sans Apache Httpd en frontal. Faire écouter un serveur sur les ports &lt;1024 comme 80 et 443 requiert de démarrer le processus en <em>root</em>. Cependant, à la différence d&#8217;Apache Httpd qui sait <a
href="http://httpd.apache.org/docs/2.2/misc/security_tips.html#serverroot" rel="nofollow">changer de user après son démarrage en <em>root</em></a> pour restreindre ses privilèges, une JVM (Tomcat mais également Glassfish, JBoss, WebSphere, Weblogic, etc) ne sait pas changer de user et devrait donc s&#8217;exécuter en <em>root</em>.<br
/> Comme il est le plus souvent incompatible avec les règles de sécurité de s&#8217;exécuter en <em>root</em>, nous avons proposé l&#8217;astuce <em>iptables</em>.</p><p>Cyrille (Xebia)</p> ]]></content:encoded> </item> <item><title>Par : Eric</title><link>http://blog.xebia.fr/2009/11/13/tomcat-ssl-communications-securisees-et-x-forwarded-proto/#comment-16828</link> <dc:creator>Eric</dc:creator> <pubDate>Fri, 13 Nov 2009 16:47:29 +0000</pubDate> <guid
isPermaLink="false">http://blog.xebia.fr/?p=3092#comment-16828</guid> <description>Astuce : comment éviter de démarrer le serveur Tomcat avec les privilèges root ?
Il est aussi possible avec httpd.conf de faire un alias/forward de 8080 vers 80.</description> <content:encoded><![CDATA[<p>Astuce : comment éviter de démarrer le serveur Tomcat avec les privilèges root ?</p><p>Il est aussi possible avec httpd.conf de faire un alias/forward de 8080 vers 80.</p> ]]></content:encoded> </item> </channel> </rss>
