{"id":25305706,"url":"https://github.com/philterd/phinder-pii-opensearch-plugin","last_synced_at":"2025-10-28T10:31:41.763Z","repository":{"id":272805280,"uuid":"888088137","full_name":"philterd/phinder-pii-opensearch-plugin","owner":"philterd","description":"An OpenSearch plugin to redact PII from search results.","archived":false,"fork":false,"pushed_at":"2025-09-30T12:26:49.000Z","size":120,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-30T14:40:31.225Z","etag":null,"topics":["opensearch","pii","plugin","redaction"],"latest_commit_sha":null,"homepage":"https://www.philterd.ai","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philterd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.txt","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-13T19:46:56.000Z","updated_at":"2025-09-30T12:25:07.000Z","dependencies_parsed_at":"2025-01-16T19:01:10.001Z","dependency_job_id":"c5beb080-8ac9-4222-996c-413a67daa3b7","html_url":"https://github.com/philterd/phinder-pii-opensearch-plugin","commit_stats":null,"previous_names":["philterd/phinder-pii-opensearch-plugin"],"tags_count":0,"template":false,"template_full_name":"opensearch-project/opensearch-plugin-template-java","purl":"pkg:github/philterd/phinder-pii-opensearch-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philterd%2Fphinder-pii-opensearch-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philterd%2Fphinder-pii-opensearch-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philterd%2Fphinder-pii-opensearch-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philterd%2Fphinder-pii-opensearch-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philterd","download_url":"https://codeload.github.com/philterd/phinder-pii-opensearch-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philterd%2Fphinder-pii-opensearch-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281424734,"owners_count":26499021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["opensearch","pii","plugin","redaction"],"created_at":"2025-02-13T09:53:44.930Z","updated_at":"2025-10-28T10:31:41.428Z","avatar_url":"https://github.com/philterd.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phinder PII Plugin for OpenSearch\n\nThis repository is a plugin for Amazon OpenSearch that redacts PII from search results. It uses the [phileas](https://github.com/philterd/phileas/) library for redaction.\n\nThere is also a [version](https://github.com/philterd/phinder-pii-elasticsearch-plugin) available for Elasticsearch.\n\n## Related Topics\n\nIf you are here, you may also be interested in:\n* [Field-level security in OpenSearch](https://opensearch.org/docs/latest/security/access-control/field-level-security/)\n* [Field masking in OpenSearch](https://opensearch.org/docs/latest/security/access-control/field-masking/)\n\n## Build and Install\n\nTo build the plugin:\n\n```\n./gradlew build\n```\n\nTo install the plugin:\n\n```\n/usr/share/opensearch/bin/opensearch-plugin install --batch file:/path/to/phinder-1.0.0-SNAPSHOT.zip\n```\n\n## Using Docker\n\nTo quickly run OpenSearch and the plugin for development or testing:\n\n```\ndocker compose build\ndocker compose up\n```\n\n## Usage\n\nTo use the plugin, create an index and then index some documents:\n\n```\ncurl -s -X PUT \"http://localhost:9200/sample_index\" -H 'Content-Type: application/json'\n```\n\n```\ncurl -s -X POST \"http://localhost:9200/sample_index/_doc\" -H 'Content-Type: application/json' -d'\n{\n  \"name\": \"Another Example\",\n  \"description\": \"My email is something@something.com ok!\"\n}'\n\ncurl -s -X POST \"http://localhost:9200/sample_index/_doc\" -H 'Content-Type: application/json' -d'\n{\n  \"name\": \"Yet Another Example\",\n  \"description\": \"No email addresses in this one\"\n}'\n\ncurl -s -X POST \"http://localhost:9200/sample_index/_doc\" -H 'Content-Type: application/json' -d'\n{\n  \"name\": \"A Third Example\",\n  \"description\": \"tom@tom.com\"\n}'\n\n```\n\nNext, do a search providing a filter policy and specifying which field you want to redact. (For more on policies, see Phileas' documentation on [Policies](https://philterd.github.io/phileas/filter_policies/filter_policies/).) In this example,\nwe are going to redact email addresses that appear in the `description` field:\n\n```\ncurl -s http://localhost:9200/sample_index/_search -H \"Content-Type: application/json\" -d'\n   {\n    \"ext\": {\n       \"phinder\": {\n          \"field\": \"description\",\n          \"policy\": \"{\\\"identifiers\\\": {\\\"emailAddress\\\":{\\\"emailAddressFilterStrategies\\\":[{\\\"strategy\\\":\\\"REDACT\\\",\\\"redactionFormat\\\":\\\"{{{REDACTED-%t}}}\\\"}]}}}\"\n        }\n     },\n     \"query\": {\n       \"match_all\": {}\n     }\n   }'\n```\n\nThe value of `field` in the request can be a single field, or a comma-separated list of fields to redact.\n\nIn the response, you will see the email address in the indexed document has been redacted:\n\n```\n{\n  \"took\": 2,\n  \"timed_out\": false,\n  \"_shards\": {\n    \"total\": 1,\n    \"successful\": 1,\n    \"skipped\": 0,\n    \"failed\": 0\n  },\n  \"hits\": {\n    \"total\": {\n      \"value\": 3,\n      \"relation\": \"eq\"\n    },\n    \"max_score\": 1,\n    \"hits\": [\n      {\n        \"_index\": \"sample_index\",\n        \"_id\": \"3sZ8cJQBeC9RICk83_tV\",\n        \"_score\": 1,\n        \"_source\": {\n          \"name\": \"Another Example\",\n          \"description\": \"My email is {{{REDACTED-email-address}}} ok!\"\n        }\n      },\n      {\n        \"_index\": \"sample_index\",\n        \"_id\": \"38Z8cJQBeC9RICk83_t1\",\n        \"_score\": 1,\n        \"_source\": {\n          \"name\": \"Yet Another Example\",\n          \"description\": \"No email addresses in this one\"\n        }\n      },\n      {\n        \"_index\": \"sample_index\",\n        \"_id\": \"4MZ8cJQBeC9RICk83_uI\",\n        \"_score\": 1,\n        \"_source\": {\n          \"name\": \"A Third Example\",\n          \"description\": \"{{{REDACTED-email-address}}}\"\n        }\n      }\n    ]\n  }\n}\n```\n\n## License\nThis code is licensed under the Apache 2.0 License. See [LICENSE.txt](LICENSE.txt).\n\n## Copyright\nCopyright 2025 Philterd, LLC. See [NOTICE](NOTICE.txt) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilterd%2Fphinder-pii-opensearch-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilterd%2Fphinder-pii-opensearch-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilterd%2Fphinder-pii-opensearch-plugin/lists"}