-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtwitcher.ini.template
137 lines (117 loc) · 4.73 KB
/
twitcher.ini.template
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
###
# app configuration
# https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html
###
# From sample
# https://github.com/bird-house/twitcher/blob/master/development.ini
###
[app:main]
use = egg:pyramid_twitcher
pyramid.reload_templates = true
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
pyramid.includes =
# twitcher not using db, instead employ magpie adapter
sqlalchemy.url = sqlite:///%(here)s/twitcher.sqlite
#sqlalchemy.url = postgresql://${POSTGIS_USER}:${POSTGIS_PASSWORD}@postgis:${POSTGIS_PORT}/twitcher
retry.attempts = 3
# Caching settings for specific sections/functions - improves performance response times of recurring requests
# For caching related to Magpie API endpoints themselves, instead refer to Magpie INI configuration file.
#
# Although related to Magpie code, cache regions settings executed by 'MagpieAdapter' are running under Twitcher
# to resolve Access Control Lists (ACL) to services/resources, and must therefore be placed in Twitcher configuration.
# Caching that takes effect in Twitcher via 'MagpieAdapter' is when requests use the URL endpoint:
#
# <twitcher.url>/<twitcher.ows_proxy_protected_path>/proxy/<service-name>[/...]
#
# NOTE: Caching will only take effect with Magpie >= 3.7
# Detail:
# Both 'acl' and 'service' scopes occur on every permission resolution for a given user requesting any access.
# The difference is that 'acl' applies for every combination of (user/group, service/resource, permissions),
# while 'service' limits itself to the service name/type resolution from the request path.
# Since services are not expected to change often, 'service' cache can be safely increased at a much higher refresh
# interval than 'acl' which should re-validate any permission changes more frequently.
# Caching can be forced reset/ignored by using the 'Cache-Control: no-cache' header during any corresponding request.
cache.regions = acl, service
cache.type = memory
cache.enabled = true
cache.acl.enabled = true
cache.acl.expire = 20
cache.service.enabled = true
cache.service.expire = 60
# By default, the toolbar only appears for clients from IP addresses
# '127.0.0.1' and '::1'.
# debugtoolbar.hosts = 127.0.0.1 ::1
# twitcher
twitcher.url = https://${PAVICS_FQDN}/twitcher
twitcher.adapter = magpie.adapter.MagpieAdapter
twitcher.rpcinterface = false
twitcher.username =
twitcher.password =
twitcher.ows_security = true
twitcher.ows_proxy = true
twitcher.ows_proxy_delegate = false
twitcher.ows_proxy_protected_path = /ows
twitcher.ows_proxy_ssl_verify = ${VERIFY_SSL}
twitcher.workdir =
twitcher.prefix =
# magpie (for twitcher.adapter)
magpie.url = https://${PAVICS_FQDN}/magpie
magpie.secret = ${MAGPIE_SECRET}
magpie.admin_user = ${MAGPIE_ADMIN_USERNAME}
magpie.admin_password = ${MAGPIE_ADMIN_PASSWORD}
###
# wsgi server configuration
###
[alembic]
# path to migration scripts
script_location = twitcher/alembic
file_template = %%(year)d%%(month).2d%%(day).2d_%%(rev)s
# file_template = %%(rev)s_%%(slug)s
[server:main]
use = egg:waitress#main
listen = 0.0.0.0:8000
###
# logging configuration
# https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
###
[loggers]
keys = root, twitcher, magpie, sqlalchemy
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console
[logger_twitcher]
# "level = DEBUG" logs detailed information about operations/settings (not for production, will leak sensitive data)
# "level = INFO" reports useful information, not leaking details about settings
# "level = WARN" only potential problems/unexpected results reported, such as when caching is employed
level = INFO
handlers =
qualname = twitcher
# MagpieAdapter or any other Magpie utilities it employs through Twitcher proxy-adapter security check
[logger_magpie]
# "level = DEBUG" logs detailed information about operations/settings (not for production, will leak sensitive data)
# "level = INFO" reports useful information about operations, not leaking details about settings
# "level = WARN" only potential problems are reported such as missing settings in configuration
level = INFO
handlers =
qualname = magpie
[logger_sqlalchemy]
# "level = DEBUG" logs SQL queries, transactions and results
# "level = INFO" logs SQL queries (data can be identified from query field values)
# "level = WARN" logs neither (recommended for production systems, avoid anything below unless for dev/debug system)
level = WARN
handlers =
qualname = sqlalchemy.engine
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] %(message)s