Standalone PHP web admin dashboard for Open OSCAR Server (AIM/ICQ) for managing users, sessions, rooms, and server admin tasks.
Find a file
2026-12-03 18:49:50 -05:00
assets Initial public release of Oscar Admin 2026-12-03 18:26:44 -05:00
.gitignore Initial public release of Oscar Admin 2026-12-03 18:26:44 -05:00
.htaccess Harden admin security and encrypt Gotify tokens 2026-12-03 18:32:16 -05:00
action.php Initial public release of Oscar Admin 2026-12-03 18:26:44 -05:00
admin.css Initial public release of Oscar Admin 2026-12-03 18:26:44 -05:00
admin.js Initial public release of Oscar Admin 2026-12-03 18:26:44 -05:00
AI_DISCLOSURE.md Initial public release of Oscar Admin 2026-12-03 18:26:44 -05:00
bart-info.php Initial public release of Oscar Admin 2026-12-03 18:26:44 -05:00
config.example.php Harden admin security and encrypt Gotify tokens 2026-12-03 18:32:16 -05:00
CONTRIBUTING.md Initial public release of Oscar Admin 2026-12-03 18:26:44 -05:00
index.php Initial public release of Oscar Admin 2026-12-03 18:26:44 -05:00
lib.php Add SEO metadata and git repo link to admin pages 2026-12-03 18:49:13 -05:00
lib_gotify.php Support Gotify key migration when app_secret is added 2026-12-03 18:36:52 -05:00
LICENSE Initial public release of Oscar Admin 2026-12-03 18:26:44 -05:00
login.php Add SEO metadata and git repo link to admin pages 2026-12-03 18:49:13 -05:00
logout.php Initial public release of Oscar Admin 2026-12-03 18:26:44 -05:00
README.md Document how to disable login page SEO 2026-12-03 18:49:50 -05:00
SECURITY.md Harden admin security and encrypt Gotify tokens 2026-12-03 18:32:16 -05:00
user-menu.php Initial public release of Oscar Admin 2026-12-03 18:26:44 -05:00

Oscar Admin

A standalone, web-based admin dashboard for Open OSCAR Server (AIM/ICQ OSCAR protocol).

Oscar Admin provides a clean UI for day-to-day server administration: users, sessions, chat rooms, messaging, directory, BART assets, buddy lists (feedbag), audit logs, and a raw Management API console.

Status: Active. The admin panel is intended to be deployed alongside Open OSCAR Server, but this repository is standalone and does not require changes to the server source.

Features

  • Secure login - OSCAR screen name + math anti-spam challenge + one-time code sent via OSCAR IM.
  • Anti-enumeration - Allowed and non-allowed screen names get the same login flow/UI.
  • Optional Gotify delivery - Per-user Gotify URL/token settings; login codes can be sent through Gotify when configured. 100% optional.
  • Overview - Version, online sessions, users, and room counts.
  • User management - List/search, create/delete, details, suspend/unsuspend, bot flag, password reset, buddy icon, active sessions.
  • Session management - List active sessions, inspect details, kick sessions.
  • Chat rooms - List public/private rooms, create/delete public rooms.
  • Messaging - Send IM/popup through the system account (feature availability depends on server version).
  • Directory - Category/keyword CRUD and AIM directory entries.
  • BART / Buddy Art - Type catalog, browse assets, upload/hash/preview/delete, feedbag BART item set/remove, and a built-in info guide.
  • Buddy List / Feedbag - User-friendly group/buddy management and linked accounts.
  • Audit log - Local log of admin actions.
  • API Console - Raw Management API requests for advanced/debug use.

Requirements

  • PHP 8.1+ with curl and session extensions enabled.
  • A web server capable of running PHP (nginx + PHP-FPM, Apache, Caddy+php-fpm, etc.).
  • An Open OSCAR Server instance with the Management API enabled.
  • A system OSCAR account on that server (used to send login codes/messages).

Quick Start

  1. Clone the repo

    git clone https://github.com/<your-org>/oscar-admin.git
    cd oscar-admin
    
  2. Create config

    cp config.example.php config.php
    
  3. Edit config.php

    • Add allowed admin screen names to admin_users.
    • Set system_screen_name and system_password (an existing OSCAR account).
    • Set mgmt_api_host / mgmt_api_port to your private Management API endpoint.
    • Optionally enable Gotify (gotify_enabled => true).
  4. Serve with PHP

    For local testing:

    php -S 127.0.0.1:8081
    

    Open http://127.0.0.1:8081/login.php.

    For production, use nginx/Apache + PHP-FPM behind HTTPS.

Configuration

See config.example.php for all options. Key settings:

