Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inherit APIBasedAuthenticationEnabled property from parent application to the shared application #407

Conversation

HasiniSama
Copy link
Contributor

Purpose

$subject

Issue: wso2/product-is#21222

Fixes the first task of the above issue.

  1. If the root application is marked as an API based authentication enabled application, inherit that configuration for shared apps as well

Goals

  • The shared application will inherit the main application's APIBasedAuthenticationEnabled property during the shared application creation.
  • When retrieving the shared application it will inherit the main application's APIBasedAuthenticationEnabled property, if and only if, the APIBasedAuthenticationEnabled property in the main application is true.
Root App APIBasedAuthenticationEnabled Property Shared App APIBasedAuthenticationEnabled Property Impact
False False Doesn't inherit property from root app.
False True Doesn't inherit property from root app.
True False Inherit property from root app has a behavior change.
True True Inherit property from root app but doesn't make any behavior change.

Approach

  • The prepareSharedApplication() is updated to add the APIBasedAuthenticationEnabled property.
  • The inheritAPIBasedAuthenticationEnabledProperty() in FragmentApplicationMgtListener is updated to send the APIBasedAuthenticationEnabled property of the parent application if it's enabled in parent.

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.01%. Comparing base (8c75c3d) to head (c30fb79).
Report is 12 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #407      +/-   ##
============================================
+ Coverage     27.64%   29.01%   +1.36%     
- Complexity      368      385      +17     
============================================
  Files            50       50              
  Lines          4145     4146       +1     
  Branches        478      478              
============================================
+ Hits           1146     1203      +57     
+ Misses         2911     2842      -69     
- Partials         88      101      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HasiniSama HasiniSama force-pushed the APIBasedAuthenticationEnabled-property-shared-app branch from 4188618 to c30fb79 Compare November 6, 2024 11:41
@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/11702891299

@sadilchamishka sadilchamishka merged commit 724dc51 into wso2-extensions:main Nov 6, 2024
4 checks passed
@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/11702891299
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/11702891299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants