Skip to content
Snippets Groups Projects
Commit 3267431a authored by lcappelli's avatar lcappelli
Browse files

Restore tests that fails

parent a159aa8a
No related branches found
No related tags found
No related merge requests found
...@@ -11,8 +11,11 @@ __DATA__ ...@@ -11,8 +11,11 @@ __DATA__
--- main_config --- main_config
env X509_VOMS_DIR=t/vomsdir; env X509_VOMS_DIR=t/vomsdir;
load_module /etc/nginx/modules/ngx_http_voms_module.so; load_module /etc/nginx/modules/ngx_http_voms_module.so;
load_module /etc/nginx/modules/ngx_http_js_module.so;
load_module /etc/nginx/modules/ngx_http_echo_module.so; load_module /etc/nginx/modules/ngx_http_echo_module.so;
--- http_config --- http_config
js_path "/home/nginx/t";
js_import socket.js;
log_format voms '$remote_addr - $remote_user [$time_local] ' log_format voms '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent ' '"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" ' '"$http_referer" "$http_user_agent" '
...@@ -27,27 +30,18 @@ __DATA__ ...@@ -27,27 +30,18 @@ __DATA__
ssl_verify_depth 10; ssl_verify_depth 10;
location = / { location = / {
default_type text/plain; default_type text/plain;
echo $voms_user; # echo $voms_user;
return 200 "$voms_user\n";
} }
} }
--- config --- config
location = /lua { location = /njs {
error_log logs/error-proxy.log debug; error_log logs/error-proxy.log debug;
access_log logs/access-proxy.log; access_log logs/access-proxy.log;
content_by_lua_block { js_content socket.connect;
local sock = ngx.socket.tcp()
local ok, err = sock:connect("127.0.0.1", 8443)
if not ok then
ngx.say("failed to connect to upstream: ", err)
return
end
ngx.say("successfully connected to upstream!")
sock:send("G")
sock:close()
}
} }
--- request --- request
GET /lua GET /njs
--- error_log --- error_log
client prematurely closed connection client prematurely closed connection
retrieve_voms_ac_from_proxy retrieve_voms_ac_from_proxy
......
...@@ -19,22 +19,17 @@ __DATA__ ...@@ -19,22 +19,17 @@ __DATA__
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 = / {
auth_request /authz; auth_request /authz;
default_type text/plain; default_type text/plain;
# auth_request_set $pippo $some_var;
# echo $http_pluto;
echo $some_var; echo $some_var;
# echo $pippo;
# return 200 "$pippo\n";
}
location = /authz {
internal;
set $some_var $voms_user;
proxy_set_header pluto $voms_user;
return 200;
} }
location = /authz {
internal;
set $some_var $voms_user;
return 200;
}
} }
--- config --- config
location = / { location = / {
......
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