SecuAAS Docs

Configuration

SecuFile — Configuration

Configuration

Configuration

Go Backend Environment Variables

Configuration is entirely managed through environment variables. In production, secrets are injected via Kubernetes Secrets.

Server

VariableDescriptionDefault
SERVER_PORTListening port8080
SERVER_HOSTListening address0.0.0.0
ENVIRONMENTMode (dev/staging/prod)dev
CORS_ORIGINSAllowed origins (comma-separated)"" (required in prod)
LOG_LEVELLog level (debug/info/warn/error)info
MAX_BODY_SIZEMax request body size (bytes)1048576 (1MB)
SERVER_READ_TIMEOUTRead timeout (seconds)30
SERVER_WRITE_TIMEOUTWrite timeout (seconds)30

PostgreSQL Database

VariableDescriptionDefault
DB_HOSTPostgreSQL hostlocalhost
DB_PORTPort5432
DB_USERUsernamefilesecure
DB_PASSWORDPassword-
DB_NAMEDatabase namefilesecure
DB_SSLMODESSL modedisable
DB_MAX_OPEN_CONNSMax open connections25
DB_MAX_IDLE_CONNSMax idle connections5

Redis

VariableDescriptionDefault
REDIS_HOSTRedis host-
REDIS_PORTPort6379
REDIS_PASSWORDPassword-
REDIS_DBDatabase number0

OVH S3 Storage

VariableDescriptionDefault
S3_ENDPOINTOVH S3 endpoints3.bhs.cloud.ovh.net
S3_REGIONRegionbhs
S3_ACCESS_KEY_IDAccess key-
S3_SECRET_ACCESS_KEYSecret key-
S3_BUCKETDefault bucketfilesecure
S3_USE_SSLUse HTTPStrue

JWT Authentication

VariableDescriptionDefault
JWT_SECRETJWT secret key (min 32 chars)-
JWT_ACCESS_TTL_MINUTESAccess token duration15
JWT_REFRESH_TTL_HOURSRefresh token duration168 (7 days)
JWT_ISSUERJWT issuerfilesecure

KMS (Key Management Service)

VariableDescriptionDefault
KMS_PROVIDERProvider type (local or ovh)local
KMS_ENDPOINTOVH KMS endpoint-
KMS_REGIONOVH KMS regioneu-west-rbx
KMS_KEY_IDMaster key UUID in KMS-
KMS_CERT_PATHClient certificate path (PEM)-
KMS_KEY_PATHClient private key path (PEM)-
KMS_CA_PATHCA certificate path (PEM)-
KMS_LOCAL_MASTER_KEYBase64-encoded 32-byte key-

Rate Limiting

VariableDescriptionDefault
RATE_LIMIT_AUTHAuth endpoint limit (req/min)20
RATE_LIMIT_PUBLICPublic endpoint limit (req/min)60
RATE_LIMIT_APIProtected API limit (req/min)120

Account Lockout

VariableDescriptionDefault
ACCOUNT_LOCKOUT_ENABLEDEnable lockouttrue
ACCOUNT_LOCKOUT_MAX_ATTEMPTSMax failed attempts5
ACCOUNT_LOCKOUT_DURATION_MINUTESLockout duration (minutes)15

Stripe Billing

VariableDescriptionDefault
STRIPE_ENABLEDEnable Stripe integrationfalse
STRIPE_TEST_PUBLISHABLE_KEYTest publishable key-
STRIPE_TEST_SECRET_KEYTest secret key-
STRIPE_TEST_WEBHOOK_SECRETTest webhook secret-
STRIPE_PROD_PUBLISHABLE_KEYProduction publishable key-
STRIPE_PROD_SECRET_KEYProduction secret key-
STRIPE_PROD_WEBHOOK_SECRETProduction webhook secret-

ClamAV Antivirus

VariableDescriptionDefault
CLAMAV_ENABLEDEnable antivirus scanningtrue
CLAMAV_HOSTClamAV daemon hostclamav
CLAMAV_PORTPort3310
CLAMAV_TIMEOUTScan timeout (seconds)30

OVH Storage Provisioning

VariableDescriptionDefault
OVH_STORAGE_ENABLEDEnable per-org provisioningfalse
OVH_STORAGE_ENDPOINTOVH API endpointovh-ca
OVH_APPLICATION_KEYOVH application key-
OVH_APPLICATION_SECRETOVH application secret-
OVH_CONSUMER_KEYOVH consumer key-
OVH_STORAGE_PROJECT_IDOVH Cloud project ID-
OVH_STORAGE_USE_MOCKUse mock client (dev/test)false

File Upload

VariableDescriptionDefault
FILE_UPLOAD_MAX_SIZEMax file size (bytes)26214400 (25 MB)

Cleanup Service

VariableDescriptionDefault
CLEANUP_ENABLEDEnable cleanup jobtrue
CLEANUP_INTERVAL_MINUTESRun interval (minutes)5
CLEANUP_BATCH_SIZEMax folders per run100

Python WebGUI Backend Variables

VariableDescription
EXTERNAL_API_URLGo API URL (e.g., https://api.secufile.secuaas.dev)
DEBUGDebug mode (true/false)
POSTGRES_HOSTPostgreSQL host
POSTGRES_PORTPostgreSQL port
POSTGRES_DBDatabase name
POSTGRES_USERUsername
POSTGRES_PASSWORDPassword
SERVICE_ACCOUNT_TOKENGo API service account token
RESEND_API_KEYResend API key (emails)
SENDER_EMAILSender email address
ZITADEL_CLIENT_IDZitadel client ID (SSO)
ZITADEL_CLIENT_SECRETZitadel secret
ZITADEL_ISSUERZitadel issuer (e.g., https://auth.secuaas.com)
OVH_APPLICATION_KEYOVH API key (billing)
OVH_APPLICATION_SECRETOVH API secret
OVH_CONSUMER_KEYOVH consumer key
OVH_STORAGE_PROJECT_IDOVH Cloud project ID

Secrets Management

In production, no secret is stored in plaintext in the code. All secrets are managed via:

  1. Kubernetes Secrets: Injected via envFrom.secretRef in deployments
  2. OVH Secret Manager: The Go backend uses pkg/secretsloader to load secrets from OVH Secret Manager with automatic fallback to environment variables
  3. secuops CLI: Secret management via the command line

The Kubernetes secret secufile-secrets contains 32+ keys covering all services.

Production Validation

The Go backend validates critical configuration at startup. In production mode (ENVIRONMENT=prod), the following checks are enforced:

  • JWT_SECRET must be at least 32 characters
  • DB_PASSWORD must be set
  • CORS_ORIGINS must be explicitly configured (not * or empty)
  • DB_SSLMODE must not be disable

Failure to meet these requirements causes the application to exit immediately.

On this page