Skip to content
Snippets Groups Projects
Commit 4db9d5bc authored by Nicholas Terranova's avatar Nicholas Terranova
Browse files

README.md, empty_voms_proxy.t and expired_ac_proxy.t fixed

parent c0e6b7c2
No related branches found
No related tags found
No related merge requests found
...@@ -29,3 +29,7 @@ A comma-separated list of _Fully Qualified Attribute Names_ ...@@ -29,3 +29,7 @@ A comma-separated list of _Fully Qualified Attribute Names_
### voms_user ### voms_user
## Testing
Setup and files to test the *ngx\_http\_voms\_module* are contained in the `t` folder.
...@@ -2,33 +2,33 @@ ...@@ -2,33 +2,33 @@
## Description ## Description
Setup and files to test the *ngx\_http\_voms\_module* are contained in the **t** folder. The [Openresty data-driven testsuite](https://openresty.gitbooks.io/programming-openresty/content/testing/) has been adopted for testing. Setup and files to test the *ngx\_http\_voms\_module* are contained in the `t` folder. The [Openresty data-driven testsuite](https://openresty.gitbooks.io/programming-openresty/content/testing/) has been adopted for testing.
### Test fixture setup ### Test fixture setup
Proxy certificates are in the **certs** folder: Proxy certificates are in the `certs` folder:
* 0.pem: long-lived proxy, no AC; * 0.pem: long-lived proxy certificate, without Attribute Certificate (AC);
* 1.pem: long-lived proxy, expired AC; * 1.pem: long-lived proxy certificate, with an expired AC;
* 2.pem: expired proxy certificate. * 2.pem: expired proxy certificate.
Proxy certificates are generated using [VOMS client 3.3.0](http://italiangrid.github.io/voms/documentation/voms-clients-guide/3.0.3/). Proxy certificates are generated using [VOMS client 3.3.0](http://italiangrid.github.io/voms/documentation/voms-clients-guide/3.0.3/).
The following options are used: 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_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. *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**. 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. 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.
### Running Tests ### Running Tests
To run the tests made available in the **t** folder just type To run the tests made available in the `t` folder just type
prove -v t prove -v
Using the docker image provided to exploit Openresty in the Storm2 project: Using the docker image provided to exploit Openresty in the Storm2 project:
...@@ -39,4 +39,4 @@ Using the docker image provided to exploit Openresty in the Storm2 project: ...@@ -39,4 +39,4 @@ Using the docker image provided to exploit Openresty in the Storm2 project:
make && make install make && make install
cd .. cd ..
sudo chown build.build -R t sudo chown build.build -R t
prove -v t prove -v
...@@ -5,7 +5,7 @@ run_tests(); ...@@ -5,7 +5,7 @@ run_tests();
__DATA__ __DATA__
=== TEST 1: https with x509 client authentication, valid proxy certificate no voms attributes === TEST 1: https with x509 client authentication, valid proxy certificate with no VOMS attributes
--- main_config --- main_config
env OPENSSL_ALLOW_PROXY_CERTS=1; env OPENSSL_ALLOW_PROXY_CERTS=1;
env X509_VOMS_DIR=t/vomsdir; env X509_VOMS_DIR=t/vomsdir;
...@@ -20,7 +20,8 @@ __DATA__ ...@@ -20,7 +20,8 @@ __DATA__
ssl_verify_client on; ssl_verify_client on;
location = / { location = / {
default_type text/plain; default_type text/plain;
echo $voms_fqans $voms_user; echo $voms_fqans;
echo $voms_user;
} }
} }
--- config --- config
...@@ -32,7 +33,7 @@ __DATA__ ...@@ -32,7 +33,7 @@ __DATA__
--- request --- request
GET / GET /
--- response_body_like eval --- response_body_like eval
qr/\n/ qr/\n\n/
--- error_log --- error_log
VOMS extension not found VOMS extension not found
--- error_code: 200 --- error_code: 200
...@@ -5,7 +5,7 @@ run_tests(); ...@@ -5,7 +5,7 @@ run_tests();
__DATA__ __DATA__
=== TEST 1: https with x509 client authentication, valid proxy certificate expired voms attributes === TEST 1: https with x509 client authentication, valid proxy certificate with expired VOMS attributes
--- main_config --- main_config
env OPENSSL_ALLOW_PROXY_CERTS=1; env OPENSSL_ALLOW_PROXY_CERTS=1;
env X509_VOMS_DIR=t/vomsdir; env X509_VOMS_DIR=t/vomsdir;
...@@ -20,7 +20,8 @@ __DATA__ ...@@ -20,7 +20,8 @@ __DATA__
ssl_verify_client on; ssl_verify_client on;
location = / { location = / {
default_type text/plain; default_type text/plain;
echo $voms_fqans $voms_user; echo $voms_fqans;
echo $voms_user;
} }
} }
--- config --- config
...@@ -32,7 +33,7 @@ __DATA__ ...@@ -32,7 +33,7 @@ __DATA__
--- request --- request
GET / GET /
--- response_body_like eval --- response_body_like eval
qr/\n/ qr/\n\n/
--- error_log --- error_log
AC not valid anymore AC not valid anymore
--- error_code: 200 --- error_code: 200
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment