qudreams / nginx-http-radius-module

nginx http radius authentication module
27 stars 17 forks source link

Authentication info can't be reused #5

Open jenningsloy318 opened 5 years ago

jenningsloy318 commented 5 years ago

Hi I have compiled it with latest nginx source code 1.15.9 with this module, after setup with freeradius, I can authentictated into nginx, but any refresh or subpath access will ask again for credentials, don't know how to fix it

Here is my conf:

....
    radius_dict_directory "/etc/nginx/raddb/";

    radius_server "radius_server1" {
            #authentication timed-out
            auth_timeout 15;

            #limit to resend the request
            resend_limit 3;

            #radius authentication server url.
            url "10.36.47.230:1812";

            #share secret
            share_secret "MySecrets";
        }
server {
    listen       9093;
    server_name  default;

    location /  {
      proxy_http_version   1.1;
      proxy_hide_header    Vary;
      proxy_hide_header    X-Powered-By;
      proxy_set_header     Host             $host;
      proxy_set_header     X-Real_IP        $remote_addr;
      proxy_set_header     X-Forwarded-For  $proxy_add_x_forwarded_for;
      proxy_next_upstream  http_502 http_504 http_404 error timeout invalid_header;
      proxy_pass           http://10.36.47.205:9093;
      auth_radius_server "radius_server1" "PAP";
      auth_radius "Restricted";
    }
}
....

the error logs shows:

2019/03/18 14:56:02 [error] 78617#78617: *63 add radius packet failed: fd=18,id=26, client: 10.36.52.235, server: default, request: "GET /lib/bootstrap-4.0.0-alpha.6-dist/css/bootstrap.min.css HTTP/1.1", host: "10.36.47.254:9093", referrer: "http://10.36.47.254:9093/"
2019/03/18 14:56:02 [error] 78617#78617: *109 add radius packet failed: fd=18,id=252, client: 10.36.52.235, server: default, request: "GET /lib/font-awesome-4.7.0/css/font-awesome.min.css HTTP/1.1", host: "10.36.47.254:9093", referrer: "http://10.36.47.254:9093/"
2019/03/18 14:56:02 [error] 78617#78617: *110 add radius packet failed: fd=18,id=219, client: 10.36.52.235, server: default, request: "GET /lib/bootstrap-4.0.0-alpha.6-dist/css/bootstrap.min.css HTTP/1.1", host: "10.36.47.254:9093", referrer: "http://10.36.47.254:9093/"
2019/03/18 14:56:02 [error] 78617#78617: *111 add radius packet failed: fd=18,id=162, client: 10.36.52.235, server: default, request: "GET /api/v2/receivers HTTP/1.1", host: "10.36.47.254:9093", referrer: "http://10.36.47.254:9093/"
2019/03/18 14:56:02 [error] 78617#78617: *112 add radius packet failed: fd=18,id=60, client: 10.36.52.235, server: default, request: "GET /api/v2/alerts?silenced=false&inhibited=false HTTP/1.1", host: "10.36.47.254:9093", referrer: "http://10.36.47.254:9093/"
2019/03/18 14:56:02 [error] 78617#78617: *113 add radius packet failed: fd=18,id=16, client: 10.36.52.235, server: default, request: "GET /favicon.ico HTTP/1.1", host: "10.36.47.254:9093", referrer: "http://10.36.47.254:9093/"