wso2 / carbon-apimgt

Apache License 2.0
166 stars 626 forks source link

Enables transport layer security and application layer security optional #12293

Closed Kirishikesan closed 7 months ago

Kirishikesan commented 7 months ago

Overview

OAuth and the Mutual SSL cannot be optional at same time for the authentication. In api manager, one of the authentication mechanism has to be mandatory and cannot select both as optional. This PR enables both to be set as optional under the following conditions

  1. At least one authentication mechanism should pass
  2. Authentication will happen in the order of the priority of authenticators
  3. If an authentication of a high priority authentication fails due to "INVALID CREDENTIALS", the authentication fails
  4. If an authentication of a high priority authentication passes, authentication passes.

Resolves

https://github.com/wso2/api-manager/issues/2352

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 48.27586% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 47.55%. Comparing base (23a6bce) to head (8c06629). Report is 19 commits behind head on master.

Files Patch % Lines
...a/org/wso2/carbon/apimgt/impl/APIProviderImpl.java 50.00% 4 Missing and 3 partials :warning:
...ay/handlers/security/APIAuthenticationHandler.java 53.84% 4 Missing and 2 partials :warning:
...security/authenticator/MutualSSLAuthenticator.java 0.00% 0 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #12293 +/- ## ============================================ + Coverage 40.32% 47.55% +7.23% - Complexity 3131 4130 +999 ============================================ Files 1838 1839 +1 Lines 135618 135672 +54 Branches 19588 19602 +14 ============================================ + Hits 54682 64517 +9835 + Misses 73972 63583 -10389 - Partials 6964 7572 +608 ``` | [Flag](https://app.codecov.io/gh/wso2/carbon-apimgt/pull/12293/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wso2) | Coverage Δ | | |---|---|---| | [integration_tests](https://app.codecov.io/gh/wso2/carbon-apimgt/pull/12293/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wso2) | `42.28% <48.27%> (+9.97%)` | :arrow_up: | | [unit_tests](https://app.codecov.io/gh/wso2/carbon-apimgt/pull/12293/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wso2) | `20.55% <0.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wso2#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.