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

Features #180

Merged
merged 6 commits into from
Dec 3, 2024
Merged

Features #180

merged 6 commits into from
Dec 3, 2024

Conversation

croessner
Copy link
Owner

No description provided.

Christian Roessner added 6 commits December 3, 2024 11:08
Introduce a 'soft whitelist' feature to enhance flexibility in client IP handling. This feature applies a less strict whitelist check, allowing certain usernames and networks to bypass stricter authentication checks. Additionally, the `HandleFeatures` method was refactored to utilize the new soft whitelist checking mechanisms.

Signed-off-by: Christian Roessner <c@roessner.co>
Introduced a new soft whitelist feature for network management, with corresponding Lua module bindings. This includes constants, operations for setting, retrieving, and deleting whitelist entries, and comprehensive unit tests to ensure expected behavior. The implementation provides integration across various server components, enhancing flexibility and security in network handling.

Signed-off-by: Christian Roessner <c@roessner.co>
Introduced a new soft whitelist feature for network management, with corresponding Lua module bindings. This includes constants, operations for setting, retrieving, and deleting whitelist entries, and comprehensive unit tests to ensure expected behavior. The implementation provides integration across various server components, enhancing flexibility and security in network handling.

Signed-off-by: Christian Roessner <c@roessner.co>
Introduce a read-write mutex in the SoftWhitelist type to ensure thread safety during concurrent operations. Locks are added to methods that read or modify the internal map, preventing race conditions. This change enhances stability by synchronizing access across multiple goroutines.

Signed-off-by: Christian Roessner <c@roessner.co>
Changed the SoftWhitelist map initialization to have an initial size of 1 for performance improvement. Also updated the network retrieval to check for existence using the map's boolean return, avoiding deadlocks.

Signed-off-by: Christian Roessner <c@roessner.co>
Refactored the softallow modules to define and use the SoftWhitelistProvider interface, enhancing modularity and readability. Updated the NewSoftWhitelist function to initialize an empty map without a predefined size. Adjusted LUA functions to utilize the updated SoftWhitelistProvider methods, including adding initialization checks and handling feature categories more robustly.

Signed-off-by: Christian Roessner <c@roessner.co>
@croessner croessner merged commit 8bdd3db into main Dec 3, 2024
5 checks passed
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.

1 participant