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

Duplicate Service Registration Allows Unauthorized Connection #3

Closed
arijitcodes opened this issue Mar 1, 2025 · 1 comment
Closed
Assignees
Labels
bug Something isn't working enhancement New feature or request fixed A bug has been fixed released

Comments

@arijitcodes
Copy link
Owner

arijitcodes commented Mar 1, 2025

We have identified a need to implement a mechanism to block duplicate service registrations in the MicroStream Hub. Currently, there is no functionality to prevent multiple instances of the same service from connecting to the hub, which can lead to potential conflicts and security issues.

Note: The client-side implementation of this feature is being tracked in Issue #3 in the client repository.

Steps to Reproduce:

Start the MicroStream Hub.
Connect a service with a specific name (e.g., serviceA).
Attempt to connect another service with the same name (serviceA).
Observe that both services are able to connect without any restrictions.
Expected Behavior:

The hub should reject any duplicate service registration attempts and prevent multiple instances of the same service from connecting.

Actual Behavior:

The hub allows multiple instances of the same service to connect without any restrictions.

Impact:

This issue can lead to potential conflicts and security vulnerabilities in the MicroStream Hub.

@arijitcodes arijitcodes self-assigned this Mar 1, 2025
@arijitcodes arijitcodes added bug Something isn't working enhancement New feature or request labels Mar 1, 2025
github-actions bot pushed a commit that referenced this issue Mar 1, 2025
## [1.0.6](v1.0.5...v1.0.6) (2025-03-01)

### Bug Fixes

✅ **hub.js:** prevent duplicate service registration in hub ([9b3168f](9b3168f)), closes [#3](#3)

- Added socket.io middleware to validate service registration
- Implemented service name uniqueness check during connection
- Added standardized error response for duplicate registration attempts
- Implemented socket cleanup for rejected connections
- Added proper logging for duplicate registration attempts
- Implemented automatic rejection of duplicate socket connection requests

This prevents multiple services from registering with the same name, ensuring message routing integrity and system stability. Any duplicate connection attempts are automatically rejected at the connection level, providing enhanced security against unauthorized service impersonation. <br/><br/>
Copy link

github-actions bot commented Mar 1, 2025

🎉 This issue has been resolved in version 1.0.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@arijitcodes arijitcodes added the fixed A bug has been fixed label Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request fixed A bug has been fixed released
Projects
None yet
Development

No branches or pull requests

1 participant