{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/7888","repository_url":"https://api.github.com/repos/openshift/origin","labels_url":"https://api.github.com/repos/openshift/origin/issues/7888/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/7888/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/7888/events","html_url":"https://github.com/openshift/origin/pull/7888","id":139605823,"number":7888,"title":"make userAgentMatching take a set of required and deny regexes","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/openshift/origin/milestones/11","html_url":"https://github.com/openshift/origin/milestones/1.2.0","labels_url":"https://api.github.com/repos/openshift/origin/milestones/11/labels","id":1502487,"number":11,"title":"1.2.0","description":"","creator":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":88,"state":"open","created_at":"2016-01-12T16:06:32Z","updated_at":"2016-03-11T18:36:02Z","due_on":"2016-03-17T04:00:00Z","closed_at":null},"comments":6,"created_at":"2016-03-09T15:21:17Z","updated_at":"2016-03-11T20:25:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/7888","html_url":"https://github.com/openshift/origin/pull/7888","diff_url":"https://github.com/openshift/origin/pull/7888.diff","patch_url":"https://github.com/openshift/origin/pull/7888.patch"},"body":"The previous implementation didn't handle OSE clients to origin servers and vice-versa.  Since the config never escaped in a release, I've simply changed it to take a series of required user agent regexes and denied regexes where required is evaluated first and denied second.\r\n\r\nI had to have both because the golang regexp evaluator doesn't do negative look arounds and one requirement is to handle \"no skew allowed\" cases.\r\n\r\n@pweil- ptal\r\n@smarterclayton fyi\r\n\r\nexample config:\r\n```yaml\r\n  userAgentMatchingConfig:\r\n    defaultRejectionMessage: \"Your client is too old.  Go to https://example.org to update it.\"\r\n    deniedClients: \r\n    - regex: '\\w+/v(?:(?:1\\.1\\.1)|(?:1\\.0\\.1)) \\(.+/.+\\) openshift/\\w{7}'\r\n    - regex: '\\w+/v(?:1\\.1\\.3) \\(.+/.+\\) openshift/\\w{7}'\r\n    - regex: '\\w+/v1\\.2\\.0 \\(.+/.+\\) kubernetes/\\w{7}'\r\n    requiredClients: null\r\n```\r\n\r\n```yaml\r\n  userAgentMatchingConfig:\r\n    defaultRejectionMessage: \"Your client is too old.  Go to https://example.org to update it.\"\r\n    deniedClients: []\r\n    requiredClients: \r\n    - regex: '\\w+/v1\\.1\\.3 \\(.+/.+\\) openshift/\\w{7}'\r\n    - regex: '\\w+/v1\\.2\\.0 \\(.+/.+\\) kubernetes/\\w{7}'\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/195535231","html_url":"https://github.com/openshift/origin/pull/7888#issuecomment-195535231","issue_url":"https://api.github.com/repos/openshift/origin/issues/7888","id":195535231,"user":{"login":"openshift-bot","id":1779249,"avatar_url":"https://avatars.githubusercontent.com/u/1779249?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift-bot","html_url":"https://github.com/openshift-bot","followers_url":"https://api.github.com/users/openshift-bot/followers","following_url":"https://api.github.com/users/openshift-bot/following{/other_user}","gists_url":"https://api.github.com/users/openshift-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift-bot/subscriptions","organizations_url":"https://api.github.com/users/openshift-bot/orgs","repos_url":"https://api.github.com/users/openshift-bot/repos","events_url":"https://api.github.com/users/openshift-bot/events{/privacy}","received_events_url":"https://api.github.com/users/openshift-bot/received_events","type":"User","site_admin":false},"created_at":"2016-03-11T20:25:29Z","updated_at":"2016-03-11T20:25:29Z","body":"continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/2040/)"}}