2015-12-13 09:34:12 +00:00
|
|
|
import os
|
|
|
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
|
|
|
# BASIC APP CONFIG
|
|
|
|
WTF_CSRF_ENABLED = True
|
|
|
|
SECRET_KEY = 'We are the world'
|
2016-04-13 04:13:59 +00:00
|
|
|
BIND_ADDRESS = '127.0.0.1'
|
2015-12-14 09:38:47 +00:00
|
|
|
PORT = 9393
|
2016-04-28 15:53:50 +00:00
|
|
|
LOGIN_TITLE = "PDNS"
|
2015-12-13 09:34:12 +00:00
|
|
|
|
2016-03-17 04:59:33 +00:00
|
|
|
# TIMEOUT - for large zones
|
|
|
|
TIMEOUT = 10
|
|
|
|
|
2016-08-12 08:15:38 +00:00
|
|
|
# LOG CONFIG
|
2015-12-13 09:34:12 +00:00
|
|
|
LOG_LEVEL = 'DEBUG'
|
|
|
|
LOG_FILE = 'logfile.log'
|
2016-08-16 22:04:40 +00:00
|
|
|
# For Docker, set the following
|
|
|
|
#LOG_FILE = '/dev/stdout'
|
2015-12-13 09:34:12 +00:00
|
|
|
|
2015-12-16 17:50:28 +00:00
|
|
|
# Upload
|
|
|
|
UPLOAD_DIR = os.path.join(basedir, 'upload')
|
|
|
|
|
2015-12-13 09:34:12 +00:00
|
|
|
# DATABASE CONFIG
|
2016-08-16 16:54:07 +00:00
|
|
|
#You'll need MySQL-python
|
|
|
|
SQLA_DB_USER = 'powerdnsadmin'
|
|
|
|
SQLA_DB_PASSWORD = 'powerdnsadminpassword'
|
|
|
|
SQLA_DB_HOST = 'mysqlhostorip'
|
|
|
|
SQLA_DB_NAME = 'powerdnsadmin'
|
|
|
|
|
|
|
|
#MySQL
|
|
|
|
SQLALCHEMY_DATABASE_URI = 'mysql://'+SQLA_DB_USER+':'\
|
|
|
|
+SQLA_DB_PASSWORD+'@'+SQLA_DB_HOST+'/'+SQLA_DB_NAME
|
|
|
|
#SQLite
|
2016-08-12 08:15:38 +00:00
|
|
|
#SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/your/pdns.db'
|
2015-12-13 09:34:12 +00:00
|
|
|
SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository')
|
|
|
|
SQLALCHEMY_TRACK_MODIFICATIONS = True
|
|
|
|
|
|
|
|
# LDAP CONFIG
|
2016-08-16 15:21:29 +00:00
|
|
|
LDAP_TYPE = 'ldap'
|
2015-12-13 09:34:12 +00:00
|
|
|
LDAP_URI = 'ldaps://your-ldap-server:636'
|
|
|
|
LDAP_USERNAME = 'cn=dnsuser,ou=users,ou=services,dc=duykhanh,dc=me'
|
|
|
|
LDAP_PASSWORD = 'dnsuser'
|
|
|
|
LDAP_SEARCH_BASE = 'ou=System Admins,ou=People,dc=duykhanh,dc=me'
|
2016-04-28 15:53:50 +00:00
|
|
|
# Additional options only if LDAP_TYPE=ldap
|
|
|
|
LDAP_USERNAMEFIELD = 'uid'
|
|
|
|
LDAP_FILTER = '(objectClass=inetorgperson)'
|
2015-12-13 09:34:12 +00:00
|
|
|
|
2016-08-16 15:21:29 +00:00
|
|
|
## AD CONFIG
|
|
|
|
#LDAP_TYPE = 'ad'
|
|
|
|
#LDAP_URI = 'ldaps://your-ad-server:636'
|
|
|
|
#LDAP_USERNAME = 'cn=dnsuser,ou=Users,dc=domain,dc=local'
|
|
|
|
#LDAP_PASSWORD = 'dnsuser'
|
|
|
|
#LDAP_SEARCH_BASE = 'dc=domain,dc=local'
|
|
|
|
## You may prefer 'userPrincipalName' instead
|
|
|
|
#LDAP_USERNAMEFIELD = 'sAMAccountName'
|
|
|
|
## AD Group that you would like to have accesss to web app
|
|
|
|
#LDAP_FILTER = 'memberof=cn=DNS_users,ou=Groups,dc=domain,dc=local'
|
|
|
|
|
2016-08-05 08:20:41 +00:00
|
|
|
# Github Oauth
|
|
|
|
GITHUB_OAUTH_ENABLE = False
|
|
|
|
GITHUB_OAUTH_KEY = 'G0j1Q15aRsn36B3aD6nwKLiYbeirrUPU8nDd1wOC'
|
|
|
|
GITHUB_OAUTH_SECRET = '0WYrKWePeBDkxlezzhFbDn1PBnCwEa0vCwVFvy6iLtgePlpT7WfUlAa9sZgm'
|
|
|
|
GITHUB_OAUTH_SCOPE = 'email'
|
|
|
|
GITHUB_OAUTH_URL = 'http://127.0.0.1:5000/api/v3/'
|
|
|
|
GITHUB_OAUTH_TOKEN = 'http://127.0.0.1:5000/oauth/token'
|
|
|
|
GITHUB_OAUTH_AUTHORIZE = 'http://127.0.0.1:5000/oauth/authorize'
|
|
|
|
|
2016-04-26 20:04:33 +00:00
|
|
|
#Default Auth
|
|
|
|
BASIC_ENABLED = True
|
|
|
|
SIGNUP_ENABLED = True
|
|
|
|
|
2015-12-13 09:34:12 +00:00
|
|
|
# POWERDNS CONFIG
|
|
|
|
PDNS_STATS_URL = 'http://172.16.214.131:8081/'
|
|
|
|
PDNS_API_KEY = 'you never know'
|
2016-06-07 06:50:31 +00:00
|
|
|
PDNS_VERSION = '3.4.7'
|
2015-12-13 09:34:12 +00:00
|
|
|
|
|
|
|
# RECORDS ALLOWED TO EDIT
|
2016-03-08 02:52:54 +00:00
|
|
|
RECORDS_ALLOW_EDIT = ['A', 'AAAA', 'CNAME', 'SPF', 'PTR', 'MX', 'TXT']
|