Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modern HWID integration #33265

Merged
merged 3 commits into from
Nov 22, 2024

Conversation

PJB3005
Copy link
Member

@PJB3005 PJB3005 commented Nov 12, 2024

This should be the primary changes for the future-proof "Modern HWID" system implemented into Robust and the auth server.

HWIDs in the database have been given an additional column representing their version, legacy or modern. This is implemented via an EF Core owned entity. By manually setting the column name of the main value column, we can keep DB compatibility and the migration is just adding some type columns.

This new HWID type has to be plumbed through everywhere, resulting in some breaking changes for the DB layer and such.

New bans and player records are placed with the new modern HWID. Old bans are still checked against legacy HWIDs.

Modern HWIDs are presented with a "V2-" prefix to admins, to allow distinguishing them. This is also integrated into the parsing logic for placing new bans.

There's also some code cleanup to reduce copy pasting around the place from my changes.

Requires latest engine to support ImmutableArray in NetSerializer.

Fixes formatting of owned entity type property names. These are normally named "FooBar_Baz" by EF Core, but the snake case thing was turning them into "foo_bar__baz". The double underscore is now fixed.

We don't *yet* have any EF Core owned entity in use, but I am planning to add one. I don't know if downstreams are using any so this should still be marked as a breaking change.

Also fixed it creating and dropping a Compiled Regex instance for every name, the regex is now cached (and pregenerated).
This should be the primary changes for the future-proof "Modern HWID" system implemented into Robust and the auth server.

HWIDs in the database have been given an additional column representing their version, legacy or modern. This is implemented via an EF Core owned entity. By manually setting the column name of the main value column, we can keep DB compatibility and the migration is just adding some type columns.

This new HWID type has to be plumbed through everywhere, resulting in some breaking changes for the DB layer and such.

New bans and player records are placed with the new modern HWID. Old bans are still checked against legacy HWIDs.

Modern HWIDs are presented with a "V2-" prefix to admins, to allow distinguishing them. This is also integrated into the parsing logic for placing new bans.

There's also some code cleanup to reduce copy pasting around the place from my changes.

Requires latest engine to support ImmutableArray<byte> in NetSerializer.
@PJB3005 PJB3005 requested a review from DrSmugleaf as a code owner November 12, 2024 00:53
@github-actions github-actions bot added S: Needs Review Status: Requires additional reviews before being fully accepted Changes: UI Changes: Might require knowledge of UI design or code. and removed S: Needs Review Status: Requires additional reviews before being fully accepted labels Nov 12, 2024
@SlamBamActionman SlamBamActionman added the S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. label Nov 14, 2024
@SaphireLattice SaphireLattice added P1: High Priority: Higher priority than other items, but isn't an emergency. T: Refactor Type: Refactor of notable amount of codebase D2: Medium Difficulty: A good amount of codebase knowledge required. S: Needs Review Status: Requires additional reviews before being fully accepted A: Admin Tooling Area: Admin tooling and moderation. A: Core Tech Area: Underlying core tech for the game and the Github repository. T: Of Admin Interest Type: Affects administration work a lot, and might require admins to weigh in on and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Nov 15, 2024
@Merrokitsune
Copy link

Merrokitsune commented Nov 20, 2024

Just a question, could it be made a CCVar, so forks should be able to choose which HWID version to use?

@dvir001
Copy link
Contributor

dvir001 commented Nov 20, 2024

Just a question, could it be made a CCVar, so forks should be able to choose which HWID version to use?

What is the use case for it?

@PJB3005
Copy link
Member Author

PJB3005 commented Nov 20, 2024

Just a question, could it be made a CCVar, so forks should be able to choose which HWID version to use?

The legacy HWID system is fundamentally broken and we are not interested in continuing to support it.

@github-actions github-actions bot added the size/XL Denotes a PR that changes 5000+ lines. label Nov 21, 2024
@VasilisThePikachu VasilisThePikachu merged commit 94ac0b1 into space-wizards:master Nov 22, 2024
12 checks passed
@PJB3005 PJB3005 deleted the 24-10-29-modern-hwid branch November 24, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Admin Tooling Area: Admin tooling and moderation. A: Core Tech Area: Underlying core tech for the game and the Github repository. Changes: UI Changes: Might require knowledge of UI design or code. D2: Medium Difficulty: A good amount of codebase knowledge required. P1: High Priority: Higher priority than other items, but isn't an emergency. S: Needs Review Status: Requires additional reviews before being fully accepted size/XL Denotes a PR that changes 5000+ lines. T: Of Admin Interest Type: Affects administration work a lot, and might require admins to weigh in on T: Refactor Type: Refactor of notable amount of codebase
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants