An unofficial authentication server for Factorio
Go to file
2024-02-10 21:46:44 +00:00
src Implement LDAP authentication backend 2024-02-10 21:44:43 +00:00
.editorconfig Add .editorconfig 2024-02-09 20:21:31 +00:00
.env use query! and query_as! 2024-02-10 14:31:22 +01:00
.gitignore Add config 2024-02-10 13:11:36 +00:00
Cargo.lock Add sha2 crate 2024-02-10 18:49:23 +00:00
Cargo.toml Add sha2 crate 2024-02-10 18:49:23 +00:00
clippy.toml Add clippy configuration 2024-02-10 09:20:44 +00:00
config.toml.example Update README, example config 2024-02-10 21:46:44 +00:00
LICENSE.txt Add license 2024-02-09 20:22:03 +00:00
README.md Update README, example config 2024-02-10 21:46:44 +00:00

factoriauth - an unofficial Factorio authentication server

Let's say you and your friends are

  • on an oil rig,
  • in space, or
  • in the far future,

and you want to host a Factorio server. Because you don't have an internet connection (or the official authentication servers don't exist anymore), your only option is to disable require_user_verification in the server config - but this allows anyone to connect as any user, which is no good, especially for PvP scenarios! Wouldn't it be great if you could set up your own authentication server?

factoriauth is exactly that. It allows clients to log in as custom users provided by one of several authentication backends (e.g. LDAP or a passwd-style file), and allows servers to validate that these custom users are properly authenticated.

Roadmap

Complete

  • server padlock generation (POST /generate-server-padlock-2)
  • user_server_key generation (POST /generate-user-server-key-2)
  • user token generation and storage (POST /api-login), without any actual authentication
    • LDAP auth backend

Planned

  • more auth backends: user file, PAM(?)
  • server padlock proxying (to allow e.g. factorio.com users to join servers using a custom auth server)

Unplanned

Setup

Configuring factoriauth

TBD

Configuring clients/servers

To use the auth server, the following snippet needs to be added to the clients' and servers' config.ini, replacing the URL of the server as appropriate:

[servers]
auth-server=https://my-auth-server.example/

Unless your clients are really offline, you also need to override the updater server to an invalid/unreachable address, otherwise the client will contact it with an invalid token on startup and prompt for a re-login:

[servers]
updater-server=http://invalid.example

Running factoriauth

TBD