Skip to content

Licensedb integration#3953

Open
MahmoudSheemy127 wants to merge 22 commits intoeclipse-sw360:mainfrom
MahmoudSheemy127:licensedb-integration
Open

Licensedb integration#3953
MahmoudSheemy127 wants to merge 22 commits intoeclipse-sw360:mainfrom
MahmoudSheemy127:licensedb-integration

Conversation

@MahmoudSheemy127
Copy link

Initial PR for GSOC 26's project

LicenseDB Integration layer initial implementation.

Changes

  • Implementation of LicenseDB Rest client for LicenseDB integration
  • The following endpoints are implemented:
    • /api/v1/login
    • /api/v1/refresh
    • /api/v1/licenses
    • /api/v1/licenses/:id
  • The following files are created under backend/licenses-core/../java/LicenseDB:
    • config/LicenseDBConfig.java: Configurations for RestTemplate and ConfigurationRepository
    • config/LicenseDBRestConfig.java: To fetch configuration parameters for the LicenseDB Rest client through the Configuration Repository.
    • dtos/License_db: Definition for the License object fetched from LicenseDB
    • rest/LicenseDBRestClient: Rest client class implementation for LicenseDB. Rest methods are implemented for the mentioned endpoints.
    • LICENSEDB_INTEGRATION.md: Complete implementation details for the LicenseDB Rest client interface

How to use

Example usage for the LicenseDB Rest client in LicenseDatabaseHandler.java:

public class LicenseDatabaseHandler{
    ...

    private final LicenseDBRestClient licenseDBRestClient;

    public LicenseDatabaseHandler(...) {
        ...
        licenseDBRestClient = new LicenseDBRestClient();


    }


    public List<License> getLicenseSummary() {

    final List<License> licenses;

    List<License_db> licenses_db = licenseDBRestClient.getLicenses();
    
    // Mapping Layer licenses_db ->  licenses (To be implemented)
    
    return licenses;

    }

}

Dependencies

Issue #3934

Suggested Reviewers

@GMishx

@ADITYA-CODE-SOURCE
Copy link
Contributor

ADITYA-CODE-SOURCE commented Mar 21, 2026

Great initial implementation, @MahmoudSheemy127!
I've been working on complementary components for this GSoC project and reviewed your code:
REST client structure - Clean separation of concerns
Configuration setup - Well organized Spring integration
DTO definitions - Matches LicenseDB API schema

A few suggestions from my related PRs that could enhance this:

  1. Exception handling (PR feat(licensedb): Add exception handling classes for error management #3894) - Custom exception classes for granular error handling
  2. Data transformation layer (PR feat(licensedb): Add data transformation layer for LicenseDB integration #3898) - Your mapping layer marked "to be implemented", I have LicenseTransformer/ObligationTransformer ready
  3. Conflict resolution (PR feat(licensedb): Add conflict resolution module for data synchronization #3911 - open) - For handling sync conflicts
    Additional components I've implemented:
  • OAuth retry mechanism with exponential backoff for resilient authentication
  • Persistence layer for storing sync metadata
    Happy to collaborate and coordinate our PRs to provide complete LicenseDB integration.
    Looking forward to mentors' feedback! @GMishx

@GMishx GMishx added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Mar 23, 2026
@MahmoudSheemy127
Copy link
Author

MahmoudSheemy127 commented Mar 23, 2026

@ADITYA-CODE-SOURCE,

Glad to hear from you.

I have reviewed your PRs and they are in fact completing the remaining implementation details required for the LicenseDB integration through a rest client. Good Job

As you know this PR is just for an initial implementation of my proposed solution to the project for GSoC 2026. It will be great if we can elaborate together and work together on the project and merge our PRs prior to GSoC 2026.

Looking forward to mentor's @GMishx feedback suggesting if we can work together on the project as it would be a greate chance.

GMishx and others added 20 commits March 25, 2026 00:58
Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.15.1 to 2.16.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](step-security/harden-runner@58077d3...fa2e9d6)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Add gettext-base as runtime dependency for envsubst in
docker-entrypoint.sh

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
Reuse GSON objects to improve memory usage.
https://github.com/google/gson/blob/b7d59549188867deb42e46073fb38735a5beda1c/UserGuide.md?plain=1#L73

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
1. Use static Cloudant Client to improve connections and rely on
   underlying OkHttp to pool connections.
2. Add new feature from Cloudant SDK to enable retries (default 2 with 5
   second interval).
3. Properly shutdown okhttp to prevent thread leaks as per tomcat logs.

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
1. Add a new custom `AttachmentAwareDatabase` override for handling
   attachments. This provides option to have filenames with special
   characters like '+'.
2. CouchDB not allow filename starting with `_`, thus trim from strat.

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs code review needs general test This is general testing, meaning that there is no org specific issue to check for

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants