mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
* Standardize spelling customize in docs * Standardize spelling categorize in docs * Standardize spelling behavior in docs * Standardize spelling visualization in docs * Standardize spelling Redis in docs * Standardize spelling ZMQ in docs * Standardize spelling CPU in docs * Standardize spelling URL in docs * Correct typos in docs
35 lines
1.1 KiB
Text
35 lines
1.1 KiB
Text
HTTP authentication can be enabled from the ntopng preferences page.
|
|
|
|
NTOP will request a POST to a URL with a JSON content:
|
|
{ "user": "username", "password": "password" }
|
|
|
|
User is granted if webservice return code 200, anything else
|
|
user is not granted. Content-Type and answer content are not checked.
|
|
|
|
If you want to grant a user as an administrator, webservice must
|
|
reply a JSON like:
|
|
{ "admin": true }
|
|
|
|
Some optional fields can personalize user.
|
|
You can set allowed ifname via optional allowedIfname field:
|
|
{ "allowedIfname": "ethX" }
|
|
|
|
You can set allowed network via optional allowedNets field:
|
|
{ "allowedNets": "10.0.0.0/24,192.168.0.0/16" }
|
|
|
|
You can set language via optional language field:
|
|
{ "language": "en" }
|
|
|
|
HTTP authentication parameters are discussed below.
|
|
|
|
* HTTP URL
|
|
URL to request for authentication.
|
|
Examples:
|
|
http://server.tld/auth
|
|
https://server.tld/auth
|
|
http://192.168.1.1/api/auth
|
|
|
|
# Setting up a simple HTTP authenticator
|
|
The python script https://github.com/ntop/ntopng/blob/dev/tools/http_authenticator.py
|
|
shows how to implement a simple HTTP authenticator. It assumes that a `/login` path
|
|
is used to indicate the login path.
|