bcgov / gwa-api

Gateway Admin API for self-service of Kong configuration, ACL management and BCDC Catalog updates for API metadata
Apache License 2.0
6 stars 4 forks source link

Case sensitivity issue with gwa-api #97

Open Elson9 opened 1 year ago

Elson9 commented 1 year ago

This issue was brought to our attention in our rocket.chat channel: https://chat.developer.gov.bc.ca/channel/aps-ops?msg=vTnsP434K6uJSWhX9

Issue: After successfully running gwa status, when I run gwa pg --dry-run on this config file generated from an OpenAPI spec, I get the error "x Error [400] Unexpected undefined".

Our client had the GWA_NAMESPACE value capitalized in their .env file. The request succeeded when changed to all lower-case (ie: payment instead of Payment).

The authz check should have detected this, however the map_res_name_to_id function succeeded even though there was a case-sensitive difference.

Possible resolution might be including the exactName=true param to the query