Skip to content

Commit b9d7af7

Browse files
committed
Merge branch 'release/1.2.1'
2 parents bbd24da + 9619b54 commit b9d7af7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1215
-993
lines changed

.pre-commit-config.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v6.0.0
4+
hooks:
5+
- id: check-added-large-files
6+
args: ['--maxkb=1024']
7+
- id: check-merge-conflict
8+
- id: check-vcs-permalinks
9+
- id: forbid-new-submodules
10+
- id: end-of-file-fixer
11+
- id: trailing-whitespace
12+
args: [--markdown-linebreak-ext=md]
13+
exclude: CHANGELOG.md
14+
- id: check-yaml
15+
args: [--allow-multiple-documents]
16+
- id: check-executables-have-shebangs
17+
- id: check-symlinks
18+
- id: destroyed-symlinks
19+
20+
# Cross platform
21+
- id: check-case-conflict
22+
- id: mixed-line-ending
23+
args: [--fix=lf]
24+
25+
# Security
26+
- id: detect-aws-credentials
27+
args: ['--allow-missing-credentials']
28+
- id: detect-private-key
29+
- repo: local
30+
hooks:
31+
- id: license-check
32+
name: format license headers using maven
33+
always_run: true
34+
language: script
35+
entry: /bin/sh -c "mvn validate license:format"
36+
pass_filenames: false
37+
- repo: https://github.com/crate-ci/typos
38+
rev: v1.35.8
39+
hooks:
40+
- id: typos

LICENSE

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,4 @@
199199
distributed under the License is distributed on an "AS IS" BASIS,
200200
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201201
See the License for the specific language governing permissions and
202-
limitations under the License.
202+
limitations under the License.

LICENSE_HEADER

100755100644
File mode changed.

kubernetesPod.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
labels:
55
ci: containerproxy-build
66
spec:
7+
hostUsers: false
78
volumes:
89
- name: docker-socket
910
emptyDir: { }

pom.xml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

66
<groupId>eu.openanalytics</groupId>
77
<artifactId>containerproxy</artifactId>
8-
<version>1.2.0</version>
8+
<version>1.2.1</version>
99
<name>ContainerProxy</name>
1010
<packaging>jar</packaging>
1111
<inceptionYear>2016</inceptionYear>
1212

1313
<parent>
1414
<groupId>org.springframework.boot</groupId>
1515
<artifactId>spring-boot-starter-parent</artifactId>
16-
<version>3.4.5</version>
16+
<version>3.4.11</version>
1717
<relativePath/>
1818
</parent>
1919

@@ -23,28 +23,30 @@
2323
<maven.compiler.source>21</maven.compiler.source>
2424
<maven.compiler.target>21</maven.compiler.target>
2525
<!-- Dependency versions -->
26-
<spring-boot.version>3.4.5</spring-boot.version>
26+
<spring-boot.version>3.4.11</spring-boot.version>
2727
<aws-java-sdk.version>2.31.21</aws-java-sdk.version>
2828
<commons-collections4.version>4.4</commons-collections4.version>
2929
<commons-io.version>2.19.0</commons-io.version>
30-
<springdoc.version>2.8.6</springdoc.version>
30+
<springdoc.version>2.8.13</springdoc.version>
3131
<logstash-logback-encoder.version>8.1</logstash-logback-encoder.version>
3232
<jaxb-api.version>2.3.1</jaxb-api.version>
3333
<docker-client.version>7.0.8-OA-4</docker-client.version>
3434
<javax-annotation-api.version>1.3.2</javax-annotation-api.version>
3535
<monetdb-jdbc.version>12.0</monetdb-jdbc.version>
36-
<postgresql.version>42.7.5</postgresql.version>
36+
<postgresql.version>42.7.8</postgresql.version>
3737
<fabric8-client.version>7.1.0</fabric8-client.version>
3838
<jquery.version>3.7.1</jquery.version>
3939
<fontawesome.version>4.7.0</fontawesome.version>
4040
<jakarta-json-api.version>2.1.3</jakarta-json-api.version>
4141
<glassfish-jakarta-json.version>2.0.1</glassfish-jakarta-json.version>
4242
<guava-version>33.4.8-jre</guava-version>
43+
<jsoup.version>1.21.2</jsoup.version>
44+
<sqlite-jdbc.version>3.50.3.0</sqlite-jdbc.version>
4345
<!-- Plugin versions -->
4446
<maven.license-plugin.version>4.6</maven.license-plugin.version>
4547
<maven.build-helper-maven.plugin.version>3.6.0</maven.build-helper-maven.plugin.version>
4648
<maven.jar-plugin.version>3.4.2</maven.jar-plugin.version>
47-
<maven.dependency-check-plugin.version>12.1.1</maven.dependency-check-plugin.version>
49+
<maven.dependency-check-plugin.version>12.1.7</maven.dependency-check-plugin.version>
4850
</properties>
4951

