Re: Buffer in apache

2018-08-21 Thread Christophe JAILLET

Le 21/08/2018 à 13:50, Hemant Chaudhary a écrit :

Hi All,

I want to use buffer of 512B in apache . I am using mod_proxy_http to 
send request to tomcat and have set ProxyIOBufferSize 512.


But it is sending message to tomcat with size greater than 512B.

How should I control apache in proxy so that it will send message and 
receive with max buffer size of 512B.


Thanks
Hemant


Hi,

for some reasons, mod_proxy_ajp has the folowing code ([1])

This means that value are silently forced between 8k (AJP_MSG_BUFFER_SZ) 
and 64k (AJP_MAX_BUFFER_SZ).

I don't know why this is done this way and it looks spurious

However, the code looks in line with apache 2.2 doc ([2]), but not with 
2.4. ([3])
This looks to something that has not been completely updated in the 2.2 
-> 2.4 process.


Sounds like a useless limitation and mod_proxy_ajp should be aligned on 
the doc.
IMHO, the test with AJP_MSG_BUFFER_SZ should be removed. (and also the 
one with AJP_MAX_BUFFER_SZ BTW)


I cross-post to dev@ list for others feed-back.

CJ


[1]: 
http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ajp.c?diff_format=h=markup#l197

[2]: https://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyiobuffersize
[3]: https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyiobuffersize



Re: alias.t/extra.conf.in change 1829008

2018-08-21 Thread Marion & Christophe JAILLET




Le 21/08/2018 à 15:27, pgajdos a écrit :

Hello Christophe,

On Mon, Aug 20, 2018 at 08:34:16PM +0200, Marion & Christophe JAILLET wrote:

according to https://httpd.apache.org/docs/2.4/en/mod/mod_alias.html#alias,
Alias with-in a LocationMatch is allowed since 2.4.19.
If you can test and confirm, I'll update the test-framework accordingly.

yes, as far as I tested correctly, this is true from 2.4.20 on, 2.4.19
was not released, so I can not test.


BTW, glad to see someone tweaking our test framework.
Feel free to send any improvements and/or additional tests. They will be
added to the base in order to improve future releases.

And I should say big thank you for the test suite. It helps me every
security update in regression testing.

For curiosity, there is a apache-test spec running the testsuite
during build (the package results in no rpm):
[0] https://build.opensuse.org/package/show/Apache:Test/apache-test
and therefore testing the httpd in respective distros. I have similar
setup in internal build service instance, where I am testing httpd
BEFORE and AFTER each security update in several distros.

For one example, from link [0], the testsuite is failing for
openSUSE Leap 42.3, and this is because we backported http_strict
things, but had not noticed
http://svn.apache.org/viewvc?view=revision=1800215
which we now found thanks to the testsuite and we will be releasing
update in near future to fix that.

You can notice from the [0], we have around twenty patches, but almost
all are dedicated to get around issues in older distros, like 'we
ported something to older distros', which the testsuite can not know.

One thing I noticed is insufficient version checking of httpd version,
Well, it is sometimes hard to figure out when a given feature or 
directive has been added. Especially when tests are added a long time 
afterwards. Well, it is not that hard, but it is time consuming and 
honestly, I don't really focus on old releases compatibility.

And as you say, 2.2 is no more supported by us, so...

Having more test is always needed and we consider that some work should 
be needed in this area.

Contributions welcome :)


The 'lbmethod=heartbeat' in 2.3.0+ has been fixed in r1838576.
The 'ProxyAddHeaders' in 2.3.10+ has been fixed in r1838578.

For 'SSLOCSPResponderCertificateFile' I've asked on the dev@ list if 
just skipping the directive is enough or if something else must be tweaked.



I've gone through [0] and applied what make sense to me. If you consider 
that something else could be backported (i.e. is not opensuse specific), 
do not hesitate to tell me what.


I'm also adding the dev@ list in copy, there is no need to keep this 
private. Others could be interested.


CJ



see attachments. Note we will still be supporting 2.2 branch for
certain amount of time in one of our distros, not sure though how much
the testsuite upstream should take it into account given that 2.2 is no
longer supported upstream. But at least SSLOCSPResponderCertificateFile
should be surrounded I think.

I have also issue with ocsp.t failing completely, but that needs more
investigation.

Thanks again for the great testsuite!

Petr





Re: svn commit: r1831398 - in /httpd/test/framework/trunk/t: conf/ssl/ssl.conf.in htdocs/modules/cgi/ htdocs/modules/cgi/ocsp.pl.PL ssl/ocsp.t

2018-08-21 Thread Christophe JAILLET

Le 11/05/2018 à 12:26, jor...@apache.org a écrit :

Author: jorton
Date: Fri May 11 10:26:31 2018
New Revision: 1831398

URL: http://svn.apache.org/viewvc?rev=1831398=rev
Log:
Add basic OCSP client cert verification test using the "openssl ocsp" built-in
toy OCSP responder.

Added:
 httpd/test/framework/trunk/t/htdocs/modules/cgi/ocsp.pl.PL
 httpd/test/framework/trunk/t/ssl/ocsp.t
Modified:
 httpd/test/framework/trunk/t/conf/ssl/ssl.conf.in
 httpd/test/framework/trunk/t/htdocs/modules/cgi/   (props changed)

Modified: httpd/test/framework/trunk/t/conf/ssl/ssl.conf.in
URL: 
http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/conf/ssl/ssl.conf.in?rev=1831398=1831397=1831398=diff
==
--- httpd/test/framework/trunk/t/conf/ssl/ssl.conf.in (original)
+++ httpd/test/framework/trunk/t/conf/ssl/ssl.conf.in Fri May 11 10:26:31 2018
@@ -237,6 +237,25 @@
 
  
  
+# For t/ssl/ocsp.t --

+
+SetEnv SSL_CA_ROOT @sslca@/asf
+
+Alias /modules/ssl/ocsp@DocumentRoot@/modules/cgi/ocsp.pl
+
+
+   SSLEngine on
+
+   SSLVerifyClient on
+
+   SSLOCSPEnable on
+   SSLOCSPDefaultResponder http://@SERVERNAME@:@PORT@/modules/ssl/ocsp
+   SSLOCSPResponderCertificateFile @SSLCA@/asf/certs/server.crt


SSLOCSPResponderCertificateFile is only supported since 2.4.26.
Does just surrounding this directive by a = 2.4.26> is 
enough, or should the corresponding test be adjusted some way or another 
as well?


(based on, 
https://build.opensuse.org/package/view_file/Apache:Test/apache-test/apache-test-ocsp-httpd-version.patch?expand=1)


CJ


+
+   # Ignore CRL check results
+   SSLCARevocationCheck none
+
+
  # For t/ssl/pr43738.t:
  
  Action application/x-pf-action /modules/cgi/action.pl

[...]