Implemented complete A2-A3 advancement functionality with DAM integration: Backend: - Added DamClient.php with mTLS V2 (Hybrid) authentication - Implemented PFX to PEM certificate conversion - Added OAuth token management with automatic refresh - Created 3 new API endpoints: * list-a2-campaigns: Query DAM for A2 status campaigns * advance-to-a3: Update campaign status to A3 * get-campaign-files: Query database for uploaded files Frontend: - Added new 'A2-A3 Advancement' tab to navigation - Implemented campaign cards with grid layout - Added search/filter functionality with debouncing - Created 'View Uploaded Files' button (queries DB on demand) - Implemented 'Advance to A3' with confirmation dialog - Added smooth animations for card removal Configuration: - Created env_loader.php for .env file support - Added .env.example template with all required variables - Updated config.example.php to use environment variables - Created SETUP.md with configuration guide Security: - Added .htaccess to protect config.php and sensitive files - Updated .gitignore to exclude REFRENCE MATERIAL folder - Implemented proper file permissions guidance All DAM credentials now managed via .env file with support for referencing existing certificates without duplication.
43 lines
1.4 KiB
PHP
43 lines
1.4 KiB
PHP
<?php
|
|
/**
|
|
* Ferrero Naming Convention Tool - Database Configuration
|
|
*
|
|
* Copy this file to config.php and update with your database credentials
|
|
* DO NOT commit config.php to version control
|
|
*/
|
|
|
|
// Load environment variables from .env file
|
|
require_once __DIR__ . '/public-v2/env_loader.php';
|
|
|
|
return [
|
|
'database' => [
|
|
'host' => getenv('DB_HOST') ?: 'localhost',
|
|
'port' => getenv('DB_PORT') ?: '5433',
|
|
'dbname' => getenv('DB_NAME') ?: 'ferrero_tracking',
|
|
'user' => getenv('DB_USER') ?: 'ferrero_user',
|
|
'password' => getenv('DB_PASSWORD') ?: 'ferrero_pass_2025',
|
|
'charset' => 'utf8',
|
|
'options' => [
|
|
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
|
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
|
PDO::ATTR_EMULATE_PREPARES => false,
|
|
]
|
|
],
|
|
|
|
// DAM API Configuration (mTLS V2 Authentication)
|
|
// All values should be set in .env file
|
|
'dam' => [
|
|
'base_url' => getenv('DAM_BASE_URL') ?: '',
|
|
'mtls_oauth_url' => getenv('DAM_MTLS_OAUTH_URL') ?: '',
|
|
'mtls_cert_path' => getenv('DAM_MTLS_CERT_PATH') ?: '',
|
|
'mtls_cert_password' => getenv('DAM_MTLS_CERT_PASSWORD') ?: '',
|
|
'timeout' => 30
|
|
],
|
|
|
|
// SSO Configuration (if applicable)
|
|
'sso' => [
|
|
'enabled' => getenv('SSO_ENABLED') === 'true',
|
|
'tenant_id' => getenv('SSO_TENANT_ID') ?: '',
|
|
'client_id' => getenv('SSO_CLIENT_ID') ?: ''
|
|
]
|
|
];
|