Web UI leveraging Mist APIs to synchronize and provide historical data for Rogue/Neighbor APs
1.6K
Copyright (c) 2020 Thomas Munzer
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This Web app can be used to keep historical data about the Rogue/Neighbor APs detected by Mist APs.
The backend will to a daily sync to retrieve the list of Rogue/Neighbor APs detected during the last day, and store the information. This can be used to have a better understanding to the Rogue/Neighbor APs on every sites, and to be alerted when an AP has been heard for more than X days.
|
|
|
This is a demo application using the Mist APIs.
You can run it as a strandalone Python application, or deploy it as a Docker container.
Note: The application is not providing secured HTTPS connections. It is highly recommended to deploy it behind a reverse proxy providing HTTPS encryption.
src folder, install the javascript dependencies (ex: npm install)srcfolder, start the app with npm startTCP3000The docker image is available on docker hub: https://hub.docker.com/repository/docker/tmunzer/mist_rogue_monitor.
The Docket image is listening on port TCP3000
You can configure the settings through a configuration file or through Environment Variables.
A configuration example with explanation is avaiable in the src/config_example.js. This file must be edited and renamed config.js.
| Variable Name | Type | Default Value | Comment |
|---|---|---|---|
| NODE_HOSTNAME | string | null | Server IP Address or FQDN |
| NODE_PORT | int | 3000 | server HTTP port |
| NODE_HTTPS | boolean | false | whether or not to enable HTTPS |
| NODE_PORT_HTTPS | int | 3443 | if NODE_HTTPS==true, server HTTPS port |
| NODE_HTTPS_CERT | string | null | if NODE_HTTPS==true, HTTPS certificate |
| NODE_HTTPS_KEY | string | null | if NODE_HTTPS==true, HTTPS certifiate key |
| NODE_DISABLE_SERVER_ROLE | boolean | false | because the syncing task may slow down the frontend processes, it may be recommanded to deploy one instance for serving the clients (SERVER_ROLE) and one instance to sync with Mist Cloud (SYNC_ROLE) |
| NODE_DISABLE_SYNC_ROLE | boolean | false | because the syncing task may slow down the frontend processes, it may be recommanded to deploy one instance for serving the clients (SERVER_ROLE) and one instance to sync with Mist Cloud (SYNC_ROLE) |
| MONGO_HOSTNAME | string | null | mongoDB server Hostname or IP address |
| MONGO_DB | string | mrm | mongoDO collection name |
| MONGO_USER | string | null | if authentication is required, mongoDB user |
| MONGO_PASSWORD | string | null | if authentication is required, mongoDB password |
| MONGO_ENC_KEY | string | null | to encrypt mongoDB data. Can be generated with openssl rand -base64 32 |
| MONGO_SIG_KEY | string | null | to encrypt mongoDB data. Can be generated with openssl rand -base64 64 |
| SMTP_HOSTNAME | string | null | IP Address or FQDN of the SMTP server to connect to |
| SMTP_PORT | int | 25 | port to connect to the SMTP server |
| SMTP_SECURE | boolean | false | to use STARTTLS connection with SMTP server |
| SMTP_REJECT_UNAUTHORIZED | boolean | true | is SMTP_SECURE==true, do not authorized SMTP server with self signed certificate |
| SMTP_USER | string | null | if SMTP requires authentication |
| SMTP_PASSWORD | string | null | if SMTP requires authentication |
| SMTP_FROM_NAME | string | Wi-Fi Access | |
| SMTP_FROM_EMAIL | string | [email protected] | |
| SMTP_SUBJECT | string | Your Personal Wi-Fi access code | |
| SMTP_LOGO | string | https://cdn.mist.com/wp-content/uploads/logo.png | |
| MAX_AGE | int | 30 | in days. how long the data are kept in the database. This is used to limit the rogue details history, and to automatically delete an AP if it has not been heard for more than X days |
Content type
Image
Digest
sha256:99653722e…
Size
80.5 MB
Last updated
about 2 years ago
docker pull tmunzer/mist_rogue_monitor