hbnet/user_managment/config-SAMPLE.py

88 lines
2.6 KiB
Python
Raw Normal View History

'''
2021-06-19 11:58:15 -04:00
Settings for HBNet Web Server.
'''
2021-06-19 11:58:15 -04:00
# Database options
# Using SQLite is simple and easiest. Comment out this line and uncomment the MySQL
# line to use a MySQL/MariaDB server.
db_location = 'sqlite:///hbnet.sqlite'
2021-05-12 15:01:29 -04:00
2021-06-19 11:58:15 -04:00
# Uncomment and change this line to use a MySQL DB. It is best to start with a fresh
# DB without data in it.
#db_location = 'mysql+pymysql://DB_USERNAME:DB_PASSWORD@DB_HOST:MySQL_PORT/DB_NAME'
2021-05-12 15:01:29 -04:00
2021-06-19 11:58:15 -04:00
# Title of the HBNet Web Server
title = 'HBNet DMR server'
# Port to run server
2021-06-19 11:58:15 -04:00
hws_port = 8080
# IP to run server on
2021-06-19 11:58:15 -04:00
hws_host = '127.0.0.1'
# Publicly accessible URL of the web server. THIS IS REQUIRED AND MUST BE CORRECT.
url = 'http://localhost:8080'
2021-06-19 11:58:15 -04:00
# Replace below with some random string such as an SHA256
secret_key = 'SUPER SECRET LONG KEY'
2021-06-19 11:58:15 -04:00
# Default state for newly created user accounts. Setting to False will require
# the approval of an admin user before the user can login.
default_account_state = True
# Legacy passphrase used in hblink.cfg
#legacy_passphrase = 'passw0rd'
2021-06-19 11:58:15 -04:00
# Passphrase calculation config. If REMOTE_CONFIG is not used in your DMR server config
# (hblink.cfg), then the values in section [USER_MANAGER] MUST match the values below.
# If REMOTE_CONFIG is enabled, the DMR server (hblink) will automatically use the values below.
# These config options affect the generation of user passphrases.
2021-06-03 20:19:44 -04:00
2021-06-19 11:58:15 -04:00
# Set to a value between 1 - 99. This value is used in the normal calculation.
append_int = 1
# Set to a value between 1 - 99. This value is used for compromised passphrases.
2021-06-03 20:19:44 -04:00
burn_int = 5
2021-06-19 11:58:15 -04:00
# Set to a value between 1 - 99 This value is used in the normal calculation.
extra_int_1 = 5
# Set to a value between 1 - 99 This value is used in the normal calculation.
extra_int_2 = 8
# Set to a length of about 10 characters.
extra_1 = 'TeSt'
extra_2 = 'DmR4'
# Shorten generated passphrases
use_short_passphrase = True
# Character length of shortened passphrase
shorten_length = 6
# How often to pick character from long passphrase when shortening.
shorten_sample = 4
2021-06-03 20:19:44 -04:00
2021-05-17 13:42:05 -04:00
# Email settings
MAIL_SERVER = 'smtp.gmail.com'
MAIL_PORT = 465
MAIL_USE_SSL = True
MAIL_USE_TLS = False
MAIL_USERNAME = 'app@gmail.com'
MAIL_PASSWORD = 'password'
MAIL_DEFAULT_SENDER = '"' + title + '" <app@gmail.com>'
2021-06-19 11:58:15 -04:00
# User settings settings
2021-05-17 13:42:05 -04:00
USER_ENABLE_EMAIL = True
2021-06-19 11:58:15 -04:00
USER_ENABLE_USERNAME = True
USER_REQUIRE_RETYPE_PASSWORD = True
2021-05-17 13:42:05 -04:00
USER_ENABLE_CHANGE_USERNAME = False
USER_ENABLE_MULTIPLE_EMAILS = True
USER_ENABLE_CONFIRM_EMAIL = True
USER_ENABLE_REGISTER = True
USER_AUTO_LOGIN_AFTER_CONFIRM = False
USER_SHOW_USERNAME_DOES_NOT_EXIST = True
2021-06-19 11:58:15 -04:00
# Time format for display on some pages
time_format = '%H:%M:%S - %m/%d/%y'