Skip to content

Environment or Database Configuration ​

The configuration settings for the applications are loaded from docker container by environment or from your database. If you have a configuration in you environment variables that one ALWAYS wins. The System checks the variable in the database und update them with the value from your System Env

The configurations can also change by using the configuration routes.

Auth ​

ConfigurationDescriptionDefault
AUTH_HANDLERHandler for managing User and Role Data. Possible Values: mongo or staticmongo
AUTH_APIKEYLENGTHLength of the generated API Key32
AUTH_SECRETPrivate Key for JWTsecret_key
AUTH_CACHE_DBShould the JWT cached to the DB to keep it after application restart.true
AUTH_EXPIRING_DURATIONLifetime of generated JWT6h
AUTH_REFRESH_GRACE_DURATIONHow long a JWT stays valid after it was replaced by /auth/token/refresh60s
IMPORT_MAX_BYTESThe greatest size of the request body of an import (POST .../documents/import) in bytes, read for every request. The import is a stream, so the size does not matter for the memory of the server.1073741824 (1 GiB)
AUTH_GRANT_DENIED_STATUSHTTP status of a request that is refused because the user has no grant for the collection, bucket or admin route: 401 or 403. A client such as the UI clears its session on 401, so 403 keeps the session of a user who only lacks a grant. A missing or invalid token is always 401.401
AUTH_BEAREREnable Bearer Header Token for secured routes.true
AUTH_BASICEnable HttpBasicAuth for secured routes.true
AUTH_TOKENEnable Api Key Token for secured routes.true

Server ​

ConfigurationDescriptionDefault
SERVER_INTERFACE0.0.0.0
SERVER_PORT8080

CORS ​

ConfigurationDescriptionDefault
CORS_HEADERS_ALLOWEDUsed as Access-Control-Allow-Origin["Authorization", "Content-Type", "X-Requested-With", "X-AUTH-APIKEY"]
CORS_HEADERS_EXPOSEDUsed as Access-Control-Expose-Headers["Content-Type", "x-pagination-rows-per-page", "x-pagination-current-page", "x-pagination-count-rows", "x-pagination-count-pages"]
CORS_ORIGINS_ALLOWEDAccess-Control-Expose-HeadersAccess-Control-Expose-Headers["http://localhost:8080"]

File ​

ConfigurationDescriptionDefault
FILE_HANDLERDefault only supported gridfs. Possible to extend with Plugin.gridfs
FILE_CACHE_AGEUsed at File Header cache-control with value max-age=7776000

Aggregation ​

INFO

The aggregation endpoint refuses a pipeline that contains one of the denied operators, anywhere in the pipeline (also inside $project, $addFields, $group, $match, $lookup and $facet), with 403. $function, $accumulator and $where run JavaScript on the database server, $out and $merge write to collections. In an environment variable the $ has to be quoted for the shell, for example AGGREGATION_STAGES_DENIED='["$function","$out"]'.

ConfigurationDescriptionDefault
AGGREGATION_STAGES_DENIEDList of operators that are refused in the pipeline of an aggregation.["$function", "$accumulator", "$where", "$out", "$merge", "$currentOp", "$listSessions", "$collStats", "$indexStats"]

Plugins ​

INFO

All plugins in Folder and Modules will be activated automatically. If your want to exclude one of this plugins use PLUGINS_IGNORED, for example if you don't want to expose Metrics you can add dev.mongocamp.server.route.MetricsRoutes$ to ignored plugins.

ConfigurationDescriptionDefault
PLUGINS_IGNOREDList of ignored Plugins.[]
PLUGINS_MODULESList of your used Plugins / Maven Dependencies.[]
PLUGINS_MAVEN_REPOSITORIESList of your special MVN Repository (maybe private).[]
PLUGINS_DIRECTORYDirectory where the app search the plugins./opt/mongocamp/plugins
PLUGINS_URLSUrls of JARs the Server should download before startup.[]

HttpClient ​

ConfigurationDescriptionDefault
HTTP_CLIENT_HEADERSAdditional headers for hosts saved in the Database as String containing a Json with Headers. Sample at{}

Docs ​

ConfigurationDescriptionDefault
DOCS_SWAGGERShould the SwaggerUI served by server.false
DOCS_OPENAPIShould the OpenApi Yaml served by server.true

Released under the Apache License 2.0.