{"action":"created","comment":{"url":"https://api.github.com/repos/codice/ddf/pulls/comments/155677712","pull_request_review_id":82031820,"id":155677712,"diff_hunk":"@@ -83,19 +97,33 @@\n    * @return a map keyed by entry names with the corresponding entry\n    * @throws IOException if an I/O error occurs while reading the file\n    */\n-  public static Map<String, ZipEntry> getEntriesFrom(Path path) throws IOException {\n+  public static Map<String, MigrationZipEntry> getEntriesFrom(Path path) throws IOException {\n     return AbstractMigrationSupport.getEntriesFrom(\n         new BufferedInputStream(new FileInputStream(path.toFile())));\n   }\n \n+  public static String decrypt(byte[] data, Path keyPath)\n+      throws IOException, DecoderException, NoSuchPaddingException, NoSuchAlgorithmException,\n+          InvalidKeyException, InvalidAlgorithmParameterException {\n+\n+    String keyData = new String(readFileToByteArray(keyPath.toFile()));","path":"platform/migration/platform-migration/src/test/java/org/codice/ddf/configuration/migration/AbstractMigrationSupport.java","position":56,"original_position":56,"commit_id":"8605154c906ad890861c2c76cd6f0b3149624f6a","original_commit_id":"8605154c906ad890861c2c76cd6f0b3149624f6a","user":{"login":"paouelle","id":10549555,"avatar_url":"https://avatars0.githubusercontent.com/u/10549555?v=4","gravatar_id":"","url":"https://api.github.com/users/paouelle","html_url":"https://github.com/paouelle","followers_url":"https://api.github.com/users/paouelle/followers","following_url":"https://api.github.com/users/paouelle/following{/other_user}","gists_url":"https://api.github.com/users/paouelle/gists{/gist_id}","starred_url":"https://api.github.com/users/paouelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paouelle/subscriptions","organizations_url":"https://api.github.com/users/paouelle/orgs","repos_url":"https://api.github.com/users/paouelle/repos","events_url":"https://api.github.com/users/paouelle/events{/privacy}","received_events_url":"https://api.github.com/users/paouelle/received_events","type":"User","site_admin":false},"body":"❗️ That would use the default charset. We should use UTF-8?","created_at":"2017-12-08T00:22:02Z","updated_at":"2017-12-08T00:24:29Z","html_url":"https://github.com/codice/ddf/pull/2486#discussion_r155677712","pull_request_url":"https://api.github.com/repos/codice/ddf/pulls/2486","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments/155677712"},"html":{"href":"https://github.com/codice/ddf/pull/2486#discussion_r155677712"},"pull_request":{"href":"https://api.github.com/repos/codice/ddf/pulls/2486"}}},"pull_request":{"url":"https://api.github.com/repos/codice/ddf/pulls/2486","id":146302286,"html_url":"https://github.com/codice/ddf/pull/2486","diff_url":"https://github.com/codice/ddf/pull/2486.diff","patch_url":"https://github.com/codice/ddf/pull/2486.patch","issue_url":"https://api.github.com/repos/codice/ddf/issues/2486","number":2486,"state":"open","locked":false,"title":"DDF-3376 Add encryption support to the migration framework","user":{"login":"oconnormi","id":3409759,"avatar_url":"https://avatars3.githubusercontent.com/u/3409759?v=4","gravatar_id":"","url":"https://api.github.com/users/oconnormi","html_url":"https://github.com/oconnormi","followers_url":"https://api.github.com/users/oconnormi/followers","following_url":"https://api.github.com/users/oconnormi/following{/other_user}","gists_url":"https://api.github.com/users/oconnormi/gists{/gist_id}","starred_url":"https://api.github.com/users/oconnormi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oconnormi/subscriptions","organizations_url":"https://api.github.com/users/oconnormi/orgs","repos_url":"https://api.github.com/users/oconnormi/repos","events_url":"https://api.github.com/users/oconnormi/events{/privacy}","received_events_url":"https://api.github.com/users/oconnormi/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\n\r\nEncrypts/Decrypts the export created by the migration framework\r\n\r\n#### Who is reviewing it? \r\n\r\n@paouelle @peterhuffer @emmberk @AzGoalie  \r\n\r\n#### Choose 2 committers to review/merge the PR. \r\n\r\n@clockard @coyotesqrl \r\n\r\n#### How should this be tested? (List steps with links to updated documentation)\r\n\r\n1. Install DDF\r\n2. run `migration:export`\r\n3. confirm that `<ddf_home>/exported/<ddf-export-file-name>.dar` and `<ddf_home>/exported/<ddf-export-file-name>.dar.key` and `<ddf_home>/exported/<ddf-export-file-name>.dar.sha256` exist\r\n4. manually unzip the file and verify that files have encrypted contents\r\n5. copy the zip and the key to a new system\r\n6. run `migration:import` and confirm success\r\n\r\n#### Any background context you want to provide?\r\n\r\nEach entry in the migration zip is individually encrypted. The zip can be unzipped with any zip utility, however the contents of each file will be unreadable unless decrypted using the correct key\r\n\r\n#### What are the relevant tickets?\r\n\r\n[DDF-3376](https://codice.atlassian.net/browse/DDF-3376)\r\n\r\n#### Review Comment Legend:\r\n- ✏️ (Pencil) This comment is a nitpick or style suggestion, no action required for approval. This comment should provide a suggestion either as an in line code snippet or a gist. \r\n- ❓ (Question Mark) This comment is to gain a clearer understanding of design or code choices, clarification is required but action may not be necessary for approval.\r\n- ❗ (Exclamation Mark) This comment is critical and requires clarification or action before approval.\r\n","created_at":"2017-10-12T20:08:20Z","updated_at":"2017-12-08T00:24:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1e1cc8f89fc7ef4c71829601b269e161f4c8590","assignee":{"login":"coyotesqrl","id":1469860,"avatar_url":"https://avatars2.githubusercontent.com/u/1469860?v=4","gravatar_id":"","url":"https://api.github.com/users/coyotesqrl","html_url":"https://github.com/coyotesqrl","followers_url":"https://api.github.com/users/coyotesqrl/followers","following_url":"https://api.github.com/users/coyotesqrl/following{/other_user}","gists_url":"https://api.github.com/users/coyotesqrl/gists{/gist_id}","starred_url":"https://api.github.com/users/coyotesqrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coyotesqrl/subscriptions","organizations_url":"https://api.github.com/users/coyotesqrl/orgs","repos_url":"https://api.github.com/users/coyotesqrl/repos","events_url":"https://api.github.com/users/coyotesqrl/events{/privacy}","received_events_url":"https://api.github.com/users/coyotesqrl/received_events","type":"User","site_admin":false},"assignees":[{"login":"coyotesqrl","id":1469860,"avatar_url":"https://avatars2.githubusercontent.com/u/1469860?v=4","gravatar_id":"","url":"https://api.github.com/users/coyotesqrl","html_url":"https://github.com/coyotesqrl","followers_url":"https://api.github.com/users/coyotesqrl/followers","following_url":"https://api.github.com/users/coyotesqrl/following{/other_user}","gists_url":"https://api.github.com/users/coyotesqrl/gists{/gist_id}","starred_url":"https://api.github.com/users/coyotesqrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coyotesqrl/subscriptions","organizations_url":"https://api.github.com/users/coyotesqrl/orgs","repos_url":"https://api.github.com/users/coyotesqrl/repos","events_url":"https://api.github.com/users/coyotesqrl/events{/privacy}","received_events_url":"https://api.github.com/users/coyotesqrl/received_events","type":"User","site_admin":false},{"login":"clockard","id":5248090,"avatar_url":"https://avatars1.githubusercontent.com/u/5248090?v=4","gravatar_id":"","url":"https://api.github.com/users/clockard","html_url":"https://github.com/clockard","followers_url":"https://api.github.com/users/clockard/followers","following_url":"https://api.github.com/users/clockard/following{/other_user}","gists_url":"https://api.github.com/users/clockard/gists{/gist_id}","starred_url":"https://api.github.com/users/clockard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clockard/subscriptions","organizations_url":"https://api.github.com/users/clockard/orgs","repos_url":"https://api.github.com/users/clockard/repos","events_url":"https://api.github.com/users/clockard/events{/privacy}","received_events_url":"https://api.github.com/users/clockard/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/codice/ddf/pulls/2486/commits","review_comments_url":"https://api.github.com/repos/codice/ddf/pulls/2486/comments","review_comment_url":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codice/ddf/issues/2486/comments","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/8605154c906ad890861c2c76cd6f0b3149624f6a","head":{"label":"oconnormi:DDF-3376","ref":"DDF-3376","sha":"8605154c906ad890861c2c76cd6f0b3149624f6a","user":{"login":"oconnormi","id":3409759,"avatar_url":"https://avatars3.githubusercontent.com/u/3409759?v=4","gravatar_id":"","url":"https://api.github.com/users/oconnormi","html_url":"https://github.com/oconnormi","followers_url":"https://api.github.com/users/oconnormi/followers","following_url":"https://api.github.com/users/oconnormi/following{/other_user}","gists_url":"https://api.github.com/users/oconnormi/gists{/gist_id}","starred_url":"https://api.github.com/users/oconnormi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oconnormi/subscriptions","organizations_url":"https://api.github.com/users/oconnormi/orgs","repos_url":"https://api.github.com/users/oconnormi/repos","events_url":"https://api.github.com/users/oconnormi/events{/privacy}","received_events_url":"https://api.github.com/users/oconnormi/received_events","type":"User","site_admin":false},"repo":{"id":40485585,"name":"ddf","full_name":"oconnormi/ddf","owner":{"login":"oconnormi","id":3409759,"avatar_url":"https://avatars3.githubusercontent.com/u/3409759?v=4","gravatar_id":"","url":"https://api.github.com/users/oconnormi","html_url":"https://github.com/oconnormi","followers_url":"https://api.github.com/users/oconnormi/followers","following_url":"https://api.github.com/users/oconnormi/following{/other_user}","gists_url":"https://api.github.com/users/oconnormi/gists{/gist_id}","starred_url":"https://api.github.com/users/oconnormi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oconnormi/subscriptions","organizations_url":"https://api.github.com/users/oconnormi/orgs","repos_url":"https://api.github.com/users/oconnormi/repos","events_url":"https://api.github.com/users/oconnormi/events{/privacy}","received_events_url":"https://api.github.com/users/oconnormi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oconnormi/ddf","description":"The Distributed Data Framework - Distribution, SDK, and Test","fork":true,"url":"https://api.github.com/repos/oconnormi/ddf","forks_url":"https://api.github.com/repos/oconnormi/ddf/forks","keys_url":"https://api.github.com/repos/oconnormi/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oconnormi/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oconnormi/ddf/teams","hooks_url":"https://api.github.com/repos/oconnormi/ddf/hooks","issue_events_url":"https://api.github.com/repos/oconnormi/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/oconnormi/ddf/events","assignees_url":"https://api.github.com/repos/oconnormi/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/oconnormi/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/oconnormi/ddf/tags","blobs_url":"https://api.github.com/repos/oconnormi/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oconnormi/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oconnormi/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/oconnormi/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oconnormi/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/oconnormi/ddf/languages","stargazers_url":"https://api.github.com/repos/oconnormi/ddf/stargazers","contributors_url":"https://api.github.com/repos/oconnormi/ddf/contributors","subscribers_url":"https://api.github.com/repos/oconnormi/ddf/subscribers","subscription_url":"https://api.github.com/repos/oconnormi/ddf/subscription","commits_url":"https://api.github.com/repos/oconnormi/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/oconnormi/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/oconnormi/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/oconnormi/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/oconnormi/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/oconnormi/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oconnormi/ddf/merges","archive_url":"https://api.github.com/repos/oconnormi/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oconnormi/ddf/downloads","issues_url":"https://api.github.com/repos/oconnormi/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/oconnormi/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/oconnormi/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/oconnormi/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oconnormi/ddf/labels{/name}","releases_url":"https://api.github.com/repos/oconnormi/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/oconnormi/ddf/deployments","created_at":"2015-08-10T14:00:20Z","updated_at":"2016-01-12T15:07:08Z","pushed_at":"2017-12-07T17:54:19Z","git_url":"git://github.com/oconnormi/ddf.git","ssh_url":"git@github.com:oconnormi/ddf.git","clone_url":"https://github.com/oconnormi/ddf.git","svn_url":"https://github.com/oconnormi/ddf","homepage":"","size":192223,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"codice:master","ref":"master","sha":"883f8b5b9fd9e7bf2ed6cb40e658b3c728d270bb","user":{"login":"codice","id":2386734,"avatar_url":"https://avatars2.githubusercontent.com/u/2386734?v=4","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"repo":{"id":15173563,"name":"ddf","full_name":"codice/ddf","owner":{"login":"codice","id":2386734,"avatar_url":"https://avatars2.githubusercontent.com/u/2386734?v=4","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codice/ddf","description":"DDF Distributed Data Framework - an open source, modular integration framework.","fork":false,"url":"https://api.github.com/repos/codice/ddf","forks_url":"https://api.github.com/repos/codice/ddf/forks","keys_url":"https://api.github.com/repos/codice/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codice/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codice/ddf/teams","hooks_url":"https://api.github.com/repos/codice/ddf/hooks","issue_events_url":"https://api.github.com/repos/codice/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/codice/ddf/events","assignees_url":"https://api.github.com/repos/codice/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/codice/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/codice/ddf/tags","blobs_url":"https://api.github.com/repos/codice/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codice/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codice/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/codice/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/codice/ddf/languages","stargazers_url":"https://api.github.com/repos/codice/ddf/stargazers","contributors_url":"https://api.github.com/repos/codice/ddf/contributors","subscribers_url":"https://api.github.com/repos/codice/ddf/subscribers","subscription_url":"https://api.github.com/repos/codice/ddf/subscription","commits_url":"https://api.github.com/repos/codice/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/codice/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/codice/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/codice/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/codice/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/codice/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codice/ddf/merges","archive_url":"https://api.github.com/repos/codice/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codice/ddf/downloads","issues_url":"https://api.github.com/repos/codice/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/codice/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/codice/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/codice/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codice/ddf/labels{/name}","releases_url":"https://api.github.com/repos/codice/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/codice/ddf/deployments","created_at":"2013-12-13T20:38:28Z","updated_at":"2017-11-14T22:40:26Z","pushed_at":"2017-12-08T00:20:31Z","git_url":"git://github.com/codice/ddf.git","ssh_url":"git@github.com:codice/ddf.git","clone_url":"https://github.com/codice/ddf.git","svn_url":"https://github.com/codice/ddf","homepage":"http://ddf.codice.org","size":366222,"stargazers_count":68,"watchers_count":68,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":121,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":121,"open_issues":39,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/2486"},"html":{"href":"https://github.com/codice/ddf/pull/2486"},"issue":{"href":"https://api.github.com/repos/codice/ddf/issues/2486"},"comments":{"href":"https://api.github.com/repos/codice/ddf/issues/2486/comments"},"review_comments":{"href":"https://api.github.com/repos/codice/ddf/pulls/2486/comments"},"review_comment":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codice/ddf/pulls/2486/commits"},"statuses":{"href":"https://api.github.com/repos/codice/ddf/statuses/8605154c906ad890861c2c76cd6f0b3149624f6a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"paouelle"}}