TYK Key Page is not getting loaded

Hi,

Good Day to you…
I am using TYK Dashboard and Gateway of version TYK 3.0.1.
Also, I am using TYK Pump of version 1.1.0

Recently, I had enabled SSO with the In-Built TIB component and 3rd party Identity provider in the TYK Dashboard.

But, after these changes done, only the Key page in the Dashboard is not coming as expected.
I have checked that the JSON Response of the Key page in the Dashboard, has been malformed.
Please find the JSON Response of the Key page in the Dashboard below:

{
“data”: {
“keys”: {
“keys”: [{
“key_id”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_ID1”,
“key_hash”: null,
“data”: null,
“allowance”: 1000,
“expires”: 0,
“date_created”: “2020-06-10T05:23:15.251212233Z”,
“tags”: ,
“apply_policies_data”: null,
“__typename”: null
}, “__typename”: null
}, {
“key_id”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_ID2”,
“key_hash”: null,
“data”: null,
“allowance”: 1000,
“expires”: 0,
“date_created”: “2020-04-01T13:03:00.591967273Z”,
“tags”: ,
“apply_policies_data”: null,
“__typename”: null
},
“__typename”: null
}, {
“key_id”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_ID3”,
“key_hash”: null,
“data”: null,
“allowance”: 1000,
“expires”: 0,
“date_created”: “2020-01-13T07:39:21.577627577Z”,
“tags”: ,
“apply_policies_data”: null,
“__typename”: null
},
“__typename”: null
}, {
“key_id”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_ID3”,
“key_hash”: null,
“data”: null,
“allowance”: 1000,
“expires”: 0,
“date_created”: “2020-01-09T18:49:09.846790928Z”,
“tags”: ,
“apply_policies_data”: null,
“__typename”: null
}, “__typename”: null
}, {
“key_id”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_ID4”,
“key_hash”: null,
“data”: null,
“allowance”: 1000,
“expires”: 0,
“date_created”: “2020-01-09T18:42:51.856064367Z”,
“tags”: ,
“apply_policies_data”: null,
“__typename”: null
}, “__typename”: null
}, {
“key_id”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_ID5”,
“key_hash”: null,
“data”: null,
“allowance”: 10,
“expires”: 0,
“date_created”: “2019-12-23T12:00:07.388035296Z”,
“tags”: ,
“apply_policies_data”: null,
“__typename”: null
}, “__typename”: null
}, {
“key_id”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_ID6”,
“key_hash”: null,
“data”: null,
“allowance”: 1000,
“expires”: 1558431672,
“date_created”: “0001-01-01T00:00:00Z”,
“tags”: ,
“apply_policies_data”: null,
“__typename”: null
}, “__typename”: null
}, {
“key_id”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_ID7”,
“key_hash”: null,
“data”: {
“alias”: “yyyyyyyyyyyyyyy”,
“allowance”: 1000,
“expires”: 0,
“date_created”: “0001-01-01T00:00:00Z”,
“tags”: ,
“apply_policies_data”: ,
“__typename”: null
},
“__typename”: null
}, {
“key_id”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_ID8”,
“key_hash”: null,
“data”: null,
“allowance”: 1000,
“expires”: 0,
“date_created”: “0001-01-01T00:00:00Z”,
“tags”: ,
“apply_policies_data”: null,
“__typename”: null
}, “__typename”: null
}, {
“key_id”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_ID9”,
“key_hash”: null,
“data”: null,
“allowance”: 1000,
“expires”: 1557421906,
“date_created”: “0001-01-01T00:00:00Z”,
“tags”: ,
“apply_policies_data”: null,
“__typename”: null
}, “__typename”: null
}
], “pages”: 12, “__typename”: “KeysDetailed”, “__typename”: “KeysDetailed”
}
}
}

Below are the log messages I am getting in TYK Dashboard log:

