{"action":"created","comment":{"url":"https://api.github.com/repos/codice/ddf/pulls/comments/44680225","id":44680225,"diff_hunk":"@@ -0,0 +1,77 @@\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 ddf.security.sts;\n+\n+import java.util.ArrayList;\n+import java.util.Collection;\n+import java.util.List;\n+import java.util.regex.Matcher;\n+import java.util.regex.Pattern;\n+import java.util.regex.PatternSyntaxException;\n+\n+import org.apache.cxf.sts.service.StaticService;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import ddf.security.SecurityConstants;\n+\n+/**\n+ * This class was created as a workaround for the cxf issue\n+ * https://issues.apache.org/jira/browse/CXF-6673\n+ * Remove this class and use StaticService once the issue has been addressed\n+ */\n+public class StsStaticService extends StaticService {\n+\n+    private static final Logger LOGGER = LoggerFactory.getLogger(SecurityConstants.SECURITY_LOGGER);\n+\n+    /**\n+     * a collection of compiled regular expression patterns\n+     */\n+    private final Collection<Pattern> endpointPatterns = new ArrayList<Pattern>();\n+\n+    /**\n+     * Return true if the supplied address corresponds to a known address for this service\n+     */\n+    public boolean isAddressInEndpoints(String address) {\n+        String addressToMatch = address;\n+        if (addressToMatch == null) {\n+            addressToMatch = \"\";\n+        }\n+        for (Pattern endpointPattern : endpointPatterns) {\n+            final Matcher matcher = endpointPattern.matcher(addressToMatch);\n+            if (matcher.matches()) {\n+                LOGGER.trace(\"Address \" + address + \" matches with pattern \" + endpointPattern);","path":"platform/security/sts/security-sts-server/src/main/java/ddf/security/sts/StsStaticService.java","position":54,"original_position":54,"commit_id":"a777617a909b6e61c6b4ec05be76bfd7e4c22a57","original_commit_id":"a777617a909b6e61c6b4ec05be76bfd7e4c22a57","user":{"login":"shaundmorris","id":4359166,"avatar_url":"https://avatars.githubusercontent.com/u/4359166?v=3","gravatar_id":"","url":"https://api.github.com/users/shaundmorris","html_url":"https://github.com/shaundmorris","followers_url":"https://api.github.com/users/shaundmorris/followers","following_url":"https://api.github.com/users/shaundmorris/following{/other_user}","gists_url":"https://api.github.com/users/shaundmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/shaundmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaundmorris/subscriptions","organizations_url":"https://api.github.com/users/shaundmorris/orgs","repos_url":"https://api.github.com/users/shaundmorris/repos","events_url":"https://api.github.com/users/shaundmorris/events{/privacy}","received_events_url":"https://api.github.com/users/shaundmorris/received_events","type":"User","site_admin":false},"body":"Should this be SLF4j parameterized logging?","created_at":"2015-11-12T16:39:28Z","updated_at":"2015-11-12T16:39:28Z","html_url":"https://github.com/codice/ddf/pull/333#discussion_r44680225","pull_request_url":"https://api.github.com/repos/codice/ddf/pulls/333","_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments/44680225"},"html":{"href":"https://github.com/codice/ddf/pull/333#discussion_r44680225"},"pull_request":{"href":"https://api.github.com/repos/codice/ddf/pulls/333"}}},"pull_request":{"url":"https://api.github.com/repos/codice/ddf/pulls/333","id":50450017,"html_url":"https://github.com/codice/ddf/pull/333","diff_url":"https://github.com/codice/ddf/pull/333.diff","patch_url":"https://github.com/codice/ddf/pull/333.patch","issue_url":"https://api.github.com/repos/codice/ddf/issues/333","number":333,"state":"open","locked":false,"title":"DDF-1649 STS Server Config token issue endpoint list should be configurable","user":{"login":"clockard","id":5248090,"avatar_url":"https://avatars.githubusercontent.com/u/5248090?v=3","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},"body":"@pklinef @djblue @vinamartin\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.png\" height=40 alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/codice/ddf/333)\n<!-- Reviewable:end -->\n","created_at":"2015-11-11T23:09:02Z","updated_at":"2015-11-12T16:39:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec848ac56ff414f0f926d948de6793a108fc000e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/codice/ddf/pulls/333/commits","review_comments_url":"https://api.github.com/repos/codice/ddf/pulls/333/comments","review_comment_url":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codice/ddf/issues/333/comments","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/a777617a909b6e61c6b4ec05be76bfd7e4c22a57","head":{"label":"clockard:DDF-1649","ref":"DDF-1649","sha":"a777617a909b6e61c6b4ec05be76bfd7e4c22a57","user":{"login":"clockard","id":5248090,"avatar_url":"https://avatars.githubusercontent.com/u/5248090?v=3","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},"repo":{"id":33900871,"name":"ddf","full_name":"clockard/ddf","owner":{"login":"clockard","id":5248090,"avatar_url":"https://avatars.githubusercontent.com/u/5248090?v=3","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},"private":false,"html_url":"https://github.com/clockard/ddf","description":"The Distributed Data Framework - Distribution, SDK, and Test","fork":true,"url":"https://api.github.com/repos/clockard/ddf","forks_url":"https://api.github.com/repos/clockard/ddf/forks","keys_url":"https://api.github.com/repos/clockard/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clockard/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clockard/ddf/teams","hooks_url":"https://api.github.com/repos/clockard/ddf/hooks","issue_events_url":"https://api.github.com/repos/clockard/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/clockard/ddf/events","assignees_url":"https://api.github.com/repos/clockard/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/clockard/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/clockard/ddf/tags","blobs_url":"https://api.github.com/repos/clockard/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clockard/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clockard/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/clockard/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clockard/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/clockard/ddf/languages","stargazers_url":"https://api.github.com/repos/clockard/ddf/stargazers","contributors_url":"https://api.github.com/repos/clockard/ddf/contributors","subscribers_url":"https://api.github.com/repos/clockard/ddf/subscribers","subscription_url":"https://api.github.com/repos/clockard/ddf/subscription","commits_url":"https://api.github.com/repos/clockard/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/clockard/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/clockard/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/clockard/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/clockard/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/clockard/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clockard/ddf/merges","archive_url":"https://api.github.com/repos/clockard/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clockard/ddf/downloads","issues_url":"https://api.github.com/repos/clockard/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/clockard/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/clockard/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/clockard/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clockard/ddf/labels{/name}","releases_url":"https://api.github.com/repos/clockard/ddf/releases{/id}","created_at":"2015-04-14T00:06:27Z","updated_at":"2015-04-14T00:06:28Z","pushed_at":"2015-11-12T00:49:38Z","git_url":"git://github.com/clockard/ddf.git","ssh_url":"git@github.com:clockard/ddf.git","clone_url":"https://github.com/clockard/ddf.git","svn_url":"https://github.com/clockard/ddf","homepage":"","size":121985,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"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":"6b338997d3575b30971b47a21637734fc93a8177","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 - Distribution, SDK, and Test","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}","created_at":"2013-12-13T20:38:28Z","updated_at":"2015-11-11T00:19:30Z","pushed_at":"2015-11-12T16:22:11Z","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":141507,"stargazers_count":24,"watchers_count":24,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":61,"mirror_url":null,"open_issues_count":15,"forks":61,"open_issues":15,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/333"},"html":{"href":"https://github.com/codice/ddf/pull/333"},"issue":{"href":"https://api.github.com/repos/codice/ddf/issues/333"},"comments":{"href":"https://api.github.com/repos/codice/ddf/issues/333/comments"},"review_comments":{"href":"https://api.github.com/repos/codice/ddf/pulls/333/comments"},"review_comment":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codice/ddf/pulls/333/commits"},"statuses":{"href":"https://api.github.com/repos/codice/ddf/statuses/a777617a909b6e61c6b4ec05be76bfd7e4c22a57"}}}}