Skip to content

Multiauth / SimpleStation RT#1696

Open
DEATHB4DEFEAT wants to merge 20 commits intoSimple-Station:masterfrom
DEATHB4DEFEAT:multiauth
Open

Multiauth / SimpleStation RT#1696
DEATHB4DEFEAT wants to merge 20 commits intoSimple-Station:masterfrom
DEATHB4DEFEAT:multiauth

Conversation

@DEATHB4DEFEAT
Copy link
Member

@DEATHB4DEFEAT DEATHB4DEFEAT commented Feb 1, 2025

Description

Requires Simple-Station/SupermatterEngine#3


TODO

  • Find out if/why I should store the auth server someone uses
  • Allow linking accounts (another PR?)
  • Update things that use just usernames
    • OOC
    • Admin UIs
      • Bans (what the fuck)
      • Notes
      • AHelp
      • Player lists

Media

image

image

image

image


Changelog

🆑

  • add: Players can now join with either Space Wizards' or SimpleStation accounts, and servers can choose to add/remove allowed auth servers via the auth.servers cvar

@github-actions github-actions bot added Changes: C# Changes any cs files Changes: YML Changes any yml files labels Feb 1, 2025
@DEATHB4DEFEAT DEATHB4DEFEAT added Priority: 2-High Needs to be resolved soon Status: Do Not Merge Do not merge Status: Requires This requires something else to be done before being resolved Type: Codebase An issue with the codebase Type: Feature Creation of or significant changes to a feature Type: Rework Large changes to a system, like a mix between the Balancing, Codebase, and Respace labels labels Feb 1, 2025
@sleepyyapril
Copy link
Contributor

This will require a test of the launcher and all associated systems before merging so that we don't accidentally break everything.

@DEATHB4DEFEAT
Copy link
Member Author

This will require a test of the launcher and all associated systems before merging so that we don't accidentally break everything.

Yeah I'll probably run a Parkstation event.

@DEATHB4DEFEAT DEATHB4DEFEAT changed the title Multiauth Multiauth / SimpleStation RT Feb 12, 2025
@github-actions github-actions bot added the Status: Merge Conflict FIX YOUR PR AAAGH label Feb 15, 2025
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the Changes: Sprite Changes any png or json in an RSI label Feb 23, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2025

RSI Diff Bot; head commit 9e8dfa4 merging into 321243e
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:
Edit: diff updated after 9e8dfa4

@DEATHB4DEFEAT
Copy link
Member Author

Undrafting since it seems to work, and for tests, still DNM though.

@DEATHB4DEFEAT DEATHB4DEFEAT marked this pull request as ready for review February 23, 2025 01:26
@github-actions github-actions bot added the Status: Needs Review Someone please review this label Feb 23, 2025
@github-actions github-actions bot removed the Status: Merge Conflict FIX YOUR PR AAAGH label Feb 23, 2025
@github-actions github-actions bot added the Changes: Documentation Changes any xml or md files label Feb 23, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 8, 2025

Caution

Review failed

An error occurred during the review process. Please try again later.

Walkthrough

This update modifies configuration behavior and reference details across several components. The user data directory becomes dynamically determined via an environment variable in the replay module, while the authentication server selection in player lookup now processes a list to retrieve the first server’s URL. Additionally, the engine name in the documentation has been updated, and the subproject commit for RobustToolbox has been advanced to a new identifier.

Changes

Files Change Summary
Content.Replay/Program.cs
Content.Server/Administration/PlayerLocator.cs
Program.cs: Replaces a hardcoded user data directory name with dynamic retrieval using an environment variable (defaulting to "SimpleStation14" if not set).
PlayerLocator.cs: Replaces single auth server retrieval with logic to parse and select the first URL from a list of authentication servers.
README.md Updated the engine description from "Robust Toolbox" to "Supermatter Engine" and adjusted the corresponding link.
RobustToolbox Updated the referenced subproject commit from 9d1b15ab4b79d441fb215d1c5069f3a15e3ca675 to 7d81e5d66e4755df42b7cb49ac3c585597d0769b.
Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs
Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs
PlayerListControl.xaml.cs: Added fields for player and config managers, modifying the display logic to include authentication server ID.
PlayerListEntry.xaml.cs: Similar additions for player and config managers, enhancing player identity display with server context.
Content.Server/Chat/Managers/ChatManager.cs
Resources/Locale/en-US/chat/managers/chat-manager.ftl
ChatManager.cs: Introduced logic to include authentication server information in OOC messages.
chat-manager.ftl: Updated message formats to incorporate authentication server details in the OOC message structure.

