iilab / openoil

Open Oil Corporate Network Navigator
GNU General Public License v3.0
14 stars 6 forks source link

Password protect neo4j server #17

Closed jmatsushita closed 10 years ago

jmatsushita commented 10 years ago

Looked into this but the following nginx configuration:

      satisfy  any;
      allow x.y.z.t;
      deny   all;

      auth_basic            "Restricted Access";
      auth_basic_user_file  /data/auth/neo4j;

doesn't work since the browser makes the request.

Probably needs something with the HTTP_ORIGIN variable and maybe the auth_basic off; and maybe the map module http://nginx.org/en/docs/http/ngx_http_map_module.html

jmatsushita commented 10 years ago

Used this approach to conditional auth with custom error code and $http_origin variable.