Case sensitivity issue with gwa-api
- Dominant language
- Python
- Stars
- 5
- Forks
- 4
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 9
Description
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](https://github.com/bcgov/gwa-api/blob/dev/microservices/gatewayApi/auth/uma.py#L6) succeeded even though there was a case-sensitive difference.
Possible resolution might be including the [exactName=true param to the query](https://github.com/keycloak/keycloak-documentation/blob/main/authorization_services/topics/service-protection-resources-api-papi.adoc#querying-resources)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.