Hello !
I’m evaluating the possibility to upgrade from Tyk 1.7 to 2.1. We are using tyk-gateway (no dashboard, no MongoDB, API definition in json file in the apps folder).
I read the following docs (https://tyk.io/docs/tyk-api-gateway-v1-9/upgrading-to-tyk-gateway-v1-9/ and https://tyk.io/docs/tyk-api-gateway-v-2-0/upgrading-to-tyk-v2-0/) and added “enable_jsvm”: true to my tyk.conf.
Tyk 2.1 is starting fine (no WARN or ERROR) but when I try to call the first API it doesn’t seem to check for the Authorization header:
with tyk 1.7:
curl -i 'http://localhost:8082/mobile/v1/devices'
HTTP/1.1 400 Bad Request
Content-Type: application/json
X-Generator: tyk.io
Date: Fri, 03 Jun 2016 08:16:25 GMT
Content-Length: 46
{
"error": "Authorization field missing"
}
with tyk 2.1:
curl -i 'http://localhost:9082/mobile/v1/devices'
HTTP/1.1 404 Not Found
Content-Language: fr
Content-Length: 1039
Content-Type: text/html;charset=utf-8
Date: Fri, 03 Jun 2016 08:16:31 GMT
Server: Apache-Coyote/1.1
X-Ratelimit-Limit: 0
X-Ratelimit-Remaining: 0
X-Ratelimit-Reset: 0
<!DOCTYPE html><html><head><title>Apache Tomcat/8.0.33 - Rapport d''erreur</title>
This is my API definition:
{
"name": "mobile_api_auth",
"api_id": "1",
"org_id": "",
"definition": {
"location": "header",
"key": "version"
},
"auth": {
"auth_header_name": "Authorization"
},
"version_data": {
"not_versioned": true,
"versions": {
"Default": {
"name": "Default",
"expires": "3000-01-02 15:04",
"use_extended_paths": true,
"extended_paths": {
"ignored": [],
"white_list": [
{"path":"/users/mobiles","method_actions":{"GET":{"action":"no_action"},"PUT":{"action":"no_action"}}},
{"path":"/users/devices","method_actions":{"GET":{"action":"no_action"}}},
{"path":"/users/scripts","method_actions":{"GET":{"action":"no_action"}}},
{"path":"/users/peripherals","method_actions":{"GET":{"action":"no_action"}}},
{"path":"/scripts","method_actions":{"POST":{"action":"no_action"},"PUT":{"action":"no_action"},"DELETE":{"action":"no_action"}}},
{"path":"/peripherals","method_actions":{"POST":{"action":"no_action"},"PUT":{"action":"no_action"},"DELETE":{"action":"no_action"}}},
{"path":"/data/push","method_actions":{"POST":{"action":"no_action"}}},
{"path":"/devices","method_actions":{"GET":{"action":"no_action"},"PUT":{"action":"no_action"}}},
{"path":"/authentication/refreshToken","method_actions":{"POST":{"action":"no_action"}}} ],
"black_list": []
}
}
}
},
"proxy": {
"listen_path": "/mobile/v1/",
"target_url": "http://med.dev.hub.docapost.io:8080/mediation-mobile/v1/",
"strip_listen_path": true
},
"custom_middleware": {
"post": [
{
"name": "getUserIdMiddleware",
"path": "/USR/newtprod/tyk/middleware/getUserIdCCUMiddleware.js",
"require_session": true
}
]
},
"enable_batch_request_support": false
}
Any idea of what can be wrong here ?
Thank you !