forked from OpenCTI-Platform/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
298 lines (280 loc) · 9.58 KB
/
docker-compose.yml
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
version: '3'
services:
redis:
deploy:
replicas: 1
placement:
constraints:
- node.labels.role == opencti-core
restart_policy: &default_restart_policy
condition: on-failure
delay: 3s
max_attempts: 5
window: 60s
image: redis:7.2.4
volumes:
- redisdata:/data
nginx:
image: codeforafrica/cfa-opencti:0.0.6
deploy:
replicas: 1
placement:
constraints:
- node.labels.role == manager
restart_policy: *default_restart_policy
ports:
- "80:80"
depends_on:
- opencti
rabbitmq:
image: rabbitmq:3.13-management
deploy:
replicas: 1
placement:
constraints:
- node.labels.role == opencti-core
restart_policy: *default_restart_policy
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
- RABBITMQ_NODENAME=rabbit01@localhost
volumes:
- amqpdata:/var/lib/rabbitmq
opencti:
deploy:
replicas: 1
placement:
constraints:
- node.labels.role == opencti-core
restart_policy: *default_restart_policy
image: opencti/platform:6.1.1
environment:
- NODE_OPTIONS=--max-old-space-size=8096
- APP__PORT=8080
- APP__BASE_URL=${OPENCTI_BASE_URL}
- APP__ADMIN__EMAIL=${OPENCTI_ADMIN_EMAIL}
- APP__ADMIN__PASSWORD=${OPENCTI_ADMIN_PASSWORD}
- APP__ADMIN__TOKEN=${OPENCTI_ADMIN_TOKEN}
- APP__APP_LOGS__LOGS_LEVEL=error
- APP__APP_LOGS__LOGS_CONSOLE=true # Output in the container console
- REDIS__HOSTNAME=redis
- REDIS__PORT=6379
- ELASTICSEARCH__SSL__REJECT_UNAUTHORIZED="false"
- "ELASTICSEARCH__URL=[\"https://${ELASTIC_USER}:${ELASTIC_PASSWORD}@${ELASTIC_IP_1}:${ELASTIC_PORT}\", \"https://${ELASTIC_USER}:${ELASTIC_PASSWORD}@${ELASTIC_IP_2}:${ELASTIC_PORT}\", \"https://${ELASTIC_USER}:${ELASTIC_PASSWORD}@${ELASTIC_IP_3}:${ELASTIC_PORT}\"]"
- ELASTICSEARCH__INDEX_PREFIX=opencti
- MINIO__ENDPOINT=${MINIO__ENDPOINT}
- MINIO__PORT=${MINIO__PORT}
- MINIO__USE_SSL=${MINIO__USE_SSL}
- MINIO__ACCESS_KEY=${MINIO__ACCESS_KEY}
- MINIO__SECRET_KEY=${MINIO__SECRET_KEY}
- MINIO__BUCKET_NAME=${MINIO__BUCKET_NAME}
- MINIO__BUCKET_REGION=${MINIO__BUCKET_REGION}
- RABBITMQ__HOSTNAME=rabbitmq
- RABBITMQ__PORT=5672
- RABBITMQ__PORT_MANAGEMENT=15672
- RABBITMQ__MANAGEMENT_SSL=false
- RABBITMQ__USERNAME=${RABBITMQ_DEFAULT_USER}
- RABBITMQ__PASSWORD=${RABBITMQ_DEFAULT_PASS}
- SMTP__HOSTNAME=${SMTP_HOSTNAME}
- SMTP__PORT=25
- PROVIDERS__LOCAL__STRATEGY=LocalStrategy
ports:
- "8080:8080"
depends_on:
- redis
- rabbitmq
worker:
image: opencti/worker:6.1.1
environment:
- OPENCTI_URL=${OPENCTI_CONNECT_URL}
- OPENCTI_TOKEN=${OPENCTI_ADMIN_TOKEN}
- OPENCTI_JSON_LOGGING=true # Enable / disable JSON logging
- WORKER_LOG_LEVEL=error
depends_on:
- opencti
deploy:
mode: replicated
replicas: 3
placement:
constraints:
- node.labels.role == opencti-core
restart_policy: *default_restart_policy
connector-export-file-stix:
deploy:
replicas: 1
placement:
constraints:
- node.labels.role == opencti-core
restart_policy: *default_restart_policy
image: opencti/connector-export-file-stix:6.1.1
environment:
- OPENCTI_URL=${OPENCTI_CONNECT_URL}
- OPENCTI_TOKEN=${OPENCTI_ADMIN_TOKEN}
- CONNECTOR_ID=${CONNECTOR_EXPORT_FILE_STIX_ID} # Valid UUIDv4
- CONNECTOR_TYPE=INTERNAL_EXPORT_FILE
- CONNECTOR_NAME=ExportFileStix2
- CONNECTOR_SCOPE=application/json
- CONNECTOR_CONFIDENCE_LEVEL=15 # From 0 (Unknown) to 100 (Fully trusted)
- OPENCTI_JSON_LOGGING=true # Enable / disable JSON logging
- CONNECTOR_LOG_LEVEL=info=error
depends_on:
- opencti
connector-export-file-csv:
deploy:
replicas: 1
placement:
constraints:
- node.labels.role == opencti-core
restart_policy: *default_restart_policy
image: opencti/connector-export-file-csv:6.1.1
environment:
- OPENCTI_URL=${OPENCTI_CONNECT_URL}
- OPENCTI_TOKEN=${OPENCTI_ADMIN_TOKEN}
- CONNECTOR_ID=${CONNECTOR_EXPORT_FILE_CSV_ID} # Valid UUIDv4
- CONNECTOR_TYPE=INTERNAL_EXPORT_FILE
- CONNECTOR_NAME=ExportFileCsv
- CONNECTOR_SCOPE=text/csv
- CONNECTOR_CONFIDENCE_LEVEL=15 # From 0 (Unknown) to 100 (Fully trusted)
- OPENCTI_JSON_LOGGING=true # Enable / disable JSON logging
- CONNECTOR_LOG_LEVEL=info=error
depends_on:
- opencti
connector-export-file-txt:
deploy:
replicas: 1
placement:
constraints:
- node.labels.role == opencti-core
restart_policy: *default_restart_policy
image: opencti/connector-export-file-txt:6.1.1
environment:
- OPENCTI_URL=${OPENCTI_CONNECT_URL}
- OPENCTI_TOKEN=${OPENCTI_ADMIN_TOKEN}
- CONNECTOR_ID=${CONNECTOR_EXPORT_FILE_TXT_ID} # Valid UUIDv4
- CONNECTOR_TYPE=INTERNAL_EXPORT_FILE
- CONNECTOR_NAME=ExportFileTxt
- CONNECTOR_SCOPE=text/plain
- CONNECTOR_CONFIDENCE_LEVEL=15 # From 0 (Unknown) to 100 (Fully trusted)
- OPENCTI_JSON_LOGGING=true # Enable / disable JSON logging
- CONNECTOR_LOG_LEVEL=info=error
depends_on:
- opencti
connector-import-file-stix:
deploy:
replicas: 1
placement:
constraints:
- node.labels.role == opencti-core
restart_policy: *default_restart_policy
image: opencti/connector-import-file-stix:6.1.1
environment:
- OPENCTI_URL=${OPENCTI_CONNECT_URL}
- OPENCTI_TOKEN=${OPENCTI_ADMIN_TOKEN}
- CONNECTOR_ID=${CONNECTOR_IMPORT_FILE_STIX_ID} # Valid UUIDv4
- CONNECTOR_TYPE=INTERNAL_IMPORT_FILE
- CONNECTOR_NAME=ImportFileStix
- CONNECTOR_VALIDATE_BEFORE_IMPORT=false # Validate any bundle before import
- CONNECTOR_SCOPE=application/json,text/xml
- CONNECTOR_AUTO=true # Enable/disable auto-import of file
- CONNECTOR_CONFIDENCE_LEVEL=15 # From 0 (Unknown) to 100 (Fully trusted)
- OPENCTI_JSON_LOGGING=true # Enable / disable JSON logging
- CONNECTOR_LOG_LEVEL=info=error
depends_on:
- opencti
connector-import-document:
deploy:
replicas: 1
placement:
constraints:
- node.labels.role == opencti-core
restart_policy: *default_restart_policy
image: opencti/connector-import-document:6.1.1
environment:
- OPENCTI_URL=${OPENCTI_CONNECT_URL}
- OPENCTI_TOKEN=${OPENCTI_ADMIN_TOKEN}
- CONNECTOR_ID=${CONNECTOR_IMPORT_DOCUMENT_ID} # Valid UUIDv4
- CONNECTOR_TYPE=INTERNAL_IMPORT_FILE
- CONNECTOR_NAME=ImportDocument
- CONNECTOR_VALIDATE_BEFORE_IMPORT=true # Validate any bundle before import
- CONNECTOR_SCOPE=application/pdf,text/plain,text/html
- CONNECTOR_AUTO=true # Enable/disable auto-import of file
- CONNECTOR_ONLY_CONTEXTUAL=false # Only extract data related to an entity (a report, a threat actor, etc.)
- CONNECTOR_CONFIDENCE_LEVEL=15 # From 0 (Unknown) to 100 (Fully trusted)
- OPENCTI_JSON_LOGGING=true # Enable / disable JSON logging
- CONNECTOR_LOG_LEVEL=info=error
- IMPORT_DOCUMENT_CREATE_INDICATOR=true
depends_on:
- opencti
connector-disarm-framework:
deploy:
replicas: 1
placement:
constraints:
- node.labels.role == opencti-core
restart_policy: *default_restart_policy
image: opencti/connector-disarm-framework:6.1.1
environment:
- OPENCTI_URL=${OPENCTI_CONNECT_URL}
- OPENCTI_TOKEN=${OPENCTI_ADMIN_TOKEN}
- CONNECTOR_ID=${DISARM_CONNECTOR_ID}
- "CONNECTOR_NAME=DISARM Framework"
- CONNECTOR_SCOPE=marking-definition,identity,attack-pattern,course-of-action,intrusion-set,campaign,malware,tool,report,narrative,event,channel
- CONNECTOR_CONFIDENCE_LEVEL=75 # From 0 (Unknown) to 100 (Fully trusted)
- CONNECTOR_RUN_AND_TERMINATE=false
- OPENCTI_JSON_LOGGING=true # Enable / disable JSON logging
- CONNECTOR_LOG_LEVEL=info=error
- DISARM_FRAMEWORK_URL=https://raw.githubusercontent.com/DISARMFoundation/DISARMframeworks/main/generated_files/DISARM_STIX/DISARM.json
- DISARM_FRAMEWORK_INTERVAL=7 # In days, must be strictly greater than 1
depends_on:
- opencti
networks:
- cfa_opencti_network
portainer-agent:
image: portainer/agent
environment:
- AGENT_CLUSTER_ADDR=tasks.portainer-agent
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker/volumes:/var/lib/docker/volumes
deploy:
mode: global
networks:
- cfa_opencti_network
portainer:
image: portainer/portainer
command: >
-H tcp://tasks.portainer-agent:9001 --tlsskipverify
--admin-password=${PORTAINER_ADMIN_PASSWORD}
environment:
- PORTAINER_ADMIN_PASSWORD=${PORTAINER_ADMIN_PASSWORD}
ports:
- "9010:9000"
- "8000:8000"
volumes:
- portainer_data:/data
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
networks:
- cfa_opencti_network
volumes:
s3data:
driver: local
driver_opts:
type: none
o: bind
device: /home/ubuntu/opencti/volumes/s3data
redisdata:
driver: local
driver_opts:
type: none
o: bind
device: /home/ubuntu/opencti/volumes/redisdata
amqpdata:
driver: local
driver_opts:
type: none
o: bind
device: /home/ubuntu/opencti/volumes/amqpdata