-
Bug
-
Resolution: Done
-
Major
-
None
-
None
After inventory and alerts imlemented the accounts+KC, the JavaScript tests in hawkular/ui-services module stopped working. They are not run by Travis, so it's not so obvious.
Adding the auth header doesn't help https://github.com/hawkular/hawkular-ui-services/blob/b9268669a4d919073ed58c18f278b4d82b062327/src/rest/hawkRest-inventory-provider.spec.rest.js#L56
I haven't touched the code for a month, but iirc, the issue was with angular/karma/jasmine/whatever overriding the `Origin` header with * (or http://localhost:9876, I can't remember)
The problem is that for other Origin than `http://127.0.0.1:8080`, it returns 403 Forbidden
The issue can be simulated by following curl:
(1) curl -iv -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Origin: http://127.0.0.1:8080" -H "Authorization: Basic amRvZTpwYXNzd29yZA==" http://127.0.0.1:8080/hawkular/inventory/tenant | less
(2) curl -iv -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Origin: *" -H "Authorization: Basic amRvZTpwYXNzd29yZA==" http://127.0.0.1:8080/hawkular/inventory/tenant | less
(1): http 200
(2): http 403