-
Notifications
You must be signed in to change notification settings - Fork 31
Create new UI command to retrieve detailed infomap of country_codes in the Patch #469
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
Comments
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. Note from later: I no longer believe this. I do believe that the entire Neighborhood Database graph should be sent to the front end, but I don't believe it should be done in response to this command: I think it should be done whenever the Node sends Gossip on the network. As a matter of fact, I no longer think this command should even exist. |
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. |
From a Sunday meeting:
|
1. As I understand we want to provide 2. We have updated the card and the JSON structure for card mentioned aboce #469, that contains following informations:
In general, we want to decide and argue, how we want to proceed with this |
…ture db_countries and find_exit_location fn from GH-469
* final changes in gossip_acceptor from review * continue of implementing review comments * fix test return value * added ip_country to ci/all.sh * cherry-pick from GH-784-fix-for-Vojta and implementing iterator for deserializer * try to create test for fmt * tests for print ip v4 and v6 vec[u8] in country_block_serde.rs * ci for ip_country + resolved conflicts of clippy * masq_lib dependencies solved * dependency masq_lib for ip_country in node workspace * remove commented out code + fix condition for non empty bit_queue * formatting * 5 seconds for wait_for_log in requested_chain_meets_different_db_chain_and_panics_integration * fixing impl for AGR in multinode tests * formatting * fix nonexistent NodeAddr in multinode tests for AGR * change single match to if * try to fix build in actions for MacOS * try to find out disk space on MacOS container in Actions * add diagnostics commands on failure * check diskspace before ci/all.sh workflow runs * diagnose mounted disks * analyze /var/ diskspace * remove advanced diagnosticst for disk space * switch macos to version 13 * diagnostics for /Users/runner/work/Node/Node/node/target/release * fasten diagnostics * fasten diagnostics fix * fasten diagnostics back * test for mac-os build without masq_lib for ip_country * remove masq_lib from ip_country * starting with UI setup for Exit Location * GH-784-review-two-state: fixes that could work on Actions, appeasing it * fixing review * implementing CountryBlock count in generated rs file, and infrastructure * fixing ip_country tests * fix import of ip_country to multinode_integration_tests * formatting * fix the reference for COUNTRY_CODE_FINDER * exit location for shared_schema, set_configuration_command, configurator, persistent_configuration_mock * tests for persistent_configurator_mock, and valdator ..string_u64_value_pairs * test for trigger todo for implement validate_parameter_with_separate_string_u64_value_pairs * add ip_country dependency to masq_lib, validation for exit-location in shared_schema * validate pipe separated values with closure from particular validators * starting work on neighborhood modification * test for exit location in large patch * implementing exit_location * ExitLocation struct and its members to messages.rs, set_exit_location_command to masq, implemented From(String, usize) for CountryCodes * Gh 784 review four (MASQ-Project#521) * continue of code review changes * test for panic in handle_retrieve_transactions * fixing more comments from review * removing TODO * implementing review, added two new tests for ip_country * removing unnecesary country_code from node_descriptor * added cfg(test) and cfg(not(test)) for static ref COUNTRY_CODE_FINDER, created test_dbip_country.rs * change country_code member of NodeRecordInner_0v1 to country_code_opt * simplifying tests in node_record.rs and neighborhood_database.rs * resolving review comments * final changes in gossip_acceptor from review * continue of implementing review comments * fix test return value * added ip_country to ci/all.sh * cherry-pick from GH-784-fix-for-Vojta and implementing iterator for deserializer * try to create test for fmt * tests for print ip v4 and v6 vec[u8] in country_block_serde.rs * ci for ip_country + resolved conflicts of clippy * masq_lib dependencies solved * dependency masq_lib for ip_country in node workspace * remove commented out code + fix condition for non empty bit_queue * formatting * 5 seconds for wait_for_log in requested_chain_meets_different_db_chain_and_panics_integration * fixing impl for AGR in multinode tests * formatting * fix nonexistent NodeAddr in multinode tests for AGR * change single match to if * try to fix build in actions for MacOS * try to find out disk space on MacOS container in Actions * add diagnostics commands on failure * check diskspace before ci/all.sh workflow runs * diagnose mounted disks * analyze /var/ diskspace * remove advanced diagnosticst for disk space * switch macos to version 13 * diagnostics for /Users/runner/work/Node/Node/node/target/release * fasten diagnostics * fasten diagnostics fix * fasten diagnostics back * GH-784-review-two-state: fixes that could work on Actions, appeasing it * fixing review * implementing CountryBlock count in generated rs file, and infrastructure * fixing ip_country tests * fix import of ip_country to multinode_integration_tests * formatting * fix the reference for COUNTRY_CODE_FINDER * implemenitng initalization checker for COUNTRY_CODE_FINDER * CountryCodeFinder initializer * fixed comments from review * removed custom PartialEq for NodeLocation * get back with COUNTRY_CODE_FINDER --------- Co-authored-by: Bert <[email protected]> * implemented country-codes and fallback-routing into MessageBody for Node from the UI * completed test for c ommand for exit location, add test for neighborhood actor to test recieved message * implemented handler for exit_location_opt, rename exit_loctation to exit_location_opt, cleanup persistent configuration, test finished for set_exit_location message handler * fmt for HashSet<ExitLocation>, finished the assertions in test exit_location_can_be_changed_using_exit_location_msg * cleanup, test for fallback-routing: false, logger for fallback-routing and implementation for handle from message in Neighborhood * change exit_locations_opt from HashSet to HashMap * clearing bootstrapper config * country_undesidability to NodeRecordMetadata * added member for NodeRecordMetadata and processing for country_undesirability in message handler for exit location * added assertion message for assert on db change in actor * refacotring neighborhood_test_utils: extracted make_segmented_ip, and make_segments for usage in tests, add comments to assertions in handle_exit_location test, test for nodes_mut * added unset exit_location logic with test * change name of test * fiixing tests for set_exit_location_command, fixing log assertion for exit_location handler in Neighborhood * added assertion on neighborhood to exit_location tests * pull request branch changed to GH-784 * formatting * fixing comments from review * polishing helps * addressing comments from review * polishing helps for exit-location * add use super::*; to tests use * add cfg(test) for tests in set_exit_location_command * fixing clippy complains * fix multinode neighborhood constructor * rename set_exit_location_command.rs to exit_location_command.rs * add protection for empty Neighborhood DB * change protection for empty Neighborhood * fixed shared schema, added exit location to --help of masq * set version for sccache * add lifetime for daemon_shared_app fn return * fixing log assertion in tests, add db to exit location test, fix app lifetime for daemon help * introduce test utilities * remove unused import - localhost linux compile and passes all ip_country tests * addressing comments from review * addressing comments from review, refactoring Neighborhood for exit-location, introduce enum for ExitPreference, fixed Display for ExitLocationSet * fix tests for separate_u64_values * add Eq to ExitPreference * rearranged test_utilities, fix to exit_location_handler and its tests * fixing ByteArrayWriter and Reader for masq * added more nodes to exit_location test with fallback to test UNREACHABLE_COUNTRY_PENALTY * move test_utilities to dev-dependencies * test_utilities from dev to production dependencies in masq_lib * formatting help * formatting help * review 3 - refactoring message handler for exit location, and few minor changes * country codes for NodeRecords in tests Neighborhood DBs, constants for assertion and better error messages, other minor changes * formatting * fix todo comment, and formatting * exit-loaction data structures moved into the ExitTools, cloned into NeighborhoodMetadata and sent to handler, modified test for gossip handler to ensure new node has modified undesirability * implemented adding country_undesirability for introducer and debutant * formatting and remove unnecesary let * fallback routing assertion change * formatting * rename ExitTools * fix request for neverssl.com to impersonate user-agent * changes in test for country_code_route, remove country_code_opt from routing engine, replaced by UserExitPreferences, implemented filtr for country_code in routing * working exit country selection wihtout fallback, introduces new structure db_countries and find_exit_location fn from MASQ-ProjectGH-469 * start of implementing find_exit_location * changes to create db_countries * completed process for db_countries and routign_engine for fallback_routing * handling missing locations in NeighborhoodDB * introduced Error responose for ExitLocation handler, adjusted tests, investigate find_exit_location function and routng_engine * modified routing engine to harvest more exit nodes from Neihgborhood DB * implemented recursion for research neighborhood, adjusted tests, missing_countries moved to extract_exit_locations_from_message * fix research_neighborhood in routing_engine, new recursion call for research_neighborhood, recursion guts moved to outbound function * formatting and compiler complains resolved * test for db_countries setting on handle gossip * completed test for newly introduced exit node, added assertions, works * test for removing exit location of last node with particular country code from db_countries, TODO created * formatting * removing comments, introducing TODOs * unit test for init_db_countries(), removed duplicit test for handle gossip * added --show-countries for exit-location subcommand for testing purposes * first cherry pick from amoy commit b2a3ebf * added amoy network * formatting * amoy fixing * fixing routing engine for direction back in route, and fallback-routing condition * create prefix with capacity * back to previous version of routing_engine * fix dotgraph * allow dead code for unused service functions for new multinode integration test of exit_location * fix tilde for windows - cherry pick from master * formatting * remove unused imports * fix tilde in config-file path from master * replace neverssl.com for testingmcafeesites.com in multiple_streans_zero_hop * formatting * remove slash from url in test to pass * multinode test with processing functions * remove unused imports and questionmark * connect last node to germany network * interconnect_world_network public * remove networks before creation * add creation of integration_net to test * remove world network from last node * fix first node * network into docker run * add clone, debug, partialeq to NetworkPack * fix arguments count to do_docker_run * fix do_prepared_docker_run * solving temporary issue * solving dereference * solving free while use issue * resolve lifetime issues * resolve lifetime issues do_docker_run * remove network connect duplication * fix ip start index for nodes in loop * fix ip start index for nodes in loop cz * fix ip start in loop * fix ip start in loop de * multinode integration test with multiple real networks, selecting exit-location country, and retrieving web result * country_code_exit_location_routing - final stage with multiple networks * multinode test http_end_to_end_routing_test_with_exit_locationL * rebuilding exit-location command response * introduced UiSetExitLocationResponse and processing it in masq CLI, fixed exit-location handler and messages * multinode test and refactoring masq command request and response * resolving self-review: updated copyright to right year, removing obsolete TODOs, added test for constants, corrected output to stdout in exit_location_command * added assertions Response and udated Response processing exit-location-command tests * remove unnecessary Docker components for exit_location test, fixing self review commnets, new TODO in neighborhood/mod.rs * resolved handle_new_public_ip test, and half way to resolve handle_gossip test and update db_countries on DB change * test for init_db_countries in handle_agrs, condition for one-hop in handle_agrs Reply, remove target_country_opt * formatting * fix exit-location cmd assertion * multinode test from master * make_node_record do not add country if show_ip is false * ok_responose partialy from master for MockBlockchainClientServer * resolved last comments * remove data from dbip_country.rs - prepared for actions build * working on exit_location_command * addressing issues from review * continue addressing review comments * Added DBIP file generation * ci: improve GitHub Actions workflow - Replace s3-sync-action with AWS CLI, update credentials handling, improve cache invalidation * refactor: improve path resolution and code quality in generate_dbip * ci: remove unnecessary dependencies and update generate dbip step * chore: remove unused generate_dbip_country.sh script * docs: update download script message to reference cargo command * refactor: Improve generate_dbip.rs organization and efficiency * fix: Update dbip_country.rs paths in CI workflow to use temp directory * fix: Update verification pattern for generated dbip file * ci: revert platform changes to legacy * ci: update windows specific file move to use bash * ci: corrected verification step * more addressed comments from review * test for min_hops_change affects exit_countries and enrich_exit_countries in extract_exit_locations_from_message to be implemented in handle_config_change_msg * new machinery for min-hop affects exit location settings * handle_config_change_msg debugging * finalize min_hops_change_affects_db_countries test * rename test * refactoring neighborhood/mod.rs, moving AccessibleGossipRecord to gossip.rs, formatting * Room for an MMDB parser * Generating countries, rudimentary * parse() should produce a Countries object, instead of Vec<(String, String)>. Gonna do that. * fix db to dot grap test * Interim commit * addressing more comments from review * addressing minor changes from review * addressing review comments * resolving comments from review * Must make tests self-adapting * No MMDB yet, but tests pass * addressing comments from review * UI README updated (uncompleted), comment explaining country_undesirability in Metadata, addressing gomments from review * About to try bringing in an actual DBIP file * Happy-path test passing * formatting for ExitLovationSet * setup_reporter_shared_app and wait_for_masq_node_ends * CountryCodes to CountryBlocks, fix formatting of ExitLocationSet in tests, remove reference from supporting functions, already reference comming in * resolving unimplemented Copy trait in Process * new clap test providing_show_countries_with_other_argument_fails * format * MMDB parser seems to be finished * fallback routing test change * country codes to nodes names in tests * description to exit-location response * removing comments, adding country codes to node names in tests * Now MMDB parser isn't as wasteful * Removed dead data * Tests all pass * Merge mostly complete; lots of tests pass. Maybe all of them? * One test failing. Can't figure why. * All masq tests passing now * Multinode tests pass; one bit of code cleanup remains * All tests should be passing * Removed dead code * Little surgery on modules and imls * Updated the CSV country list from MMDB * Started GitHub Actions file for monthly downloads * conditions for failing download and gargo run, to not continue, file names in generate and commit * Going to try out the dbip_download workflow * Temporary on: --------- Co-authored-by: Vojtěch Parkán <[email protected]> Co-authored-by: Bert <[email protected]> Co-authored-by: FinsaasGH <[email protected]> Co-authored-by: FinsaasGH <[email protected]>
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.The text was updated successfully, but these errors were encountered: