diff --git a/build.sh b/build.sh index 3ac6784006a852e029ec387e157e73ba1e54d45a..48250ac9ff42bbbfcd891812922737e7d5be3606 100755 --- a/build.sh +++ b/build.sh @@ -35,10 +35,10 @@ docker build --build-arg BUILD_DATE=$(date -Iseconds) \ --build-arg VERSION=$VERSION \ --tag "$IMAGE:latest" \ --tag "$IMAGE:$VERSION" \ - --tag kkech/portal_backend:latest \ + --tag jerrypan44/portal_backend:latest \ . -docker push kkech/portal_backend:latest +docker push jerrypan44/portal_backend:latest BUGSNAG_KEY="" eval $(grep -e "^\\s*BUGSNAG_KEY" Dockerfile | tr '\\' ' ') diff --git a/docker/config/application.tmpl b/docker/config/application.tmpl index 4651cb58db17a876559ababc8c71a7919be424d4..b3fb351fe665935f850598487b64066c0d3bae27 100644 --- a/docker/config/application.tmpl +++ b/docker/config/application.tmpl @@ -92,6 +92,7 @@ services: algorithmsUrl: {{ default .Env.EXAREME_URL "http://localhost:9090" }}/mining/algorithms.json workflows: workflowUrl: {{ default .Env.WORKFLOW_URL "http://localhost:9090" }} + jwtSecret: {{ default .Env.JWT_SECRET "secret" }} workflowAuthorization: {{ default .Env.WORKFLOW_AUTHORIZATION "undefined" }} galaxy: galaxyUsername: {{ default .Env.GALAXY_USERNAME admin }} diff --git a/src/main/java/eu/hbp/mip/controllers/RequestsApi.java b/src/main/java/eu/hbp/mip/controllers/RequestsApi.java index 84a869730d392eb24db6778f7089bf1d7d0d25c1..3a06a26fec1ea3b295861342215b2b178a3df33d 100644 --- a/src/main/java/eu/hbp/mip/controllers/RequestsApi.java +++ b/src/main/java/eu/hbp/mip/controllers/RequestsApi.java @@ -17,6 +17,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; @@ -121,6 +122,12 @@ public class RequestsApi { return prefix + memId; } + @Value("#{'${services.galaxy.galaxyUsername:admin}'}") + private boolean galaxyUsername; + + @Value("#{'${services.galaxy.galaxyPassword:admin}'}") + private boolean galaxyPassword; + /** * Get Galaxy Reverse Proxy basic access token. * @@ -129,10 +136,7 @@ public class RequestsApi { @RequestMapping(method = RequestMethod.GET, produces = "application/json") @ResponseStatus(value = HttpStatus.OK) public ResponseEntity getGalaxyBasicAccessToken(){ - String username = "admin"; - String password = "admin"; - - String stringEncoded = Base64.getEncoder().encodeToString((username + ":" + password).getBytes()); + String stringEncoded = Base64.getEncoder().encodeToString((galaxyUsername + ":" + galaxyPassword).getBytes()); return ResponseEntity.ok(new StringDtoResponse(stringEncoded)); }