wso2 / carbon-apimgt

Apache License 2.0
165 stars 623 forks source link

Add JWT as default token for portals #12297

Closed chamilaadhi closed 4 months ago

chamilaadhi commented 5 months ago

This PR changes opaque tokens to JWT for portal logins

Note: This pr needs to be merged after https://github.com/wso2-extensions/identity-inbound-auth-oauth/pull/2384 and https://github.com/wso2/carbon-identity-framework/pull/5547

After these PRs, Need to add following to the deployment.toml to enable JWT for portals

  [apim.oauth_config]
  enable_jwt_for_portals = true

  [transport.https.properties]
  maxHttpHeaderSize = "12288"

  [oauth]
  add_tenant_domain_to_access_token = true
codecov[bot] commented 5 months ago

Codecov Report

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

Project coverage is 47.49%. Comparing base (4900ea0) to head (bc3869d). Report is 86 commits behind head on master.

:exclamation: Current head bc3869d differs from pull request most recent head ec75e45. Consider uploading reports for the commit ec75e45 to get more accurate results

Files Patch % Lines
...rbon/apimgt/rest/api/admin/v1/dto/SettingsDTO.java 0.00% 9 Missing :warning:
.../apimgt/rest/api/publisher/v1/dto/SettingsDTO.java 0.00% 9 Missing :warning:
...rbon/apimgt/rest/api/store/v1/dto/SettingsDTO.java 0.00% 9 Missing :warning:
.../rest/api/util/impl/OAuthJwtAuthenticatorImpl.java 0.00% 9 Missing :warning:
...ava/org/wso2/carbon/apimgt/impl/utils/APIUtil.java 0.00% 6 Missing :warning:
...rest/api/dcr/web/impl/RegistrationServiceImpl.java 28.57% 4 Missing and 1 partial :warning:
...imgt/rest/api/dcr/web/dto/RegistrationProfile.java 33.33% 2 Missing :warning:
...i/admin/v1/utils/mappings/SettingsMappingUtil.java 0.00% 1 Missing :warning:
...lisher/v1/common/mappings/SettingsMappingUtil.java 0.00% 1 Missing :warning:
...est/api/store/v1/mappings/SettingsMappingUtil.java 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #12297 +/- ## ============================================ + Coverage 42.00% 47.49% +5.49% - Complexity 3265 4142 +877 ============================================ Files 1838 1839 +1 Lines 135618 135715 +97 Branches 19588 19608 +20 ============================================ + Hits 56967 64462 +7495 + Misses 71787 63683 -8104 - Partials 6864 7570 +706 ``` | [Flag](https://app.codecov.io/gh/wso2/carbon-apimgt/pull/12297/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/12297/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wso2) | `42.22% <5.45%> (+6.87%)` | :arrow_up: | | [unit_tests](https://app.codecov.io/gh/wso2/carbon-apimgt/pull/12297/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.