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

Refactor ActionManagementDAO to handle action type specific properties #6119

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

ashanthamara
Copy link
Contributor

@ashanthamara ashanthamara commented Nov 10, 2024

Proposed changes in this pull request

  1. With this PR, ActionManagementDAO will be able to handle properties specific to each actionTypes. (Currently for PRE_ISSUE_ACCESS_TOKEN and PRE_UPDATE_PASSWORD)
  2. action-mgt component will utilize certificate-mgt for the operations related to the certificates used in PRE_UPDATE_PASSWORD action type.
  3. Also with this PR, the updateActionEndpointAuthentication will be removed as it has no use case in the product
  4. The IDN_ACTION_ENDPOINT table will be renamed to IDN_ACTION_PROPERTIES and now it will be utilize to store action type related properties as well.

Related Issue

Copy link

codecov bot commented Nov 10, 2024

Codecov Report

Attention: Patch coverage is 93.77163% with 18 lines in your changes missing coverage. Please review.

Project coverage is 40.83%. Comparing base (6ffda9f) to head (374b341).

Files with missing lines Patch % Lines
...management/internal/ActionMgtServiceComponent.java 0.00% 10 Missing ⚠️
...n/management/dao/impl/ActionManagementDAOImpl.java 96.93% 4 Missing and 2 partials ⚠️
...entity/secret/mgt/core/dao/impl/SecretDAOImpl.java 87.50% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6119      +/-   ##
============================================
+ Coverage     40.78%   40.83%   +0.05%     
- Complexity    14546    14556      +10     
============================================
  Files          1772     1773       +1     
  Lines        118320   118382      +62     
  Branches      19266    19245      -21     
============================================
+ Hits          48251    48342      +91     
+ Misses        62773    62749      -24     
+ Partials       7296     7291       -5     
Flag Coverage Δ
unit 25.16% <93.77%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@jenkins-is-staging
Copy link

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

Copy link

sonarcloud bot commented Nov 10, 2024

@jenkins-is-staging
Copy link

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

</limit>
<limit implementation="org.jacoco.report.check.Limit">
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<!-- Temp decreasing this. There is an ongoing effort to improve
the code complexity coverage. -->
<minimum>0.60</minimum>
<minimum>0.68</minimum>
Copy link
Member

@malithie malithie Nov 11, 2024

Choose a reason for hiding this comment

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

Let's keep this to 0.6

@@ -178,14 +183,14 @@
<!-- Temporarily decreasing this.
Will be improved upon in a follow-up effort.
Related issue: https://github.com/wso2/product-is/issues/21368 -->
<minimum>0.70</minimum>
<minimum>0.77</minimum>
Copy link
Member

Choose a reason for hiding this comment

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

Target here should be 0.8

public static final String AUTHN_TYPE_ATTRIBUTE = "authnType";
public static final String URI_PROPERTY = "uri";
public static final String AUTHN_TYPE_PROPERTY = "authnType";
public static final String PASSWORD_SHARING_FORMAT_PROPERTY = "passwordSharingFormat";
Copy link
Member

Choose a reason for hiding this comment

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

This constant should not come to the actions core. It's specific to a particular extension

public static final String URI_PROPERTY = "uri";
public static final String AUTHN_TYPE_PROPERTY = "authnType";
public static final String PASSWORD_SHARING_FORMAT_PROPERTY = "passwordSharingFormat";
public static final String CERTIFICATE_ID_PROPERTY = "certificateId";
Copy link
Member

Choose a reason for hiding this comment

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

Same here

@@ -53,19 +55,30 @@ public enum ErrorMessages {
"%s is empty."),
ERROR_INVALID_ACTION_REQUEST_FIELD("60005", "Invalid request.",
"%s is invalid."),
ERROR_INVALID_ACTION_CERTIFICATE("60006", "Invalid request.", "Provided certificate is invalid."),
Copy link
Member

Choose a reason for hiding this comment

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

This is specific to a particular extension, we should be able to take these validations out from the core

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