-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.example.py
95 lines (81 loc) · 3.04 KB
/
config.example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
class Config():
"""
Default config options
"""
# Flask debugging
DEBUG = True
# Flask testing
TESTING = False
# SSO auth enabled
SSO_AUTH = True
# Authentication is done outside the app, use HTTP header to get the user uuid.
# If SSO_AUTH is set to True, this option is ignored and SSO auth is used.
HEADER_AUTH = False
# Name of HTTP header containing the UUID of authenticated user.
# Only used when HEADER_AUTH is set to True
AUTH_HEADER_NAME = 'X-Authenticated-User'
# SSO LOGOUT
LOGOUT_URL = "https://flowspec.example.com/Shibboleth.sso/Logout"
# SQL Alchemy config
SQLALCHEMY_TRACK_MODIFICATIONS = False
# ExaApi configuration
# possible values HTTP, RABBIT
EXA_API = "HTTP"
# for HTTP EXA_API_URL must be specified
EXA_API_URL = "http://localhost:5000/"
# for RABBITMQ EXA_API_RABBIT_* must be specified
EXA_API_RABBIT_HOST = "your rabbit host"
EXA_API_RABBIT_PORT = "rabit port (5672)"
EXA_API_RABBIT_PASS = "some secret password"
EXA_API_RABBIT_USER = "rabbit user"
EXA_API_RABBIT_VHOST = "rabbit vhost"
EXA_API_RABBIT_QUEUE = "exa_api"
# Secret keys for Flask Session and JWT (API and CSRF protection)
JWT_SECRET = "GenerateSomeLongRandomSequence"
SECRET_KEY = "GenerateSomeLongRandomSequence"
# LOCAL user parameters - when the app is used without SSO_AUTH
# Defined in User model
LOCAL_USER_UUID = "[email protected]"
# Defined in User model
LOCAL_USER_ID = 1
# Defined in Role model / default 1 - view, 2 - normal user, 3 - admin
LOCAL_USER_ROLES = ["admin"]
# Defined in Organization model
# List of organizations for the local user. There can be many of them.
# Define the name and the adress range. The range is then used for first data insert
# after the tables are created with db-init.py script.
LOCAL_USER_ORGS = [
{"name": "Example Org.", "arange": "192.168.0.0/16\n2121:414:1a0b::/48"},
]
# Defined in Role model / default 1 - view, 2 - normal user, 3 - admin
LOCAL_USER_ROLE_IDS = [3]
# Defined in Organization model
LOCAL_USER_ORG_IDS = [1]
# APP Name - display in main toolbar
APP_NAME = "ExaFS"
# Route Distinguisher for VRF
# When True set your rd string and label to be used in messages
USE_RD = True
RD_STRING = "7654:3210"
RD_LABEL = "label for RD"
class ProductionConfig(Config):
"""
Production config options
"""
# SQL Alchemy config string - mustl include user and pwd
SQLALCHEMY_DATABASE_URI = "Your Productionl Database URI"
# Public IP of the production machine
LOCAL_IP = "127.0.0.1"
# SSO AUTH enabled in produciion
SSO_AUTH = True
# Set true if you need debug in production
DEBUG = False
class DevelopmentConfig(Config):
"""
Development config options - usually for localhost development and debugging process
"""
SQLALCHEMY_DATABASE_URI = "Your Local Database URI"
LOCAL_IP = "127.0.0.1"
DEBUG = True
class TestingConfig(Config):
TESTING = True