Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
ngx_http_voms_module
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cnafsd
ngx_http_voms_module
Compare revisions
d904aca125bb9815359ed8b6ca2a33f0a98ad1a4 to master
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
cnafsd/ngx_http_voms_module
Select target project
No results found
master
Select Git revision
Branches
29-rebase-on-openresty-1-21-4-1
improve-ci
master
Swap
Target
fornari/ngx_http_voms_module
Select target project
fornari/ngx_http_voms_module
cnafsd/ngx_http_voms_module
2 results
d904aca125bb9815359ed8b6ca2a33f0a98ad1a4
Select Git revision
Branches
29-rebase-on-openresty-1-21-4-1
almalinux
master
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
t/valid_ac.t
+25
-30
25 additions, 30 deletions
t/valid_ac.t
t/vomsdir/test.vo/voms.example.lsc
+0
-2
0 additions, 2 deletions
t/vomsdir/test.vo/voms.example.lsc
test-ngx-voms.sh
+0
-45
0 additions, 45 deletions
test-ngx-voms.sh
with
25 additions
and
77 deletions
t/valid_ac.t
View file @
5edd34fe
...
@@ -3,35 +3,36 @@ use Test::Nginx::Socket 'no_plan';
...
@@ -3,35 +3,36 @@ use Test::Nginx::Socket 'no_plan';
run_tests
();
run_tests
();
# /C=IT/O=IGI/CN=Test0
# /C=IT/O=IGI/CN=Test CA
# /test.vo/exp1,/test.vo/exp2,/test.vo/exp3/Role=PIPPO,/C=IT/O=IGI/CN=*.test.example
# test.vo
# voms.example:15000
#
__DATA__
__DATA__
=== TEST 1: valid AC, verification of valid VOMS attributes extracted by ngx_http_voms_module
=== TEST 1: valid AC, verification of valid VOMS attributes extracted by ngx_http_voms_module
--- main_config
--- main_config
env OPENSSL_ALLOW_PROXY_CERTS=1;
env X509_VOMS_DIR=t/vomsdir;
env X509_VOMS_DIR=t/vomsdir;
env X509_CERT_DIR=t/trust-anchors;
env X509_CERT_DIR=t/trust-anchors;
load_module /etc/nginx/modules/ngx_http_voms_module.so;
--- http_config
--- http_config
client_body_temp_path /tmp/client_temp;
proxy_temp_path /tmp/proxy_temp_path;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
server {
server {
error_log logs/error.log debug;
error_log logs/error.log debug;
listen 8443 ssl;
listen 8443 ssl;
ssl_certificate ../../certs/
nginx_voms
_example.cert.pem;
ssl_certificate ../../certs/
star_test
_example.cert.pem;
ssl_certificate_key ../../certs/
nginx_voms
_example.key.pem;
ssl_certificate_key ../../certs/
star_test
_example.key.pem;
ssl_client_certificate ../../trust-anchors/igi
-
test
-
ca.pem;
ssl_client_certificate ../../trust-anchors/igi
_
test
_
ca.pem;
ssl_verify_depth 10;
ssl_verify_depth 10;
ssl_verify_client on;
ssl_verify_client on;
location = / {
location = / {
default_type text/plain;
default_type text/plain;
echo $voms_user;
return 200 "$voms_user\n $voms_user_ca\n$voms_fqans,$voms_server\n$voms_vo\n$voms_server_uri\n";
echo $voms_user_ca;
echo $voms_fqans;
echo $voms_server;
echo $voms_server_ca;
echo $voms_vo;
echo $voms_server_uri;
echo $voms_not_before;
echo $voms_not_after;
echo $voms_generic_attributes;
echo $voms_serial;
}
}
}
}
--- config
--- config
...
@@ -42,18 +43,12 @@ __DATA__
...
@@ -42,18 +43,12 @@ __DATA__
proxy_ssl_certificate_key ../../certs/3.key.pem;
proxy_ssl_certificate_key ../../certs/3.key.pem;
}
}
--- request
--- request
GET /
GET /
--- response_body
--- response_body eval
/C=IT/O=IGI/CN=test0
`env X509_CERT_DIR=t/trust-anchors voms-proxy-info -file t/certs/3.pem -identity`
/C=IT/O=IGI/CN=Test CA
. ` env X509_CERT_DIR=t/trust-anchors voms-proxy-info -file t/certs/3.pem -chain | grep issuer | cut -d: -f2 | head -1`
/test/exp1,/test/exp2,/test/exp3/Role=PIPPO
. ` env X509_CERT_DIR=t/trust-anchors voms-proxy-info -file t/certs/3.pem -fqan | tr "\n" ","`
/C=IT/O=IGI/CN=voms.example
. ` env X509_CERT_DIR=t/trust-anchors voms-proxy-info -file t/certs/3.pem -acissuer`
/C=IT/O=IGI/CN=Test CA
. ` env X509_CERT_DIR=t/trust-anchors voms-proxy-info -file t/certs/3.pem -vo`
test.vo
. ` env X509_CERT_DIR=t/trust-anchors voms-proxy-info -file t/certs/3.pem -uri`
voms.example:15000
20180101000000Z
20300101000000Z
n=nickname v=newland q=test.vo,n=nickname v=giaco q=test.vo
7B
--- error_code: 200
--- error_code: 200
This diff is collapsed.
Click to expand it.
t/vomsdir/test.vo/voms.example.lsc
deleted
100644 → 0
View file @
d904aca1
/C=IT/O=IGI/CN=voms.example
/C=IT/O=IGI/CN=Test CA
This diff is collapsed.
Click to expand it.
test-ngx-voms.sh
deleted
100755 → 0
View file @
d904aca1
#!/bin/sh
# Copyright 2018 Istituto Nazionale di Fisica Nucleare
#
# Licensed under the EUPL, Version 1.2 or - as soon they will be approved by the
# European Commission - subsequent versions of the EUPL (the "Licence"). You may
# not use this work except in compliance with the Licence. You may obtain a copy
# of the Licence at:
#
# https://joinup.ec.europa.eu/software/page/eupl
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# Licence for the specific language governing permissions and limitations under
# the Licence.
# This script builds in debug mode and installs openresty together with the
# ngx_http_voms_module.
#
# The script requires the locations of the openresty bundle and of the
# ngx_http_voms_module code (for example as checked-out from git). The locations
# are expressed by the environment variables OPENRESTY_ROOT and
# NGX_HTTP_VOMS_MODULE_ROOT respectively, if available. If they are not set,
# they are guessed:
# * a unique openresty bundle is looked for in ${HOME}
# * the ngx_http_voms_module code is looked for in the working directory of the
# continuous integration environment first and then in ${HOME}
#
# The script works best (i.e. it is tested) if run within a docker container
# started from the storm2/ngx-voms-build image.
if
[
-r
"
${
HOME
}
/openresty-env"
]
;
then
.
${
HOME
}
/openresty-env
fi
module_root
=
${
NGX_HTTP_VOMS_MODULE_ROOT
:-${
CI_PROJECT_DIR
:-${
HOME
}
/ngx_http_voms_module
}}
if
[
!
-d
"
${
module_root
}
"
]
;
then
>
&2
echo
'Invalid ngx_http_voms_module environment ("'
${
module_root
}
'")'
exit
1
fi
mkdir
-p
/tmp/t
prove
${
module_root
}
/t
This diff is collapsed.
Click to expand it.
Prev
1
2
3
4
5
6
Next