-
Notifications
You must be signed in to change notification settings - Fork 215
/
concierge.conf
174 lines (143 loc) · 5.04 KB
/
concierge.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
ditto {
service-name = "concierge"
mapping-strategy.implementation = "org.eclipse.ditto.concierge.service.ConciergeMappingStrategies"
mapping-strategy.implementation = ${?MAPPING_STRATEGY_IMPLEMENTATION}
concierge {
enforcement {
# configuration for retrieval of policies/things during enforcement via sharding
ask-with-retry {
# maximum duration to wait for anwers from entity shard regions
ask-timeout = 3s
ask-timeout = ${?ENFORCEMENT_ASK_TIMEOUT}
# one of: OFF, NO_DELAY, FIXED_DELAY, BACKOFF_DELAY
retry-strategy = BACKOFF_DELAY
retry-strategy = ${?ENFORCEMENT_ASK_RETRY_STRATEGY}
retry-attempts = 3
retry-attempts = ${?ENFORCEMENT_ASK_TIMEOUT_RETRIES}
fixed-delay = 5s
fixed-delay = ${?ENFORCEMENT_ASK_FIXED_DELAY}
backoff-delay {
min = 100ms
max = 10s
# must be between 0.0 and 1.0:
random-factor = 0.5
}
}
# the buffer size used for the queue in the enforcement actor
buffer-size = 100
buffer-size = ${?ENFORCEMENT_BUFFER_SIZE}
# whether to dispatch live response from channels other than subscribers of live messages.
global-live-response-dispatching = true
global-live-response-dispatching = ${?ENFORCEMENT_GLOBAL_LIVE_RESPONSE_DISPATCHING}
# list of namespaces for which a special usage logging should be enabled in enforcement
special-logging-inspected-namespaces = []
special-logging-inspected-namespaces = ${?ENFORCEMENT_SPECIAL_LOGGING_INSPECTED_NAMESPACES}
# restrict entity creation
entity-creation {
# this default entry allows every authenticated "auth-subject" to create any "resource-type" in any "namespace":
grant = [{}]
# same as "grant", but rejecting requests which already passed "grant"
revoke = []
}
}
caches {
# configuration for retrieval of policies/things during cache update via sharding
ask-with-retry {
# maximum duration to wait for answers from entity shard regions
ask-timeout = 3s
ask-timeout = ${?CONCIERGE_CACHES_ASK_TIMEOUT}
# one of: OFF, NO_DELAY, FIXED_DELAY, BACKOFF_DELAY
retry-strategy = BACKOFF_DELAY
retry-strategy = ${?CONCIERGE_CACHES_ASK_RETRY_STRATEGY}
retry-attempts = 3
retry-attempts = ${?CONCIERGE_CACHES_ASK_TIMEOUT_RETRIES}
fixed-delay = 5s
fixed-delay = ${?CONCIERGE_CACHES_ASK_FIXED_DELAY}
backoff-delay {
min = 100ms
max = 10s
# must be between 0.0 and 1.0:
random-factor = 0.5
}
}
id {
# how many relations to cache
maximum-size = 80000
maximum-size = ${?AUTHORIZATION_ID_CACHE_SIZE}
# maximum duration of inconsistency after losing a cache invalidation
expire-after-write = 1h
expire-after-write = ${?EXPIRE_AFTER_WRITE_ID_CACHE}
# prolonged on each cache access by that duration
expire-after-access = 15m
expire-after-access = ${?EXPIRE_AFTER_ACCESS_ID_CACHE}
}
enforcer {
# how many enforcers to cache
maximum-size = 20000
maximum-size = ${?AUTHORIZATION_ENFORCER_CACHE_SIZE}
# maximum duration of inconsistency after losing a cache invalidation
expire-after-write = 1h
expire-after-write = ${?EXPIRE_AFTER_WRITE_ENFORCER_CACHE}
# prolonged on each cache access by that duration
expire-after-access = 15m
expire-after-access = ${?EXPIRE_AFTER_ACCESS_ENFORCER_CACHE}
}
}
things-aggregator {
single-retrieve-thing-timeout = 30s
single-retrieve-thing-timeout = ${?THINGS_AGGREGATOR_SINGLE_RETRIEVE_THING_TIMEOUT}
max-parallelism = 20
max-parallelism = ${?THINGS_AGGREGATOR_MAX_PARALLELISM}
}
}
}
akka {
actor {
deployment {
/conciergeRoot/dispatcherActor/aggregator {
router = round-robin-pool
# nr-of-instances = 5
resizer {
lower-bound = 5
upper-bound = 100
messages-per-resize = 50
}
}
}
}
cluster {
sharding {
role = ${ditto.service-name}
}
roles = [
"concierge",
"blocked-namespaces-aware",
"live-signal-aware",
"acks-aware"
]
}
}
cached-namespace-invalidator-dispatcher {
# one thread per actor in case the actor blocks.
type = PinnedDispatcher
executor = "thread-pool-executor"
}
blocked-namespaces-dispatcher {
type = Dispatcher
executor = "fork-join-executor"
fork-join-executor {
# Min number of threads to cap factor-based parallelism number to
parallelism-min = 4
# Parallelism (threads) ... ceil(available processors * factor)
parallelism-factor = 3.0
# Max number of threads to cap factor-based parallelism number to
parallelism-max = 32
parallelism-max = ${?DEFAULT_DISPATCHER_PARALLELISM_MAX}
}
throughput = 5
}
enforcement-cache-dispatcher {
type = Dispatcher
executor = "thread-pool-executor"
}
include "concierge-extension"