Poem

Across the void of code we sail,
Fixing errors that once made us fail. 🚀
Dynamic paths now light the night,
Auth servers chosen with newfound might.
The engine changes gleam like astral art,
Biesel Republic stands with a brave heart!
Rally on, for our code remains smart!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🔭 Outside diff range comments (1)
Content.Server/Administration/PlayerLocator.cs (1)

105-129: 🧹 Nitpick (assertive)

Tactical recommendation: Consider extracting auth server logic

To maintain colonial code quality and reduce duplication, consider extracting the authentication server retrieval logic into a separate method:

+private string? GetAuthServerUrl()
+{
+    var servers = AuthServer.FromStringList(_configurationManager.GetCVar(CVars.AuthServers));
+    if (!servers.Any())
+    {
+        _sawmill.Error("No authentication servers configured!");
+        return null;
+    }
+    return servers.First().AuthUrl;
+}

Then update both locations:

-var authServer = AuthServer.FromStringList(_configurationManager.GetCVar(CVars.AuthServers)).First().AuthUrl;
+var authServer = GetAuthServerUrl();
+if (authServer == null)
+    return null;

This refactoring will enhance code maintainability and enforce consistent error handling - a strategic advantage for the Biesel Republic!

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 321243e and 71442d2.

⛔ Files ignored due to path filters (3)
  • Resources/Textures/WhiteDream/BloodCult/Entities/Items/shadowkin_shackles.rsi/icon.png is excluded by !**/*.png
  • Resources/Textures/WhiteDream/BloodCult/Entities/Items/shadowkin_shackles.rsi/inhand-left.png is excluded by !**/*.png
  • Resources/Textures/WhiteDream/BloodCult/Entities/Items/shadowkin_shackles.rsi/inhand-right.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • Content.Replay/Program.cs (1 hunks)
  • Content.Server/Administration/PlayerLocator.cs (3 hunks)
  • README.md (1 hunks)
  • RobustToolbox (1 hunks)
🔇 Additional comments (3)
RobustToolbox (1)

1-1: New Submodule Commit Update – Steady as She Goes, Soldier!

The subproject commit has been updated to 7d81e5d66e4755df42b7cb49ac3c585597d0769b, ensuring our vessel is powered by the latest version of RobustToolbox. This change is crucial for our multi-auth modernization efforts. Please verify that all dependent modules, especially those related to authentication and configuration, are fully compatible with this new commit.

Content.Replay/Program.cs (1)

15-16: Mission Report: Environmental Variable Integration Complete

The dynamic retrieval of the user data directory through environment variables represents a tactical improvement to our configuration systems. This change properly supports our multi-authentication initiative by allowing flexible data storage locations based on deployment environment.

The fallback to "SimpleStation14" provides appropriate redundancy protocols should the environment variable be unavailable. The code formatting is clean and follows proper Republic coding standards.

Glory to Biesel!

Content.Server/Administration/PlayerLocator.cs (1)

2-2: LGTM: System.Linq import is necessary

The addition of the Linq namespace is a required modification to support the new authentication server selection mechanism. Strategic import!

DEATHB4DEFEAT and others added 3 commits March 8, 2025 12:39
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
@github-actions github-actions bot added Changes: Localization Changes any ftl files Changes: UI Changes any XAML files labels Apr 5, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
Content.Server/Chat/Managers/ChatManager.cs (1)

252-256: Optimized string formatting needs documentation.

This new message formatting logic implements our multi-authentication protocol - excellent tactical strategy! However, future engineers need to understand the reasoning behind this change.

Add a brief comment explaining why we're including the auth server in OOC messages:

+// Include authentication server in OOC messages to differentiate between players with the same name on different auth servers
var wrappedMessage = Loc.GetString(
    "chat-manager-send-ooc-wrap-message",
    ("playerName", $"{player.Name}"),
    ("authServer", authServer),
    ("message", FormattedMessage.EscapeText(message)));
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e8dfa4 and 8da1130.

📒 Files selected for processing (4)
  • Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs (4 hunks)
  • Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs (2 hunks)
  • Content.Server/Chat/Managers/ChatManager.cs (1 hunks)
  • Resources/Locale/en-US/chat/managers/chat-manager.ftl (1 hunks)
