diff --git a/openbas-api/src/main/java/io/openbas/rest/executor/ExecutorApi.java b/openbas-api/src/main/java/io/openbas/rest/executor/ExecutorApi.java index 194a114ba9..e3187bc981 100644 --- a/openbas-api/src/main/java/io/openbas/rest/executor/ExecutorApi.java +++ b/openbas-api/src/main/java/io/openbas/rest/executor/ExecutorApi.java @@ -215,6 +215,7 @@ public Executor registerExecutor( if (resolvedToken.isEmpty()) { throw new UnsupportedOperationException("Invalid token"); } + //todo pass agent token String installCommand = this.endpointService.generateInstallCommand(platform, token); return ResponseEntity.ok().contentType(MediaType.TEXT_PLAIN).body(installCommand); } diff --git a/openbas-framework/src/main/java/io/openbas/asset/EndpointService.java b/openbas-framework/src/main/java/io/openbas/asset/EndpointService.java index 494b9bfc22..d8fbfe9ec9 100644 --- a/openbas-framework/src/main/java/io/openbas/asset/EndpointService.java +++ b/openbas-framework/src/main/java/io/openbas/asset/EndpointService.java @@ -126,7 +126,7 @@ public String getFileOrDownloadFromJfrog(String platform, String file, String ad return IOUtils.toString(in, StandardCharsets.UTF_8) .replace("${OPENBAS_URL}", openBASConfig.getBaseUrlForAgent()) - .replace("${OPENBAS_TOKEN}", adminToken) + .replace("${OPENBAS_TOKEN}", adminToken) //todo agent token .replace( "${OPENBAS_UNSECURED_CERTIFICATE}", String.valueOf(openBASConfig.isUnsecuredCertificate()))