Release Notes - Version 3.1.0
Release Date: October 9, 2025
Type: Feature Release
Severity: Medium
Overview
Version 3.1.0 introduces a comprehensive web-based settings management system that allows administrators to configure all application options through an intuitive web interface. Settings are persisted to config/settings.json
and override environment variables, providing a more user-friendly alternative to editing .env
files.
✨ New Features
1. Web-Based Settings Management
Feature: Complete settings configuration interface accessible via web browser
Benefits:
- No need to edit
.env
files or restart server to change most settings - Organized tabbed interface for different configuration categories
- Real-time validation and feedback
- Settings persist across server restarts
Capabilities:
- Server Configuration: HTTP/HTTPS ports, SSL domain, force HTTPS, certificate paths
- Authentication: Basic auth credentials, session secrets, OIDC SSO integration
- Rate Limiting: Configure CLI, API, and auth rate limits
- Email Notifications: SMTP configuration, TLS settings, recipient management
- Certificate Monitoring: Cron schedules, warning/critical thresholds
- Theme Customization: Default theme mode, primary color selection
New Endpoints:
GET /api/settings
- Retrieve current settingsPOST /api/settings
- Save settings to fileDELETE /api/settings
- Reset to defaultsGET /api/settings/running
- View actual running configurationGET /api/settings/export
- Export settings as JSON backupPOST /api/settings/import
- Import settings from JSON
UI Components:
/settings.html
- Settings management interfacesettings.js
- Frontend JavaScript for form handling- Responsive tabbed interface with six categories
- Success/error notifications
- Configuration viewer modal
2. Settings Override Mechanism
Configuration Priority (highest to lowest):
config/settings.json
- Web UI settings (NEW).env
file - Environment variables- Default values - Hardcoded in
src/config/index.js
Technical Implementation:
- Deep merge function in
src/config/index.js
ensures nested settings override correctly - Settings loaded at application startup
- Automatic fallback to defaults if settings file missing
- Settings file excluded from version control for security
Example:
// config/settings.json overrides .env values
{
"server": {
"port": 3001,
"enableHttps": true
},
"email": {
"enabled": true,
"smtp": {
"host": "smtp.company.com"
}
}
}
3. Security Features
Sensitive Data Protection:
- Passwords and secrets masked when displayed in UI (
********
) - Masked values not saved unless explicitly changed
- Settings file added to
.gitignore
automatically - Authentication required for settings access (if auth enabled)
- Rate limiting applied to all settings endpoints
Protected Fields:
auth.password
- Basic auth passwordauth.sessionSecret
- Session encryption keyoidc.clientSecret
- OIDC application secretemail.smtp.auth.pass
- SMTP password
📋 Technical Details
New Files Created
Frontend:
public/settings.html
- Settings management page (1,200+ lines)public/settings.js
- Frontend logic (500+ lines)SETTINGS.md
- Comprehensive user documentationSETTINGS_IMPLEMENTATION.md
- Technical implementation details
Backend:
src/routes/settings.js
- REST API endpoints (300+ lines)
Configuration:
config/
- Directory forsettings.json
storage
Files Modified
-
src/config/index.js
- Added settings.json loader
- Implemented
deepMerge()
function for nested object merging - Settings now loaded and merged at startup
-
server.js
- Imported settings routes module
- Mounted settings routes at
/api/settings
-
public/index.html
- Added Settings link to navigation bar
- Simplified email/monitoring configuration section
- Added pointer to Settings page for configuration
-
public/scep.html
- Added Settings link to navigation bar
- Consistent navigation across all pages
-
public/styles.css
- Added
.alert-info
style for informational messages - Theme-compatible alert styling
- Added
-
.gitignore
- Added
config/settings.json
to prevent committing sensitive data
- Added
Configuration Structure
Settings organized into six main categories:
{
"server": {
"port": 3000,
"httpsPort": 3443,
"enableHttps": false,
"forceHttps": false,
"sslDomain": "localhost"
},
"auth": {
"enabled": false,
"username": "admin",
"password": "...",
"sessionSecret": "..."
},
"oidc": {
"enabled": false,
"issuer": "...",
"clientId": "...",
"clientSecret": "...",
"callbackUrl": "...",
"scope": "openid profile email"
},
"rateLimit": {
"cli": { "window": 900000, "max": 10 },
"api": { "window": 900000, "max": 100 },
"auth": { "window": 900000, "max": 5 }
},
"email": {
"enabled": false,
"smtp": { /* SMTP config */ },
"from": "...",
"to": "...",
"subject": "..."
},
"monitoring": {
"enabled": false,
"checkInterval": "0 8 * * *",
"warningDays": 30,
"criticalDays": 7,
"includeUploaded": true
},
"theme": {
"mode": "dark",
"darkMode": true,
"primaryColor": "#007bff"
},
"paths": {
"certificates": "certificates",
"uploaded": "certificates/uploaded"
}
}
🎯 User Experience Improvements
Settings Page Features
- Tabbed Navigation: Six organized tabs for different setting categories
- Form Validation: Real-time validation with helpful error messages
- Save Feedback: Success banner and notifications on save
- Reset Functionality: One-click reset to defaults with confirmation
- Import/Export: Backup and restore settings via JSON files
- Configuration Viewer: View actual running configuration in modal
- Responsive Design: Mobile-friendly interface
- Theme Integration: Matches main application theme (dark/light mode)
Navigation Enhancements
- Settings link added to all pages (Certificate Manager, SCEP Service)
- Consistent navigation bar across entire application
- Active page highlighted in navigation
- Icon-based navigation for better visual recognition
✅ Migration Guide
For Existing Users
Option 1: Continue Using .env (No Changes Required)
- Existing
.env
configurations continue to work - No migration necessary
- Settings page will show current
.env
values
Option 2: Migrate to Web UI Settings
- Start server with existing
.env
file - Navigate to Settings page (
/settings.html
) - Review pre-populated values (loaded from
.env
) - Click "Save Settings" to persist to
config/settings.json
- Settings now stored in file and override
.env
Option 3: Hybrid Approach
- Keep non-sensitive defaults in
.env
- Use web UI for frequently changed settings
- Web UI settings override
.env
values
For New Deployments
Recommended Setup:
- Use
.env
file for deployment-specific values (ports, paths) - Use Settings UI for operational configuration (email, monitoring)
- Export settings as JSON for backup
- Version control
.env
but notconfig/settings.json
📝 Important Notes
Restart Requirements
Some settings require server restart to take effect:
- Server ports (HTTP/HTTPS)
- HTTPS enable/disable
- Authentication configuration
- Rate limiting windows
- Certificate monitoring schedule
Other settings (like SMTP configuration) are loaded dynamically by services.
Backup Recommendations
- Export Settings Regularly: Use export feature to backup configuration
- Document Changes: Keep notes on why settings were changed
- Test in Development: Test critical changes (auth, ports) in dev first
- Settings File Backup: Consider backing up
config/settings.json
separately
Security Considerations
- Settings file may contain sensitive data (passwords, secrets)
- File automatically added to
.gitignore
- Consider using environment variables for secrets in production
- Settings page requires authentication (if auth enabled)
- Rate limiting prevents settings endpoint abuse
🔧 API Examples
Get Current Settings
curl http://localhost:3000/api/settings
Save Settings
curl -X POST http://localhost:3000/api/settings \
-H "Content-Type: application/json" \
-d '{
"server": {
"port": 3001
},
"email": {
"enabled": true,
"smtp": {
"host": "smtp.company.com"
}
}
}'
View Running Configuration
curl http://localhost:3000/api/settings/running
Reset to Defaults
curl -X DELETE http://localhost:3000/api/settings
Export Settings
curl http://localhost:3000/api/settings/export > backup.json
Import Settings
curl -X POST http://localhost:3000/api/settings/import \
-H "Content-Type: application/json" \
-d @backup.json
🐛 Bug Fixes
Certificate Monitoring Service Logging
- Issue: Excessive logging of "Found X certificate files to monitor" on every check
- Fix: Commented out verbose logging to reduce log noise
- Impact: Cleaner logs without losing important monitoring information
Debug Logging Cleanup
- Issue: Debug console.log statements left in certificate routes
- Fix: Removed debug logging statements from
src/routes/certificates.js
- Impact: Cleaner production logs
📊 Upgrade Path
From Version 3.0.1 to 3.1.0
-
Pull latest code:
git pull origin main
-
Install dependencies (if any new ones):
npm install
-
Restart server:
npm start
-
Access Settings page: Navigate to
/settings.html
-
Review configuration: Verify settings match your requirements
-
(Optional) Save settings: Click "Save Settings" to persist to file
Rollback Procedure
If issues occur:
- Delete
config/settings.json
to revert to.env
values - Restart server
- Settings will load from
.env
as before