mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-02 07:35:03 -04:00
checkThrottleEncryption() now consults the THROTTLE_KEY environment variable when throttle.key is empty, mirroring the ENCRYPTION_KEY fallback in Config/Encryption. This lets Docker/Compose deployments supply the throttle HMAC secret without writing a shared value into a read-only .env. An explicit throttle.key always takes precedence. Adds regression tests to the existing security_helperTest suite and documents THROTTLE_KEY in .env.example.
118 lines
4.6 KiB
Bash
118 lines
4.6 KiB
Bash
#--------------------------------------------------------------------
|
|
# ENVIRONMENT
|
|
#--------------------------------------------------------------------
|
|
|
|
CI_ENVIRONMENT=production
|
|
|
|
#--------------------------------------------------------------------
|
|
# SECURITY: ALLOWED HOSTNAMES
|
|
#--------------------------------------------------------------------
|
|
# CRITICAL: Whitelist of allowed hostnames to prevent Host Header
|
|
# Injection attacks (GHSA-jchf-7hr6-h4f3).
|
|
#
|
|
# REQUIRED IN PRODUCTION: Application will fail to start if not configured.
|
|
# In development, falls back to 'localhost' with an error log.
|
|
#
|
|
# Configure with comma-separated list of domains/subdomains:
|
|
# app.allowedHostnames='yourdomain.com,www.yourdomain.com'
|
|
#
|
|
# Or via environment variable (useful for Docker/Compose):
|
|
# ALLOWED_HOSTNAMES=yourdomain.com,www.yourdomain.com
|
|
#
|
|
# For local development:
|
|
# app.allowedHostnames='localhost'
|
|
#
|
|
# Note: Do not include protocol (http/https) or port numbers.
|
|
app.allowedHostnames=''
|
|
|
|
#--------------------------------------------------------------------
|
|
# DATABASE
|
|
#--------------------------------------------------------------------
|
|
|
|
database.default.hostname='localhost'
|
|
database.default.database='ospos'
|
|
database.default.username='admin'
|
|
database.default.password='pointofsale'
|
|
database.default.DBDriver='MySQLi'
|
|
database.default.DBPrefix='ospos_'
|
|
|
|
database.development.hostname='localhost'
|
|
database.development.database='ospos'
|
|
database.development.username='admin'
|
|
database.development.password='pointofsale'
|
|
database.development.DBDriver='MySQLi'
|
|
database.development.DBPrefix='ospos_'
|
|
|
|
database.tests.hostname='localhost'
|
|
database.tests.database='ospos_test'
|
|
database.tests.username='admin'
|
|
database.tests.password='pointofsale'
|
|
database.tests.DBDriver='MySQLi'
|
|
database.tests.DBPrefix='ospos_'
|
|
|
|
#--------------------------------------------------------------------
|
|
# ENCRYPTION
|
|
#--------------------------------------------------------------------
|
|
|
|
# Leave blank and the application auto-generates a unique key on first use.
|
|
# For Docker/Compose, pass it via the ENCRYPTION_KEY env var instead:
|
|
# docker run -e ENCRYPTION_KEY="$(openssl rand -hex 32)" opensourcepos
|
|
# ENCRYPTION_KEY is read as a fallback when encryption.key is empty, so no
|
|
# shared key needs to be committed or baked into the shipped image.
|
|
encryption.key=''
|
|
# Persistent secret for HMAC-hashing login-throttle cache keys. Left blank and
|
|
# provisioned on startup (php spark env:provision); independent of encryption.key.
|
|
# For Docker/Compose, pass it via the THROTTLE_KEY env var instead:
|
|
# docker run -e THROTTLE_KEY="$(openssl rand -hex 32)" opensourcepos
|
|
# THROTTLE_KEY is read as a fallback when throttle.key is empty, so no
|
|
# shared secret needs to be committed or baked into the shipped image.
|
|
throttle.key=''
|
|
|
|
#--------------------------------------------------------------------
|
|
# LOGGER
|
|
# - 0=Disables logging, Error logging TURNED OFF
|
|
# - 1=Emergency Messages - System is unusable
|
|
# - 2=Alert Messages - Action Must Be Taken Immediately
|
|
# - 3=Critical Messages - Application component unavailable, unexpected exception.
|
|
# - 4=Runtime Errors - Don't need immediate action, but should be monitored.
|
|
# - 5=Warnings - Exceptional occurrences that are not errors.
|
|
# - 6=Notices - Normal but significant events.
|
|
# - 7=Info - Interesting events, like user logging in, etc.
|
|
# - 8=Debug - Detailed debug information.
|
|
# - 9=All Messages
|
|
#--------------------------------------------------------------------
|
|
|
|
logger.threshold=0
|
|
app.db_log_enabled=false
|
|
|
|
#--------------------------------------------------------------------
|
|
# HONEYPOT
|
|
#--------------------------------------------------------------------
|
|
|
|
honeypot.hidden=true
|
|
honeypot.label='Fill This Field'
|
|
honeypot.name='honeypot'
|
|
honeypot.template='<label>{label}</label><input type="text" name="{name}" value="">'
|
|
honeypot.container='<div style="display:none">{template}</div>'
|
|
|
|
#--------------------------------------------------------------------
|
|
# SECURITY: DISALLOW PASSWORD CHANGE
|
|
#--------------------------------------------------------------------
|
|
# When true, disables the "change password" feature for all employees.
|
|
# Useful when passwords are managed by an external system (e.g. SSO/LDAP).
|
|
#
|
|
# DISALLOW_PASSWORD_CHANGE=false
|
|
|
|
DISALLOW_PASSWORD_CHANGE=false
|
|
|
|
#--------------------------------------------------------------------
|
|
# SECURITY: DISALLOW GRANT CHANGE
|
|
#--------------------------------------------------------------------
|
|
# When true, disables changing an employee's grants for all employees.
|
|
# New employees cannot be created with grants while this is enabled.
|
|
# Useful for demo deployments.
|
|
#
|
|
# DISALLOW_GRANT_CHANGE=false
|
|
|
|
DISALLOW_GRANT_CHANGE=false
|