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

Support organization visibility in unified search #3406

Open
RusJaI opened this issue Dec 1, 2024 · 4 comments
Open

Support organization visibility in unified search #3406

RusJaI opened this issue Dec 1, 2024 · 4 comments
Assignees

Comments

@RusJaI
Copy link

RusJaI commented Dec 1, 2024

Description

Related to #2925

Version

No response

@RusJaI
Copy link
Author

RusJaI commented Dec 1, 2024

Update [2024-11-29]

A. Flows Tested in the current setup :

1. Setup:
Organizations and Users:
BankA: User usera.
BankB: User userb.
APIs:
Cats and Pizzashack, both created and published by the super admin.
Initial Configuration:

2. APIs published using admin credentials, with no organizational restrictions.
Performed a Content-Based Search in the public DevPortal, by logging in as admin and organization users:
Verified that the search works as expected for all users.

3. Restrictive Configuration:
Cats API restricted to BankB organization only.
Pizzashack API restricted to BankA organization only.

4. Validation of Restrictions:

  • DevPortal Login as usera (BankA):
    - Performed a search.
    - Result: No APIs visible.

  • DevPortal Login as userb (BankB):
    - Performed a search.
    - Result: No APIs visible.

B. Further observations made while debugging the current Setup :

Testing with Solr console :
In the results set returned for the query to fetch devportal APIs list, it has the organization name as visible_organizations_ss value.

Debugging the code :
The solr query to fetch devportal APIs contain organization ID for the visible_organizations_ss field.
ex : visible_organizations_ss:(all OR a2ecd49d-9f9e-47ad-bb3f-dbf045d8d7e9)

@RusJaI
Copy link
Author

RusJaI commented Dec 4, 2024

Update [2024-12-02]

Issue in API Listing:
Resolved the issue by providing the organization ID instead of the name in publisher access control. Understood that it is the expected behaviour as per the current implementation.

Search by Content:
Implemented a fix to enable searching by content. However, it does not currently retrieve documents and Swagger files. Further investigation is required to address this limitation.

@RusJaI
Copy link
Author

RusJaI commented Dec 4, 2024

Update [2024-12-03, 04]

Content Search Issue:
During further debugging, it was identified that the visible_organizations value was not being set for other artifacts such as documents and OpenAPI definitions, causing these contents to be excluded from search results.
Resolved this by updating the implementation to save the visible_organizations value for all relevant artifacts and ensuring the content search functionality returns all expected results.

Tag-Based Search:
Worked on and successfully completed the implementation of tag-based search functionality.

Tasks left to do :
Planning to review the other flows supported by the unified search functionality, apart from content search and tag-based search. Will analyze these options and address any identified issues to ensure functionality across supported search scenarios.


Fixed Unified Search for API Categories
Addressed an issue in filtering API categories during unified search.

Fixed Filtering Issue for API Lifecycle States
Identified a bug in the filtering logic where two field values were being assigned with the same key, including a default field that listed all lifecycle states.
Resolved the issue by ensuring only the correct field value is applied.

Pull Request: wso2/carbon-apimgt#12717

@RusJaI
Copy link
Author

RusJaI commented Dec 15, 2024

Update [2024-12-13]

Addressed the review comments and updated the PR

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

No branches or pull requests

1 participant