lihop / lihop/systemnauts

Basic authenication

Open
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
GDScript
Stars
6
Forks
1
PR merge metrics
No merged PRs in 30d

Description

When a player enters the game a shell is created and this shell is given a process id. All actions the player performs on the OS level is done through this shell. Currently, the server does not authenticate users. It just places them directly in the game world when they request to join. It also cannot act upon the user on the OS level because it has no idea which shell belongs to the user.

The server should:
- Authenticate a player before adding them to the game world.
- Associate each player with their uid and shell's pid.

The following basic authentication flow should work:
1. Client connects to server and requests to join game.
2. Server generates and random token that can be used as a filename.
2. Server starts watching for that file in `/tmp`.
3. Server sends the token to client.
4. Client creates its shell connection to the server. This should connection should last for the duration of the client's session.
5. Client creates a file in `/tmp` with the name token and contents being a single line containing the shells pid (i.e. `echo $$ > /tmp/`).
6. Server detects that the `/tmp/` file was created. It then checks the uid of the files owner and reads the pid.
7. The server checks that the pid is owned by the same user that owns the file (this introduces a modicum of security).
8. If everything is ok, the server registers the pid and uid of the user against the clients network id and adds the client to the game. If not ok the client is rejected.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the server's join-game handling and the code that creates each player's shell connection. Trace how the client and server communicate during session setup, then implement and verify the stated token, /tmp file ownership, UID/PID matching, registration, and rejection flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
godot, linux
Domain
authentication, game-dev, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.