Activity log for bug #1759663

Date Who What changed Old value New value Message
2018-03-28 19:39:59 Duc Truong bug added bug
2018-03-28 19:40:06 Duc Truong senlin: assignee Duc Truong (dtruong)
2018-03-29 01:31:55 Qiming Teng senlin: status New Triaged
2018-03-29 01:31:58 Qiming Teng senlin: importance Undecided High
2018-03-29 03:11:51 Duc Truong summary webhook trigger does work if V query parameter is not specified webhook trigger works even if V query parameter is not specified
2018-03-29 03:11:54 Duc Truong description According to API documentation, V query parameter for webhook trigger is optional (https://developer.openstack.org/api-ref/clustering/#id250): V (Optional) query string The webhook implementation version requested. However, when sending a webhook trigger request without the V query parameter, an error is returned: (openstack) cluster receiver create --cluster mycluster --action CLUSTER_SCALE_OUT --type webhook test-receiver +------------+------------------------------------------------------------------------------------------------------+ | Field | Value | +------------+------------------------------------------------------------------------------------------------------+ | action | CLUSTER_SCALE_OUT | | actor | { | | | "trust_id": "d27dfaa97525490b8407822820bbf4e0" | | | } | | channel | { | | | "alarm_url": "http://10.0.20.10:8778/v1/webhooks/30ef5c97-abab-4bfe-b73d-ca226ebf5f7d/trigger?V=1" | | | } | | cluster_id | 447efe11-7505-49bb-b264-534523464cdd | | created_at | 2018-03-28T16:15:20Z | | domain_id | None | | id | 30ef5c97-abab-4bfe-b73d-ca226ebf5f7d | | location | None | | name | test-receiver | | params | {} | | project_id | ce556a7d93c84471a0fc2154d3cbb592 | | type | webhook | | updated_at | None | | user_id | 1d7de07588dc4b08b478fd71e80ec8f2 | +------------+------------------------------------------------------------------------------------------------------+ stack@sandboxController:~> curl -X POST http://10.0.20.10:8778/v1/webhooks/30ef5c97-abab-4bfe-b73d-ca226ebf5f7d/trigger {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}} The request to the webhook trigger does succeed without the V query parameter if the user passes in a X-Auth-Token: stack@sandboxController:~> curl -X POST -H "X-Auth-Token: gAAAAABau9wcXjvwrJ1W-uFSK2T-wrbJSvmT--_6tGW_Dldv0W6-orLwZ5f-JWftvUjjxos2JCbwkxhXHv-2eSeuCAkKL9ps-sPZAaCEUX6gcO6sNH_c7-UAh5D1hgrrC2OkMYQiq9um1cb6wmW-ec-NE7XAXMy8e51lgXwPUVCqWo3pDXGjMbk" http://10.0.20.10:8778/v1/webhooks/30ef5c97-abab-4bfe-b73d-ca226ebf5f7d/trigger {"action": "fce862ed-aafc-4f3e-9bf5-30a2b14ede18"} According to API documentation, V query parameter for webhook trigger is optional (https://developer.openstack.org/api-ref/clustering/#id250): V (Optional) query string The webhook implementation version requested. However, as per discussion with Qiming, the V query parameter should be required: http://eavesdrop.openstack.org/irclogs/%23senlin/%23senlin.2018-03-29.log.html When sending a webhook trigger request with a X-Auth-Token header and without the V query parameter, the webhook trigger still succeeds: (openstack) cluster receiver create --cluster mycluster --action CLUSTER_SCALE_OUT --type webhook test-receiver +------------+------------------------------------------------------------------------------------------------------+ | Field | Value | +------------+------------------------------------------------------------------------------------------------------+ | action | CLUSTER_SCALE_OUT | | actor | { | | | "trust_id": "d27dfaa97525490b8407822820bbf4e0" | | | } | | channel | { | | | "alarm_url": "http://10.0.20.10:8778/v1/webhooks/30ef5c97-abab-4bfe-b73d-ca226ebf5f7d/trigger?V=1" | | | } | | cluster_id | 447efe11-7505-49bb-b264-534523464cdd | | created_at | 2018-03-28T16:15:20Z | | domain_id | None | | id | 30ef5c97-abab-4bfe-b73d-ca226ebf5f7d | | location | None | | name | test-receiver | | params | {} | | project_id | ce556a7d93c84471a0fc2154d3cbb592 | | type | webhook | | updated_at | None | | user_id | 1d7de07588dc4b08b478fd71e80ec8f2 | +------------+------------------------------------------------------------------------------------------------------+ stack@sandboxController:~> curl -X POST -H "X-Auth-Token: gAAAAABau9wcXjvwrJ1W-uFSK2T-wrbJSvmT--_6tGW_Dldv0W6-orLwZ5f-JWftvUjjxos2JCbwkxhXHv-2eSeuCAkKL9ps-sPZAaCEUX6gcO6sNH_c7-UAh5D1hgrrC2OkMYQiq9um1cb6wmW-ec-NE7XAXMy8e51lgXwPUVCqWo3pDXGjMbk" http://10.0.20.10:8778/v1/webhooks/30ef5c97-abab-4bfe-b73d-ca226ebf5f7d/trigger {"action": "fce862ed-aafc-4f3e-9bf5-30a2b14ede18"} The expected behavior is for the webhook trigger request to return an error when the V query parameter is not specified.
2018-03-29 18:43:58 OpenStack Infra senlin: status Triaged In Progress
2018-03-30 18:19:54 OpenStack Infra senlin: status In Progress Fix Released