{"action":"created","issue":{"url":"https://api.github.com/repos/cloudevents/spec/issues/155","repository_url":"https://api.github.com/repos/cloudevents/spec","labels_url":"https://api.github.com/repos/cloudevents/spec/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/cloudevents/spec/issues/155/comments","events_url":"https://api.github.com/repos/cloudevents/spec/issues/155/events","html_url":"https://github.com/cloudevents/spec/pull/155","id":313546588,"number":155,"title":"HTTP WebHook Specification","user":{"login":"clemensv","id":542030,"avatar_url":"https://avatars0.githubusercontent.com/u/542030?v=4","gravatar_id":"","url":"https://api.github.com/users/clemensv","html_url":"https://github.com/clemensv","followers_url":"https://api.github.com/users/clemensv/followers","following_url":"https://api.github.com/users/clemensv/following{/other_user}","gists_url":"https://api.github.com/users/clemensv/gists{/gist_id}","starred_url":"https://api.github.com/users/clemensv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clemensv/subscriptions","organizations_url":"https://api.github.com/users/clemensv/orgs","repos_url":"https://api.github.com/users/clemensv/repos","events_url":"https://api.github.com/users/clemensv/events{/privacy}","received_events_url":"https://api.github.com/users/clemensv/received_events","type":"User","site_admin":false},"labels":[{"id":927948896,"url":"https://api.github.com/repos/cloudevents/spec/labels/v1.0","name":"v1.0","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-04-12T01:45:36Z","updated_at":"2018-05-24T02:30:18Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/cloudevents/spec/pulls/155","html_url":"https://github.com/cloudevents/spec/pull/155","diff_url":"https://github.com/cloudevents/spec/pull/155.diff","patch_url":"https://github.com/cloudevents/spec/pull/155.patch"},"body":"This PR complements https://github.com/cloudevents/spec/pull/148 \r\n\r\nThis specification is a *generic* specification that formalizes delivery of notifications over HTTP, generally known as \"Web hooks\". The HTTP transport binding for Cloud Events composes with this specification for one-way event delivery.\r\n\r\nThe specification defines that notifications are delivered by HTTP POST, should use a token-based authNZ scheme either carried in the Authorization header or the query string (whereby \"token\" can be a simple key), and strongly suggests implementation of a pre-flight handshake (similar to [W3C CORS](www.w3.org/TR/cors/)) that protects a sender from being abused as a distributed denial of service machine gun.\r\n\r\nThis specification would probably be best proposed to IETF, but here's a good place to start with the draft.\r\n\r\nThis is not relevant to the 0.1 of the core spec, but is relevant to the interop group\r\n\r\nSigned-off-by: Clemens Vasters <clemensv@microsoft.com>"},"comment":{"url":"https://api.github.com/repos/cloudevents/spec/issues/comments/391567767","html_url":"https://github.com/cloudevents/spec/pull/155#issuecomment-391567767","issue_url":"https://api.github.com/repos/cloudevents/spec/issues/155","id":391567767,"user":{"login":"darrelmiller","id":447694,"avatar_url":"https://avatars2.githubusercontent.com/u/447694?v=4","gravatar_id":"","url":"https://api.github.com/users/darrelmiller","html_url":"https://github.com/darrelmiller","followers_url":"https://api.github.com/users/darrelmiller/followers","following_url":"https://api.github.com/users/darrelmiller/following{/other_user}","gists_url":"https://api.github.com/users/darrelmiller/gists{/gist_id}","starred_url":"https://api.github.com/users/darrelmiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darrelmiller/subscriptions","organizations_url":"https://api.github.com/users/darrelmiller/orgs","repos_url":"https://api.github.com/users/darrelmiller/repos","events_url":"https://api.github.com/users/darrelmiller/events{/privacy}","received_events_url":"https://api.github.com/users/darrelmiller/received_events","type":"User","site_admin":false},"created_at":"2018-05-24T02:30:18Z","updated_at":"2018-05-24T02:30:18Z","author_association":"NONE","body":"Here is a first stab at capturing the essence of the spec as an OpenAPI V3 document.  I have only done the auth header scenario just to stop it from getting any longer than it already is.\r\n\r\n```\r\nopenapi: 3.0.0\r\ninfo: \r\n  title: Example Web Hook based on Cloud Events spec\r\n  version: 1.0.0\r\npaths:\r\n  '/SubscribeToEvent':  \r\n    'post':    \r\n      summary: Subscription operation. (Not defined by specification)\r\n      parameters:\r\n        - name: deliveryTarget\r\n          in: query\r\n          schema:\r\n            type: string\r\n            format: uri\r\n      responses:\r\n        '201':\r\n          description: Successfully subscribed\r\n      callbacks:\r\n        exampleWithAuthHeader:\r\n          '$request.query.deliveryTarget':\r\n            'post':\r\n              description: Delivery Request\r\n              parameters:\r\n                - name: Origin\r\n                  in: header\r\n                  required: true\r\n              requestBody:\r\n                required: true\r\n              responses:\r\n                '200':\r\n                  description: Delivery Response with payload\r\n                '201':\r\n                  description: Created Notification with or without payload\r\n                '202':\r\n                  description: Accepted Notification Delivery\r\n                '410':\r\n                  description: Unsubscribe\r\n                '415':\r\n                  description: Delivery request payload media type not understood\r\n                '429':\r\n                  description: Too many requests\r\n                  headers:\r\n                    'retry-after':\r\n                      required: true\r\n                      schema:\r\n                        type: integer\r\n              security:\r\n                - callbackToken : []\r\n            'options':\r\n              description: Validation Request\r\n              parameters:\r\n                - name: WebHook-Request-Origin\r\n                  in: header\r\n                  required: true\r\n                - name: WebHook-Request-Callback\r\n                  in: header\r\n                  required: false\r\n                  schema:\r\n                    type: string\r\n                    format: uri\r\n                - name: WebHook-Request-Rate\r\n                  in: header\r\n                  required: false\r\n                  schema:\r\n                    type: integer\r\n                - name: Allow\r\n                  in: header\r\n                  schema:\r\n                    type: string\r\n                    default: POST\r\n              responses:\r\n                200:\r\n                  description: Validated\r\n                  headers:\r\n                    WebHook-Allowed-Origin:\r\n                      required: true\r\n                      schema:\r\n                        type: string\r\n                    WebHook-Allowed-Rate:\r\n                      required: false\r\n                      schema:\r\n                        type: integer                   \r\ncomponents:\r\n  securitySchemes:\r\n    'callbackToken':\r\n      type: http\r\n      scheme: bearer\r\n```"}}
{"actor":{"display_login":"darrelmiller"}}