Commit Graph

47 Commits

Author SHA1 Message Date
Avgustin Marinov
56c548e474 Remove unused org.eclipse.hawkbit.api.HostnameResolver (#1978)
_release_notes_

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2024-11-08 17:05:14 +02:00
Avgustin Marinov
178fb48336 Remove OidcUserManagementAutoConfiguration from auto config (#1970)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2024-11-08 15:12:42 +02:00
Avgustin Marinov
d958d8e82c Remove download by downloadId functionality (#1820)
This functionallity seems to get via AMQP (after some authentication)
a private (wihtout need of authentication) url to an artifact assigned
to the controller.

By default, DDI or DMF shall provide proper urls (for direct download)
to devices and if they have to be without authentication this shall be
solved in different ways - for instance separate download server providing
dedicated private / signed urls.

This functinallity is not a real hawkBit part but more like something
intended to solve some edge cases.
Since it is complicated, heeds support, doesn't solve wide spread use
cases, and could be achieved with other means - better to be removed.

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-08-14 17:28:46 +03:00
Avgustin Marinov
3a34ded4f6 Support for simultaneous base and OAuth authentication (#1785)
* Remove _OidcAuthenticationSuccessHandler_:
  * _OAuth2AuthenticationToken.setDetails_ is made by jwt authentication converter
  * get tenant data (with potentially creating tenant) is done via a filter added in filterChainREST
* _filterChainREST_ uses _Customizer<OAuth2ResourceServerConfigurer<HttpSecurity>>_ as configuration for OAuth. Thus it is not bound with oauth client configuration
* _OidcUserManagementAutoConfiguration_ - now registers (if conditions are met) Customizer<OAuth2ResourceServerConfigurer<HttpSecurity>> which covers both - oauth legacy filter from filterChainREST and OidcBearerTokenAuthenticationFilter
* Since oauth clients are not related to hawkBit anymore (since removal of legacy UI) and the proper configuration would be via resource server or whatever, the _OidcUserManagementAutoConfiguration_ is DEPRECATED and for removal
* _UserAuthenticationFilter_ is removed
* Enabled sumiltaneous base and oauth authentication. Still, by default, if OAuth configured http authentication is disabled. However, if OAuth it is configured (via _Customizer<OAuth2ResourceServerConfigurer<HttpSecurity>>)_ and **hawkbit.server.security.allowHttpBasicOnOAuthEnabled** is set to **true** then http auth would be also enabled
* _OidcUserManagementAutoConfiguration_ could be disabled with **hawkbit.server.security.oAuth2OnClientsConfig.enabled=false**

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-07-26 10:59:15 +03:00
Avgustin Marinov
e0bc1f85c1 Remove default user/pass (#1577)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-01-31 16:15:46 +02:00
Avgustin Marinov
fc3cbe52ec [#1383] Spring Boot 3 migration Step 2: fix auto conigurations (2nd) (#1563)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com
2024-01-23 14:28:34 +02:00
Avgustin Marinov
6c542c3650 [#1383] Spring Boot 3 migration Step 2: fix auto conigurations (#1562)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com
2024-01-23 12:39:31 +02:00
Florian BEZANNIER
dafc08304d Add portRequest url handler property (#1449)
* Add portRequest url handler property

The option server.forward-headers-strategy=NATIVE allow to dynamicly
generate link based on X-Forwarded-Proto header.
Unfortunately Hawkbit artifact use a custom url handler.
This PR allow to serve artifacts on http and https in the same time.

Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>

* docs: use server.forward-headers-strategy option

---------

Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>
2023-10-19 12:04:23 +03:00
Avgustin Marinov
9c86729a68 [#1393,#1008] Switch to Eclipse v2.0 license (#1427)
Switching license from EPL v1 to v2. Following
https://www.eclipse.org/legal/epl-2.0/faq.php#h.tci84nlsqpgw

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-09-14 11:03:20 +03:00
Avgustin Marinov
56ea5b15c9 [#1383] Spring Boot 3 Migration / Step 1 (#1384)
1. PagingAndSortingRepository doesn't extend CrudRepository anymore. For all extending that interface repositories CrudRepository super interface shall be now declared (https://spring.io/blog/2022/02/22/announcing-listcrudrepository-friends-for-spring-data-3-0 -
```
The popular PagingAndSortingRepository used to extend from CrudRepository, but it no longer does. This lets you combine it
with either CrudRepository or ListCrudRepository or a base interface of your own creation. This means you now have to
explicitly extend from a CRUD fragment, even when you already extend from PagingAndSortingRepository.
```
)
2. org.eclipse.hawkbit.autoconfigure.mgmt.ui -> move in hawkbit-ui (to be ready for removal), anyway - it's a better location for ui related configs
3. extends WebMvcConfigurerAdapter -> implements WebMvcConfigurer
4. remove WebSecurityConfigurerAdapter -> https://docs.spring.io/spring-security/reference/5.8/migration/servlet/config.html#_stop_using_websecurityconfigureradapter, https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter
and add @Order to the bean reg!!
5. Use configurers (the other will be deprecated / removed), e.d:  http.csrf().disable() -> http.csrf(AbstractHttpConfigurer::disable)
6. configure(final AuthenticationManagerBuilder auth) -> put in httpsecurity config - http.getSharedObject(AuthenticationManagerBuilder.class).... (https://www.baeldung.com/spring-security-authentication-provider)
7. configure(final WebSecurity webSecurity) ->
```
@Bean
public WebSecurityCustomizer webSecurityCustomizer() {
    return (web) -> web.ignoring().antMatchers("/documentation/**", "/VAADIN/**", "/*.*", "/docs/**");
}
```
(https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter)
8. AuthenticationManager authenticationManagerBean() ->
```
@Bean
AuthenticationManager authenticationManager(final AuthenticationConfiguration authenticationConfiguration) throws Exception {
    return authenticationConfiguration.getAuthenticationManager();
}
```
(https://backendstory.com/spring-security-how-to-replace-websecurityconfigureradapter/)
9. WebMvcAutoConfiguration could be removed - it uses deprectated methods, and sets properties that are same by default - hence - not neeeded
(https://github.com/spring-projects/spring-framework/issues/23915#issuecomment-563987147)

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-07-17 10:36:26 +03:00
Sebastian Firsching
41922bfa0c Adapt rel value in properties files
Signed-off-by: Sebastian Firsching <sebastian.firsching@bosch-si.com>
2023-06-20 09:08:05 +02:00
Shruthi Manavalli Ramanna
0759fd80b0 Added support for cdn download url for mgmt API and tests
Signed-off-by: Shruthi Manavalli Ramanna <shruthimanavalli.ramanna@bosch-si.com>
2023-06-02 19:09:31 +02:00
Brandon Schmitt
1bcced9838 OpenID Connect support (#865)
* Added OpenID Connect support

Utilized Spring Security's OAuth2 respectively OIDC support as another
possibility to manage users and their permissions.

Signed-off-by: Brandon Schmitt <Brandon.Schmitt@kiwigrid.com>

* Document OpenID Connect Support

Signed-off-by: Brandon Schmitt <Brandon.Schmitt@kiwigrid.com>

* Updated license in OidcUserManagementAutoConfiguration.java

Signed-off-by: Brandon Schmitt <Brandon.Schmitt@kiwigrid.com>

* Revert updated license notice and add Kiwigrid license file

This reverts commit 23d36245

Signed-off-by: Brandon Schmitt <Brandon.Schmitt@kiwigrid.com>

* Resolve SonarQube issues

- Explicitly import the needed specific classes
- Document public methods
- Add `static` to the constant `JwtAuthoritiesOidcUserService.INVALID_REQUEST`
- Remove superfluous runtime exception `OAuth2AuthenticationException`

Signed-off-by: Brandon Schmitt <Brandon.Schmitt@kiwigrid.com>

* Add OidcUser support in SpringSecurityAuditorAware

Signed-off-by: Brandon Schmitt <Brandon.Schmitt@kiwigrid.com>

* Secure Management API using OpenID Connect, too.

Signed-off-by: Brandon Schmitt <Brandon.Schmitt@kiwigrid.com>
2020-01-14 13:09:13 +01:00
Bondar Bogdan
c68c5a6f5b Feature event publishing (#884)
* refactored code to use EventPublisherHolder for publishing application events where possible

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>

* fixed comment

Signed-off-by: Bogdan Bondar <Bogdan.Bondar@bosch-si.com>
2019-08-14 09:08:23 +02:00
Kai Zimmermann
d52a720480 Spring Boot 2.0 (#721)
* Migration to Boot 2.0.

Signed-off-by: Kai Zimmermann <kai.zimmermann@microsoft.com>
2019-01-31 07:29:27 +01:00
Melanie Retter
f42d9b6978 Restructuring properties (#528)
* Moved test property file to one locations

Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com>

* Added missing properties

Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com>

* Move property defaults to respective modules.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Moved test relevant properties in respective modules. Added missing
tests.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* deleted security.filter-order property

Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com>

* Remove empty line

Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>

* Removed build properties

Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com>
2017-06-08 11:07:48 +02:00
Kai Zimmermann
4709f4374c Fix to many request filter usage in DDI (#526)
* Fix DOS filter usage in DDI

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Add optional CSP definition.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix for empty case.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* readability and ensure that manual enforcement is also possible in
timeforced active but no hit yet.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Class order to bean order.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix exception propagation.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2017-06-07 16:32:52 +02:00
kaizimmerm
28765b168c Fix to many request filter URL configuration, order and added a config
for the UI.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2017-05-17 17:46:07 +02:00
Kai Zimmermann
f99da28185 Fix default isolation and auto commit (#484)
* Switch to spring/DB default isolation.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix dependency to uncommited isolation level in rollout management.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Corrected UQ checks

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Remove modifying annotation.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Disable autocommit on connection pool. Cleanups. Flush at commit.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Cleanups.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix Rollout UI performance.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Typo fixed


Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com>

* Remove empty lines

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2017-04-18 08:43:38 +02:00
Dennis Melzer
c82cc06682 Restructure the autoconfigure module (#408)
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
2017-01-26 10:21:57 +01:00
Kai Zimmermann
80d11494b6 Added template variables for request driven URL calculation. (#416)
Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2017-01-18 18:20:26 +01:00
Kai Zimmermann
feb3369858 Custom Tenant configuration. (#395)
* Tenant configuration configurable.
Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2016-12-23 07:19:46 +01:00
Kai Zimmermann
92dd6a1a0e Modular hawkBit (#378)
* Cleaned up component scan
* More flexibility for hawkBit micro services
* Introduce spring boot starters
* Eclipse Jetty as hawkBit default
* Fixed links as prep for wiki removal

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2016-12-13 12:29:21 +01:00
Michael Hirsch
8be49a1184 Add filesystem artifact repository implementation (#336)
Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
2016-11-14 11:23:50 +01:00
Dennis Melzer
866bc72114 Feature horizontal scalability (#305)
Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2016-11-03 15:53:53 +01:00
Kai Zimmermann
c7129e6ed7 Optimisation and bug fixing of UI push events (#310)
Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2016-10-17 21:59:53 +02:00
Kai Zimmermann
5c53bef164 Configurable download URL generation (#296)
Configurable download URL generation.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2016-09-28 09:18:03 +02:00
Michael Hirsch
0a604d4c40 set default admin admin in hawkBit defaults
Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
2016-09-21 10:05:33 +02:00
kaizimmerm
23cb62b9d9 Fix scheduled executor, auth exchange and simulator poll.
Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
2016-06-24 13:59:19 +02:00
SirWayne
1b4d73bd13 Merge branch 'master' into feature_rollouts_credentials
Conflicts:
	hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/artifacts/upload/UploadStatusObject.java


Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
2016-06-15 09:53:06 +02:00
Kai Zimmermann
3726aac6db Cleaned up default mismatch.
Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
2016-06-13 12:38:08 +02:00
SirWayne
9bd62d1815 Refactor auto config and detail service
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
2016-06-03 14:36:46 +02:00
Dominic Schabel
3cc6fdc21f Basic auth entry point added, so e.g. a browser shows basic auth pop-up. Also done some clean-up/formatting.
Signed-off-by: Dominic Schabel <dominic.schabel@bosch-si.com>
2016-06-02 18:19:17 +02:00
SirWayne
702decee62 Rename deadletter queue and add ttl
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
2016-04-19 10:42:29 +02:00
Kai Zimmermann
807aaf629c Merge remote-tracking branch 'eclipse/master' into feature_MECS-86_tenant_specific_polling_configuration
# Conflicts:
#
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/tenantconfiguration/Tena
ntConfigurationDashboardView.java
2016-03-14 09:51:00 +01:00
Kai Zimmermann
3f763e7db4 Migrated hardcoded doc links to configurable setup. 2016-03-12 19:08:12 +01:00
SirWayne
ed97031faf Merge branch 'master' into
feature_MECS-86_tenant_specific_polling_configuration

Conflicts:
	hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/security/SecurityManagedConfiguration.java
	hawkbit-core/src/main/java/org/eclipse/hawkbit/tenancy/configuration/TenantConfigurationKey.java
	hawkbit-dmf-amqp/src/main/java/org/eclipse/hawkbit/amqp/AmqpControllerAuthentfication.java
	hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/amqp/AmqpControllerAuthentficationTest.java
	hawkbit-repository/src/test/resources/application-test.properties


Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
2016-03-09 13:29:40 +01:00
SirWayne
52be35c7ff Rename deadletter queue and exchange
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
2016-03-07 10:02:00 +01:00
Kai Zimmermann
a227ede0e0 Completed merge 2016-03-04 12:21:38 +01:00
Fabian Nonnenmacher
1eedd3a531 Implemented Buisnesslogic to read and save correct polling configuration
- added min and max values to config files
- updated ControllerPollProperties: added getter and setter of min and max values
- updated PollConfigurationHelper: added getter for different values

Signed-off-by: Nonnenmacher Fabian <fabian.nonnenmacher@bosch-si.com>
2016-02-29 13:13:12 +01:00
Kai Zimmermann
c221da7d64 Removed unnecessary property definitions 2016-02-25 21:26:04 +01:00
Kai Zimmermann
7692a29918 Fixed property bean setup 2016-02-25 20:36:17 +01:00
Kai Zimmermann
713922d762 Remove broken spring property usage for vaadin caching 2016-02-22 12:21:14 +01:00
Kai Zimmermann
6b143d6016 Fixed production mode path 2016-02-19 16:30:38 +01:00
Michael Hirsch
f18825ce34 Initial Contribution of the rollout-management feature
- Repository functionality for rollout, rolloutgroup entities
- Rollout scheduler to watch and handle running rollouts and start next
group of rollout
- Vaadin view to administrate rollouts and reflect the current rollout
status
- REST resources to cover rollout creation, updating, starting, pausing
and resuming

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
2016-02-04 15:10:44 +01:00
Kai Zimmermann
64deaeea3c Remove swagger and minor feature extensions and bug fixes
- Various Bug fixes and improvements
- Management API extended
- Swagger removed
- Guava Upgraded to 19
2016-01-21 13:42:38 +01:00
Kai Zimmermann
7497ab61ed Initial check in accordance with Parallel IP 2016-01-21 13:18:55 +01:00