diff --git a/hawkbit-runtime/README.md b/hawkbit-runtime/README.md index 446001cc87..3793b6b414 100644 --- a/hawkbit-runtime/README.md +++ b/hawkbit-runtime/README.md @@ -11,6 +11,5 @@ hawkBit Runtime | `hawkbit-ddi-server/` | Spring-Boot application of hawkBit DDI server. | | `hawkbit-dmf-server/` | Spring-Boot application of hawkBit DMF server. | | `hawkbit-mgmt-server/` | Spring-Boot application of hawkBit Management server. Provides REST Management API and rollouts / auto assigment processing | -| `hawkbit-vv8-ui/` | Spring-Boot application of hawkBit Vaadin 8 UI. | Note: micro service setup requires all services using DB to use same shared DB. So, they don't work with default in memory H2 database. Docker compose with mysql shows an example setup. diff --git a/hawkbit-runtime/docker/docker-compose-micro-services-mysql.yml b/hawkbit-runtime/docker/docker-compose-micro-services-mysql.yml index 78b7d9ae36..7e11b6ef09 100644 --- a/hawkbit-runtime/docker/docker-compose-micro-services-mysql.yml +++ b/hawkbit-runtime/docker/docker-compose-micro-services-mysql.yml @@ -75,29 +75,3 @@ services: labels: NAME: "hawkbit-mgmt" - - # --------------------- - # HawkBit MGMT - # --------------------- - hawkbit-vv8ui: - image: "hawkbit/hawkbit-vv8-ui:latest-mysql" - environment: - - 'SPRING_DATASOURCE_URL=jdbc:mariadb://mysql:3306/hawkbit' - - 'SPRING_RABBITMQ_HOST=rabbitmq' - - 'SPRING_RABBITMQ_USERNAME=guest' - - 'SPRING_RABBITMQ_PASSWORD=guest' - - 'SPRING_DATASOURCE_USERNAME=root' - volumes: - - artifactrepo:/artifactrepo - restart: always - ports: - - "8082:8082" - depends_on: - mysql: - condition: service_healthy - labels: - NAME: "hawkbit-vv8-ui" - -volumes: - artifactrepo: - driver: local diff --git a/hawkbit-runtime/docker/docker_build/build_all_dev.sh b/hawkbit-runtime/docker/docker_build/build_all_dev.sh index 4538bab84d..06bcf64ca1 100755 --- a/hawkbit-runtime/docker/docker_build/build_all_dev.sh +++ b/hawkbit-runtime/docker/docker_build/build_all_dev.sh @@ -51,7 +51,6 @@ function build() { build "hawkbit-ddi-server" build "hawkbit-dmf-server" build "hawkbit-mgmt-server" -build "hawkbit-vv8-ui" build "hawkbit-simple-ui" build "hawkbit-update-server" diff --git a/hawkbit-runtime/hawkbit-vv8-ui/README.md b/hawkbit-runtime/hawkbit-vv8-ui/README.md deleted file mode 100644 index 24b8e1a080..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# hawkBit Vaadin 8 UI (EXPERIMENTAL and already DEPRECATED!) -The hawkBit Vaadin v8 UI is a standalone spring-boot application with an embedded servlet container. It should be started with at least hawkbit-mgmt-server. - -## On your own workstation - -### Run - -```bash -java -jar hawkbit-runtime/hawkbit-vv8-ui/target/hawkbit-vv8-ui-*-SNAPSHOT.jar -``` - -_(Note: you have to add the JDBC driver also to your class path if you intend to use another database than H2.)_ - -Or: - -```bash -run org.eclipse.hawkbit.app.vv8ui.Vv8UIStart -``` - -### Usage -The Management UI can be accessed via http://localhost:8082/UI - -### Clustering (Experimental!!!) -The micro-service instances are configured to communicate via Spring Cloud Bus. You could run multiple instances of any micro-service but hawkbit-mgmt-server. Management server run some schedulers which shall not run simultaneously - e.g. auto assignment checker and rollouts executor. To run multiple management server instances you shall do some extensions of hawkbit to ensure that they wont run schedulers simultaneously or you shall configure all instances but one to do not run schedulers! - -## Optional Protostuff for Sprign cloud bus -The micro-service instances are configured to communicate via Spring Cloud Bus. Optionally, you could use [Protostuff](https://github.com/protostuff/protostuff) based message payload serialization for improved performance. - -**Note**: If Protostuff is enabled it shall be enabled on all microservices! - -Add/Uncomment to/in your `application.properties` : - -```properties -spring.cloud.stream.bindings.springCloudBusInput.content-type=application/binary+protostuff -spring.cloud.stream.bindings.springCloudBusOutput.content-type=application/binary+protostuff -``` - -Add to your `pom.xml` : - -```xml - - io.protostuff - protostuff-core - - - io.protostuff - protostuff-runtime - -``` \ No newline at end of file diff --git a/hawkbit-runtime/hawkbit-vv8-ui/pom.xml b/hawkbit-runtime/hawkbit-vv8-ui/pom.xml deleted file mode 100644 index d1ab6f26eb..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - 4.0.0 - - org.eclipse.hawkbit - hawkbit-runtime-parent - ${revision} - - hawkbit-vv8-ui - hawkBit :: Runtime :: Vaadin v8 UI - - - org.eclipse.hawkbit.app.vv8ui.Vaadin8UIStart - - - - - org.eclipse.hawkbit - hawkbit-boot-starter-mgmt-ui - ${project.version} - - - - org.springframework.cloud - spring-cloud-stream-binder-rabbit - - - \ No newline at end of file diff --git a/hawkbit-runtime/hawkbit-vv8-ui/src/main/java/org/eclipse/hawkbit/app/vv8ui/ErrorController.java b/hawkbit-runtime/hawkbit-vv8-ui/src/main/java/org/eclipse/hawkbit/app/vv8ui/ErrorController.java deleted file mode 100644 index 4b2734b18c..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/src/main/java/org/eclipse/hawkbit/app/vv8ui/ErrorController.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) 2015 Bosch Software Innovations GmbH and others - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - */ -package org.eclipse.hawkbit.app.vv8ui; - -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.boot.autoconfigure.web.ServerProperties; -import org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController; -import org.springframework.boot.web.servlet.error.ErrorAttributes; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; - -/** - * Error page controller that ensures that ocet stream does not return text in - * case of an error. - */ -@Controller -// Exception squid:S3752 - errors need handling for all methods -@SuppressWarnings("squid:S3752") -public class ErrorController extends BasicErrorController { - - private static final String PATH = "path"; - - /** - * A new {@link ErrorController}. - * - * @param errorAttributes - * the error attributes - * @param serverProperties - * configuration properties - */ - public ErrorController(final ErrorAttributes errorAttributes, final ServerProperties serverProperties) { - super(errorAttributes, serverProperties.getError()); - } - - @RequestMapping(produces = MediaType.APPLICATION_OCTET_STREAM_VALUE) - public ResponseEntity errorStream(final HttpServletRequest request, final HttpServletResponse response) { - final HttpStatus status = getStatus(request); - return new ResponseEntity<>(status); - } - - @Override - @RequestMapping - public ResponseEntity> error(final HttpServletRequest request) { - final HttpStatus status = getStatus(request); - final Map body = getErrorAttributesWithoutPath(request); - return new ResponseEntity<>(body, status); - } - - private Map getErrorAttributesWithoutPath(final HttpServletRequest request) { - final Map body = getErrorAttributes(request, getErrorAttributeOptions(request, MediaType.ALL)); - if (body != null && body.containsKey(PATH)) { - body.remove(PATH); - } - return body; - } -} diff --git a/hawkbit-runtime/hawkbit-vv8-ui/src/main/java/org/eclipse/hawkbit/app/vv8ui/MyLoginUI.java b/hawkbit-runtime/hawkbit-vv8-ui/src/main/java/org/eclipse/hawkbit/app/vv8ui/MyLoginUI.java deleted file mode 100644 index 217218342b..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/src/main/java/org/eclipse/hawkbit/app/vv8ui/MyLoginUI.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) 2015 Bosch Software Innovations GmbH and others - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - */ -package org.eclipse.hawkbit.app.vv8ui; - -import org.eclipse.hawkbit.im.authentication.MultitenancyIndicator; -import org.eclipse.hawkbit.ui.UiProperties; -import org.eclipse.hawkbit.ui.login.AbstractHawkbitLoginUI; -import org.eclipse.hawkbit.ui.themes.HawkbitTheme; -import org.eclipse.hawkbit.ui.utils.VaadinMessageSource; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; -import org.vaadin.spring.security.VaadinSecurity; - -import com.vaadin.spring.annotation.SpringUI; - -/** - * Example hawkBit login UI implementation. - * - * A {@link SpringUI} annotated class must be present in the classpath for the - * login path. The easiest way to get an hawkBit login UI running is to extend - * the {@link AbstractHawkbitLoginUI} and to annotated it with {@link SpringUI} - * as in this example to the defined {@link HawkbitTheme#LOGIN_UI_PATH}. - */ -@SpringUI(path = HawkbitTheme.LOGIN_UI_PATH) -// Exception squid:MaximumInheritanceDepth - Most of the inheritance comes from -// Vaadin. -@SuppressWarnings({ "squid:MaximumInheritanceDepth" }) -public class MyLoginUI extends AbstractHawkbitLoginUI { - private static final long serialVersionUID = 1L; - - @Autowired - MyLoginUI(final ApplicationContext context, final VaadinSecurity vaadinSecurity, final VaadinMessageSource i18n, - final UiProperties uiProperties, final MultitenancyIndicator multiTenancyIndicator) { - super(context, vaadinSecurity, i18n, uiProperties, multiTenancyIndicator); - } - -} diff --git a/hawkbit-runtime/hawkbit-vv8-ui/src/main/java/org/eclipse/hawkbit/app/vv8ui/MyUI.java b/hawkbit-runtime/hawkbit-vv8-ui/src/main/java/org/eclipse/hawkbit/app/vv8ui/MyUI.java deleted file mode 100644 index b677a33ec7..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/src/main/java/org/eclipse/hawkbit/app/vv8ui/MyUI.java +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2015 Bosch Software Innovations GmbH and others - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - */ -package org.eclipse.hawkbit.app.vv8ui; - -import org.eclipse.hawkbit.ui.AbstractHawkbitUI; -import org.eclipse.hawkbit.ui.UiProperties; -import org.eclipse.hawkbit.ui.components.NotificationUnreadButton; -import org.eclipse.hawkbit.ui.error.ErrorView; -import org.eclipse.hawkbit.ui.menu.DashboardMenu; -import org.eclipse.hawkbit.ui.push.EventPushStrategy; -import org.eclipse.hawkbit.ui.push.UIEventProvider; -import org.eclipse.hawkbit.ui.utils.VaadinMessageSource; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; -import org.vaadin.spring.events.EventBus.UIEventBus; - -import com.vaadin.annotations.Push; -import com.vaadin.server.ErrorHandler; -import com.vaadin.shared.communication.PushMode; -import com.vaadin.shared.ui.ui.Transport; -import com.vaadin.spring.annotation.SpringUI; -import com.vaadin.spring.navigator.SpringViewProvider; - -/** - * Example hawkBit UI implementation. - * - * A {@link SpringUI} annotated class must be present in the classpath. The - * easiest way to get an hawkBit UI running is to extend the - * {@link AbstractHawkbitUI} and to annotated it with {@link SpringUI} as in - * this example. WEBSOCKET_XHR transport is used instead of WEBSOCKET in order - * to preserve Spring Security Context, that does not work using websocket - * communication with Vaadin Shared Security. - * - */ -@SpringUI -@Push(value = PushMode.AUTOMATIC, transport = Transport.WEBSOCKET_XHR) -// Exception squid:MaximumInheritanceDepth - Most of the inheritance comes from -// Vaadin. -@SuppressWarnings({ "squid:MaximumInheritanceDepth" }) -public class MyUI extends AbstractHawkbitUI { - private static final long serialVersionUID = 1L; - - @Autowired - MyUI(final EventPushStrategy pushStrategy, final UIEventBus eventBus, final UIEventProvider eventProvider, - final SpringViewProvider viewProvider, final ApplicationContext context, final DashboardMenu dashboardMenu, - final ErrorView errorview, final NotificationUnreadButton notificationUnreadButton, - final UiProperties uiProperties, final VaadinMessageSource i18n, final ErrorHandler uiErrorHandler) { - super(pushStrategy, eventBus, eventProvider, viewProvider, context, dashboardMenu, errorview, - notificationUnreadButton, uiProperties, i18n, uiErrorHandler); - } - -} diff --git a/hawkbit-runtime/hawkbit-vv8-ui/src/main/java/org/eclipse/hawkbit/app/vv8ui/Vaadin8UIStart.java b/hawkbit-runtime/hawkbit-vv8-ui/src/main/java/org/eclipse/hawkbit/app/vv8ui/Vaadin8UIStart.java deleted file mode 100644 index 3c98e5e2b6..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/src/main/java/org/eclipse/hawkbit/app/vv8ui/Vaadin8UIStart.java +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) 2015 Bosch Software Innovations GmbH and others - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - */ -package org.eclipse.hawkbit.app.vv8ui; - -import org.eclipse.hawkbit.autoconfigure.security.EnableHawkbitManagedSecurityConfiguration; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -/** - * A {@link SpringBootApplication} annotated class with a main method to start. - * The minimal configuration for the stand alone hawkBit server. - * - */ -@SpringBootApplication -@EnableHawkbitManagedSecurityConfiguration -public class Vaadin8UIStart { - - /** - * Main method to start the spring-boot application. - * - * @param args - * the VM arguments. - */ - public static void main(final String[] args) { - SpringApplication.run(Vaadin8UIStart.class, args); - } -} diff --git a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application-db2.properties b/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application-db2.properties deleted file mode 100644 index 16a0fa0b8c..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application-db2.properties +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright (c) 2019 Bosch Software Innovations GmbH and others -# -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# - -# This profile adds basic configurations for a DB2 DB usage. -# Keep in mind that you need the DB2 driver in your classpath on compile. -# see https://www.eclipse.org/hawkbit/guides/runhawkbit/ - -spring.jpa.database=DB2 -spring.datasource.url=jdbc:db2://localhost:50000/hawkbit -spring.datasource.username=db2inst1 -spring.datasource.password=db2inst1-pwd -spring.datasource.driverClassName=com.ibm.db2.jcc.DB2Driver diff --git a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application-mssql.properties b/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application-mssql.properties deleted file mode 100644 index a00c95aa8e..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application-mssql.properties +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright (c) 2018 Bosch Software Innovations GmbH and others -# -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# - -# This profile adds basic configurations for a Microsoft SQL Server DB usage. -# Keep in mind that you need the SQL server driver in your classpath on compile. -# see https://www.eclipse.org/hawkbit/guides/runhawkbit/ - -spring.jpa.database=SQL_SERVER -spring.datasource.url=jdbc:sqlserver://localhost:1433;database=hawkbit -spring.datasource.username=SA -spring.datasource.password= -spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver diff --git a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application-mysql.properties b/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application-mysql.properties deleted file mode 100644 index 979fec5630..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application-mysql.properties +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright (c) 2015 Bosch Software Innovations GmbH and others -# -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# - -# This profile adds basic configurations for a MySQL DB usage. -# Keep in mind that you need the MariaDB driver in your classpath on compile. -# see https://www.eclipse.org/hawkbit/guides/runhawkbit/ - -spring.jpa.database=MYSQL -spring.datasource.url=jdbc:mariadb://localhost:3306/hawkbit -spring.datasource.username=root -spring.datasource.password= -spring.datasource.driverClassName=org.mariadb.jdbc.Driver diff --git a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application-postgresql.properties b/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application-postgresql.properties deleted file mode 100644 index 8b7a40af52..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application-postgresql.properties +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright (c) 2020 Enapter Co.,Ltd -# -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# - -# This profile adds basic configurations for a PostgreSQL usage. -# Keep in mind that you need the PostgreSQL driver in your classpath on compile. -# see https://www.eclipse.org/hawkbit/guides/runhawkbit/ - -spring.jpa.database=POSTGRESQL -spring.datasource.url=jdbc:postgresql://localhost:5432/hawkbit -spring.datasource.username=postgres -spring.datasource.password=admin -spring.datasource.driverClassName=org.postgresql.Driver diff --git a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application.properties b/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application.properties deleted file mode 100644 index 451eec3389..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/application.properties +++ /dev/null @@ -1,77 +0,0 @@ -# -# Copyright (c) 2015 Bosch Software Innovations GmbH and others -# -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# - -spring.application.name=vv8-ui-server -server.port=8082 - -# User Security -spring.security.user.name=admin -spring.security.user.password={noop}admin -spring.main.allow-bean-definition-overriding=true - -# Http Encoding -server.servlet.encoding.charset=UTF-8 -server.servlet.encoding.enabled=true -server.servlet.encoding.force=true - -# DDI authentication configuration -hawkbit.server.ddi.security.authentication.anonymous.enabled=false -hawkbit.server.ddi.security.authentication.targettoken.enabled=false -hawkbit.server.ddi.security.authentication.gatewaytoken.enabled=false - -# Optional events -hawkbit.server.repository.publish-target-poll-event=false - -## Configuration for DMF/RabbitMQ integration -spring.rabbitmq.username=guest -spring.rabbitmq.password=guest -spring.rabbitmq.virtual-host=/ -spring.rabbitmq.host=localhost -spring.rabbitmq.port=5672 - -# Define own users instead of default "admin" user: -#hawkbit.server.im.users[0].username=hawkbit -#hawkbit.server.im.users[0].password={noop}isAwesome! -#hawkbit.server.im.users[0].firstname=Eclipse -#hawkbit.server.im.users[0].lastname=HawkBit -#hawkbit.server.im.users[0].permissions=ALL - -# Enable CORS and specify the allowed origins: -#hawkbit.server.security.cors.enabled=true -#hawkbit.server.security.cors.allowedOrigins=http://localhost - -## Disable swagger -hawkbit.server.swagger.mgmt.api.group.enabled=false -hawkbit.server.swagger.ddi.api.group.enabled=false - -# Flyway disabled - US only -spring.flyway.enabled=false -## SQL Database Configuration - END - -## No Schedulers - START -hawkbit.autoassign.scheduler.enabled=false -hawkbit.rollout.scheduler.enabled=false -## No Schedulers - END - -# Disable discovery client of spring-cloud-commons -spring.cloud.discovery.enabled=false -# Enable communication between services -spring.cloud.bus.enabled=true -spring.cloud.bus.ack.enabled=false -spring.cloud.bus.refresh.enabled=false -spring.cloud.bus.env.enabled=false -endpoints.spring.cloud.bus.refresh.enabled=false -endpoints.spring.cloud.bus.env.enabled=false -spring.cloud.stream.bindings.springCloudBusInput.group=vv8-ui-server - -# To use protostuff (for instance fot improved performance) you shall uncomment -# the following two lines and add io.protostuff:protostuff-core and io.protostuff:protostuff-runtime to dependencies -#spring.cloud.stream.bindings.springCloudBusInput.content-type=application/binary+protostuff -#spring.cloud.stream.bindings.springCloudBusOutput.content-type=application/binary+protostuff \ No newline at end of file diff --git a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/banner.txt b/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/banner.txt deleted file mode 100644 index 64f7e47a9f..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/banner.txt +++ /dev/null @@ -1,18 +0,0 @@ - ______ _ _ _ _ ____ _ _ - | ____| | (_) | | | | | _ \(_) | - | |__ ___| |_ _ __ ___ ___ | |__ __ ___ _| | _| |_) |_| |_ - | __| / __| | | '_ \/ __|/ _ \ | '_ \ / _` \ \ /\ / / |/ / _ <| | __| - | |___| (__| | | |_) \__ \ __/ | | | | (_| |\ V V /| <| |_) | | |_ - |______\___|_|_| .__/|___/\___| |_| |_|\__,_| \_/\_/ |_|\_\____/|_|\__| - __ __ | | _ _ ___ _ _ _____ - \ \ / / |_| | (_) / _ \ | | | |_ _| - \ \ / /_ _ __ _ __| |_ _ __ __ _| (_) | | | | | | | - \ \/ / _` |/ _` |/ _` | | '_ \ \ \ / /> _ < | | | | | | - \ / (_| | (_| | (_| | | | | | \ V /| (_) | | |__| |_| |_ - \/ \__,_|\__,_|\__,_|_|_| |_| \_/ \___/ \____/|_____| - -Eclipse hawkBit Vaadin v8 UI ${application.formatted-version} -using Spring Boot ${spring-boot.formatted-version} - -Go to https://www.eclipse.org/hawkbit for more information. - \ No newline at end of file diff --git a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/logback-spring.xml b/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/logback-spring.xml deleted file mode 100644 index b71e34118f..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/src/main/resources/logback-spring.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/hawkbit-runtime/hawkbit-vv8-ui/src/test/java/org/eclipse/hawkbit/app/vv8ui/AbstractSecurityTest.java b/hawkbit-runtime/hawkbit-vv8-ui/src/test/java/org/eclipse/hawkbit/app/vv8ui/AbstractSecurityTest.java deleted file mode 100644 index f99aa2465c..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/src/test/java/org/eclipse/hawkbit/app/vv8ui/AbstractSecurityTest.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) 2020 Bosch.IO GmbH and others - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - */ -package org.eclipse.hawkbit.app.vv8ui; - -import org.eclipse.hawkbit.repository.test.util.SharedSqlTestDatabaseExtension; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.extension.ExtendWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.DefaultMockMvcBuilder; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.web.context.WebApplicationContext; - -@SpringBootTest(properties = { "hawkbit.dmf.rabbitmq.enabled=false" }) -@ExtendWith(SharedSqlTestDatabaseExtension.class) -public abstract class AbstractSecurityTest { - - @Autowired - private WebApplicationContext context; - - protected MockMvc mvc; - - @BeforeEach - public void setup() { - final DefaultMockMvcBuilder builder = MockMvcBuilders.webAppContextSetup(context) - .apply(SecurityMockMvcConfigurers.springSecurity()).dispatchOptions(true); - mvc = builder.build(); - } - -} diff --git a/hawkbit-runtime/hawkbit-vv8-ui/src/test/java/org/eclipse/hawkbit/app/vv8ui/AllowedHostNamesTest.java b/hawkbit-runtime/hawkbit-vv8-ui/src/test/java/org/eclipse/hawkbit/app/vv8ui/AllowedHostNamesTest.java deleted file mode 100644 index 549f17a310..0000000000 --- a/hawkbit-runtime/hawkbit-vv8-ui/src/test/java/org/eclipse/hawkbit/app/vv8ui/AllowedHostNamesTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Copyright (c) 2019 Bosch Software Innovations GmbH and others - * - * This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 - * which is available at https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - */ -package org.eclipse.hawkbit.app.vv8ui; - -import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - -import io.qameta.allure.Description; -import org.junit.jupiter.api.Test; -import org.springframework.http.HttpHeaders; -import org.springframework.security.web.firewall.RequestRejectedException; - -import io.qameta.allure.Feature; -import io.qameta.allure.Story; -import org.springframework.test.context.TestPropertySource; - -@TestPropertySource(properties = { "hawkbit.server.security.allowedHostNames=localhost", - "hawkbit.server.security.httpFirewallIgnoredPaths=/index.html" }) -@Feature("Integration Test - Security") -@Story("Allowed Host Names") -public class AllowedHostNamesTest extends AbstractSecurityTest { - - @Test - @Description("Tests whether a RequestRejectedException is thrown when not allowed host is used") - public void allowedHostNameWithNotAllowedHost() { - assertThatExceptionOfType(RequestRejectedException.class).isThrownBy( - () -> mvc.perform(get("/").header(HttpHeaders.HOST, "www.google.com"))); - } - - @Test - @Description("Tests whether request is redirected when allowed host is used") - public void allowedHostNameWithAllowedHost() throws Exception { - mvc.perform(get("/").header(HttpHeaders.HOST, "localhost")).andExpect(status().is3xxRedirection()); - } - - @Test - @Description("Tests whether request without allowed host name and with ignored path end up with a client error") - public void notAllowedHostnameWithIgnoredPath() throws Exception { - mvc.perform(get("/index.html").header(HttpHeaders.HOST, "www.google.com")) - .andExpect(status().is4xxClientError()); - } -} \ No newline at end of file diff --git a/hawkbit-runtime/pom.xml b/hawkbit-runtime/pom.xml index 09c265f3a7..16c7aebad3 100644 --- a/hawkbit-runtime/pom.xml +++ b/hawkbit-runtime/pom.xml @@ -98,8 +98,7 @@ hawkbit-dmf-server hawkbit-mgmt-server hawkbit-simple-ui - - hawkbit-vv8-ui + hawkbit-update-server diff --git a/site/content/gettingstarted.md b/site/content/gettingstarted.md index d58c2c9229..c2c6dedf43 100755 --- a/site/content/gettingstarted.md +++ b/site/content/gettingstarted.md @@ -28,7 +28,7 @@ HawkBit Update Server username/password -> admin/admin as default login credenti It supports two configurations: * monolith - hawkbit-update-server -* micro-service - hawkbit-mgmt-server, hawkbit-ddi-server, hawkbit-dmf-server, hawkbit-vv8-ui. +* micro-service - hawkbit-mgmt-server, hawkbit-ddi-server, hawkbit-dmf-server. ### A: Run hawkBit Update Server (Monolith) as Docker Container