refactor(backend): migrate cvesearch service from Thrift to Spring Boot REST#4237
Merged
GMishx merged 2 commits intoJun 20, 2026
Merged
Conversation
Contributor
Author
|
Hi @GMishx I have merged with latest base branch and resolved conflicts. Please review |
Member
|
@Shivamrut , please rebase for review. |
25f1d25 to
ebde5f7
Compare
Contributor
Author
|
Hi @GMishx , rebased. Please review |
05e699d to
1be1a86
Compare
GMishx
requested changes
Jun 16, 2026
GMishx
left a comment
Member
There was a problem hiding this comment.
@Shivamrut the ECA is failing for the branch. Please check
f428137 to
a65ea9e
Compare
…ot REST Signed-off-by: Shivamrut G <gshivamrut@gmail.com>
Signed-off-by: Shivamrut G <gshivamrut@gmail.com>
a65ea9e to
e23db1a
Compare
Contributor
Author
|
Hi @GMishx fixed the ECA problem, please review |
Contributor
Author
|
Adding sequence number for order of migration: service-6 |
GMishx
approved these changes
Jun 20, 2026
0b4776e
into
eclipse-sw360:feat/thrift/replace-spring
2 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Documentation — CVE Search Service Migration
Summary
toThriftXansfromThriftXfor all entities added for smoother migration. Scope is to delete it after complete migration.Layer 1 — Backend service (
backend/cvesearch)CveSearchApplication.java@SpringBootApplication,SpringBootServletInitializerfor WAR deploy (cvesearch.war)CveSearchController.java@RestControllerat/api/cvesearch— 6 REST endpoints replacing ThriftCveSearchService.IfaceCveSearchHandler.java@Service; public API usesservice-api(Release,Component,Project,VulnerabilityUpdateStatus,RequestStatus); no Thrift interfaceCveSearchServlet.javaweb.xmlindex.jspapplication.ymlpom.xmlspring-boot-starter-web,spring-boot-starter-tomcat(provided),spring-boot-maven-plugin,service-api,backend-commonVulnerabilityConnector.java*ConverterPOJO ↔ Thrift at DB handler boundaryVulnerabilityUtils.javaservice-apiUpdateType/VulnerabilityUpdateStatusservice-apicomponent/release typesCveSearchApiImpl.javaHttpURLConnection, timeouts, safer JSON parsing for CIRCL API responsesCveSearchGuesser.java,CveSearchWrapper.java,Heuristic.javaREST endpoints (deployed as
http://localhost:8080/cvesearch/api/cvesearch/...)POST/releases/{releaseId}updateForReleasePOST/components/{componentId}updateForComponentPOST/projects/{projectId}updateForProjectPOST/full-updatefullUpdatePOST/updateupdatePOST/cpes?vendor&product&versionfindCpes(stub: returns[])Note: Backend cvesearch REST has no user-header auth (same as other internal backend WARs). Authorization is enforced on resource-server (
@PreAuthorize("hasAuthority('ADMIN')")).Layer 2 — Schedule integration (
backend/schedule)CveSearchRestClient.javaPOST /cvesearch/api/cvesearch/updateviaRestClient; returnsRequestStatusScheduleRestClientConfig.javaRestClientbean withThriftClients.BACKEND_URLbase URLScheduleHandler.javacvesearchServicescheduling + manual trigger usecveSearchRestClient.update()instead ofmakeCvesearchClient().update()Behavior:
scheduleService?serviceName=cvesearchService→ scheduler → RESTupdatetriggerService?serviceName=cvesearchService→ RESTupdateLayer 3 — Resource-server proxy (
rest/resource-server)CveSearchController.java/api/cvesearch/*; HATEOAS linkcvesearch; OpenAPI annotationsSw360CveSearchService.javaRestClient→POSTbackend/cvesearch/api/cvesearch/...Uses shared
RestClientbean fromSw360ResourceServer(backend.url).Public API (deployed as
http://localhost:8080/resource/api/cvesearch/...)POST/cvesearch/releases/{releaseId}ADMINPOST/cvesearch/components/{componentId}ADMINPOST/cvesearch/projects/{projectId}ADMINPOST/cvesearch/full-updateADMINPOST/cvesearch/updateADMINPOST/cvesearch/cpesADMINLayer 4 — Client cleanup (
libraries/datahandler)ThriftClients.javaCVESEARCH_SERVICE_URL,makeCvesearchClient(),CveSearchServiceimportCVESEARCH_SERVICEstring constant remains viaServiceNames.CVESEARCH_SERVICEfor schedule configuration.How everything connects (CVE Search)
Tests updated (
backend/cvesearch)VulnerabilityConnectorTest.javaVulnerabilityUtilsTest.javaservice-apitypesCveSearchWrapperTest.javaCveSearchDataTranslatorTest.javaSearchLevelsTest.javaVerification (manual)
Expected after deploy:
/cvesearch/thrift→ 404; REST → 200 +requestStatus: "SUCCESS"(lists may be empty);triggerService→"SUCCESS"string (not 500).