Code Monkey home page Code Monkey logo

Comments (4)

Sidiox avatar Sidiox commented on August 28, 2024

You can enable basic webauthentication on your webserver. If you use Apache as the webserver you can simply follow the instructions here: https://httpd.apache.org/docs/2.4/howto/auth.html
This is authentication against the webserver itself, the Wistar instance behind the webserver is still shared between all users that can authenticate.

from wistar.

akher1 avatar akher1 commented on August 28, 2024

I am able to bring up the apache server but the authentication is not working for me.

This is my server

ankur@ankur-virtual-machine:/etc/apache2/sites-enabled$ pwd
/etc/apache2/sites-enabled
nkur@ankur-virtual-machine:/etc/apache2/sites-enabled$ ls -la
total 48
drwxr-xr-x 2 root root 4096 Aug 2 16:15 .
drwxr-xr-x 8 root root 4096 Aug 2 14:47 ..
-rw-r--r-- 1 root root 152 Aug 2 15:54 .htaccess
-rw------- 1 root root 12288 Aug 2 15:52 .htaccess.swo
-rw------- 1 root root 12288 Aug 2 15:47 .htaccess.swp
-rw-r--r-- 1 root root 756 Aug 2 16:13 999-non
-rw-r--r-- 1 root root 563 Aug 2 15:59 999-wistar.conf
-rw-r--r-- 1 root root 1332 Aug 2 15:13 backup-0000-default.conf

virtual-machine:/etc/apache2/sites-enabled$ cat 999-wistar.conf
Define wistar_path /opt/wistar/wistar-master
Listen 8080
<VirtualHost *:8080>
WSGIScriptAlias / ${wistar_path}/wistar/wsgi.py
WSGIDaemonProcess wistar python-path=${wistar_path}
WSGIProcessGroup wistar
ErrorLog /var/log/apache2/wistar.log
CustomLog /var/log/apache2/wistar_access.log combined
Alias /static/ ${wistar_path}/common/static/

<Directory "${wistar_path}/common/static">
Require all granted

<Directory ${wistar_path}>

Require all granted


+++++++++THIS IS NOT WORKING+++++++++
ankur@ankur-virtual-machine:/etc/apache2/sites-enabled$ cat 999-non
Define wistar_path /opt/wistar/wistar-master
<VirtualHost *:8080>
WSGIScriptAlias / ${wistar_path}/wistar/wsgi.py
WSGIDaemonProcess wistar python-path=${wistar_path}
WSGIProcessGroup wistar
ErrorLog /var/log/apache2/wistar.log
CustomLog /var/log/apache2/wistar_access.log combined
Alias /static/ ${wistar_path}/common/static/

<Directory "${wistar_path}/common/static">
Require all granted

<Directory ${wistar_path}>

    <Files wsgi.py>
          AuthType Basic
      AuthName "Restricted Files"
      # (Following line optional)
      AuthBasicProvider file
      AuthUserFile "/var/www/html/passwords"
      Require user ankur   
    </Files>
ankurh@ankur-virtual-machine:/etc/apache2/sites-enabled$

=========

So, in which path I should call my password?

Regards,
Ankur Kher

from wistar.

akher1 avatar akher1 commented on August 28, 2024

Please provide some directions?

from wistar.

dmontagner avatar dmontagner commented on August 28, 2024

@akher1 today Wistar has no authentication methods enabled as it is a lab tool only. The suggestion made by @Sidiox is by far the easiest way to provide some level of authentication.

I suspect you haven't created the file .htpasswd on /opt/wistar/wistar-master.

Alternatively, but far more complex, you can enable authentication in DJango. But this will require extra coding.

https://docs.djangoproject.com/en/2.2/topics/auth/default/

from wistar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.