5052
<distributionManagement>
@@ -308,6 +310,7 @@
308310
<dependency>
309311
<groupId>org.xerial</groupId>
310312
<artifactId>sqlite-jdbc</artifactId>
313+
<version>${sqlite-jdbc.version}</version>
311314
</dependency>
312315

313316
<dependency>
@@ -335,7 +338,7 @@
335338
</exclusion>
336339
<exclusion>
337340
<groupId>io.fabric8</groupId>
338-
<artifactId>kubernetes-httpclient-vertx</artifactId>
341+
<artifactId>kubernetes-httpclient-vertex</artifactId>
339342
</exclusion>
340343
</exclusions>
341344
</dependency>
@@ -360,6 +363,11 @@
360363
<artifactId>fontawesome</artifactId>
361364
<version>${fontawesome.version}</version>
362365
</dependency>
366+
<dependency>
367+
<groupId>org.jsoup</groupId>
368+
<artifactId>jsoup</artifactId>
369+
<version>${jsoup.version}</version>
370+
</dependency>
363371

364372
<!-- Amazon Base libraries-->
365373
<dependency>

src/main/java/eu/openanalytics/containerproxy/ContainerProxyApplication.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
import com.fasterxml.jackson.datatype.jsonp.JSONPModule;
2424
import eu.openanalytics.containerproxy.backend.dispatcher.proxysharing.ProxySharingDispatcher;
2525
import eu.openanalytics.containerproxy.model.spec.ProxySpec;
26-
import eu.openanalytics.containerproxy.service.hearbeat.ActiveProxiesService;
27-
import eu.openanalytics.containerproxy.service.hearbeat.HeartbeatService;
28-
import eu.openanalytics.containerproxy.service.hearbeat.IHeartbeatProcessor;
26+
import eu.openanalytics.containerproxy.service.heartbeat.ActiveProxiesService;
27+
import eu.openanalytics.containerproxy.service.heartbeat.HeartbeatService;
28+
import eu.openanalytics.containerproxy.service.heartbeat.IHeartbeatProcessor;
2929
import eu.openanalytics.containerproxy.spec.IProxySpecProvider;
3030
import eu.openanalytics.containerproxy.util.LoggingConfigurer;
3131
import eu.openanalytics.containerproxy.util.ProxyMappingManager;
Lines changed: 91 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,91 @@
1-
/*
2-
* ContainerProxy
3-
*
4-
* Copyright (C) 2016-2025 Open Analytics
5-
*
6-
* ===========================================================================
7-
*
8-
* This program is free software: you can redistribute it and/or modify
9-
* it under the terms of the Apache License as published by
10-
* The Apache Software Foundation, either version 2 of the License, or
11-
* (at your option) any later version.
12-
*
13-
* This program is distributed in the hope that it will be useful,
14-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16-
* Apache License for more details.
17-
*
18-
* You should have received a copy of the Apache License
19-
* along with this program. If not, see <http://www.apache.org/licenses/>
20-
*/
21-
package eu.openanalytics.containerproxy.api;
22-
23-
import eu.openanalytics.containerproxy.service.IdentifierService;
24-
import eu.openanalytics.containerproxy.service.UserService;
25-
import eu.openanalytics.containerproxy.spec.expression.SpecExpressionContext;
26-
import eu.openanalytics.containerproxy.spec.expression.SpecExpressionResolver;
27-
import jakarta.servlet.http.HttpServletRequest;
28-
import jakarta.servlet.http.HttpServletResponse;
29-
import org.springframework.core.env.Environment;
30-
import org.springframework.security.core.Authentication;
31-
import org.springframework.ui.ModelMap;
32-
import org.springframework.web.context.request.RequestContextHolder;
33-
import org.springframework.web.context.request.ServletRequestAttributes;
34-
35-
import javax.annotation.PostConstruct;
36-
import javax.inject.Inject;
37-
38-
public class BaseController {
39-
40-
@Inject
41-
private Environment environment;
42-
43-
@Inject
44-
private IdentifierService identifierService;
45-
46-
@Inject
47-
protected SpecExpressionResolver expressionResolver;
48-
49-
@Inject
50-
private UserService userService;
51-
52-
private String title;
53-
private boolean titleContainsExpression;
54-
55-
@PostConstruct
56-
public void baseInit() {
57-
title = environment.getProperty("proxy.title", "ShinyProxy");
58-
titleContainsExpression = title.contains("#{");
59-
}
60-
61-
protected void prepareMap(ModelMap map) {
62-
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes();
63-
HttpServletRequest httpServletRequest = servletRequestAttributes.getRequest();
64-
HttpServletResponse httpServletResponse = servletRequestAttributes.getResponse();
65-
map.put("title", getTitle(userService.getCurrentAuth(), httpServletRequest.getServerName()));
66-
// no versioning (using instanceId) needed since paths already contain a version
67-
map.put("bootstrapCss", "/css/bootstrap.css");
68-
map.put("bootstrapJs", "/js/bootstrap.js");
69-
map.put("jqueryJs", "/webjars/jquery/3.7.1/jquery.min.js");
70-
map.put("fontAwesomeCss", "/webjars/fontawesome/4.7.0/css/font-awesome.min.css");
71-
map.put("resourcePrefix", "/" + identifierService.instanceId);
72-
73-
map.put("request", httpServletRequest);
74-
map.put("response", httpServletResponse);
75-
}
76-
77-
private String getTitle(Authentication user, String serverName) {
78-
if (!titleContainsExpression) {
79-
return title;
80-
}
81-
SpecExpressionContext context = SpecExpressionContext.create(
82-
user,
83-
user.getPrincipal(),
84-
user.getCredentials()
85-
)
86-
.serverName(serverName)
87-
.build();
88-
return expressionResolver.evaluateToString(title, context);
89-
}
90-
91-
}
1+
/*
2+
* ContainerProxy
3+
*
4+
* Copyright (C) 2016-2025 Open Analytics
5+
*
6+
* ===========================================================================
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the Apache License as published by
10+
* The Apache Software Foundation, either version 2 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* Apache License for more details.
17+
*
18+
* You should have received a copy of the Apache License
19+
* along with this program. If not, see <http://www.apache.org/licenses/>
20+
*/
21+
package eu.openanalytics.containerproxy.api;
22+
23+
import eu.openanalytics.containerproxy.service.IdentifierService;
24+
import eu.openanalytics.containerproxy.service.UserService;
25+
import eu.openanalytics.containerproxy.spec.expression.SpecExpressionContext;
26+
import eu.openanalytics.containerproxy.spec.expression.SpecExpressionResolver;
27+
import jakarta.servlet.http.HttpServletRequest;
28+
import jakarta.servlet.http.HttpServletResponse;
29+
import org.springframework.core.env.Environment;
30+
import org.springframework.security.core.Authentication;
31+
import org.springframework.ui.ModelMap;
32+
import org.springframework.web.context.request.RequestContextHolder;
33+
import org.springframework.web.context.request.ServletRequestAttributes;
34+
35+
import javax.annotation.PostConstruct;
36+
import javax.inject.Inject;
37+
38+
public class BaseController {
39+
40+
@Inject
41+
private Environment environment;
42+
43+
@Inject
44+
private IdentifierService identifierService;
45+
46+
@Inject
47+
protected SpecExpressionResolver expressionResolver;
48+
49+
@Inject
50+
private UserService userService;
51+
52+
private String title;
53+
private boolean titleContainsExpression;
54+
55+
@PostConstruct
56+
public void baseInit() {
57+
title = environment.getProperty("proxy.title", "ShinyProxy");
58+
titleContainsExpression = title.contains("#{");
59+
}
60+
61+
protected void prepareMap(ModelMap map) {
62+
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes();
63+
HttpServletRequest httpServletRequest = servletRequestAttributes.getRequest();
64+
HttpServletResponse httpServletResponse = servletRequestAttributes.getResponse();
65+
map.put("title", getTitle(userService.getCurrentAuth(), httpServletRequest.getServerName()));
66+
// no versioning (using instanceId) needed since paths already contain a version
67+
map.put("bootstrapCss", "/css/bootstrap.css");
68+
map.put("bootstrapJs", "/js/bootstrap.js");
69+
map.put("jqueryJs", "/webjars/jquery/3.7.1/jquery.min.js");
70+
map.put("fontAwesomeCss", "/webjars/fontawesome/4.7.0/css/font-awesome.min.css");
71+
map.put("resourcePrefix", "/" + identifierService.instanceId);
72+
73+
map.put("request", httpServletRequest);
74+
map.put("response", httpServletResponse);
75+
}
76+
77+
private String getTitle(Authentication user, String serverName) {
78+
if (!titleContainsExpression) {
79+
return title;
80+
}
81+
SpecExpressionContext context = SpecExpressionContext.create(
82+
user,
83+
user.getPrincipal(),
84+
user.getCredentials()
85+
)
86+
.serverName(serverName)
87+
.build();
88+
return expressionResolver.evaluateToString(title, context);
89+
}
90+
91+
}

0 commit comments

Comments
 (0)