configs: Rework nginx configs
This commit is contained in:
parent
a0a1a717ee
commit
fb53c9a4f1
13 changed files with 54 additions and 286 deletions
19
configs/nginx/get-team/client-cert.conf
Normal file
19
configs/nginx/get-team/client-cert.conf
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
set $auth_basic "Challenge FIC";
|
||||
if ($ssl_client_verify != "SUCCESS") {
|
||||
set $team "$remote_user";
|
||||
set $needauth "1";
|
||||
}
|
||||
if ($ssl_client_verify = "SUCCESS") {
|
||||
set $team "_AUTH_ID_$ssl_client_serial";
|
||||
set $auth_basic off;
|
||||
set $needauth "0";
|
||||
}
|
||||
if (!-f /srv/PKI/shared/ficpasswd) {
|
||||
set $needauth "${needauth}0";
|
||||
}
|
||||
if ($needauth = "10") {
|
||||
return 401;
|
||||
}
|
||||
|
||||
auth_basic $auth_basic;
|
||||
auth_basic_user_file /srv/PKI/shared/ficpasswd;
|
||||
3
configs/nginx/get-team/request.conf
Normal file
3
configs/nginx/get-team/request.conf
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
auth_request /auth;
|
||||
|
||||
set $team "$remote_user";
|
||||
1
configs/nginx/get-team/team-1.conf
Normal file
1
configs/nginx/get-team/team-1.conf
Normal file
|
|
@ -0,0 +1 @@
|
|||
set $team 1;
|
||||
1
configs/nginx/get-team/upstream.conf
Normal file
1
configs/nginx/get-team/upstream.conf
Normal file
|
|
@ -0,0 +1 @@
|
|||
set $team "$http_x_fic_team";
|
||||
Reference in a new issue