The fix is achieved by using the same logic for persisting `Vulnerability` and `VulnerableSoftware` records that `NistApiMirrorTask` was already using. It handles duplicate records.
This should also yield a performance boost (did not benchmark because that wasn't the focus of this change), since the transaction commit frequency is reduced compared to the previous logic.
Fixes#3663
Signed-off-by: nscuro <nscuro@protonmail.com>
Instead of causing a full-blown service disruption when API token decryption fails, fall back to unauthenticated API usage to limit the impact.
Relates to #2366
Signed-off-by: nscuro <nscuro@protonmail.com>
`ClientErrorException` in JAX-RS corresponds to HTTP 4xx status codes. Those were previously handled by Alpine's `GlobalExceptionHandler`, resulting in an HTTP 500 response when it really should've been a 4xx.
Fixes#3645
Signed-off-by: nscuro <nscuro@protonmail.com>
Including default values for both `pageNumber`/`pageSize` and `offset`/`limit` causes the request generated by Swagger UI to use them all, which is confusing.
Signed-off-by: nscuro <nscuro@protonmail.com>
Collect basic metrics:
* Total number of index operations (`add`, `update`, `delete`, `commit`), grouped by index
* Number of index documents in RAM
* Number of bytes used by the index
* Total number of documents in the index
Also, integrate Lucene's `InfoStream` with Dependency-Track's logging system. Lucene output will now be included when configuring `LOGGING_LEVEL=DEBUG`, or when the respective logger is explicitly configured in `logback.xml`.
Relates to #3429
Signed-off-by: nscuro <nscuro@protonmail.com>
This extends the identity of a `ComponentProperty` to also include its value. As a consequence, encrypted values will not be supported.
In order to support duplicate `groupName` / `propertyValue` pairs, the `ComponentProperty` class now has a separate `uuid` field in order to still be able to address individual properties via REST API (e.g. for deletion operations).
It is no longer possible to update a `ComponentProperty` via REST API.
Uniqueness of properties is now enforced across `groupName`, `propertyName`, *and* `propertyValue`.
Signed-off-by: nscuro <nscuro@protonmail.com>