{"action":"created","issue":{"url":"https://api.github.com/repos/gravitee-io/issues/issues/1468","repository_url":"https://api.github.com/repos/gravitee-io/issues","labels_url":"https://api.github.com/repos/gravitee-io/issues/issues/1468/labels{/name}","comments_url":"https://api.github.com/repos/gravitee-io/issues/issues/1468/comments","events_url":"https://api.github.com/repos/gravitee-io/issues/issues/1468/events","html_url":"https://github.com/gravitee-io/issues/issues/1468","id":357184270,"node_id":"MDU6SXNzdWUzNTcxODQyNzA=","number":1468,"title":"[gateway] Request not logged when X-Forwarded-For header contains host with port number","user":{"login":"sahlex","id":1122279,"node_id":"MDQ6VXNlcjExMjIyNzk=","avatar_url":"https://avatars2.githubusercontent.com/u/1122279?v=4","gravatar_id":"","url":"https://api.github.com/users/sahlex","html_url":"https://github.com/sahlex","followers_url":"https://api.github.com/users/sahlex/followers","following_url":"https://api.github.com/users/sahlex/following{/other_user}","gists_url":"https://api.github.com/users/sahlex/gists{/gist_id}","starred_url":"https://api.github.com/users/sahlex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahlex/subscriptions","organizations_url":"https://api.github.com/users/sahlex/orgs","repos_url":"https://api.github.com/users/sahlex/repos","events_url":"https://api.github.com/users/sahlex/events{/privacy}","received_events_url":"https://api.github.com/users/sahlex/received_events","type":"User","site_admin":false},"labels":[{"id":394295018,"node_id":"MDU6TGFiZWwzOTQyOTUwMTg=","url":"https://api.github.com/repos/gravitee-io/issues/labels/status:%20in%20review","name":"status: in review","color":"0052cc","default":false},{"id":394290778,"node_id":"MDU6TGFiZWwzOTQyOTA3Nzg=","url":"https://api.github.com/repos/gravitee-io/issues/labels/type:%20bug","name":"type: bug","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":{"login":"brasseld","id":133094,"node_id":"MDQ6VXNlcjEzMzA5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/133094?v=4","gravatar_id":"","url":"https://api.github.com/users/brasseld","html_url":"https://github.com/brasseld","followers_url":"https://api.github.com/users/brasseld/followers","following_url":"https://api.github.com/users/brasseld/following{/other_user}","gists_url":"https://api.github.com/users/brasseld/gists{/gist_id}","starred_url":"https://api.github.com/users/brasseld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brasseld/subscriptions","organizations_url":"https://api.github.com/users/brasseld/orgs","repos_url":"https://api.github.com/users/brasseld/repos","events_url":"https://api.github.com/users/brasseld/events{/privacy}","received_events_url":"https://api.github.com/users/brasseld/received_events","type":"User","site_admin":false},"assignees":[{"login":"brasseld","id":133094,"node_id":"MDQ6VXNlcjEzMzA5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/133094?v=4","gravatar_id":"","url":"https://api.github.com/users/brasseld","html_url":"https://github.com/brasseld","followers_url":"https://api.github.com/users/brasseld/followers","following_url":"https://api.github.com/users/brasseld/following{/other_user}","gists_url":"https://api.github.com/users/brasseld/gists{/gist_id}","starred_url":"https://api.github.com/users/brasseld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brasseld/subscriptions","organizations_url":"https://api.github.com/users/brasseld/orgs","repos_url":"https://api.github.com/users/brasseld/repos","events_url":"https://api.github.com/users/brasseld/events{/privacy}","received_events_url":"https://api.github.com/users/brasseld/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/gravitee-io/issues/milestones/73","html_url":"https://github.com/gravitee-io/issues/milestone/73","labels_url":"https://api.github.com/repos/gravitee-io/issues/milestones/73/labels","id":3486170,"node_id":"MDk6TWlsZXN0b25lMzQ4NjE3MA==","number":73,"title":"1.19.0","description":"","creator":{"login":"NicolasGeraud","id":1028285,"node_id":"MDQ6VXNlcjEwMjgyODU=","avatar_url":"https://avatars0.githubusercontent.com/u/1028285?v=4","gravatar_id":"","url":"https://api.github.com/users/NicolasGeraud","html_url":"https://github.com/NicolasGeraud","followers_url":"https://api.github.com/users/NicolasGeraud/followers","following_url":"https://api.github.com/users/NicolasGeraud/following{/other_user}","gists_url":"https://api.github.com/users/NicolasGeraud/gists{/gist_id}","starred_url":"https://api.github.com/users/NicolasGeraud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicolasGeraud/subscriptions","organizations_url":"https://api.github.com/users/NicolasGeraud/orgs","repos_url":"https://api.github.com/users/NicolasGeraud/repos","events_url":"https://api.github.com/users/NicolasGeraud/events{/privacy}","received_events_url":"https://api.github.com/users/NicolasGeraud/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":25,"state":"open","created_at":"2018-07-10T14:55:50Z","updated_at":"2018-09-06T07:29:13Z","due_on":"2018-09-11T07:00:00Z","closed_at":null},"comments":1,"created_at":"2018-09-05T11:25:18Z","updated_at":"2018-09-06T07:54:27Z","closed_at":null,"author_association":"NONE","body":"We noticed recently that a request sent through an azure web appliction gateway does not appear in the logs. However, when we send an identical request directly to the gateway directly it is logged perfectly. So it seems that the app gateway is adding something to the request that causes the behavior. \r\n\r\nFurther investigations turned out that azure's application gateway tends to deliver not only the client's IP address but a combination of IP:PORT in the X-Forwarded-For (XFF) header which is not the case when we send the request to the gateway directly using postman. Gravitee's implementation seems to have trouble using this as no logs appear in elasticsearch when a request comes in through an azure app gateway.\r\n\r\nThe Headers which are added by the gateway are:\r\n\r\n      Max-Forwards: 10\r\n      X-FORWARDED-PROTO: https\r\n      X-FORWARDED-PORT: 443\r\n      X-ORIGINAL-HOST: some.host.name\r\n      SEC-WEBSOCKET-EXTENSIONS:\r\n      X-Original-URL: /Test/Coupons\r\n      X-Forwarded-For: 1.2.3.4:51008\r\n      X-ARR-SSL: (removed)\r\n      X-ARR-LOG-ID: b5eda9fb-b48a-45a3-818d-63d35ad1d1d6\r\n\r\nHowever, the request is processed nevertheless.\r\n\r\n### Expected Behavior\r\nA message should be logged in elasticsearch when sent through azure's web application gateway.\r\n\r\n### Current Behavior\r\nA message is not logged in elasticsearch when sent through azure's web application gateway. No exception is thrown in the gravitee logback system.\r\n\r\n### Possible Solution\r\nGravitee should be able to deal with the format IP:PORT for components in XFF header.\r\n\r\n### Steps to Reproduce (for bugs)\r\n1. pick any API on gravitee and set proxy log on for client and proxy\r\n2. add an X-Forwarded-For header with dummy value (like 1.2.3.4:56000) to the request (did it with postman)\r\n3. verify that no message is logged\r\n\r\n### Context\r\nGravitee behind an azure application gateway.\r\n\r\n### Your Environment\r\nGravitee 1.18.1 on docker 18.06 on CentOS 7.4\r\n"},"comment":{"url":"https://api.github.com/repos/gravitee-io/issues/issues/comments/419000489","html_url":"https://github.com/gravitee-io/issues/issues/1468#issuecomment-419000489","issue_url":"https://api.github.com/repos/gravitee-io/issues/issues/1468","id":419000489,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTAwMDQ4OQ==","user":{"login":"sahlex","id":1122279,"node_id":"MDQ6VXNlcjExMjIyNzk=","avatar_url":"https://avatars2.githubusercontent.com/u/1122279?v=4","gravatar_id":"","url":"https://api.github.com/users/sahlex","html_url":"https://github.com/sahlex","followers_url":"https://api.github.com/users/sahlex/followers","following_url":"https://api.github.com/users/sahlex/following{/other_user}","gists_url":"https://api.github.com/users/sahlex/gists{/gist_id}","starred_url":"https://api.github.com/users/sahlex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahlex/subscriptions","organizations_url":"https://api.github.com/users/sahlex/orgs","repos_url":"https://api.github.com/users/sahlex/repos","events_url":"https://api.github.com/users/sahlex/events{/privacy}","received_events_url":"https://api.github.com/users/sahlex/received_events","type":"User","site_admin":false},"created_at":"2018-09-06T07:54:27Z","updated_at":"2018-09-06T07:54:27Z","author_association":"NONE","body":"@brasseld, that's ablolutely correct. XFF is a de-facto standard that was introduced by squid proxy. So it's not standardized. Unfortunately, Microsoft uses it nevertheless the way they do ;-) (Wouldn't be the first non-standard thing for them). RFC7239 mentions it for a **Forwarded** header and does not seem to be applicable for XFF.\r\n\r\nNevertheless, it wouldn't hurt to make gravitee able to cope with it!\r\n\r\nBest regards,\r\nAlexander"}}
{"actor":{"display_login":"sahlex"}}