-
Notifications
You must be signed in to change notification settings - Fork 0
Application startup
When the application will start for the first time, 3 configuration files will be generated and these are: appsettings.json/ appsettings.Development.json, certificate_generation.json, and encryption_key_generation_file.json.

The server configurations file contains fields that are related to properties that the server application has. These properties include functions such as enabling/disabling file encryption or enabling/disabling Google Cloud Secrets to store and retrieve database credentials. The appsettings.Development.json file will be generated and used if the application is running in the Debug mode, whereas the appsettings.json, ill be generated and used if the application is running in the Release/Production mode.
{
"Logging": {
"LogLevel": {
"Microsoft_AspNetCore": "Warning",
"Default": "Information"
}
},
"AllowedHosts": "*",
"Kestrel": {
"Endpoints": {
"Address": {
"Url": "https://localhost:8000"
}
}
},
"ForwardedHeaders": {
"ForwardedHeaders": "XForwardedFor, XForwardedProto"
},
"ServerConfigModel": {
"is_reverse_proxy": false,
"use_google_secrets": false,
"aes_encryption_key_secret_url": "!!! REPLACE WITH SECRET URL !!!",
"aes_encryption_key_version": "1",
"server_salt_secret_url": "!!! REPLACE WITH SECRET URL !!!",
"server_salt_secret_version": "1",
"firebase_admin_token_secret_url": "!!! REPLACE WITH SECRET URL !!!",
"firebase_admin_token_secret_version": "1",
"mysql_user_password_secret_url": "!!! REPLACE WITH SECRET URL !!!",
"mysql_user_password_secret_version": "1",
"smtp_password_secret_url": "!!! REPLACE WITH SECRET URL !!!",
"smtp_password_secret_version": "1",
"custom_server_certificate_password_secret_url": "!!! REPLACE WITH SECRET URL !!!",
"custom_server_certificate_password_secret_version": "1",
"server_salt": "aaabbbccdddd",
"use_secure_local_storage": true,
"use_firebase": false,
"firebase_admin_token": "!!! REPLACE WITH FIREBASE DATABASE ADMIN TOKEN !!!",
"firebase_database_url": "!!! REPLACE WITH FIREBASE DATABASE URL !!!",
"firebase_api_key": "!!! REPLACE WITH THE APP'S API KEY !!!",
"firebase_auth_domain": "!!! REPLACE WITH THE APP'S AUTH DOMAIN !!!",
"mysql_server_address": "127.0.0.1",
"mysql_server_port": 3306,
"mysql_user_id": "root",
"mysql_user_password": "!!! REPLACE WITH MYSQL USER PASSWORD !!!",
"mysql_database": "thetadrive",
"twoStepAuth": false,
"smtp_email": "!!! REPLACE WITH SMTPS EMAIL ADDRESS !!!",
"smtp_password": "!!! REPLACE WITH SMTPS EMAIL PASSWORD !!!",
"smtp_server": "smtp.gmail.com",
"smtp_port": 587,
"smtp_use_ssl": false,
"WriteOperationsPerSecond": 200,
"ConnectionTimeoutSeconds": 600,
"enforce_https": true,
"logs_expiration_days": 10,
"validate_ssl_certificates": false,
"validate_ssl_certificate_chain": false,
"use_custom_ssl_certificate": false,
"ensure_host_name_and_certificate_domain_name_match": false,
"custom_server_certificate_path": "!!! REPLACE WITH THE PATH TO THE SERVER PRIVATE CERTIFICATE !!!",
"custom_server_certificate_password": "!!! REPLACE WITH SERVER PRIVATE CERTIFICATE PASSWORD !!!",
"hsts_max_age_days": 730,
"max_concurent_connections": null,
"max_request_buffer_size": null,
"max_response_buffer_size": null,
"use_file_encryption": false,
"aes_encryption_key_location": "!!! REPLACE WITH THE PATH TO THE SERVER FILE ENCRYPTION KEY !!!",
"google_oauth_client_id": "REPLACE WITH GOOGLE OAUTH CLIENT ID",
"enable_google_login": false,
"maximum_number_of_requests_per_minute": 10000,
"maximum_number_of_queued_requests": 10000
}
}
The certificate generation file is used by the server app to generate self-signed SSL certificated at start-up.
{
"generate_certificate": false,
"client_certificate_file_name": "!!! REPLACE WITH DESIRED CERTIFICATE FILE NAME !!!",
"server_certificate_file_name": "!!! REPLACE WITH DESIRED CERTIFICATE FILE NAME !!!",
"CN": "!!! REPLACE WITH DESIRED CERTIFICATE ISSUER COMMON NAME !!!",
"DN": "!!! REPLACE WITH DESIRED CERTIFICATE ISSUER DOMAIN NAME !!!",
"number_of_days_after_which_certificate_expires": 365,
"key_encryption_strength_in_bits": 2048,
"private_certificate_password": "!!! REPLACE WITH DESIRED PRIVATE CERTIFICATE PASSWORD !!!"
}
The encryption key generation configuration file is used by the server app to generate AES (Advanced Encryption Standard) keys, that the server can use to encrypt user files.
{
"generate_key": false,
"key_in_bits": 256,
"block_size": 128
}