Comments (7)
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.
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.
Run it with ./weborf -a asdasd
(it doesn't matter the value you pass, just that it will enable the authentication).
from weborf.
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.
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.
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.
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)
- nemo integration HOT 1
- Use setrlimit
- request: log output
- request: download attribute HOT 1
- Makefile adjustment HOT 11
- File already there produces http status code 206. HOT 2
- Poor documentation HOT 1
- Request: Save settings in GUI HOT 2
- libc6 2.33 dependency HOT 6
- strange CLI startup issue HOT 3
- File/directory names with a question mark character in them not handled HOT 15
- Enable WebDAV by default HOT 5
- Tar and HTTPS cannot be enabled at the same time HOT 2
- WebDAV LOCK method
- Compile error when enabling SOCKETDBG
- Logs HOT 3
- documentation at more than one folder shared HOT 7
- weborf.mo HOT 11
- send signals with pidfd_send_signal
- blacklist IP
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weborf.