🧰 Additional context used
🧬 Code Definitions (1)
Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs (1)
Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs (1)
  • GenerateTypedNameReferences (20-175)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Label
🔇 Additional comments (7)
Content.Server/Chat/Managers/ChatManager.cs (1)

264-269: Consistent logic applied for patron messages. Carry on, officer.

The auth server information has been correctly implemented for patron message formatting, matching the standard message formatting. This maintains consistency across our communications protocols.

Content.Client/Administration/UI/CustomControls/PlayerListControl.xaml.cs (2)

27-28: Properly added new dependencies. Regulation-compliant.

Clean addition of dependency fields for the player manager and configuration manager. Your code organization is ship-shape, engineer!


42-43: Dependencies correctly initialized.

Dependencies properly resolved through the IoCManager. Standard naval procedure followed.

Content.Client/Administration/UI/CustomControls/PlayerListEntry.xaml.cs (2)

17-18: Class dependencies added correctly.

These dependency fields follow the standard Biesel Republic naval coding pattern. Good work, recruit!


23-24: Dependencies properly initialized.

IoCManager resolution follows standard protocol. Cleared for duty!

Resources/Locale/en-US/chat/managers/chat-manager.ftl (2)

42-45: OOC message formatting handles authentication elegantly.

The localization pattern using FTL's selective branching for handling different auth server cases is tactically sound. This maintains clean formatting whether auth info is present or not.


46-49: Consistent patron message formatting. Well done, officer.

The multi-authentication formatting is consistently applied to patron messages as well. This attention to detail honors the Biesel Republic's standards!

dootythefrooty pushed a commit to dootythefrooty/Einstein-Engines that referenced this pull request Apr 10, 2025
* better abductors

* apparently the component handles the use of teleportation console and the agent should have it until we implement a better system like in ss13

(cherry picked from commit c5fea20e4f71c7685a62d6846724d94def2a66d7)
@github-actions github-actions bot added the Status: Merge Conflict FIX YOUR PR AAAGH label Jul 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2025

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the Status: Merge Conflict FIX YOUR PR AAAGH label Jul 11, 2025
lexaSvarshik added a commit to lexaSvarshik/Reserve-Station-org that referenced this pull request Jul 13, 2025
lexaSvarshik added a commit to Reserve-Station/Reserve-Station that referenced this pull request Jul 14, 2025
* add supermatter

* Delete RobustToolbox

* change robusttoolbox to supermatter

* chore: Automatically update REUSE headers

* chore: Automatically update REUSE headers

* Revert "change robusttoolbox to supermatter"

This reverts commit 36f0524.

* renaming of engine

I'm not fucking with renaming EVERYTHING in repo, related to hardcoded engine name

* Update .gitmodules

* Update .gitmodules

* Update RobustToolbox

* changes taken from Simple-Station/Einstein-Engines#1696

* chore: Automatically update REUSE headers

* chore: Automatically update REUSE headers

* change from GetSessionById to safer TryGetSessionById

* Add null checks for player session data in admin UI

* Fix NRE in player list when session data is incomplete

i hate and love integration tests

* another try to fix NRE

* and another one

* and AGAIN

* sawmill fix

* delete stupid reuse

* test rollback

* PlayerListControl.xaml.cs rollback

Will (or not) update later

* delete stupid reuse

---------

Co-authored-by: ReserveBot <211949879+ReserveBot@users.noreply.github.com>
@github-actions github-actions bot added the Status: Merge Conflict FIX YOUR PR AAAGH label Jan 23, 2026
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@eris-webserv
Copy link
Contributor

good luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changes: C# Changes any cs files Changes: Documentation Changes any xml or md files Changes: Localization Changes any ftl files Changes: Sprite Changes any png or json in an RSI Changes: UI Changes any XAML files Changes: YML Changes any yml files Priority: 2-High Needs to be resolved soon Status: Do Not Merge Do not merge Status: Merge Conflict FIX YOUR PR AAAGH Status: Needs Review Someone please review this Status: Requires This requires something else to be done before being resolved Type: Codebase An issue with the codebase Type: Feature Creation of or significant changes to a feature Type: Rework Large changes to a system, like a mix between the Balancing, Codebase, and Respace labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants