From abbc77229204ef4e0c2416b26ef9b04470e9bdee Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Thu, 2 Mar 2023 11:31:06 +0100 Subject: [PATCH 1/7] Fix storage limits --- Jenkinsfile | 2 +- kubernetesPod.yaml | 36 +++++++++++++++++++++++------------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fd59b2f3..1b34a61a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,7 +20,7 @@ pipeline { configFileProvider([configFile(fileId: 'maven-settings-rsb', variable: 'MAVEN_SETTINGS_RSB')]) { - sh 'mvn -B -s $MAVEN_SETTINGS_RSB -U clean deploy' + sh 'mvn -B -s $MAVEN_SETTINGS_RSB -Dmaven.repo.local=/home/jenkins/agent/m2 -U clean deploy' } } diff --git a/kubernetesPod.yaml b/kubernetesPod.yaml index 127dc514..0b3edd24 100644 --- a/kubernetesPod.yaml +++ b/kubernetesPod.yaml @@ -1,20 +1,30 @@ apiVersion: v1 kind: Pod metadata: + name: shinyproxy labels: ci: shinyproxy-build spec: + securityContext: + fsGroup: 65534 containers: - - name: containerproxy-build - image: 196229073436.dkr.ecr.eu-west-1.amazonaws.com/openanalytics/containerproxy-build - command: - - cat - tty: true - resources: - requests: - memory: "2Gi" - cpu: "1.0" - limits: - memory: "4Gi" - cpu: "1.5" - + - name: containerproxy-build + image: 196229073436.dkr.ecr.eu-west-1.amazonaws.com/openanalytics/containerproxy-build + securityContext: + privileged: true + command: [ "sh" ] + args: [ "/usr/src/app/docker-entrypoint.sh" ] + tty: true + volumeMounts: + - name: workspace-volume + subPath: docker + mountPath: /var/lib/docker + resources: + requests: + ephemeral-storage: "20Gi" + memory: "2Gi" + cpu: "1.0" + limits: + memory: "4Gi" + cpu: "1.5" + ephemeral-storage: "20Gi" From 390005f9bba1e9815dbbb9b2b4726b075a88b6f2 Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Thu, 2 Mar 2023 11:33:53 +0100 Subject: [PATCH 2/7] Bump license headers --- .../shinyproxy/AppRequestInfo.java | 2 +- .../AuthenticationRequiredFilter.java | 2 +- .../shinyproxy/ShinyProxyConfiguration.java | 2 +- .../ShinyProxyIframeScriptInjector.java | 2 +- .../shinyproxy/ShinyProxySpecExtension.java | 2 +- .../ShinyProxySpecExtensionProvider.java | 2 +- .../shinyproxy/ShinyProxySpecProvider.java | 2 +- .../shinyproxy/ShinyProxyTestStrategy.java | 2 +- .../openanalytics/shinyproxy/Thymeleaf.java | 2 +- .../shinyproxy/UISecurityConfig.java | 2 +- .../controllers/AdminController.java | 2 +- .../shinyproxy/controllers/AppController.java | 2 +- .../controllers/AppDirectController.java | 2 +- .../controllers/BaseController.java | 2 +- .../controllers/HeartbeatController.java | 2 +- .../controllers/IndexController.java | 2 +- .../controllers/IssueController.java | 2 +- .../dto/ShinyProxyApiResponse.java | 2 +- .../runtimevalues/AppInstanceKey.java | 2 +- .../runtimevalues/PublicPathKey.java | 2 +- .../ShinyForceFullReloadKey.java | 2 +- .../shinyproxy/runtimevalues/TrackAppUrl.java | 2 +- .../WebSocketReconnectionModeKey.java | 2 +- .../WebsocketReconnectionMode.java | 2 +- src/main/resources/static/css/default.css | 2 +- .../resources/static/handlebars/generate.sh | 2 +- .../static/handlebars/precompiled.js | 2 +- src/main/resources/static/js/shiny.admin.js | 2 +- src/main/resources/static/js/shiny.api.js | 2 +- src/main/resources/static/js/shiny.app.js | 20 +++++++++++++++++++ src/main/resources/static/js/shiny.common.js | 2 +- .../resources/static/js/shiny.connections.js | 2 +- src/main/resources/static/js/shiny.iframe.js | 2 +- .../resources/static/js/shiny.instances.js | 2 +- src/main/resources/static/js/shiny.ui.js | 2 +- src/main/resources/templates/admin.html | 2 +- src/main/resources/templates/app.html | 2 +- .../resources/templates/fragments/modal.html | 2 +- .../resources/templates/fragments/navbar.html | 2 +- src/main/resources/templates/index.html | 2 +- 40 files changed, 59 insertions(+), 39 deletions(-) diff --git a/src/main/java/eu/openanalytics/shinyproxy/AppRequestInfo.java b/src/main/java/eu/openanalytics/shinyproxy/AppRequestInfo.java index 29e875ac..fe7ee9ea 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/AppRequestInfo.java +++ b/src/main/java/eu/openanalytics/shinyproxy/AppRequestInfo.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/AuthenticationRequiredFilter.java b/src/main/java/eu/openanalytics/shinyproxy/AuthenticationRequiredFilter.java index dc2e2dba..443fc936 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/AuthenticationRequiredFilter.java +++ b/src/main/java/eu/openanalytics/shinyproxy/AuthenticationRequiredFilter.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyConfiguration.java b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyConfiguration.java index 731c7825..4d64987e 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyConfiguration.java +++ b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyConfiguration.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyIframeScriptInjector.java b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyIframeScriptInjector.java index ac0d2ec0..34317ebf 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyIframeScriptInjector.java +++ b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyIframeScriptInjector.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxySpecExtension.java b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxySpecExtension.java index 9fae30c9..799b2417 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxySpecExtension.java +++ b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxySpecExtension.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxySpecExtensionProvider.java b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxySpecExtensionProvider.java index e7efa859..39ed2cdb 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxySpecExtensionProvider.java +++ b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxySpecExtensionProvider.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxySpecProvider.java b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxySpecProvider.java index da8d6a3c..beec9805 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxySpecProvider.java +++ b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxySpecProvider.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyTestStrategy.java b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyTestStrategy.java index 6a2a5c37..163af6fc 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyTestStrategy.java +++ b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyTestStrategy.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/Thymeleaf.java b/src/main/java/eu/openanalytics/shinyproxy/Thymeleaf.java index 9ac1eead..1f4028c3 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/Thymeleaf.java +++ b/src/main/java/eu/openanalytics/shinyproxy/Thymeleaf.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/UISecurityConfig.java b/src/main/java/eu/openanalytics/shinyproxy/UISecurityConfig.java index 5567afc1..fde36dc1 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/UISecurityConfig.java +++ b/src/main/java/eu/openanalytics/shinyproxy/UISecurityConfig.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/controllers/AdminController.java b/src/main/java/eu/openanalytics/shinyproxy/controllers/AdminController.java index cb6d5b85..dbea948e 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/controllers/AdminController.java +++ b/src/main/java/eu/openanalytics/shinyproxy/controllers/AdminController.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/controllers/AppController.java b/src/main/java/eu/openanalytics/shinyproxy/controllers/AppController.java index 9ff9259c..de387a0b 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/controllers/AppController.java +++ b/src/main/java/eu/openanalytics/shinyproxy/controllers/AppController.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/controllers/AppDirectController.java b/src/main/java/eu/openanalytics/shinyproxy/controllers/AppDirectController.java index c051363f..edf13253 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/controllers/AppDirectController.java +++ b/src/main/java/eu/openanalytics/shinyproxy/controllers/AppDirectController.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/controllers/BaseController.java b/src/main/java/eu/openanalytics/shinyproxy/controllers/BaseController.java index 67dfe06d..2955b1cb 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/controllers/BaseController.java +++ b/src/main/java/eu/openanalytics/shinyproxy/controllers/BaseController.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/controllers/HeartbeatController.java b/src/main/java/eu/openanalytics/shinyproxy/controllers/HeartbeatController.java index e33c76ad..bb3f8e85 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/controllers/HeartbeatController.java +++ b/src/main/java/eu/openanalytics/shinyproxy/controllers/HeartbeatController.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/controllers/IndexController.java b/src/main/java/eu/openanalytics/shinyproxy/controllers/IndexController.java index fe0baabc..20c0cc0c 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/controllers/IndexController.java +++ b/src/main/java/eu/openanalytics/shinyproxy/controllers/IndexController.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/controllers/IssueController.java b/src/main/java/eu/openanalytics/shinyproxy/controllers/IssueController.java index 89127f6f..e63596ab 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/controllers/IssueController.java +++ b/src/main/java/eu/openanalytics/shinyproxy/controllers/IssueController.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/controllers/dto/ShinyProxyApiResponse.java b/src/main/java/eu/openanalytics/shinyproxy/controllers/dto/ShinyProxyApiResponse.java index 32f92841..f7c1af21 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/controllers/dto/ShinyProxyApiResponse.java +++ b/src/main/java/eu/openanalytics/shinyproxy/controllers/dto/ShinyProxyApiResponse.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/AppInstanceKey.java b/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/AppInstanceKey.java index deed4970..cffd6c17 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/AppInstanceKey.java +++ b/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/AppInstanceKey.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/PublicPathKey.java b/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/PublicPathKey.java index e37606f3..fd74577c 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/PublicPathKey.java +++ b/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/PublicPathKey.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/ShinyForceFullReloadKey.java b/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/ShinyForceFullReloadKey.java index 984dc90e..af290d5e 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/ShinyForceFullReloadKey.java +++ b/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/ShinyForceFullReloadKey.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/TrackAppUrl.java b/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/TrackAppUrl.java index c0930cad..31142a84 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/TrackAppUrl.java +++ b/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/TrackAppUrl.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/WebSocketReconnectionModeKey.java b/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/WebSocketReconnectionModeKey.java index 93766de1..f087d8dd 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/WebSocketReconnectionModeKey.java +++ b/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/WebSocketReconnectionModeKey.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/WebsocketReconnectionMode.java b/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/WebsocketReconnectionMode.java index a58f9d20..6226a360 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/WebsocketReconnectionMode.java +++ b/src/main/java/eu/openanalytics/shinyproxy/runtimevalues/WebsocketReconnectionMode.java @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/resources/static/css/default.css b/src/main/resources/static/css/default.css index 9ab23ab9..906453e9 100644 --- a/src/main/resources/static/css/default.css +++ b/src/main/resources/static/css/default.css @@ -1,7 +1,7 @@ /** * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/resources/static/handlebars/generate.sh b/src/main/resources/static/handlebars/generate.sh index c1ebb161..8e7337f4 100755 --- a/src/main/resources/static/handlebars/generate.sh +++ b/src/main/resources/static/handlebars/generate.sh @@ -2,7 +2,7 @@ # # ShinyProxy # -# Copyright (C) 2016-2021 Open Analytics +# Copyright (C) 2016-2023 Open Analytics # # =========================================================================== # diff --git a/src/main/resources/static/handlebars/precompiled.js b/src/main/resources/static/handlebars/precompiled.js index 610b75d5..c393b0a2 100644 --- a/src/main/resources/static/handlebars/precompiled.js +++ b/src/main/resources/static/handlebars/precompiled.js @@ -1,7 +1,7 @@ /* * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/resources/static/js/shiny.admin.js b/src/main/resources/static/js/shiny.admin.js index 44dccc3d..18fabf87 100644 --- a/src/main/resources/static/js/shiny.admin.js +++ b/src/main/resources/static/js/shiny.admin.js @@ -1,7 +1,7 @@ /* * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/resources/static/js/shiny.api.js b/src/main/resources/static/js/shiny.api.js index 3aaed750..6ce5a391 100644 --- a/src/main/resources/static/js/shiny.api.js +++ b/src/main/resources/static/js/shiny.api.js @@ -1,7 +1,7 @@ /* * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/resources/static/js/shiny.app.js b/src/main/resources/static/js/shiny.app.js index 018a4f6f..ac40cce9 100644 --- a/src/main/resources/static/js/shiny.app.js +++ b/src/main/resources/static/js/shiny.app.js @@ -1,3 +1,23 @@ +/* + * ShinyProxy + * + * Copyright (C) 2016-2023 Open Analytics + * + * =========================================================================== + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the Apache License as published by + * The Apache Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Apache License for more details. + * + * You should have received a copy of the Apache License + * along with this program. If not, see + */ // noinspection ES6ConvertVarToLetConst /* diff --git a/src/main/resources/static/js/shiny.common.js b/src/main/resources/static/js/shiny.common.js index fe16d074..47d70074 100644 --- a/src/main/resources/static/js/shiny.common.js +++ b/src/main/resources/static/js/shiny.common.js @@ -1,7 +1,7 @@ /* * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/resources/static/js/shiny.connections.js b/src/main/resources/static/js/shiny.connections.js index ee8c7032..e7173db2 100644 --- a/src/main/resources/static/js/shiny.connections.js +++ b/src/main/resources/static/js/shiny.connections.js @@ -1,7 +1,7 @@ /* * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/resources/static/js/shiny.iframe.js b/src/main/resources/static/js/shiny.iframe.js index 33c4440c..2ce602dd 100644 --- a/src/main/resources/static/js/shiny.iframe.js +++ b/src/main/resources/static/js/shiny.iframe.js @@ -1,7 +1,7 @@ /* * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/resources/static/js/shiny.instances.js b/src/main/resources/static/js/shiny.instances.js index d211b2ca..464eaef7 100644 --- a/src/main/resources/static/js/shiny.instances.js +++ b/src/main/resources/static/js/shiny.instances.js @@ -1,7 +1,7 @@ /* * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/resources/static/js/shiny.ui.js b/src/main/resources/static/js/shiny.ui.js index 105c2553..a9dd01c6 100644 --- a/src/main/resources/static/js/shiny.ui.js +++ b/src/main/resources/static/js/shiny.ui.js @@ -1,7 +1,7 @@ /* * ShinyProxy * - * Copyright (C) 2016-2021 Open Analytics + * Copyright (C) 2016-2023 Open Analytics * * =========================================================================== * diff --git a/src/main/resources/templates/admin.html b/src/main/resources/templates/admin.html index 0de6f97f..423ed97d 100644 --- a/src/main/resources/templates/admin.html +++ b/src/main/resources/templates/admin.html @@ -2,7 +2,7 @@ ShinyProxy - Copyright (C) 2016-2021 Open Analytics + Copyright (C) 2016-2023 Open Analytics =========================================================================== diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index 42c6b1a9..ed2dace3 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -2,7 +2,7 @@ ShinyProxy - Copyright (C) 2016-2021 Open Analytics + Copyright (C) 2016-2023 Open Analytics =========================================================================== diff --git a/src/main/resources/templates/fragments/modal.html b/src/main/resources/templates/fragments/modal.html index cfd82513..4a0b4e7c 100644 --- a/src/main/resources/templates/fragments/modal.html +++ b/src/main/resources/templates/fragments/modal.html @@ -2,7 +2,7 @@ ShinyProxy - Copyright (C) 2016-2021 Open Analytics + Copyright (C) 2016-2023 Open Analytics =========================================================================== diff --git a/src/main/resources/templates/fragments/navbar.html b/src/main/resources/templates/fragments/navbar.html index b0f323c8..546d0a80 100644 --- a/src/main/resources/templates/fragments/navbar.html +++ b/src/main/resources/templates/fragments/navbar.html @@ -2,7 +2,7 @@ ShinyProxy - Copyright (C) 2016-2021 Open Analytics + Copyright (C) 2016-2023 Open Analytics =========================================================================== diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index e22d8599..3b387770 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -2,7 +2,7 @@ ShinyProxy - Copyright (C) 2016-2021 Open Analytics + Copyright (C) 2016-2023 Open Analytics =========================================================================== From a4304a8798c6bbc932e4e844205400535085e33a Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Thu, 2 Mar 2023 11:39:07 +0100 Subject: [PATCH 3/7] Fix storage limits --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 1b34a61a..e86eef4f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,6 +3,7 @@ pipeline { agent { kubernetes { yamlFile 'kubernetesPod.yaml' + workspaceVolume dynamicPVC(accessModes: 'ReadWriteOnce', requestsSize: '40Gi') } } From dafe974b637ac5a01055e8c0810bad50124a8304 Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Fri, 3 Mar 2023 11:39:13 +0100 Subject: [PATCH 4/7] Start development on 3.0.1 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index acc45448..4594224e 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.openanalytics shinyproxy - 3.0.0 + 3.0.1-SNAPSHOT jar ShinyProxy @@ -28,7 +28,7 @@ 1.8 8 8 - 1.0.0 + 1.0.1-SNAPSHOT & From 9dec65611ffa335433c18d486b112f1d310e93b6 Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Fri, 3 Mar 2023 11:42:34 +0100 Subject: [PATCH 5/7] Fix #30015 do not add content-length header if transfer-encoding is present --- .../shinyproxy/ShinyProxyIframeScriptInjector.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyIframeScriptInjector.java b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyIframeScriptInjector.java index 34317ebf..a3b120a8 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyIframeScriptInjector.java +++ b/src/main/java/eu/openanalytics/shinyproxy/ShinyProxyIframeScriptInjector.java @@ -137,7 +137,10 @@ public void terminateWrites() throws IOException { private void updateContentLength(HttpServerExchange exchange, ByteBuffer output) { long length = output.limit(); - exchange.getResponseHeaders().put(Headers.CONTENT_LENGTH, length); + // check works case-insensitive + if (!exchange.getResponseHeaders().contains("Transfer-Encoding")) { + exchange.getResponseHeaders().put(Headers.CONTENT_LENGTH, length); + } // also update length of ServerFixedLengthStreamSinkConduit if (next instanceof ServerFixedLengthStreamSinkConduit) { From 75280ca6eaf25b71db4ed6d54a1a5fa4a5f35cfc Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Thu, 9 Mar 2023 11:38:39 +0100 Subject: [PATCH 6/7] Fix #30073: show proper error on app endpoint --- .../shinyproxy/AppRequestInfo.java | 35 ++++--------------- .../shinyproxy/controllers/AppController.java | 7 +++- .../controllers/AppDirectController.java | 9 ++++- 3 files changed, 20 insertions(+), 31 deletions(-) diff --git a/src/main/java/eu/openanalytics/shinyproxy/AppRequestInfo.java b/src/main/java/eu/openanalytics/shinyproxy/AppRequestInfo.java index fe7ee9ea..f6aaad9e 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/AppRequestInfo.java +++ b/src/main/java/eu/openanalytics/shinyproxy/AppRequestInfo.java @@ -20,9 +20,6 @@ */ package eu.openanalytics.shinyproxy; -import eu.openanalytics.containerproxy.model.runtime.ParameterValues; -import eu.openanalytics.containerproxy.util.BadRequestException; - import javax.servlet.http.HttpServletRequest; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -37,7 +34,6 @@ public class AppRequestInfo { private final String appInstance; private final String subPath; private final String appPath; - private ParameterValues providedParameters = null; public AppRequestInfo(String appName, String appInstance, String appPath, String subPath) { this.appName = appName; @@ -46,37 +42,26 @@ public AppRequestInfo(String appName, String appInstance, String appPath, String this.subPath = subPath; } - public static AppRequestInfo fromRequestOrException(HttpServletRequest request) { - AppRequestInfo result = fromURI(request.getRequestURI()); - if (result == null) { - throw new BadRequestException("Error parsing URL."); - } - return result; + public static AppRequestInfo fromRequestOrNull(HttpServletRequest request) { + return fromURI(request.getRequestURI()); } - public static AppRequestInfo fromRequestOrException(HttpServletRequest request, ParameterValues providedParameters) { - AppRequestInfo result = fromRequestOrException(request); - result.setProvidedParameters(providedParameters); - return result; - } - - public static AppRequestInfo fromURI(String uri) { Matcher appMatcher = APP_PATTERN.matcher(uri); Matcher appInstanceMatcher = APP_INSTANCE_PATTERN.matcher(uri); if (appInstanceMatcher.matches()) { String appName = appInstanceMatcher.group(2); if (appName == null || appName.trim().equals("")) { - throw new BadRequestException("Error parsing URL: name of app not found in URL."); + return null; } String appInstance = appInstanceMatcher.group(3); if (appInstance == null || appInstance.trim().equals("")) { - throw new BadRequestException("Error parsing URL: name of instance not found in URL."); + return null; } if (appInstance.length() > 64 || !INSTANCE_NAME_PATTERN.matcher(appInstance).matches()) { - throw new BadRequestException("Error parsing URL: name of instance contains invalid characters or is too long."); + return null; } String subPath = appInstanceMatcher.group(4); @@ -93,7 +78,7 @@ public static AppRequestInfo fromURI(String uri) { } else if (appMatcher.matches()) { String appName = appMatcher.group(2); if (appName == null || appName.trim().equals("")) { - throw new BadRequestException("Error parsing URL: name of app not found in URL."); + return null; } String appInstance = "_"; @@ -138,12 +123,4 @@ public String getAppPath() { return appPath; } - public ParameterValues getProvidedParameters() { - return providedParameters; - } - - private void setProvidedParameters(ParameterValues providedParameters) { - this.providedParameters = providedParameters; - } - } diff --git a/src/main/java/eu/openanalytics/shinyproxy/controllers/AppController.java b/src/main/java/eu/openanalytics/shinyproxy/controllers/AppController.java index de387a0b..36fa45e6 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/controllers/AppController.java +++ b/src/main/java/eu/openanalytics/shinyproxy/controllers/AppController.java @@ -92,7 +92,12 @@ public class AppController extends BaseController { @RequestMapping(value={"/app_i/*/**", "/app/**"}, method=RequestMethod.GET) public ModelAndView app(ModelMap map, HttpServletRequest request, HttpServletResponse response) { - AppRequestInfo appRequestInfo = AppRequestInfo.fromRequestOrException(request); + AppRequestInfo appRequestInfo = AppRequestInfo.fromRequestOrNull(request); + if (appRequestInfo == null) { + request.setAttribute(RequestDispatcher.ERROR_STATUS_CODE, HttpStatus.FORBIDDEN.value()); + return new ModelAndView("forward:/error"); + } + Proxy proxy = findUserProxy(appRequestInfo); ProxySpec spec = proxyService.getProxySpec(appRequestInfo.getAppName()); diff --git a/src/main/java/eu/openanalytics/shinyproxy/controllers/AppDirectController.java b/src/main/java/eu/openanalytics/shinyproxy/controllers/AppDirectController.java index edf13253..668d53ea 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/controllers/AppDirectController.java +++ b/src/main/java/eu/openanalytics/shinyproxy/controllers/AppDirectController.java @@ -35,8 +35,10 @@ import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.servlet.ModelAndView; import javax.inject.Inject; +import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -54,7 +56,12 @@ public class AppDirectController extends BaseController { @RequestMapping(value = {"/app_direct_i/**", "/app_direct/**"}) public void appDirect(HttpServletRequest request, HttpServletResponse response) throws InvalidParametersException, ServletException, IOException { // note: app_direct does not support parameters and resume - AppRequestInfo appRequestInfo = AppRequestInfo.fromRequestOrException(request); + AppRequestInfo appRequestInfo = AppRequestInfo.fromRequestOrNull(request); + if (appRequestInfo == null) { + request.setAttribute(RequestDispatcher.ERROR_STATUS_CODE, HttpStatus.FORBIDDEN.value()); + request.getRequestDispatcher("/error").forward(request, response); + return; + } if (appRequestInfo.getSubPath() == null) { try { From b8370746c8ddf5226666297ded0770a32c21bdf3 Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Tue, 14 Mar 2023 14:42:16 +0100 Subject: [PATCH 7/7] Bump version to 3.0.1 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 4594224e..39469f0c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.openanalytics shinyproxy - 3.0.1-SNAPSHOT + 3.0.1 jar ShinyProxy @@ -28,7 +28,7 @@ 1.8 8 8 - 1.0.1-SNAPSHOT + 1.0.1 &