Setting Purpose
admin_users OSCAR screen names allowed to sign in
system_screen_name / system_password OSCAR account used to send login codes/messages
mgmt_api_host / mgmt_api_port Private Open OSCAR Management API endpoint
gotify_enabled Enables optional Gotify addon
gotify_url / gotify_token Optional global Gotify fallback (per-user settings preferred)
app_secret Optional secret for encrypting sensitive stored values (Gotify tokens)
shared_style_path Base CSS path (defaults to bundled assets/style.css)

Gotify (Optional)

Gotify support is a 100% optional addon (lib_gotify.php). The panel works without it.

  1. Set gotify_enabled => true in config.php.
  2. Sign in to the admin dashboard.
  3. Open the top-right user menu and save your Gotify URL/token.
  4. Use Test to verify delivery.

If a Gotify URL/token is saved for a user, login codes are sent through Gotify for that user. Clear settings to disable Gotify delivery for that account.

Per-user Gotify settings are stored in gotify-users.php (gitignored). Tokens are encrypted at rest; the file is written as PHP with restrictive permissions to reduce accidental exposure. Set app_secret in config.php for an explicit encryption key.

Deployment / Hardening

Keep the Management API private

The OSCAR Management API is powerful. Bind it to 127.0.0.1 or a trusted private network and do not expose it publicly.

Protect sensitive files

Do not serve or commit:

  • config.php - secrets and config
  • audit.log - admin action log
  • gotify-users.php - per-user Gotify tokens/URLs

Serve over HTTPS and consider an IP allowlist/VPN/auth proxy. The examples below include sensitive-file denies; adjust paths, PHP-FPM socket, and TLS settings for your system.

Nginx example: subdomain

Use this when Oscar Admin is the document root for a dedicated host like admin.example.com:

server {
    listen 443 ssl http2;
    server_name admin.example.com;

    root /var/www/oscar-admin;
    index index.php;

    # TLS config omitted for brevity

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    # Deny sensitive/internal files
    location ~* ^/(config\.php|config\.example\.php|lib\.php|lib_gotify\.php|user-menu\.php|gotify-users\.php|gotify-users\.json|audit\.log|README\.md|SECURITY\.md|CONTRIBUTING\.md|AI_DISCLOSURE\.md|LICENSE|\.gitignore|\.htaccess)$ {
        deny all;
        return 404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass unix:/run/php/php8.2-fpm.sock;
    }
}

Nginx example: subpath

Use this when serving Oscar Admin under a path like https://example.com/admin/:

location = /admin {
    return 301 /admin/;
}

location /admin/ {
    alias /var/www/oscar-admin/;
    index index.php;

    # Deny sensitive/internal files
    location ~* ^/admin/(config\.php|config\.example\.php|lib\.php|lib_gotify\.php|user-menu\.php|gotify-users\.php|gotify-users\.json|audit\.log|README\.md|SECURITY\.md|CONTRIBUTING\.md|AI_DISCLOSURE\.md|LICENSE|\.gitignore|\.htaccess)$ {
        deny all;
        return 404;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        fastcgi_pass unix:/run/php/php8.2-fpm.sock;
    }
}

SEO / discoverability

The login page is intentionally indexable and includes basic SEO metadata plus a source-repo link to help people find the project. If you do not want the login page indexed, edit login.php and change the admin_page(...) SEO options:

], [
    'indexable' => false, // was true
    // 'description' => '...',
    // 'repo_url' => 'https://git.claytonia.net/Clarth/oscar-admin',
]);

Authenticated dashboard pages remain noindex,nofollow by default.

Project Structure

.
├── action.php           # Authenticated JSON action endpoint (dashboard -> Management API)
├── admin.css            # Admin-specific styles
├── admin.js             # Dashboard client behavior
├── assets/
│   └── style.css        # Bundled base stylesheet
├── bart-info.php        # BART/Buddy Art help page
├── config.example.php   # Configuration template
├── index.php            # Dashboard UI
├── lib.php              # Shared helpers: config/session/auth/API/audit/page shell
├── lib_gotify.php       # Optional Gotify addon
├── login.php            # Login flow (math challenge + OSCAR/Gotify OTP)
├── logout.php           # CSRF-protected logout
└── user-menu.php        # User menu / per-user Gotify settings

Runtime files (gitignored): config.php, audit.log, gotify-users.php.

Security

See SECURITY.md for vulnerability reporting and deployment guidance.

AI Disclosure

Parts of this project were created and maintained with assistance from AI coding tools. See AI_DISCLOSURE.md.

Contributing

Contributions are welcome. Please read CONTRIBUTING.md before opening a PR.

License

MIT