api-manager
api-manager copied to clipboard
Database Inconsistency for APP_ATTRIBUTE in Oracle 19c
Description
When using Oracle 19c as the database for WSO2 API Manager, the getApplication response behaves differently from other databases. Specifically, Oracle 19c returns the application response without empty attributes, whereas other databases return empty attributes as "" (empty strings). This leads to inconsistency across different databases when the APP_ATTRIBUTE value is empty.
Expected Behaviour
The response from the gateway should include the Optional attribute with an empty value (e.g., ""), similar to other databases
Steps to Reproduce
- Add below properties to the
deployment.tomlfile
[apim.devportal]
enable_empty_values_in_application_attributes = true
[[apim.devportal.application_attributes]]
required=false
hidden=false
name="Optional attribute"
description="Description of Optional attribute"
[[apim.devportal.application_attributes]]
required=true
hidden=false
default="Default value of Required attribute 1"
name="Required attribute 1"
description="Description of Required attribute 1"
[[apim.devportal.application_attributes]]
required=true
hidden=false
default="Default value of Required attribute 2"
name="Required attribute 2"
description="Description of Required attribute 2"
- Start WSO2 API Manager with Oracle 19c as DB.
- Create an application using REST API call. Ex:
curl --location 'https://localhost:9443/api/am/devportal/v3/applications' \
--header 'Authorization: Bearer ac0b3273-b890-33f7-abdd-8712da41f6b1' \
--header 'Content-Type: application/json' \
--data '{
"name": "issueTestApp2",
"throttlingPolicy": "Unlimited",
"description": "Sample pizza shack application",
"tokenType": "JWT",
"status": "APPROVED",
"owner": "admin",
"hashEnabled": true
}'
- Retrieve the created Application from the gateway.
curl --location 'https://localhost:9443/api/am/gateway/v2/applications?uuid=5f9d943b-5ca6-4aec-a498-455532619e3c' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='
- When comparing the responses from steps 3 and 4:
- The created application response includes the Optional attribute with a null value.
- The response received from the gateway does not include the Optional attribute at all.
- Stop the API Manager server and start again with h2 DB.
- Follow the same 3,4 steps and compares the results recieved in both cases
Version
4.4.0
Environment Details (with versions)
Oracle 19C