diff --git a/t/README.md b/t/README.md index a1398d12641830786204e274faa5f636f9066036..9cccd8c2b5e4775f114a3b0e0bb209c9fbdb31e3 100644 --- a/t/README.md +++ b/t/README.md @@ -6,32 +6,21 @@ Setup and files to test the *ngx\_http\_voms\_module* are contained in the `t` f ### Test fixture setup -Proxy certificates are in the `certs` folder: +Proxy certificates are in the `certs` folder (see [README.md](certs/README.md) for further details), while trust-anchors (e.g. igi-test-ca.pem) are contained in `trust-anchors`. - * 0.pem: long-lived proxy certificate, without Attribute Certificate (AC); - * 1.pem: long-lived proxy certificate, with an expired AC; - * 2.pem: expired proxy certificate. +Nginx server certificate and key are nginx\_voms\_example.cert.pem and nginx\_voms\_example\_key.pem, respectively, and they are contained in `certs`. -Proxy certificates are generated using [VOMS client 3.3.0](http://italiangrid.github.io/voms/documentation/voms-clients-guide/3.0.3/). - -The following command is used: - - VOMS_CLIENTS_JAVA_OPTIONS="-Dvoms.fake.vo=test.vo -Dvoms.fake=true -Dvoms.fake.aaCert=<path_to_cert>/voms_example.cert.pem -Dvoms.fake.aaKey=<path_to_key>/voms_example.key.pem" voms-proxy-init3 -voms test.vo -cert <path_to_test0>/test0.p12 --valid <validity> - -*voms\_example.cert.pem* and *voms\_example.ket.pem* can be found in the `certs` folder. - -To perform correctly the VOMS AC validation, a \*.lsc or \*.pem file is needed in `/etc/grid-security/vomsdir`, see [VOMS client 3.3.0 User Guide](http://italiangrid.github.io/voms/documentation/voms-clients-guide/3.0.3/) for further details. An example of *voms.example.lsc* can be found in `vomsdir/test.vo`. - -Trust-anchors (igi-test-ca.pem) are contained in the `trust-anchors` folder. Nginx server certificate and key (nginx\_voms\_example.cert.pem and nginx\_voms\_example\_key.pem) are in the `certs` folder. +To perform correctly the VOMS AC validation, a \*.lsc or \*.pem file is needed, see [VOMS client 3.3.0 User Guide](http://italiangrid.github.io/voms/documentation/voms-clients-guide/3.0.3/) for further details. The *voms.example.lsc* can be found in `vomsdir/test.vo`. ### Running Tests -To run the tests made available in the `t` folder just type +To run the tests made available in `t` just type prove -v +from `t`' s parent directory. -Using the docker image provided to exploit Openresty in the Storm2 project: +Using the docker image provided to exploit Openresty in the Storm2 project (see [README.md](../README.md) for further details): cp -r t /tmp cd /tmp diff --git a/t/certs/README.md b/t/certs/README.md index 36f6f3ceac53096b49e8cb95ce59dd2988240f7a..b23d8ee80f41691f24b2d130d3b5419b7f963b0a 100644 --- a/t/certs/README.md +++ b/t/certs/README.md @@ -1,3 +1,18 @@ -TBD: +======= +# Certificates for ngx\_http\_voms\_module Testing -Add docs on certs here +Proxy certificates are generated using [VOMS client 3.3.0](http://italiangrid.github.io/voms/documentation/voms-clients-guide/3.0.3/): + + * 0.pem: long-lived proxy certificate, without Attribute Certificate (AC); + * 1.pem: long-lived proxy certificate, with an expired AC; + * 2.pem: expired proxy certificate. + +To obtain such certificates the following command is used: + + VOMS_CLIENTS_JAVA_OPTIONS="-Dvoms.fake.vo=test.vo -Dvoms.fake=true -Dvoms.fake.aaCert=<path_to_cert>/voms_example.cert.pem -Dvoms.fake.aaKey=<path_to_key>/voms_example.key.pem" voms-proxy-init3 -voms test.vo -cert <path_to_test0>/test0.p12 --valid <validity> + +*voms\_example.cert.pem* and *voms\_example.ket.pem* can be found in the `certs` folder. + +To perform correctly the VOMS AC validation, a \*.lsc or \*.pem file is needed in `/etc/grid-security/vomsdir`, see [VOMS client 3.3.0 User Guide](http://italiangrid.github.io/voms/documentation/voms-clients-guide/3.0.3/) for further details. An example of *voms.example.lsc* can be found in `vomsdir/test.vo`. + +Nginx server certificate and key are nginx\_voms\_example.cert.pem and nginx\_voms\_example\_key.pem. diff --git a/t/expired_ac_proxy.t b/t/expired_ac_proxy.t index 95d474fe44768f1e4c59f5b9a9d61cd72e819732..2b07a96348f9c058dab569ef0ddd5f1daf30ed45 100644 --- a/t/expired_ac_proxy.t +++ b/t/expired_ac_proxy.t @@ -8,8 +8,8 @@ __DATA__ === TEST 1: https with x509 client authentication, valid proxy certificate with expired VOMS attributes --- main_config env OPENSSL_ALLOW_PROXY_CERTS=1; - env X509_VOMS_DIR=/home/build/ngx_http_voms_module/t/vomsdir; - env X509_CERT_DIR=/home/build/ngx_http_voms_module/t/trust-anchors; + env X509_VOMS_DIR=t/vomsdir; + env X509_CERT_DIR=t/trust-anchors; --- http_config server { error_log logs/error.log debug;