Codex Studios
Visit our Tebex StoreOur Discord
  • πŸ‘‹Welcome to Codex Studios
  • Overview
    • πŸ’‘About Us
    • ✨Our Features
  • πŸ’…RedM-Scripts
    • 🌐[Codex Studios] : Core
      • Client Side
      • Server Side - CodexCore API
      • Config
      • πŸ“ Client Side (clientside.lua)
      • 🧾 Server Side (serverside.lua)
      • πŸ›‘οΈCodexCore Security Module
      • πŸ—’οΈSecurity Detailed Explanation
      • πŸ”Client-Side: Securing Event Triggers
      • πŸ”’Server-Side: Securing Event Triggers
    • πŸ’ͺ[Codex Studios] : Trust Level
      • Client Side
      • Config
      • SQL
  • πŸ“¦[Codex Studios]: Supplies System
    • Client Side
    • Server-Side Town Supplies
    • Config
    • πŸͺ›Examples and Commands
    • Sql Updated
Powered by GitBook
On this page

Was this helpful?

  1. RedM-Scripts
  2. [Codex Studios] : Core

CodexCore Security Module

Documentation

Overview πŸ”’

The CodexCore Security Module helps to secure your events and manage them through a whitelist and blacklist system, rate-limiting, and event logging. This means developers or server administrators can configure which events can be triggered, prevent malicious or unauthorized events, and keep track of activity through logs.

Key Features:

  • Event Whitelisting βœ…: Allows certain events to pass security checks and be triggered.

  • Event Blacklisting ❌: Prevents certain events from being triggered, protecting the server from unwanted events.

  • Rate-Limiting ⏱️: Prevents users from flooding the server with too many requests within a short period of time.

  • Logging πŸ“: Tracks activity related to event security, including blocked or failed attempts, and provides a way to identify suspicious activity.

Getting Started πŸš€:

As a server owner or developer, you will only interact with the security system via the configuration file and predefined settings. This allows you to customize your server’s security without having to edit or modify the core code.

Configuration File (config.lua) πŸ› οΈ

The security system settings are configured via the CodexCore_CFG table within the configuration file. Below is an example configuration and explanations of each field.

Example Configuration:

CodexCore_CFG = {
    Core = 'vorp', -- 'vorp' or 'rsg'

    -- Database connection configuration
    SQLResource = "ghmattimysql",  -- Options: "ghmattimysql", "mysql-async", "oxmysql" (Recommended: "ghmattimysql") πŸ’Ύ

    EnableModules = true,

    -- Script Version Checks
    ScriptsChecks = {
        "codex_supplies",
        "codex_Moonshine_run",
    },

    -- Security settings
    Security = {
        GlobalEventGuard = {
            whitelist = {
                ["allowed_event"] = true,   -- Add event names here that should be allowed to trigger
            },
            blacklist = {
                ["malicious_event"] = true, -- Add event names here that should be blocked
            },
        },

        -- Rate-limiting settings
        RateLimit = {
            maxCalls = 5,        -- Max number of allowed calls per user
            perSeconds = 10,     -- Time frame in seconds for rate limiting
        },
    }
}
Previous🧾 Server Side (serverside.lua)NextSecurity Detailed Explanation

Last updated 1 month ago

Was this helpful?

πŸ’…
🌐
πŸ›‘οΈ