Open AlexGilleran opened 5 years ago
How do you re-produce this bug? In multi-tenant mode, I enabled Ckan redirection:
gateway:
ckanRedirectionDomain: "ckan.data.gov.au"
ckanRedirectionPath: ""
enableCkanRedirection: true
and create a ckan connector job for tenant 2:
connectors:
config:
- image:
name: magda-ckan-connector
id: brisbane
name: Brisbane City Council
sourceUrl: https://www.data.brisbane.qld.gov.au/data/
pageSize: 100
tenantId: 2
After deployment, I can search and navigate without problem. What did I miss out?
~@mwu2018 It seems @AlexGilleran already includes fixes for this ticket in his PR here: https://github.com/magda-io/magda/pull/2342 You probably want to review that PR instead~
I was wrong. Only ticket created
Problem description
The CKAN redirection module in the gateway doesn't know how to figure out who the client is to put in a X-Magda-Tenant-Id header in its req to the gateway to look up matching datasets.
Currently it works for single tenant because it's hard-coded to id 0, but this means in multi tenant it will look up the wrong CKAN datasets.