/
app.conf
436 lines (399 loc) · 12.9 KB
/
app.conf
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
# All application specific configuration and defaults should reside here
app {
# The service description namespace
description {
# The name of the service
name = "delta"
# The environment in which the service runs
env = "dev"
}
http {
# The default interface to bind to
interface = 127.0.0.1
# The default port to bind to
port = 8080
# The default base uri; the last path segment is considered the API version
base-uri = "http://localhost:8080/v1"
# The timeout when applying the toStrictEntity directive
strict-entity-timeout = 10 seconds
}
# Primary store settings
database {
# Access to database for regular read access (fetch and listing operations)
read = ${app.defaults.database.access}
# Access to database for write access
write = ${app.defaults.database.access}
# Access to database for streaming access (indexing / SSEs)
streaming = ${app.defaults.database.access}
name = ${app.defaults.database.name}
username = ${app.defaults.database.username}
password = ${app.defaults.database.password}
# when true it creates the tables on service boot
tables-autocreate = false
cache {
# The max number of tokens in the partition cache
max-size = 1000
# The duration after an entry in the cache expires
expire-after = 10 minutes
}
}
# Fusion configuration
fusion {
# The base url for Fusion
base = "http://localhost:8081"
# Allows to return a redirection when fetching a resource with the `Accept` header
# set to `text/html`
enable-redirects = false
}
# Json-LD Api configuration
json-ld-api {
# Set the Jena parser to perform extra checks:
# * URIs - whether IRs confirm to all the rules of the URI scheme
# * Literals: whether the lexical form conforms to the rules for the datatype.
# * Triples and quads: check slots have a valid kind of RDF term (parsers usually make this a syntax error anyway).
extra-checks: true
# Set the Jena parser to strict mode
# This mode do the extra-checks described above and reject relative iris/uris
strict: false
# Define the error handler for the Jena parser
# * strict: Both errors and warnings will raise exceptions
# * default: Errors will raise exceptions and warning will result in logs
# * no-warning: Erros will raise exceptions and warning will result in logs
error-handling: "strict"
}
# Identities configuration
identities {
# The max number of tokens in the groups cache
max-size = 500
# The duration after which the cache expires
expire-after = 3 minutes
}
# Acls configuration
acls {
# the acls event log configuration
event-log = ${app.defaults.event-log}
}
# Permissions configuration
permissions {
# the permissions event-log configuration
event-log = ${app.defaults.event-log}
# the minimum set of permissions
minimum = [
"acls/read",
"acls/write",
"permissions/read",
"permissions/write",
"realms/read",
"realms/write",
"events/read",
"projects/read",
"projects/write",
"projects/create",
"projects/delete",
"organizations/read",
"organizations/write",
"organizations/create",
"resources/read",
"resources/write",
"resolvers/write",
"views/query",
"views/write",
"schemas/write",
"files/write",
"storages/write",
"archives/write",
"version/read",
"quotas/read",
"supervision/read"
]
# permissions applied to the creator of the project
owner-permissions = [
"acls/read",
"acls/write",
"projects/read",
"projects/write",
"projects/create",
"projects/delete",
"organizations/read",
"organizations/write",
"organizations/create",
"resources/read",
"resources/write",
"resolvers/write",
"views/query",
"views/write",
"schemas/write",
"files/write",
"storages/write",
"archives/write",
"version/read",
"quotas/read"
]
}
# Realms configuration
realms {
# the realms event-log configuration
event-log = ${app.defaults.event-log}
# the realms pagination config
pagination = ${app.defaults.pagination}
}
# Organizations configuration
organizations {
# the organizations event-log configuration
event-log = ${app.defaults.event-log}
# the organizations pagination config
pagination = ${app.defaults.pagination}
# the organizations cache for org uuids
cache {
# The max number of tokens in the org uuids cache
max-size = 500
# The duration after which the cache expires
expire-after = 3 hours
}
}
# Projects configuration
projects {
# the projects event-log configuration
event-log = ${app.defaults.event-log}
# the projects pagination config
pagination = ${app.defaults.pagination}
# the projects cache for org uuids
cache {
# The max number of tokens in the projects uuids cache
max-size = 500
# The duration after which the cache expires
expire-after = 3 hours
}
# The project deletion configuration
deletion {
# To make it effective
enabled = false
# Gives a delay for project deletion tasks to be taken into account,
# especially for views deprecation events to be acknowledged by coordinators
propagation-delay = 30 seconds
# The retry strategy to apply when it fails
retry-strategy = {
retry = "exponential"
initial-delay = 30 seconds
max-delay = 1 hour
max-retries = 20
}
}
}
# Configuration for the automatic provisioning of projects.
automatic-provisioning {
enabled = false
# The list of permissions to apply to the owner on the generated project
permissions = ["resources/read", "resources/write", "projects/read"]
description = "Auto provisioned project"
# configuration of realms for automatic provisioning
# mapping between realm label and organization in which to provision the project
enabled-realms {
realm = "users-realm"
}
api-mappings {
# example API mapping
# documents = "https://bluebrain.github.io/nexus/vocabulary/defaultElasticSearchIndex"
}
# vocab setting for the project
# vocab = "http://example.com/vocab"
# base setting for the project
# base = "http://example.com/base"
}
# Quotas for projects
quotas {
# flag to enable or disable project quotas
enabled = false
# maximum number of resources per project. This field is optional
resources = 1000
# maximum number of events per project. This field is optional
events = 2000
# custom quotas for certain projects
custom {
# "myorg/myproject" {
# resources = 2000
# events = 4000
# }
}
}
# Resolvers configuration
resolvers {
# the resolvers event-log configuration
event-log = ${app.defaults.event-log}
# the resolvers pagination config
pagination = ${app.defaults.pagination}
defaults = {
# the name of the default resolver
name = "Default resolver"
# the description of the default resolver
description = "Resolver created with the project"
}
}
# Resources configuration
resources {
# the resources event-log configuration
event-log = ${app.defaults.event-log}
}
# Schemas configuration
schemas {
# the schemas event-log configuration
event-log = ${app.defaults.event-log}
}
# SSE configuration
sse {
# the schemas event-log configuration
query = ${app.defaults.query}
# the sse cache to get projects uuids
cache {
# The max number of tokens in the projects uuids cache
max-size = 500
# The duration after which the cache expires
expire-after = 15 minutes
}
}
# secrets encryption configuration
encryption {
password = "changeme"
salt = "salt"
}
# projection configuration
projections {
cluster {
size = 1
node-index = 0
}
batch {
# the maximum batching size, corresponding to the maximum number of elements
# processed before saving the progress.
max-elements = 30
# the maximum batching duration.
max-interval = 5 seconds
}
retry = ${app.defaults.constant-retry-strategy}
supervision-check-interval = 3 seconds
# how often the failed elem deletion projection will be awoken
delete-expired-every = 5 minutes
# the time after which stored projection errors will be deleted
failed-elem-ttl = 14 days
# the time after which stored restarts will be deleted
restart-ttl = 1 hour
query = ${app.defaults.query}
}
defaults {
http-client {
# the retry strategy for the http client
retry = ${app.defaults.constant-retry-strategy}
# the strategy to decide if it is worth retrying when an Http error occurs.
# allowed strategies are 'always', 'never' or 'onServerError'.
is-worth-retrying = "onServerError"
# Flag to decide whether or not to support compression
compression = true
}
# default query configuration
query {
batch-size = 30
refresh-strategy = 3s
}
# default event log configuration
event-log {
query-config = ${app.defaults.query}
max-duration = 14 seconds
}
# Default database configuration
database {
access {
# the database host
host = 127.0.0.1
# the database port
port = 5432
# the pool size
pool-size = 10
}
name = "postgres"
username = "postgres"
password = "postgres"
}
# default pagination configuration
pagination {
# the default number of results if none is specified
default-size = 30
# the maximum number of results if none is specified
size-limit = 1000
# the maximum start index for a page
from-limit = 10000
}
# default indexing configuration
indexing {
# default prefix to use when creating indices
prefix = "delta"
}
# default retry strategy, possible value formats are defined at the following config path:
# - ${app.defaults.never-retry-strategy}
# - ${app.defaults.once-retry-strategy}
# - ${app.defaults.constant-retry-strategy}
# - ${app.defaults.exponential-retry-strategy}
retry-strategy = ${app.defaults.never-retry-strategy}
# never retry
never-retry-strategy {
retry = "never"
}
# retry once with a delay
once-retry-stategy {
retry = "once"
delay = 2 seconds
}
# retry with a constant delay until the max-retries value has been met
constant-retry-strategy {
retry = "constant"
delay = 5 seconds
max-retries = 5
}
# retry with an exponential delay until the max-retries value has been met
exponential-retry-strategy {
retry = "exponential"
initial-delay = 500 milliseconds
max-delay = 20 seconds
max-retries = 20
}
}
# monitoring config
monitoring {
# tracing settings
trace {
# Interval at which sampled finished spans will be flushed to SpanReporters.
tick-interval = 10 seconds
# Decides whether to include the stack trace of a Throwable as the "error.stacktrace" Span tag when a Span is marked
# as failed.
include-error-stacktrace = yes
# Configures a sampler that decides which Spans should be sent to Span reporters. The possible values are:
# - always: report all traces.
# - never: don't report any trace.
# - random: randomly decide using the probability defined in the random-sampler.probability setting.
# - adaptive: keeps dynamic samplers for each operation while trying to achieve a set throughput goal.
# - A FQCN of a kamon.trace.Sampler implementation to be used instead. The implementation must have a default
# constructor that will be used by Kamon when creating the instance.
#
sampler = "adaptive"
}
# jaeger settings
jaeger {
enabled = false
host = "localhost"
port = 14268
# Protocol used to send data to Jaeger. The available options are:
# - http: Sends spans using jaeger.thrift over HTTP. Aimed to used with a Jaeger Collector.
# - https: Sends spans using jaeger.thrift over HTTPS. Aimed to used with a Jaeger Collector.
# - udp: Sends spans using jaeger.thrift compact over UDP. Aimed to used with a Jaeger Agent.
protocol = http
# for http and https, this is the full url to be used
http-url = ${app.monitoring.jaeger.protocol}"://"${app.monitoring.jaeger.host}":"${app.monitoring.jaeger.port}"/api/traces"
# Enable or disable including tags from kamon.environment as labels
include-environment-tags = no
}
}
# Service account configuration for internal operations
service-account {
subject: "delta"
realm: "internal"
}
}