Remove download by downloadId functionality (#1820)
This functionallity seems to get via AMQP (after some authentication) a private (wihtout need of authentication) url to an artifact assigned to the controller. By default, DDI or DMF shall provide proper urls (for direct download) to devices and if they have to be without authentication this shall be solved in different ways - for instance separate download server providing dedicated private / signed urls. This functinallity is not a real hawkBit part but more like something intended to solve some edge cases. Since it is complicated, heeds support, doesn't solve wide spread use cases, and could be achieved with other means - better to be removed. Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2015 Bosch Software Innovations GmbH and others
|
||||
*
|
||||
* This program and the accompanying materials are made
|
||||
* available under the terms of the Eclipse Public License 2.0
|
||||
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.eclipse.hawkbit.mgmt.rest.api;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
/**
|
||||
* A resource for download artifacts.
|
||||
*/
|
||||
@FunctionalInterface
|
||||
@Tag(name = "Download artifact by ID", description = "API to download artifacts by download Id.")
|
||||
// no request mapping specified here to avoid CVE-2021-22044 in Feign client
|
||||
public interface MgmtDownloadRestApi {
|
||||
|
||||
/**
|
||||
* Handles the GET request for downloading an artifact.
|
||||
*
|
||||
* @param tenant the download belongs to
|
||||
* @param downloadId the generated download id
|
||||
* @return {@link ResponseEntity} with status {@link HttpStatus#OK} if successful
|
||||
*/
|
||||
@GetMapping(value = MgmtRestConstants.DOWNLOAD_ID_V1_REQUEST_MAPPING_BASE
|
||||
+ MgmtRestConstants.DOWNLOAD_ID_V1_REQUEST_MAPPING)
|
||||
@ResponseBody
|
||||
ResponseEntity<InputStream> downloadArtifactByDownloadId(@PathVariable("tenant") String tenant,
|
||||
@PathVariable("downloadId") String downloadId);
|
||||
|
||||
}
|
||||
@@ -53,10 +53,6 @@ public final class MgmtRestConstants {
|
||||
*/
|
||||
public static final String SOFTWAREMODULE_V1_REQUEST_MAPPING = BASE_V1_REQUEST_MAPPING + "/softwaremodules";
|
||||
|
||||
public static final String DOWNLOAD_ID_V1_REQUEST_MAPPING_BASE = "/api/" + API_VERSION + "/downloadserver";
|
||||
|
||||
public static final String DOWNLOAD_ID_V1_REQUEST_MAPPING = "/downloadId/{tenant}/{downloadId}";
|
||||
|
||||
/**
|
||||
* The base URL mapping for the spring acuator management context path.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user