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
1 merge request!23Use nginx with njs instead of openresty with lua
Pipeline #91952 passed
......@@ -11,8 +11,11 @@ __DATA__
--- main_config
env X509_VOMS_DIR=t/vomsdir;
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;
--- http_config
js_path "/home/nginx/t";
js_import socket.js;
log_format voms '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
......@@ -27,27 +30,18 @@ __DATA__
ssl_verify_depth 10;
location = / {
default_type text/plain;
echo $voms_user;
# echo $voms_user;
return 200 "$voms_user\n";
}
}
--- config
location = /lua {
location = /njs {
error_log logs/error-proxy.log debug;
access_log logs/access-proxy.log;
content_by_lua_block {
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()
}
js_content socket.connect;
}
--- request
GET /lua
GET /njs
--- error_log
client prematurely closed connection
retrieve_voms_ac_from_proxy
......
......@@ -19,22 +19,17 @@ __DATA__
ssl_client_certificate ../../trust-anchors/igi-test-ca.pem;
ssl_verify_depth 10;
ssl_verify_client on;
location = / {
location = / {
auth_request /authz;
default_type text/plain;
# auth_request_set $pippo $some_var;
# echo $http_pluto;
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
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