Skip to content

Commit

Permalink
[backend] Add 'agent' role and pass the agent token in the installati…
Browse files Browse the repository at this point in the history
…on command
  • Loading branch information
savacano28 committed Dec 18, 2024
1 parent e31e29d commit 9942252
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit 9942252

Please sign in to comment.