Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

403 ModSecurity Action - SW360ComponentClient.searchByName #348

Closed
3 tasks
neubs-bsi opened this issue Nov 18, 2019 · 3 comments
Closed
3 tasks

403 ModSecurity Action - SW360ComponentClient.searchByName #348

neubs-bsi opened this issue Nov 18, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@neubs-bsi
Copy link
Contributor

Summary of the Bug

When running the Example project with an activated SW360 Updater, the build fails with this Error message when handling the Artifact "Arbitrary Copied Code":


Caused by: org.springframework.web.client.HttpClientErrorException$Forbidden: 403 ModSecurity Action
    at org.springframework.web.client.HttpClientErrorException.create (HttpClientErrorException.java:83)
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError (DefaultResponseErrorHandler.java:97)
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError (DefaultResponseErrorHandler.java:79)
    at org.springframework.web.client.ResponseErrorHandler.handleError (ResponseErrorHandler.java:63)
    at org.springframework.web.client.RestTemplate.handleResponse (RestTemplate.java:777)
    at org.springframework.web.client.RestTemplate.doExecute (RestTemplate.java:735)
    at org.springframework.web.client.RestTemplate.execute (RestTemplate.java:669)
    at org.springframework.web.client.RestTemplate.exchange (RestTemplate.java:607)
    at org.eclipse.sw360.antenna.sw360.rest.SW360Client.doRestCall (SW360Client.java:58)
    at org.eclipse.sw360.antenna.sw360.rest.SW360Client.doRestGET (SW360Client.java:66)
    at org.eclipse.sw360.antenna.sw360.rest.SW360ComponentClient.searchByName (SW360ComponentClient.java:69)
    at org.eclipse.sw360.antenna.sw360.adapter.SW360ComponentClientAdapter.getComponentByName (SW360ComponentClientAdapter.java:62)
    at org.eclipse.sw360.antenna.sw360.adapter.SW360ReleaseClientAdapter.getReleaseByNameAndVersion (SW360ReleaseClientAdapter.java:125)
    at org.eclipse.sw360.antenna.sw360.adapter.SW360ReleaseClientAdapter.getSparseRelease (SW360ReleaseClientAdapter.java:104)
    at org.eclipse.sw360.antenna.sw360.adapter.SW360ReleaseClientAdapter.getRelease (SW360ReleaseClientAdapter.java:108)
    at org.eclipse.sw360.antenna.sw360.adapter.SW360ReleaseClientAdapter.getOrCreateRelease (SW360ReleaseClientAdapter.java:46)
    at org.eclipse.sw360.antenna.sw360.SW360MetaDataUpdater.getOrCreateRelease (SW360MetaDataUpdater.java:72)
    at org.eclipse.sw360.antenna.sw360.workflow.generators.SW360UpdaterImpl.produce (SW360UpdaterImpl.java:52)
    at org.eclipse.sw360.antenna.sw360.workflow.generators.SW360Updater.produce (SW360Updater.java:66)
    at org.eclipse.sw360.antenna.api.workflow.AbstractGenerator.produce (AbstractGenerator.java:22)

Note: The "Arbitrary Copied Code" uses this ugly hack: https://github.com/eclipse/antenna/blob/5f471bce3c840759f4bf31f431d3814809bfbbee/modules/sw360/src/main/java/org/eclipse/sw360/antenna/sw360/utils/SW360ComponentAdapterUtils.java#L48 (might be part of the problem)

Steps to reproduce

  • Activate the SW360 Updater
  • Run
  • It fails

Acceptance Criteria

  • Find reason for failing
  • Fix it
  • Remove ugly hack

Definition of Done

  • Acceptance criteria fulfilled
  • A test case is created to reproduce the bug
  • A PR is created, the CI infrastructure reports green, the bug test case proves that bug is fixed
  • The PR is reviewed and approved
  • No TODOs left in the code unless explained in the ticket, if something else is still open, this is summarized in a comment in the issue
  • Documentation is updated
@neubs-bsi neubs-bsi added bug Something isn't working question Further information is requested and removed question Further information is requested labels Nov 18, 2019
@bs-ondem
Copy link
Contributor

Currently not reproducible

@neubs-bsi
Copy link
Contributor Author

Error does not occur anymore.
The component ArbitraryCopiedCode and its belonging release are now written and read from SW360 with no exception thrown.

@blaumeiser-at-bosch
Copy link
Contributor

Review 2020-01-23

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants