You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we try to create an API with a duplicate name in the same tenant domain, its API name validation won't handle it properly if the existing API is created with role-based Publisher Access Control. Therefore, the API creator could try to make an API, but it will end up below the UI error, and API creation will fail.
The expectation is that the API name should validate as already existing, but it won't enable the "create" button to create the API.
Steps to Reproduce
Create a tenant called "wso2.com": [email protected] is the admin tenant user
Create two tenant users under this "wso2.com" tenant as "[email protected]" and "[email protected]" via the management console by logging in as an admin tenant user.
Create a role called "myrole" and assign it to the "[email protected]" tenant user.
Next, try to create an API with an "ABC" name and a different context & version.
The expectation is that the "ABC" name should be validated as already existing. But it won't happen and allow us to create the API.
When clicking the "Create" button, it showed the below UI error as " Error::API Context does not exist". The reason is that when validating the API context, it detects there is no version for the given API name, provider and domain.
"SELECT API_VERSION FROM AM_API WHERE API_NAME = ? AND API_PROVIDER = ? AND ORGANIZATION = ?";
Hence, "isValidContext()[]" is false, and the above error is thrown.
Description
If we try to create an API with a duplicate name in the same tenant domain, its API name validation won't handle it properly if the existing API is created with role-based Publisher Access Control. Therefore, the API creator could try to make an API, but it will end up below the UI error, and API creation will fail.
The expectation is that the API name should validate as already existing, but it won't enable the "create" button to create the API.
Steps to Reproduce
Hence, "isValidContext()[]" is false, and the above error is thrown.
[1]. https://github.com/wso2-support/carbon-apimgt/blob/a469ed282ffecbc7f88f8ae66f60c28a47d1299f/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java#L6606
Affected Component
APIM
Version
4.2.0
Environment Details (with versions)
Latest update level: All in one APIM with multiple tenant domiansAll-in-one
Relevant Log Output
Related Issues
No response
Suggested Labels
No response
The text was updated successfully, but these errors were encountered: