api-manager
api-manager copied to clipboard
Authentication fails always for Optional - Optional scenario
Description
When Optional - Optional security is selected in Runtime configurations for an API, it always returns a response that authentication failed.
While further debugging the code it was identified that, although it authenticates both the MTLS and Application level security type, the boolean variable authenticate is still having its default value false because it only gets updated if there's an authenticator with isMandatory=true which is not happening in this particular flow.
Steps to Reproduce
- Create API from publisher portal
- provide endpoints to the api
- Go to run time configurations.
- select MTLS as optional
- select basic auth as optional
- save, deploy and publish the api
- invoke and api providing correct cert AND/OR basic auth credentials
Affected Component
APIM
Version
4.3.0
Environment Details (with versions)
No response
Relevant Log Output
No response
Related Issues
No response
Suggested Labels
No response
Update [2024-07-23 to 2024-07-25]
- The issue was reproduced and the fix was identified and is currently being implemented.
- New integration tests for the optional - optional scenario are also being created.