match-cli

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2021 License: Apache-2.0

README

match-cli

CircleCI Go Report Card GoDoc

An open-source Command Line Interface (CLI) utility written in Golang to allow any partner of an Optable Data Connectivity Node (DCN) user to perform secure matches with the DCN.

The match-cli tool enables anyone without access to an Optable DCN (external partners) to create and run a secure private set intersection (PSI) match with a DCN customer using the open-source match libary. Both parties will run the DHPSI protocol by default to ensure that no private data is leaked during the match.

Commands

The match-cli tool provides two subcommands. The partner subcommand connects to a DCN to match with and identifies the sender (match-cli operator) as an external partner. The match subcommand creates a match attempt and performs the secure intersection protocol. For each subcommand, use the --help flag to see detailed help messages and available options.

Note that it's not currently possible to be a secure match receiver using the match-cli utility. To receive secure matches you currently must have access to an Optable DCN.

Additional documentation is available here.

Example

To perform a secure PSI match with a DCN, you must first obtain an <invite-code> from the DCN's operator. The <partner-name> below is used to identify the DCN you are connecting with for subsequent match operations.

$ go run cmd/cli/main.go partner connect <partner-name> "<invite-code>"

After successful partnering, a match can be created. You can use <match-name> to identify and manage matches. A match_uuid will be displayed in a JSON-formatted output once the match is succefully created.

$ go run cmd/cli/main.go match create <partner-name> <match-name>
$ {"match_uuid":"UUID"}

Note that you are not required to save the <match_uuid>, you can run the following command to retrieve it later:

$ go run cmd/cli/main.go match list <partner-name>
$ {"match_uuid":"UUID","name":"<match-name>"}

You can then run a match with an input file that contains matchable identifiers as follows:

$ go run cmd/cli/main.go match run <partner-name> <match_uuid> <path-to-file>

Upon successful execution of the match, the number of the matching identifiers will be returned by the remote DCN in a JSON-formatted string.

{"time":"YYYY-MM-DDTHH:MM:SS.000000Z","id":"UUID","state":"completed","results":{"emails":<intersection-size>}}

Directories

Path Synopsis
api
v1
cmd
cli
internal
pkg
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL