cyberark/secretless-broker

View on GitHub
test/connector/http/basicauth/http-basic-auth.conf

Summary

Maintainability
Test Coverage
server {
  listen 8080 default_server;
  server_name localhost;

  error_log  /dev/stderr;
  access_log  /dev/stdout;

  root /var/www/html;

  auth_basic "Test Auth";
  auth_basic_user_file /etc/nginx/.htpasswd;

  location /test {
    auth_basic 'off';
    return 200 'ok';
  }

  location / {
    try_files DUMMY @fake_content;
  }

  location @fake_content {
    return 200 'secured resource';
  }
}