mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-11 23:04:52 +09:00
Add authentication plugin that does a simple challenge response protocol to verify that the player trying to log in is who they claim to be. The process goes as follows: 1. A player code is generated for a player that wants to log in and is displayed in-game. 2. The player code is input into the web interface and the master generates a verification code as a challenge back along with a token. 3. The player inputs the verification code in-game and is logged in to the web interface in doing so. To do the actual login the web interface polls a verify endpoint every 2 seconds until the code has either been verified or expired. The challenge comes from being unable to control the verification code and having to input it as a player logging into one of the servers in order to login. Some additional steps are taken in order to increase the difficulty for an attacker to subvert the challenge: - The login process must be started from in-game. - Generated codes are only valid for a limited timespan which is configurable and 2 minutes by default. - The verification code comes with a token that only works with one player code and verification code combo and must be provided to pass validation.
35 lines
963 B
JSON
35 lines
963 B
JSON
{
|
|
"name": "@clusterio/plugin-player_auth",
|
|
"version": "2.0.0-alpha.5",
|
|
"description": "Clusterio plugin authenticating logged in players to the web interface",
|
|
"author": "Hornwitser <github@hornwitser.no>",
|
|
"homepage": "https://github.com/clusterio/factorioClusterio#readme",
|
|
"license": "MIT",
|
|
"repository": "clusterio/factorioClusterio",
|
|
"scripts": {
|
|
"build": "webpack-cli --env.production",
|
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/clusterio/factorioClusterio/issues"
|
|
},
|
|
"peerDependencies": {
|
|
"@clusterio/lib": "^2.0.0-alpha.0"
|
|
},
|
|
"dependencies": {
|
|
"jsonwebtoken": "^8.2.1"
|
|
},
|
|
"devDependencies": {
|
|
"@clusterio/web_ui": "^2.0.0-alpha.4",
|
|
"antd": "^4.6.5",
|
|
"phin": "^3.4.1",
|
|
"react": "^16.13.1",
|
|
"react-dom": "^16.13.1",
|
|
"webpack-cli": "^3.3.12",
|
|
"webpack-merge": "^5.2.0"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
}
|
|
}
|