Skip to content

Add Steam authentication - #69

Draft
CdecPGL wants to merge 15 commits into
masterfrom
feature/52
Draft

Add Steam authentication#69
CdecPGL wants to merge 15 commits into
masterfrom
feature/52

Conversation

@CdecPGL

@CdecPGL CdecPGL commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Closes #52

OIDC follow-up: #70

Summary

  • replace the legacy authentication handshake with message-attachment based Steam ticket authentication
  • support mutually exclusive server authentication methods: none for local development and steam for verified production identities
  • verify Steam tickets and app ownership asynchronously through the Steam Web API without exposing publisher credentials
  • retain verified identities in server sessions and derive or validate Steam room external IDs from the verified SteamID64
  • keep authentication verifier and identity abstractions method-independent so additional providers can be added later
  • expose authentication options and detailed failure reasons in the C# and Unity clients
  • preserve authentication error code, server API version, and server game version in the Unity wrapper result
  • require HTTPS and host-name verification for Steam API calls, and install an explicit CA bundle in the production image
  • document the authentication protocol, server settings, TLS requirements, client usage, and production HTTPS integration check
  • separate reusable server code into PlanetaMatchMakerServerLib and reference it from the server executable and test project

Impact

The authentication wire format is intentionally replaced without backwards compatibility. The PMMS API version remains 0 because the project is not yet formally released.

This PR implements only none and Steam authentication. OIDC is intentionally deferred to #70. Steam credentials are accepted only under the configured TLS policy, and authentication must complete before normal matching operations can run. Steam room external IDs are derived from the verified SteamID64.

The Visual Studio solution builds the reusable server implementation as a static library. The executable owns only main and logging initialization, and the test project links the library through a project reference instead of individual object files.

Security and operations

  • Steam Publisher Keys and authentication tickets are never returned to clients or written to logs.
  • External authentication requests use asynchronous resolve, connect, TLS handshake, write, and read operations with the configured deadline.
  • TLS verifies both the certificate chain and the requested host name.
  • The production image copies Debian's CA bundle and sets SSL_CERT_FILE explicitly for the statically linked OpenSSL build.
  • The production-https-test Docker target calls Steam's public GetServerInfo endpoint through the PMMS authentication HTTP client.
  • The production image includes a Steam setting but intentionally omits game ID, Steam AppID, and Publisher Key. It refuses to start until all three are supplied by environment variables or a replacement setting file.
  • Docker/server/pmms/pmms.env.example documents the exact environment variables required for production Steam authentication.
  • OIDC/JWT dependencies are not included in this PR.

Validation

  • Visual Studio Debug and Release builds for PlanetaMatchMakerServer, PlanetaMatchMakerServerLib, and PlanetaMatchMakerServerTest
  • direct Debug builds of the server and test vcxproj files
  • C++ tests in Visual Studio Debug and Release
  • Linux CMake Release build and CTest (1/1 passed)
  • production Docker image build
  • production image startup rejects missing Steam deployment values
  • production image starts when game ID, Steam AppID, and Publisher Key are supplied through environment variables
  • production-https-test Docker target, including a verified HTTPS request to Steam
  • dotnet build PlanetaMatchMakerClient -c Release
  • dotnet test PlanetaMatchMakerClientTest -c Release
  • Unity client synchronization and authentication error mapping tests
  • git diff --check

@CdecPGL CdecPGL changed the title Add Steam and OIDC authentication Add Steam authentication Jul 18, 2026
CdecPGL added 5 commits July 18, 2026 14:19
Store verified provider user IDs independently from room P2P peer IDs, enforce connection-mode-specific room policies, and update the C#, Unity, protocol, documentation, and test surfaces. Import Windows system root certificates for external authentication HTTPS requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add authentication feature

1 participant