Encrypt per-user Gotify tokens at rest with sodium/openssl, add app_secret config, security headers, Apache .htaccess hardening, and restrictive permissions for stored settings.
62 lines
2.3 KiB
PHP
62 lines
2.3 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Oscar Admin - standalone configuration template.
|
|
*
|
|
* Copy to config.php and fill in values. config.php is gitignored.
|
|
* Keep the Management API private (localhost/trusted network only).
|
|
*/
|
|
return [
|
|
// --- Admin access ---
|
|
// OSCAR screen names allowed to sign into this admin panel.
|
|
// Use the normalized/canonical screen name as it appears on the server.
|
|
'admin_users' => [
|
|
// 'admin',
|
|
// 'clay',
|
|
],
|
|
|
|
// --- System OSCAR account used to send login codes / messages ---
|
|
// Create this account on the OSCAR server first.
|
|
'system_screen_name' => 'SystemAdmin',
|
|
'system_password' => 'CHANGE_ME',
|
|
|
|
// --- OSCAR Management API ("dev API") ---
|
|
// The management API listens on API_LISTENER in the OSCAR server settings.
|
|
// Keep this on localhost/private network; do not expose it publicly.
|
|
'mgmt_api_host' => '127.0.0.1',
|
|
'mgmt_api_port' => 8080,
|
|
|
|
// Optional: separate dev API endpoint if your setup uses one.
|
|
// Leave empty to use mgmt_api_host/mgmt_api_port.
|
|
'dev_api_host' => '',
|
|
'dev_api_port' => 0,
|
|
|
|
// --- Admin UI ---
|
|
'site_name' => 'Oscar Server Admin',
|
|
'session_name' => 'oscar_admin',
|
|
'login_code_ttl_seconds' => 600,
|
|
'login_code_length' => 8,
|
|
'max_login_attempts' => 8,
|
|
'login_attempt_window_seconds' => 900,
|
|
|
|
// Optional secret used to encrypt sensitive stored values (e.g. Gotify tokens).
|
|
// Set a long random string. If empty, a local fallback key is derived.
|
|
'app_secret' => '',
|
|
|
|
// --- Optional Gotify addon (lib_gotify.php) ---
|
|
// 100% optional. The admin panel works without this addon.
|
|
// Enable the feature here; each admin user sets their own Gotify URL/token
|
|
// from the dashboard user menu (stored in gotify-users.php, gitignored).
|
|
'gotify_enabled' => false,
|
|
'gotify_priority' => 5, // default priority for notifications (0-10)
|
|
|
|
// Optional global fallback (used only if a user has no personal Gotify config).
|
|
// Prefer per-user settings in the dashboard.
|
|
'gotify_url' => '',
|
|
'gotify_token' => '',
|
|
|
|
// Base path to shared web CSS. Defaults to bundled assets/style.css.
|
|
// Relative to this admin directory, or absolute.
|
|
'shared_style_path' => 'assets/style.css',
|
|
];
|