From 8ae48dc97827782421b2190e24eda6111aaa376a Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Mon, 11 Jan 2021 13:12:51 +0100 Subject: [PATCH 01/10] Start work on 2.4.4 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index bde17c5e..9c45ece4 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ eu.openanalytics shinyproxy - 2.4.3 + 2.4.4-SNAPSHOT jar ShinyProxy @@ -26,7 +26,7 @@ UTF-8 1.8 - 0.8.7 + 0.9.0-SNAPSHOT & From ecfc471b8d91311c2e28a14b6b3148273bcae2f8 Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Mon, 11 Jan 2021 13:27:50 +0100 Subject: [PATCH 02/10] Add minimal GH actions + remove Travis --- .github/workflows/workflows.yaml | 41 ++++++++++++++++++++++++++++++++ .travis.yml | 5 ---- 2 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/workflows.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/workflows.yaml b/.github/workflows/workflows.yaml new file mode 100644 index 00000000..2ed259ec --- /dev/null +++ b/.github/workflows/workflows.yaml @@ -0,0 +1,41 @@ +name: Tests + +on: [push] + +jobs: + tests: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ 8, 11 ] + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build with Maven + run: mvn -U clean install -DskipTests + - name: Run Tests + run: mvn test + + dependency: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Run Dependency Check + run: mvn -Powasp-dependency-check verify -DskipTests + - name: Archive code coverage results + uses: actions/upload-artifact@v2 + with: + name: dependency-check-report + path: target/dependency-check-report.html + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fd551dad..00000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: java -sudo: false -cache: - directories: - - "$HOME/.cache" From 289be818302601e7b418cc1b556d4463aaeec96d Mon Sep 17 00:00:00 2001 From: Tobia De Koninck Date: Fri, 15 Jan 2021 11:46:46 +0100 Subject: [PATCH 03/10] Support SAML Logout --- .../shinyproxy/controllers/BaseController.java | 7 ++++++- src/main/resources/fragments/navbar.html | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/openanalytics/shinyproxy/controllers/BaseController.java b/src/main/java/eu/openanalytics/shinyproxy/controllers/BaseController.java index 67e86c7d..72fcff08 100644 --- a/src/main/java/eu/openanalytics/shinyproxy/controllers/BaseController.java +++ b/src/main/java/eu/openanalytics/shinyproxy/controllers/BaseController.java @@ -34,6 +34,7 @@ import javax.inject.Inject; import javax.servlet.http.HttpServletRequest; +import eu.openanalytics.containerproxy.auth.IAuthenticationBackend; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.core.env.Environment; @@ -59,7 +60,10 @@ public abstract class BaseController { @Inject Environment environment; - + + @Inject + IAuthenticationBackend authenticationBackend; + private static Logger logger = LogManager.getLogger(BaseController.class); private static Pattern appPattern = Pattern.compile(".*?/app[^/]*/([^/]*)/?.*"); private static Map imageCache = new HashMap<>(); @@ -117,6 +121,7 @@ protected void prepareMap(ModelMap map, HttpServletRequest request) { map.put("isLoggedIn", isLoggedIn); map.put("isAdmin", userService.isAdmin(authentication)); map.put("isSupportEnabled", isLoggedIn && getSupportAddress() != null); + map.put("logoutUrl", authenticationBackend.getLogoutURL()); } protected String getSupportAddress() { diff --git a/src/main/resources/fragments/navbar.html b/src/main/resources/fragments/navbar.html index dddec9cb..0357a8c7 100644 --- a/src/main/resources/fragments/navbar.html +++ b/src/main/resources/fragments/navbar.html @@ -37,7 +37,7 @@ Report Issue Admin - Sign Out + Sign Out