Git Product home page Git Product logo

Comments (7)

ltworf avatar ltworf commented on June 5, 2024

weborf doesn't have a configuration for the authentication. It accepts a unix socket and sends everything to an external program that needs to decide whether to deny or allow the request.

Check the file /usr/share/doc/weborf/examples/auth.py, it contains a minimal example of such program.

It creates a unix socket which you then have to pass to weborf with the --auth option.

If you don't want to have an external process running, you can recompile weborf hardcoding the authentication in the file embedded_auth.h.

from weborf.

pepa65 avatar pepa65 commented on June 5, 2024

In embedded_auth.h I uncommented #define EMBEDDED_AUTH and recompiled, but this didn't turn on any authentication. Is there something more that needs to be done for this?

from weborf.

ltworf avatar ltworf commented on June 5, 2024

Run it with ./weborf -a asdasd (it doesn't matter the value you pass, just that it will enable the authentication).

from weborf.

pepa65 avatar pepa65 commented on June 5, 2024

It doesn't give an error like when embedded is not enabled, but there is no asking for credentials, it just gives access. Is there anything else I can change to make this work?

from weborf.

ltworf avatar ltworf commented on June 5, 2024

Well the default code there isn't blocking access to everything, try putting a printf to make sure it is run, and then make your own thing.

from weborf.

ltworf avatar ltworf commented on June 5, 2024

When embedded is enabled, if you are running weborf with a -a something parameter on the command line, the code in embedded_auth.h should be running, and it doesn't ask for password for every request, only for some, so make sure to change it to what you need to do.

from weborf.

pepa65 avatar pepa65 commented on June 5, 2024

OK, got it! I moved the line return emb_check_password(username,password); to the top of c_auth to always require authentication.
(I also added commandline options for username and password, so I am set! Thanks for your help.)

from weborf.

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.