-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexecengine.ini
More file actions
223 lines (215 loc) · 12.6 KB
/
execengine.ini
File metadata and controls
223 lines (215 loc) · 12.6 KB
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
#############################################
# ExecEngine Configuration File #
#############################################
# You can change the ExecEngine #
# configuration as you see fit! Currently, #
# there are a number of parameters that #
# define restrictions on working with #
# isolation environment resources, as well #
# as basic API settings. #
# #
# This configuration file contains standard #
# settings that will allow you to work #
# comfortably with ExecEngine “out of the #
# box.” You can change the settings #
# as you see fit. #
# #
# Description of all the parameters that you#
# can change is provided. Read description #
# of the parameters that you want to change.#
#############################################
#############################################
# PROJECT BASIC SETTINGS #
#############################################
# This section presents the basic project #
# settings that do not affect the API's #
# operation. Changes to these settings will #
# only be reflected in the documentation #
# automatically generated via Swagger. #
#############################################
[PROJECT BASIC SETTINGS]
# PROJECT_NAME defines the name of the project in the documentation
PROJECT_NAME = ExecEngine API
# PROJECT_VERSION defines the version of the project in the documentation
PROJECT_VERSION = 1.1.0
# PROJECT_DESCRIPTION defines the description of the project in the documentation
PROJECT_DESCRIPTION = ExecEngine is designed to run untrusted code in web-centric environments and applications.
# ENABLE_AUTO_GENERATED_DOCS Replaces classic documentation with documentation automatically generated using Swagger and ReDoc.
# Set the value to True to open automatic documentation when you enter /docs.
ENABLE_AUTO_GENERATED_DOCS = True
#############################################
# CONNECTION SETTINGS #
#############################################
# This section defines the settings for #
# connecting to the database and message #
# broker. The parameter values must be #
# identical to the values specified in .env #
# (defined in docker-compose.yml). #
# #
# If the data from this file does not match #
# the environment variables, the values from#
# docker-compose.yml will be selected as #
# default values. #
#############################################
[CONNECTION SETTINGS]
# DATABASE_HOST specifies the host for connecting to the database. Not recommended to change!
DATABASE_HOST = db
# DATABASE_NAME specifies the name of the database. Not recommended to change!
DATABASE_NAME = exec_engine
# DATABASE_USER defines the username for connecting to the database. Must match the environment variable (POSTGRES_USER)!
DATABASE_USER = postgres
# DATABASE_PASSWORD defines the password of user for connecting to the database. Must match the environment variable (POSTGRES_PASSWORD)!
DATABASE_PASSWORD = postgres
# RABBITMQ_HOST defines the host for connecting to the message broker. Not recommended to change! Must match the environment variable (RABBITMQ_HOST)!
RABBITMQ_HOST = rabbbitmq
# RABBITMQ_USER defines the username for connecting to the message broker. Must match the environment variable (RABBITMQ_DEFAULT_USER)!
RABBITMQ_USER = admin
# RABBITMQ_PASSWORD defines the password of user for connecting to the message broker. Must match the environment variable (RABBITMQ_DEFAULT_PASS)!
RABBITMQ_PASSWORD = admin
# Next options defines the administrator data that will be created when the API service is first launched.
# We strongly recommend changing the ADMIN_USERNAME and ADMIN_PASSWORD parameters to unique ones!
ADMIN_USERNAME = admin
ADMIN_PASSWORD = admin
ADMIN_EMAIL = admin_execengine@example.com
ADMIN_NAME = John Doe
#############################################
# SECRET KEY SETTINGS #
#############################################
# This section defines the settings for #
# generating a secret key for issuing API #
# tokens during user authentication on the #
# server. We recommend using a complex #
# secret key to minimize the risk of user #
# data leakage. #
#############################################
[SECRET KEY SETTINGS]
# SECRET_KEY required for creating and verifying a JWT digital signature. Must match the environment variable!
SECRET_KEY = your_secret_key
# ALGORITHM required to determine the method of creating a digital signature token.
# More about algorithms: https://jose.readthedocs.io/en/latest/
ALGORITHM = HS256
# ACCESS_TOKEN_EXPIRE_MINUTES specifies the time in minutes after which the JWT token will become inactive.
# Measurement unit: minutes
ACCESS_TOKEN_EXPIRE_MINUTES = 30
#############################################
#BATCH SIZE AND CONCURENT SUBMISSIONS LIMITS#
#############################################
# This section contains parameters that #
# determine the limits on parallel #
# processing of user requests and on the #
# size of batch requests. It is not #
# recommended to set high values in order to#
# avoid excessive load on the server. #
#############################################
[BATCH SIZE AND CONCURENT SUBMISSIONS LIMITS]
# MAX_CONCURENT_SUBMISSIONS determines the number of streams that can be occupied by user requests in a single time interval (requests are executed in parallel with each other).
# Measurement unit: number of concurent submissions
MAX_CONCURRENT_SUBMISSIONS = 5
# MAX_BATCH_SIZE determines the maximum size of a batch request that a user can send. Exceeding this value will result in a corresponding error from the server.
# Measurement unit: number of requests in batch.
MAX_BATCH_SIZE = 50
#############################################
# DB CONNECTION SETTINGS #
#############################################
# Additional database connection settings #
# that determine the server's behavior in #
# case of no access to the database. #
#############################################
[DB CONNECTION SETTINGS]
# DB_MAX_RETRIES determines the number of attempts to reconnect to the database in case of errors on the server. If the API fails to connect after the specified number of attempts, the server stops working.
# Measurement unit: number of retries
DB_MAX_RETRIES = 100
# DB_MAX_TIMEOUT specifies the time interval in seconds after which the API will attempt to connect to the database again.
# Measurement unit: seconds
DB_MAX_TIMEOUT = 3
# FREQUENCY_OF_CLEANING_SUBMISSIONS determines the frequency of cleaning the submissions table (in days). Please note that the script cleans the ENTIRE table.
# Measurement unit: days (default cleaning frequency is once every 7 days).
FREQUENCY_OF_CLEANING_SUBMISSIONS = 3
# FREQUENCY_OF_CLEANING_API_TOKENS defines the frequency of cleaning the API tokens table in minutes. Only expired tokens are removed from the table by the script.
# Measurement unit: minutes (by default, cleaning is performed every 60 minutes).
FREQUENCY_OF_CLEANING_API_TOKENS = 2
#############################################
# DEFAULT RESOURCE LIMITS #
#############################################
# This section contains parameters that set #
# standard restrictions on resource usage in#
# an isolated environment. These values will#
# be substituted automatically if the user #
# doesn't specify other values in the #
# request. #
#############################################
[DEFAULT RESOURCE LIMITS]
# DEFAULT_TIME_LIMIT sets the default value for the “time_limit” parameter if the user does not specify it in the request.
# Measurement unit: seconds (can be fractional).
DEFAULT_TIME_LIMIT = 2
# DEFAULT_MEMORY_LIMIT sets the default value for the “memory_limit” parameter if the user does not specify it in the request.
# Measurement unit: Kilobytes.
DEFAULT_MEMORY_LIMIT = 64000
# DEFAULT_EXTRA_TIME sets the default value for the “extra_time” parameter if the user does not specify it in the request.
# Measurement unit: seconds (can be fractional).
DEFAULT_EXTRA_TIME = 0.5
# DEFAULT_WALL_TIME_LIMIT sets the default value for the “wall_time_limit” parameter if the user does not specify it in the request.
# Measurement unit: seconds (can be fractional).
DEFAULT_WALL_TIME_LIMIT = 3
# DEFAULT_STACK_SIZE sets the default value for the “stack_size” parameter if the user does not specify it in the request.
# Measurement unit: Kilobytes.
DEFAULT_STACK_SIZE = 64000
# DEFAULT_MAX_FILE_SIZE sets the default value for the “max_file_size” parameter if the user does not specify it in the request.
# Measurement unit: Kilobytes.
DEFAULT_MAX_FILE_SIZE = 1024
#############################################
# MAX RESOURCE LIMITS #
#############################################
# The settings in this section define the #
# maximum values for resource limits that #
# can be used by the user when sending a #
# request. If you try to specify a value #
# that exceeds the one specified here, the #
# server will return a corresponding error. #
#############################################
[MAX RESOURCE LIMITS]
# MAX_TIME_LIMIT defines the maximum permissible value for the “time_limit” parameter, which the user can specify in the request.
# Measurement unit: seconds (can be fractional).
MAX_TIME_LIMIT = 60
# MAX_MEMORY_LIMIT defines the maximum permissible value for the “memory_limit” parameter, which the user can specify in the request.
# Measurement unit: Kilobytes.
MAX_MEMORY_LIMIT = 512000
# MAX_EXTRA_TIME defines the maximum permissible value for the “extra_time” parameter, which the user can specify in the request.
# Measurement unit: seconds (can be fractional).
MAX_EXTRA_TIME = 10.0
# MAX_WALL_TIME_LIMIT defines the maximum permissible value for the “wall_time_limit” parameter, which the user can specify in the request.
# Measurement unit: seconds (can be fractional).
MAX_WALL_TIME_LIMIT = 61
# MAX_STACK_SIZE defines the maximum permissible value for the “stack_size” parameter, which the user can specify in the request.
# Measurement unit: Kilobytes.
MAX_STACK_SIZE = 128000
# MAX_FILE_SIZE defines the maximum permissible value for the “max_file_size” parameter, which the user can specify in the request.
# Measurement unit: Kilobytes.
MAX_FILE_SIZE = 65536
#############################################
# OTHER SETTINGS #
#############################################
# The settings in this section cannot be #
# defined in other sections, but they also #
# determine how the API works in a number of#
# unique situations. #
#############################################
[OTHER SETTINGS]
# ALLOW_ENABLE_NETWORK determines the possibility of using the Internet within the user request (directly affects the operation of the “allow_network” parameter).
# If a False value is set, Internet access will be restricted.
ALLOW_ENABLE_NETWORK = True
# ALWAYS_REDIRECT_STDERR_TO_STDOUT allows you to redirect the error stream to the standard output stream in all user requests (the API ignores the “redirect_stderr_to_stdout” parameter).
# If the value is set to True, the API will redirect stderr to stdout on a permanent basis.
ALWAYS_REDIRECT_STDERR_TO_STDOUT = False
# ALLOW_COMMAND_LINE_ARGS allows users to specify command line arguments during program code execution.
# If set to False, command line arguments will be completely disabled.
ALLOW_COMMAND_LINE_ARGS = True
# ALLOW_COMPILER_OPTIONS allows users to set additional compiler options during query execution.
# If a False value is set, the “compiler_options” parameter will be ignored by the API service.
ALLOW_COMPILER_OPTIONS = True
# PROTECTED_SOFTWARE_CONFIGURATION allows you to hide the API service configuration from all users except administrators.
# If set to True, the result of the “/configuration/software” endpoint will be hidden from users who do not have extended privileges (administrators).
PROTECTED_SOFTWARE_CONFIGURATION = True
# PROTECTED_HARDWARE_CONFIGURATION allows you to hide the server configuration from all users except administrators.
# If set to True, the result of the endpoint “/configuration/software” will be hidden for users who do not have extended privileges (administrators).
PROTECTED_HARDWARE_CONFIGURATION = True