wso2 / api-manager

All issues, tasks, improvements and new features of WSO2 API Manager
Apache License 2.0
34 stars 8 forks source link

Support Deploy/Undeploy Global Level Policies from UI/REST APIs #1710

Closed YasasRangika closed 8 months ago

YasasRangika commented 1 year ago

Problem

In previous versions of API Manager releases, if we want to add a global-level policy to a gateway node, users have to put the manually written xml-type policy file to the location: /repository/deployment/server/synapse-configs/default/sequences with the naming pattern WSO2AM--Ext--.

An example Synapse configuration of a global policy is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<sequence xmlns="http://ws.apache.org/ns/synapse" name="WSO2AM--Ext--Out">
   <property name="Category" value="Electronic" scope="transport"/>
</sequence>

But this approach is no longer promoted with the API Manager 4.3.0 release.

Solution

If the logged-in user has sufficient permission, future API Manager products (from APIM-4.3.0 onwards) will provide a separate UI for adding ( /enabling ) and removing ( /disabling ) the global-level policies under the gateway label.

Affected Component

APIM

Version

No response

Implementation

Related Issues

No response

Suggested Labels

No response

YasasRangika commented 1 year ago

Update (upto 06/04/2023)

Analyzed the flow of Operation level policies feature works and had a few meetings with Lakshitha and Isuru. Started this feature implementation from the REST level and added OAS changes to the publisher-API specification. Had an initial coding review with generated classes and DTOs with Lakshitha. He suggested reducing some implementation at this level and pointed out the required REST APIs. Starting implementations of the persistence layer changes.

YasasRangika commented 1 year ago

Update (07/04/2023)

Completed:

In progress:

YasasRangika commented 1 year ago

Update (10/04/2023)

Completed:

In progress:

YasasRangika commented 1 year ago

Update (upto 18/04/2023)

Completed:

In progress:

Completing the policy aggregation process by creating the final artifact file to be deployed in the gateway.

[1] mail: "Re: [Architecture] [New Feature] Support Deploy/Undeploy Gateway-Specific Global Policies from UI/REST APIs"

YasasRangika commented 1 year ago

Update (20/04/2023)

Completed:

In progress:

thisaltennakoon commented 11 months ago

Update (09/10/2023 - 13/10/2023)

Screenshot 2023-10-13 at 1 15 19 PM

Source File of UI Sketches

piyumaldk commented 10 months ago

Update (23/10/2023 - 03/11/2023)

Implemented the basic UIs / Routing / Data handling and updating.

Please note that

Please find the implemented UIs.

Landing Page

image

Create Page

image image

Edit Page

image image
piyumaldk commented 10 months ago

Update (06/11/2023 - 10/11/2023)

Please find the below diagram in order to get a rough idea about the React:TSX component structure of the implementation. GlobalPoliciesComponents

YasasRangika commented 10 months ago

Hi @piyumaldk,

First and foremost, I must commend you on the outstanding work you've done on the UI for the feature. Your design and implementation are truly impressive, and the refactoring you carried out will significantly improve the overall codebase.

I've just returned from medical leave today and haven't had the chance to review the UI changes you have made.

Given that I'm catching up after my absence, I think it would be helpful for us to have a quick call to sync up. I'd love to hear more about your thought process behind certain design decisions and any concerns you might have regarding the UI. Additionally, it would be a good way for me to provide insights into the backend changes I've made.

As for the backend, the majority of it is now complete, and I've conducted the final code review. There were some last-minute changes requested by the leads, and I incorporated those within the given timeframe. However, I also took some time to enhance certain aspects of the feature for better performance and maintainability. As a result, I had to revise the unit tests and integration tests.

Furthermore, due to the nature of the changes, I'll be testing the backend with all the supported databases to ensure compatibility. There were query-level modifications as well, as per the feedback received during the final code review. I appreciate your understanding, and I'm confident these refinements will contribute to the overall robustness of the feature.

Since I've allocated for patches this week, starting from next week onwards, I will also allocate for RnD, allowing me to give my full focus to this project. Until then, if the backend is a blocker for you to complete the feature, I can provide a working backend within a short timeframe.

Looking forward to our call and to further discussing about this feature.

Thanks and Regards, Yasas

piyumaldk commented 10 months ago

Update (13/11/2023 - 17/11/2023)

Please find the new react component structure here. GlobalPoliciesComponents(2)

piyumaldk commented 10 months ago

Update (20/11/2023 - 21/11/2023)

GlobalPoliciesComponents(4)

piyumaldk commented 10 months ago

[FRONT-END] Pending and Requested Tasks after the Code/UX Review

YasasRangika commented 9 months ago

[Backend] Status Update as of 01/12/2023: Feature Enhancements and Refinements

Here is the progress on the feature implementation, incorporating various suggestions and feedback received during and after the code review:

To-Do:

YasasRangika commented 9 months ago

[Backend] Status Update as of 08/12/2023

To-Do: