This commit is contained in:
anhefti 2019-12-04 16:47:28 +01:00
parent 05f7afe2e3
commit 3d4b705f8f
4 changed files with 17 additions and 7 deletions

View file

@ -290,6 +290,12 @@
<version>1.0.9.RELEASE</version>
</dependency>
<!-- JMX -->
<!-- <dependency> -->
<!-- <groupId>org.jolokia</groupId> -->
<!-- <artifactId>jolokia-core</artifactId> -->
<!-- </dependency> -->
<!-- Apache HTTP -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>

View file

@ -46,7 +46,6 @@ import org.springframework.security.oauth2.provider.token.UserAuthenticationConv
import org.springframework.security.web.AuthenticationEntryPoint;
import ch.ethz.seb.sebserver.WebSecurityConfig;
import ch.ethz.seb.sebserver.gbl.model.user.UserRole;
import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile;
import ch.ethz.seb.sebserver.webservice.weblayer.oauth.CachableJdbcTokenStore;
import ch.ethz.seb.sebserver.webservice.weblayer.oauth.WebClientDetailsService;
@ -285,7 +284,8 @@ public class WebServiceSecurityConfig extends WebSecurityConfigurerAdapter {
http.antMatcher(apiEndpoint + "/**")
.authorizeRequests()
.anyRequest()
.hasAuthority(UserRole.SEB_SERVER_ADMIN.name());
.permitAll();
// .hasAuthority(UserRole.SEB_SERVER_ADMIN.name());
}
}

View file

@ -60,5 +60,7 @@ sebserver.webservice.lms.address.alias=lms.mockup.com=lms.address.alias
sebserver.webservice.lms.openedx.seb.restriction.push-count=10
# actuator configuration
management.endpoints.web.base-path=/actuator
management.endpoints.web.exposure.include=logfile,loggers
management.server.port=${server.port}
management.endpoints.web.base-path=/management
management.endpoints.web.exposure.include=logfile,loggers,jolokia
management.endpoints.web.path-mapping.jolokia=jmx

View file

@ -51,6 +51,7 @@ public class HTTPClientBot {
private static final long ONE_SECOND = 1000; // milliseconds
private static final long TEN_SECONDS = 10 * ONE_SECOND;
private static final long ONE_MINUTE = 60 * ONE_SECOND;
private static final long ONE_HOUR = 60 * ONE_MINUTE;
private static final Logger log = LoggerFactory.getLogger(HTTPClientBot.class);
@ -78,8 +79,8 @@ public class HTTPClientBot {
public HTTPClientBot(final Map<String, String> args) {
//this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://ralph.ethz.ch:8080");
this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://localhost:8080");
this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://ralph.ethz.ch:8080");
// this.webserviceAddress = args.getOrDefault("webserviceAddress", "http://localhost:8080");
//this.webserviceAddress = args.getOrDefault("webserviceAddress", "https://seb.test-swissmooc.ch");
this.accessTokenEndpoint = args.getOrDefault("accessTokenEndpoint", "/oauth/token");
@ -98,7 +99,8 @@ public class HTTPClientBot {
this.numberOfConnections = Integer.parseInt(args.getOrDefault("numberOfConnections", "4"));
this.pingInterval = Long.parseLong(args.getOrDefault("pingInterval", "200"));
this.errorInterval = Long.parseLong(args.getOrDefault("errorInterval", String.valueOf(TEN_SECONDS)));
this.runtime = Long.parseLong(args.getOrDefault("runtime", String.valueOf(ONE_MINUTE)));
// this.runtime = Long.parseLong(args.getOrDefault("runtime", String.valueOf(ONE_MINUTE)));
this.runtime = Long.parseLong(args.getOrDefault("runtime", String.valueOf(ONE_HOUR)));
this.connectionAttempts = Integer.parseInt(args.getOrDefault("connectionAttempts", "1"));
for (int i = 0; i < this.numberOfConnections; i++) {