Gitlab migration
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>flowable-local-design</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>flowable-local-design</name>
|
||||
<description>flowable local Flowable Design</description>
|
||||
|
||||
<parent>
|
||||
<groupId>com.flowable.local</groupId>
|
||||
<artifactId>14</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- flowable local -->
|
||||
<!-- =============== -->
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>${org.postgresql.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Flowable Design -->
|
||||
<!-- =============== -->
|
||||
<dependency>
|
||||
<groupId>com.flowable.design</groupId>
|
||||
<artifactId>flowable-spring-boot-starter-design</artifactId>
|
||||
<version>${com.flowable.platform.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.flowable.design</groupId>
|
||||
<artifactId>flowable-spring-boot-starter-design-actuator</artifactId>
|
||||
<version>${com.flowable.platform.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.flowable.platform</groupId>
|
||||
<artifactId>flowable-platform-palette</artifactId>
|
||||
<version>${com.flowable.platform.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring Boot -->
|
||||
<!-- =========== -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Testing -->
|
||||
<!-- ======= -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>${com.h2database.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.flowable.local.design;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class FlowableLocalDesignApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(FlowableLocalDesignApplication.class, args);
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.flowable.local.design.configuration;
|
||||
|
||||
import com.flowable.design.actuate.autoconfigure.security.servlet.ActuatorRequestMatcher;
|
||||
import com.flowable.design.engine.api.idm.DesignPrivileges;
|
||||
import org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest;
|
||||
import org.springframework.boot.actuate.health.HealthEndpoint;
|
||||
import org.springframework.boot.actuate.info.InfoEndpoint;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.http.SessionCreationPolicy;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
|
||||
@Configuration
|
||||
public class SecurityActuatorConfiguration {
|
||||
|
||||
@Bean
|
||||
@Order(6)
|
||||
public SecurityFilterChain basicActuatorSecurity(HttpSecurity http) throws Exception {
|
||||
http
|
||||
.sessionManagement()
|
||||
.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
|
||||
.and()
|
||||
.csrf()
|
||||
.disable();
|
||||
|
||||
http
|
||||
.requestMatcher(new ActuatorRequestMatcher())
|
||||
.authorizeRequests()
|
||||
.requestMatchers(EndpointRequest.to(InfoEndpoint.class, HealthEndpoint.class)).permitAll()
|
||||
.requestMatchers(EndpointRequest.toAnyEndpoint()).hasAuthority(DesignPrivileges.ACCESS_ADMIN)
|
||||
.anyRequest().denyAll()
|
||||
.and().httpBasic();
|
||||
|
||||
return http.build();
|
||||
}
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.flowable.local.design.configuration;
|
||||
|
||||
import com.flowable.autoconfigure.design.security.DesignHttpSecurityCustomizer;
|
||||
import com.flowable.design.security.spring.web.authentication.AjaxAuthenticationFailureHandler;
|
||||
import com.flowable.design.security.spring.web.authentication.AjaxAuthenticationSuccessHandler;
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.http.SessionCreationPolicy;
|
||||
import org.springframework.security.web.SecurityFilterChain;
|
||||
import org.springframework.security.web.authentication.HttpStatusEntryPoint;
|
||||
import org.springframework.security.web.util.matcher.AnyRequestMatcher;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@EnableWebSecurity
|
||||
public class SecurityConfiguration {
|
||||
|
||||
@Bean
|
||||
@Order(10)
|
||||
public SecurityFilterChain basicDefaultSecurity(HttpSecurity http, ObjectProvider<DesignHttpSecurityCustomizer> httpSecurityCustomizers) throws Exception {
|
||||
for (DesignHttpSecurityCustomizer customizer : httpSecurityCustomizers.orderedStream()
|
||||
.collect(Collectors.toList())) {
|
||||
customizer.customize(http);
|
||||
}
|
||||
|
||||
http
|
||||
.sessionManagement()
|
||||
.sessionCreationPolicy(SessionCreationPolicy.STATELESS);
|
||||
http
|
||||
.logout()
|
||||
.logoutUrl("/auth/logout")
|
||||
.logoutSuccessUrl("/");
|
||||
|
||||
http
|
||||
.exceptionHandling()
|
||||
.defaultAuthenticationEntryPointFor(new HttpStatusEntryPoint(HttpStatus.UNAUTHORIZED), AnyRequestMatcher.INSTANCE)
|
||||
.and()
|
||||
.formLogin()
|
||||
.loginProcessingUrl("/auth/login")
|
||||
.successHandler(new AjaxAuthenticationSuccessHandler())
|
||||
.failureHandler(new AjaxAuthenticationFailureHandler())
|
||||
.and()
|
||||
.authorizeRequests()
|
||||
// allow context root for all (it triggers the loading of the initial page)
|
||||
.antMatchers("/").permitAll()
|
||||
.antMatchers(
|
||||
"/**/*.svg", "/**/*.ico", "/**/*.png", "/**/*.woff2", "/**/*.css",
|
||||
"/**/*.woff", "/**/*.html", "/**/*.js",
|
||||
"/**/flowable-frontend-configuration",
|
||||
"/**/index.html").permitAll()
|
||||
.anyRequest().authenticated()
|
||||
.and()
|
||||
.httpBasic();
|
||||
|
||||
return http.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# == Embedded DB ==
|
||||
spring.datasource.driver-class-name=org.h2.Driver
|
||||
spring.datasource.url=jdbc:h2:file:./h2-database/flowable-design;DB_CLOSE_ON_EXIT=FALSE
|
||||
@@ -0,0 +1,30 @@
|
||||
server.port=8093
|
||||
server.servlet.context-path=/
|
||||
|
||||
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||
spring.datasource.url=jdbc:postgresql://localhost:5432/flowable
|
||||
spring.datasource.username=flowable
|
||||
spring.datasource.password=flowable
|
||||
|
||||
# Local Elasticsearch
|
||||
spring.elasticsearch.uris=http://localhost:9200
|
||||
|
||||
# In order for hot swapping to work for the custom.js and custom.css
|
||||
spring.thymeleaf.cache=false
|
||||
spring.web.resources.chain.cache=false
|
||||
|
||||
# Enable all endpoints over HTTP
|
||||
management.endpoints.web.exposure.include=*
|
||||
management.endpoint.health.show-details=ALWAYS
|
||||
# Pretty-print JSON responses
|
||||
spring.jackson.serialization.indent_output=true
|
||||
|
||||
flowable.design.user-store.password=test
|
||||
flowable.design.remote.idm-url=http://localhost:8090
|
||||
flowable.design.remote.authentication.user=admin
|
||||
flowable.design.remote.authentication.password=test
|
||||
|
||||
flowable.design.db-store-enabled=false
|
||||
flowable.design.deployment-api-url=http://localhost:8090/app-api
|
||||
flowable.design.undeployment-api-url=http://localhost:8090/platform-api/app-deployments
|
||||
|
||||
Reference in New Issue
Block a user