Skip to content

Commit 1f150ca

Browse files
committed
Revert "Save work"
This reverts commit 9e98f39.
1 parent e8a3d0c commit 1f150ca

4 files changed

Lines changed: 3 additions & 65 deletions

File tree

src/main/java/eu/openanalytics/containerproxy/backend/kubernetes/KubernetesBackend.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ protected void doStopProxy(Proxy proxy) throws Exception {
586586
// specify gracePeriod 0, this was the default in previous version of the fabric8 k8s client
587587
kubeClient.resource(pod).withGracePeriod(0).delete();
588588
}
589-
589+
590590
Service service = Service.class.cast(container.getParameters().get(PARAM_SERVICE));
591591
if (service != null) {
592592
kubeClient.resource(service).withGracePeriod(0).delete();

src/main/java/eu/openanalytics/containerproxy/security/WebSecurityConfig.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import eu.openanalytics.containerproxy.auth.IAuthenticationBackend;
2525
import eu.openanalytics.containerproxy.auth.UserLogoutHandler;
2626
import eu.openanalytics.containerproxy.util.AppRecoveryFilter;
27-
import eu.openanalytics.containerproxy.util.IdFilter;
2827
import org.apache.logging.log4j.LogManager;
2928
import org.apache.logging.log4j.Logger;
3029
import org.springframework.beans.factory.annotation.Autowired;
@@ -78,10 +77,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
7877

7978
@Inject
8079
private AppRecoveryFilter appRecoveryFilter;
81-
82-
@Inject
83-
private IdFilter idFilter;
84-
80+
8581
@Autowired(required=false)
8682
private List<ICustomSecurityConfig> customConfigs;
8783

@@ -119,7 +115,6 @@ private void checkForIncorrectConfiguration(HttpServletRequest request) {
119115
protected void configure(HttpSecurity http) throws Exception {
120116
// App Recovery Filter
121117
http.addFilterAfter(appRecoveryFilter, BasicAuthenticationFilter.class);
122-
http.addFilterAfter(idFilter, BasicAuthenticationFilter.class);
123118

124119
// Perform CSRF check on the login form
125120
http.csrf().requireCsrfProtectionMatcher(new AntPathRequestMatcher("/login", "POST"));

src/main/java/eu/openanalytics/containerproxy/service/ProxyService.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ public void stopProxy(Proxy proxy, boolean async, boolean ignoreAccessControl) {
299299
if (!ignoreAccessControl && !userService.isAdmin() && !userService.isOwner(proxy)) {
300300
throw new AccessDeniedException(String.format("Cannot stop proxy %s: access denied", proxy.getId()));
301301
}
302+
activeProxies.remove(proxy);
302303

303304
Runnable releaser = () -> {
304305
try {
@@ -311,11 +312,6 @@ public void stopProxy(Proxy proxy, boolean async, boolean ignoreAccessControl) {
311312
applicationEventPublisher.publishEvent(new ProxyStopEvent(this, proxy.getUserId(), proxy.getSpec().getId(),
312313
Duration.ofMillis(System.currentTimeMillis() - proxy.getStartupTimestamp())));
313314
}
314-
try {
315-
Thread.sleep(2000);
316-
} catch (InterruptedException e) {
317-
throw new RuntimeException(e);
318-
}
319315
removeProxy(proxy);
320316
} catch (Exception e){
321317
log.error("Failed to release proxy " + proxy.getId(), e);

src/main/java/eu/openanalytics/containerproxy/util/IdFilter.java

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)