Far-Beyond-Dev / Horizon-Community-Edition

An easily scalable game server implemented in Rust, and compatible with many popular game engines
https://horizon.farbeyond.dev/
Apache License 2.0
27 stars 9 forks source link

[URGENT] Authentication process to prove to the server that the client is really the correct game client #153

Open tristanpoland opened 1 month ago

tristanpoland commented 1 month ago

The Problem

We need a bulletproof authentication process to ensure that only legitimate game clients can connect to our server. This is crucial to prevent hackers from simulating clients to overwhelm the server or cheat.

Current Situation

Currently, our server lacks a robust mechanism to verify the authenticity of connecting clients. This leaves us vulnerable to unauthorized access, potential cheating, and other security risks.

Proposed Solution

I propose we implement a multi-layered authentication system that combines a few common security measures:

  1. Client-Side Certificate:

    • Embed a unique digital certificate in each game client during the build process.
    • The server will verify this certificate upon connection attempts.
    • (Could be a file the server names when it builds it's executable)
  2. API Key Rotation:

    • Implement a system of rotating API keys with short lifespans.
    • Keys are issued by the server and must be refreshed periodically.
    • We will need to implement API keys via this system as well on login
  3. Behavior Analysis:

    • Monitor client behavior patterns during the connection process.
    • Flag and potentially block connections that exhibit suspicious patterns.
  4. Secure Communication Channel:

    • Use TLS for all client-server communications to prevent man-in-the-middle attacks.
  5. Rate Limiting and Blacklisting:

    • Implement strict rate limiting on authentication attempts.
    • Maintain a blacklist of IP addresses or device identifiers that have shown malicious behavior.

Security Considerations

Timeline

Total Estimated Time: 4 weeks ?

Resources Needed

tristanpoland commented 3 days ago

@haywoodspartan Would you per chance be around at some point after/on the 16th to help me out with this one?