{"action":"created","comment":{"url":"https://api.github.com/repos/codice/ddf/pulls/comments/53359906","id":53359906,"diff_hunk":"@@ -0,0 +1,68 @@\n+/**\n+ * Copyright (c) Codice Foundation\n+ * <p>\n+ * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser\n+ * General Public License as published by the Free Software Foundation, either version 3 of the\n+ * License, or any later version.\n+ * <p>\n+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\n+ * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ * Lesser General Public License for more details. A copy of the GNU Lesser General Public License\n+ * is distributed along with this program and can be found at\n+ * <http://www.gnu.org/licenses/lgpl.html>.\n+ */\n+package org.codice.ddf.security.handler.pki.migratable.impl;\n+\n+import java.nio.file.Path;\n+import java.util.ArrayList;\n+import java.util.Collection;\n+\n+import org.codice.ddf.migration.AbstractMigratable;\n+import org.codice.ddf.migration.MigrationException;\n+import org.codice.ddf.migration.MigrationMetadata;\n+import org.codice.ddf.migration.MigrationWarning;\n+import org.codice.ddf.migration.util.MigratableUtil;\n+import org.codice.ddf.security.handler.pki.CrlChecker;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+/**\n+ * This class exports the CRL if CRL checking is enabled (CRL property in etc/ws-security/server/encryption.properties\n+ * is not commented out).\n+ */\n+public class CrlMigratable extends AbstractMigratable {\n+\n+    private static final Logger LOGGER = LoggerFactory.getLogger(CrlMigratable.class);\n+\n+    private final CrlChecker crlChecker;\n+\n+    private final MigratableUtil migratableUtil;\n+\n+    public CrlMigratable(String description, boolean isOptional, CrlChecker crlChecker,\n+            MigratableUtil migratableUtil) {\n+        super(description, isOptional);\n+        this.crlChecker = crlChecker;\n+        this.migratableUtil = migratableUtil;\n+    }\n+\n+    @Override\n+    public MigrationMetadata export(Path exportPath) throws MigrationException {\n+        return exportCrlFile(exportPath);\n+    }\n+\n+    private MigrationMetadata exportCrlFile(Path exportDirectory) throws MigrationException {\n+        Collection<MigrationWarning> migrationWarnings = new ArrayList<>();\n+        LOGGER.debug(\"Attempting to export CRL...\");\n+        if (crlChecker.isCrlEnabled()) {\n+            migratableUtil.copyFile(crlChecker.getCrlPath(), exportDirectory, migrationWarnings);\n+        } else {","path":"platform/security/handler/security-handler-pki/src/main/java/org/codice/ddf/security/handler/pki/migratable/impl/CrlMigratable.java","position":58,"original_position":58,"commit_id":"ea3419ddddc7c0d0fe32039b96de6ba08af15bcc","original_commit_id":"ea3419ddddc7c0d0fe32039b96de6ba08af15bcc","user":{"login":"lessarderic","id":11377558,"avatar_url":"https://avatars.githubusercontent.com/u/11377558?v=3","gravatar_id":"","url":"https://api.github.com/users/lessarderic","html_url":"https://github.com/lessarderic","followers_url":"https://api.github.com/users/lessarderic/followers","following_url":"https://api.github.com/users/lessarderic/following{/other_user}","gists_url":"https://api.github.com/users/lessarderic/gists{/gist_id}","starred_url":"https://api.github.com/users/lessarderic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lessarderic/subscriptions","organizations_url":"https://api.github.com/users/lessarderic/orgs","repos_url":"https://api.github.com/users/lessarderic/repos","events_url":"https://api.github.com/users/lessarderic/events{/privacy}","received_events_url":"https://api.github.com/users/lessarderic/received_events","type":"User","site_admin":false},"body":"Should we return a warning if the CRL isn't enabled or just ignore?","created_at":"2016-02-18T18:39:06Z","updated_at":"2016-02-18T18:39:06Z","html_url":"https://github.com/codice/ddf/pull/544#discussion_r53359906","pull_request_url":"https://api.github.com/repos/codice/ddf/pulls/544","_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments/53359906"},"html":{"href":"https://github.com/codice/ddf/pull/544#discussion_r53359906"},"pull_request":{"href":"https://api.github.com/repos/codice/ddf/pulls/544"}}},"pull_request":{"url":"https://api.github.com/repos/codice/ddf/pulls/544","id":59566996,"html_url":"https://github.com/codice/ddf/pull/544","diff_url":"https://github.com/codice/ddf/pull/544.diff","patch_url":"https://github.com/codice/ddf/pull/544.patch","issue_url":"https://api.github.com/repos/codice/ddf/issues/544","number":544,"state":"open","locked":false,"title":"DDF-1871: Export fails when optional CRL property is not in encryptio…","user":{"login":"figliold","id":4838043,"avatar_url":"https://avatars.githubusercontent.com/u/4838043?v=3","gravatar_id":"","url":"https://api.github.com/users/figliold","html_url":"https://github.com/figliold","followers_url":"https://api.github.com/users/figliold/followers","following_url":"https://api.github.com/users/figliold/following{/other_user}","gists_url":"https://api.github.com/users/figliold/gists{/gist_id}","starred_url":"https://api.github.com/users/figliold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/figliold/subscriptions","organizations_url":"https://api.github.com/users/figliold/orgs","repos_url":"https://api.github.com/users/figliold/repos","events_url":"https://api.github.com/users/figliold/events{/privacy}","received_events_url":"https://api.github.com/users/figliold/received_events","type":"User","site_admin":false},"body":"@lessarderic @garrettfreibott @oconnormi @bantillo @Lambeaux ","created_at":"2016-02-16T22:43:03Z","updated_at":"2016-02-18T18:39:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a837ee12a8331a325b4e7c7bca1e001df99b698","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/codice/ddf/pulls/544/commits","review_comments_url":"https://api.github.com/repos/codice/ddf/pulls/544/comments","review_comment_url":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codice/ddf/issues/544/comments","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/ea3419ddddc7c0d0fe32039b96de6ba08af15bcc","head":{"label":"figliold:DDF-1871","ref":"DDF-1871","sha":"ea3419ddddc7c0d0fe32039b96de6ba08af15bcc","user":{"login":"figliold","id":4838043,"avatar_url":"https://avatars.githubusercontent.com/u/4838043?v=3","gravatar_id":"","url":"https://api.github.com/users/figliold","html_url":"https://github.com/figliold","followers_url":"https://api.github.com/users/figliold/followers","following_url":"https://api.github.com/users/figliold/following{/other_user}","gists_url":"https://api.github.com/users/figliold/gists{/gist_id}","starred_url":"https://api.github.com/users/figliold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/figliold/subscriptions","organizations_url":"https://api.github.com/users/figliold/orgs","repos_url":"https://api.github.com/users/figliold/repos","events_url":"https://api.github.com/users/figliold/events{/privacy}","received_events_url":"https://api.github.com/users/figliold/received_events","type":"User","site_admin":false},"repo":{"id":34751793,"name":"ddf","full_name":"figliold/ddf","owner":{"login":"figliold","id":4838043,"avatar_url":"https://avatars.githubusercontent.com/u/4838043?v=3","gravatar_id":"","url":"https://api.github.com/users/figliold","html_url":"https://github.com/figliold","followers_url":"https://api.github.com/users/figliold/followers","following_url":"https://api.github.com/users/figliold/following{/other_user}","gists_url":"https://api.github.com/users/figliold/gists{/gist_id}","starred_url":"https://api.github.com/users/figliold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/figliold/subscriptions","organizations_url":"https://api.github.com/users/figliold/orgs","repos_url":"https://api.github.com/users/figliold/repos","events_url":"https://api.github.com/users/figliold/events{/privacy}","received_events_url":"https://api.github.com/users/figliold/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/figliold/ddf","description":"The Distributed Data Framework - Distribution, SDK, and Test","fork":true,"url":"https://api.github.com/repos/figliold/ddf","forks_url":"https://api.github.com/repos/figliold/ddf/forks","keys_url":"https://api.github.com/repos/figliold/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/figliold/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/figliold/ddf/teams","hooks_url":"https://api.github.com/repos/figliold/ddf/hooks","issue_events_url":"https://api.github.com/repos/figliold/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/figliold/ddf/events","assignees_url":"https://api.github.com/repos/figliold/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/figliold/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/figliold/ddf/tags","blobs_url":"https://api.github.com/repos/figliold/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/figliold/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/figliold/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/figliold/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/figliold/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/figliold/ddf/languages","stargazers_url":"https://api.github.com/repos/figliold/ddf/stargazers","contributors_url":"https://api.github.com/repos/figliold/ddf/contributors","subscribers_url":"https://api.github.com/repos/figliold/ddf/subscribers","subscription_url":"https://api.github.com/repos/figliold/ddf/subscription","commits_url":"https://api.github.com/repos/figliold/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/figliold/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/figliold/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/figliold/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/figliold/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/figliold/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/figliold/ddf/merges","archive_url":"https://api.github.com/repos/figliold/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/figliold/ddf/downloads","issues_url":"https://api.github.com/repos/figliold/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/figliold/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/figliold/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/figliold/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/figliold/ddf/labels{/name}","releases_url":"https://api.github.com/repos/figliold/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/figliold/ddf/deployments","created_at":"2015-04-28T19:40:41Z","updated_at":"2015-04-28T19:40:42Z","pushed_at":"2016-02-16T22:33:24Z","git_url":"git://github.com/figliold/ddf.git","ssh_url":"git@github.com:figliold/ddf.git","clone_url":"https://github.com/figliold/ddf.git","svn_url":"https://github.com/figliold/ddf","homepage":"","size":128758,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"codice:master","ref":"master","sha":"ee5facbe8f74534eb51e3941a280f9140d534f5c","user":{"login":"codice","id":2386734,"avatar_url":"https://avatars.githubusercontent.com/u/2386734?v=3","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://avatars.githubusercontent.com/u/2386734?v=3","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":"The Distributed Data Framework - Federated Open Geospatial Consortium (OGC) filter powered metadata catalog with SAML Web SSO secured container","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":"2016-02-02T16:34:27Z","pushed_at":"2016-02-18T18:20:45Z","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":"","size":138621,"stargazers_count":32,"watchers_count":32,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":69,"mirror_url":null,"open_issues_count":18,"forks":69,"open_issues":18,"watchers":32,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/544"},"html":{"href":"https://github.com/codice/ddf/pull/544"},"issue":{"href":"https://api.github.com/repos/codice/ddf/issues/544"},"comments":{"href":"https://api.github.com/repos/codice/ddf/issues/544/comments"},"review_comments":{"href":"https://api.github.com/repos/codice/ddf/pulls/544/comments"},"review_comment":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codice/ddf/pulls/544/commits"},"statuses":{"href":"https://api.github.com/repos/codice/ddf/statuses/ea3419ddddc7c0d0fe32039b96de6ba08af15bcc"}}}}