{“log”:“time="Oct 20 06:18:09" level=info msg=error dispatchErr="response code from dashboard was not 200" prefix="TYK_API" retCode=403\n”,“stream”:“stderr”,“time”:“2020-10-20T06:18:09.850628337Z”}
{“log”:“time="Oct 20 06:18:09" level=warning msg="SSO regular dashboard API failed, trying with Admin API" prefix="TYK_API"\n”,“stream”:“stderr”,“time”:“2020-10-20T06:18:09.85065673Z”}
{“log”:“time="Oct 20 06:18:09" level=info msg="Single Sign-On nonce created successfully via Admin API!" prefix="TYK_API"\n”,“stream”:“stderr”,“time”:“2020-10-20T06:18:09.921421395Z”}

{“log”:"time="Oct 20 06:18:10" level=info msg="Created a new dashboard user. Logging using dashboard user.

{“log”:“time="Oct 20 06:20:22" level=error msg=HttpJsonDataSource.Resolve.ioutil.ReadAll error="read tcp 127.0.0.1:37462-\u003e127.0.0.1:3000: read: connection reset by peer"\n”,“stream”:“stderr”,“time”:“2020-10-20T06:20:22.060284772Z”}
{“log”:“time="Oct 20 06:20:22" level=error msg=HttpJsonDataSource.Resolve.ioutil.ReadAll error="read tcp 127.0.0.1:37464-\u003e127.0.0.1:3000: read: connection reset by peer"\n”,“stream”:“stderr”,“time”:“2020-10-20T06:20:22.06277606Z”}

Below is the tyk_analytics.conf file, I am using:

{
“listen_port”: 3000,
“notifications_listen_port”: 5000,
“tyk_api_config”: {
“Host”: “https://gatewayhost.tyk.com”,
“Port”: “443”,
“Secret”: “xxxxxx”
},
“mongo_url”: “mongodb://host_endpoint”,
“page_size”: 10,
“admin_secret”: “xxxxxxx”,
“shared_node_secret”: “xxxxxxx”,
“redis_port”: xxxx,
“redis_host”: “redis_host_endpoint”,
“redis_password”: “xxxxxxxx”,
“enable_cluster”: false,
“force_api_defaults”: false,
“notify_on_change”: true,
“license_key”: “xxxxxxxxxxx”,
“redis_database”: xxxxx,
“redis_hosts”: null,
“hash_keys”: false,
“hide_listen_path”: false,
“sentry_code”: “”,
“sentry_js_code”: “”,
“use_sentry”: false,
“enable_master_keys”: false,
“enable_duplicate_slugs”: true,
“show_org_id”: true,
“host_config”: {
“override_hostname”: “”,
“disable_org_slug_prefix”: true,
“enable_host_names”: false,
“hostname”: “”,
“portal_domains”: {},
“portal_root_path”: “/portal”
},
“http_server_options”: {
“use_ssl”: false,
“certificates”: [{
“domain_name”: “”,
“cert_file”: “”,
“key_file”: “”
}
],
“min_version”: 0
},
“ui”: {
“login_page”: {},
“nav”: {},
“uptime”: {},
“portal_section”: null,
“designer”: {},
“dont_show_admin_sockets”: false,
“dont_allow_license_management”: false,
“dont_allow_license_management_view”: false
},
“home_dir”: “/opt/dashboard_path”,
“identity_broker”: {
“enabled”: true,
“host”: {
“connection_string”: “”,
“secret”: “”
}
},
“sso_custom_login_url”: “https://dashboardhost.tyk.com/auth/yyyyyyyyyyyyyy/openid-connect”,
“security”: {
“login_failure_username_limit”: 0,
“login_failure_ip_limit”: 0,
“login_failure_expiration”: 900,
“login_disallow_forward_proxy”: false,
“audit_log_path”: “audit_log_file_path”,
“allow_admin_reset_password”: false
},
“audit”: {
“enabled”: true,
“format”: “json”,
“path”: “audit_log_file_path”,
“detailed_recording”: true
},
“enable_multi_org_users”: true,
“tagging_options”: {
“tag_all_apis_by_org”: false
},
“log_level”: “debug”
}

Below is the tyk.conf file I am using:

{
“listen_port”: 8080,
“secret”: “xxxxxxx”,
“node_secret”: “xxxxxxx”,
“template_path”: “/opt/gateway_path/templates”,
“middleware_path”: “/opt/gateway_path/middleware”,
“use_db_app_configs”: true,
“db_app_conf_options”: {
“connection_string”: “https://dashboardhost.tyk.com”,
“node_is_segmented”: false,
“tags”: [“gateway test tyk”]
},
“app_path”: “/opt/gateway_path/apps/”,
“storage”: {
“type”: “redis”,
“host”: “redis_host_endpoint”,
“port”: xxxx,
“username”: “xxxxx”,
“password”: “xxxxx”,
“database”: xxxxx,
“optimisation_max_idle”: 2000,
“optimisation_max_active”: 4000
},
“oauth_token_expired_retain_period”: 300,
“enable_analytics”: true,
“analytics_config”: {
“enable_detailed_recording”: true
},
“health_check”: {
“enable_health_checks”: false,
“health_check_value_timeouts”: 60
},
“uptime_tests”: {
“disable”: true
},
“optimisations_use_async_session_write”: true,
“enable_non_transactional_rate_limiter”: true,
“enable_sentinel_rate_limiter”: false,
“allow_master_keys”: false,
“policies”: {
“policy_source”: “service”,
“policy_connection_string”: “https://dashboardhost.tyk.com
},
“hash_keys”: false,
“close_connections”: false,
“allow_insecure_configs”: true,
“coprocess_options”: {
“enable_coprocess”: false,
“coprocess_grpc_server”: “”
},
“enable_bundle_downloader”: true,
“bundle_base_url”: “”,
“global_session_lifetime”: 100,
“force_global_session_lifetime”: false,
“max_idle_connections_per_host”: 500,
“enable_custom_domains”: true,
“http_server_options”: {
“enable_websockets”: true,
“use_ssl”: true,
“ssl_ciphers”: [
“xxxxxxxxx”
],
“certificates”: [{
“domain_name”: “https://gatewayhost2.tyk.com”,
“cert_file”: “/opt/gateway_path/certificate2.pem”,
“key_file”: “/opt/gateway_path/key2.pem”
}, {
“domain_name”: “https://gatewayhost.tyk.com”,
“cert_file”: “/opt/gateway_path/certificate.pem”,
“key_file”: “/opt/gateway_path/key.pem”
}
],
“min_version”: 771,
“flush_interval”: 1,
“skip_target_path_escaping”: true
},
“enable_key_logging”: true,
“log_level”: “debug”
}

Even I disable the SSO configuration in the TYK Dashboard, still the issue with the Key page exists.
I am not sure whether the issue with TYK Dashboard Key page is at all related to the SSO Configuration done in the Dashboard or not.

Can you please help to understand the root-cause of the issue and how it can be resolved ?

Thanks,
Meghna Bhattacharya

Hi,

Can you please help me to troubleshoot the above mentioned issue ?

Thanks,
Meghna Bhattacharya

Hi @meghna_bhattacharya - perhaps I can help here. You said that you just enabled SSO with TIB, is this the first time you enabled that, or has this previously been working for you? It will help to troubleshoot this with that info.

Thanks

Hi @James,

Good Day to you…
I have enabled the SSO using the Internal TIB, for the first time in the TYK Dashboard.
As per my further analysis, in the Key page, we have few keys, which doesn’t have any policy attached with that key.

If I attach a policy with each of the Keys in the Key Page, then that particular Key Page is visible, after logging into the TYK Dashboard, using SSO.

Can you please help to troubleshoot the issue further ?

Thanks,
Meghna Bhattacharya

Hi @meghna_bhattacharya - I can see you’ve opened a support ticket on this with our team, we’ll follow-up there. Thanks

Hi @James,

Sure, I will wait for the response back from the TYK Team, in the support ticket raised.

Thanks,
Meghna Bhattacharya