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

Create new UI command to retrieve list of country_codes in the Patch #469

Open
czarte opened this issue Aug 9, 2024 · 4 comments
Open
Assignees

Comments

@czarte
Copy link
Collaborator

czarte commented Aug 9, 2024

This UI command will trigger Node to send collection of country codes from Neighborhood DB wtith number of Nodes in particular countries.
Front-End team want's to show the flags of available countries in the MASQ Browser for users to see waht countries are available for exit and how many exit nodes is available in particular country.

@dnwiebe
Copy link
Collaborator

dnwiebe commented Aug 9, 2024

I'd like to see this command designed to send the entire Neighborhood Database graph to the front end, so that they can use it for more purposes than just extracting a list of country codes. I recommend that a few fields from each Node be withheld (for example, the encrypted Gossip and the binary signature) because they're large and unwieldy and the front end would have no use for them; but there shouldn't be any security issues with providing all the information in the database.

@dnwiebe
Copy link
Collaborator

dnwiebe commented Aug 9, 2024

At the time of this writing, the Node is constrained to listen for UI connections only on the loopback adapter (127.0.0.1), so there's no way any attacker could connect a UI over the Internet.

If this ever changes, so that connections are accepted over the default NIC, this command will become a security liability because an attacker will be able to collect the IP addresses of all our immediate neighbors...and then probably connect to those neighbors and collect their neighbors' IP addresses, and so on, until he's got all the IP addresses in the network.

So: A) don't change the adapter that listens for UI connections, or B) if you do, make sure you bring at least username/password authorization to bear, and preferably multi-factor authorization as well. But...preferably...don't change it. Syther: this means you.

@kauri-hero kauri-hero transferred this issue from MASQ-Project/MASQ-Node-issues Aug 10, 2024
@dnwiebe
Copy link
Collaborator

dnwiebe commented Aug 11, 2024

From a Sunday meeting:

{
	"neighborhood_database": {
		"<public key 1>": {
			"version": 252,
			"country_code": "UK",
			"exit_service": true,
			"unreachable_hosts": ["facebook.com", "x.com", ...]
		},
		"<public key 3>": {
			"version": 2,
			"country_code": "UK",
			"exit_service": true,
			"unreachable_hosts": ["facebook.com", "x.com", ...]
		},
		"<public key 2>": {
			"version": 5,
			"country_code": "CZ",
			"exit_service": false,
			"unreachable_hosts": ["facebook.com", "x.com", ...]
		},
		...
	}
}

@czarte
Copy link
Collaborator Author

czarte commented Aug 12, 2024

1. As I understand we want to provide ExitLocation for all routes made from the selection of ExitLocation flag in Electron app. This selection will be based on message from the Node about the Neighborhood as is described and newly adjusted on #469 card in the Project Board here #469 (comment).
This message will contain all nodes in Neighborhood DB with informations about their country_code, exit_service and probably unreachable_hosts. These 3 pieces of information I will explain in item 2., here we want to conclude weather we want this ExitLocation to be blocking, or not. That means, as I understand the request for this feature, tahat this ExitLocation should be blocking type, which means, if we do not find any route by Nodes in particular ExitLocation, we will inform about it the user and let him decide, weather he will wait until this host will be reachable by Nodes in particular Country, or if he switch this feature off and use any Country for exiting. We can also implement something like "preferred country", that will tell routing_engine that if he could not find particular host in selected Country, we will provide for this particular host rout thru different Country. In that case user will not know about it, otherwise we need to implement some other functionality to inform user about situation, that we are routing thru different Country, than which he selected in Electron app.

2. We have updated the card and the JSON structure for card mentioned aboce #469, that contains following informations:

  • Public Key of the Node
  • Version - number indicates how many times informations about the Node has changed. Could indicate the change of other informations exept the Public Key
  • country_code of the Node to create UI interface to select the country
  • exit_service boolean that indicates if particular node can provide exit service
  • unreachable_hosts - is optional as offering. This piece of information can provide information about hosts that can't be reached thru this particular Node, that means, if all the nodes in particular Country will have common unreacable_host in this array, the Electron app can show user, that if he pick this country for ExitLocation, those hosts will be unreachable for him.

In general, we want to decide and argue, how we want to proceed with this Feature. Do we want, if user is selecting for example Gabon as ExitLocation, and there will be e.g. Twitter unreachable by all Exit Nodes, to perform the request to the Node for compute routing, or not? In case the ExitLocation will be blocking the routing_engine, user will get back something like 404 site not found, and if it will be non-blocking, then user can exit in any other Country, which could be confusing for him.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 Development In Progress
Development

No branches or pull requests

3 participants