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
Federico Fornari
ngx_http_voms_module
Commits
3267431a
Commit
3267431a
authored
2 years ago
by
lcappelli
Browse files
Options
Downloads
Patches
Plain Diff
Restore tests that fails
parent
a159aa8a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
t/ssl_log_voms_plain_http.t
+8
-14
8 additions, 14 deletions
t/ssl_log_voms_plain_http.t
t/subrequest.t
+6
-11
6 additions, 11 deletions
t/subrequest.t
with
14 additions
and
25 deletions
t/ssl_log_voms_plain_http.t
+
8
−
14
View file @
3267431a
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
t/subrequest.t
+
6
−
11
View file @
3267431a
...
@@ -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 = / {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment