feat: add country/jurisdiction support to data broker database#9
Open
thomasnemer wants to merge 1 commit intomainfrom
Open
feat: add country/jurisdiction support to data broker database#9thomasnemer wants to merge 1 commit intomainfrom
thomasnemer wants to merge 1 commit intomainfrom
Conversation
Add geographic modeling so brokers can be associated with countries and filtered by the user's jurisdiction. This enables GDPR cross-border scenarios where European users need to find non-European brokers holding their data. - Add CountryCode type with ISO 3166-1 alpha-2 validation - Add country and data_countries fields to Broker model - Add DB migration 2 for new columns - Add home_country()/data_countries() to BrokerConnector trait - Implement country info for BeenVerified (US) - Add --country flag to `broker list` and `scan` commands - Display country info in `broker info` - Auto-filter scan connectors by user's country - Refactor list_brokers with dynamic filtering (category + country + data_country) - Update registry to propagate country fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--countryCLI flags tobroker listandscancommands for jurisdiction-based filteringChanges
CountryCodetype (src/broker/mod.rs): ISO 3166-1 alpha-2 validated country code with auto-uppercasingBrokerConnectortrait: newhome_country()anddata_countries()default methodsBeenVerified: implementshome_country → "US",data_countries → ["US"]countryanddata_countriesTEXT columns tobrokerslist_brokers: refactored with dynamic WHERE clause supporting category + country + data_country filters (LIKE-based comma-separated matching)--countryflag onbroker listandscan; country info displayed inbroker infodata_countriescountry/data_countriesfrom remote registry to local DBTest plan
cargo buildcompiles cleanlycargo test— all 21 tests pass (4 new country-specific tests)data-breaker broker list --country USfilters by home countrydata-breaker broker info beenverifiedshows country infodata-breaker scan --first-name John --last-name Doe --country US --state NYfilters connectors