Commit Graph

133 Commits

Author SHA1 Message Date
Avgustin Marinov
1be473b22c [#2845] Bump Spring boot to 4.x (#2941)
Notes:
1. (!) Eclipselink shall be migrated to 5.0 (in 4.0.8 there are incompatible classes, e.g EJBQueryImpl doesn't implement some newer methods). In the moment is with beta (5.0.0-B12) - JUST for testing!
2. (!) Ethlo plugin doesn't work with Eclipselink 5.0, it builds with Eclipselink 4.0.8 (could be a problem)
3. Dependencies - new starters, test starters changes, some dependencies refactoring
4. Auto-configs split - package changes, some properties classes changes
5. Spring nullable org.springframework.lang.Nullable/NonNull are depecated and replaced with jspcify -> org.jspecify.annotations.Nullable/NonNull (NullMarked)
6. Lombok config - adding lombok.addNullAnnotations=jspecify - to do not mess annotations
7. Distributed lock table changes - SP_LOCK table db migration
8. Spring Retry replaced with Spring Core Retry - does repace retry in hawkbit
9. Specifications -> added Update/Delete(/Predicate) Specifications and JpaSpecificationExecutor changed
10. HawkbitBaseRepositoryFactoryBean modified to register properly
11. Jackson - 2 -> 3, package migrations, finals are not deserialized by default(enable finals deserialization, consider make non-final), too ‘smart’ tries to set complex objects instead of using non args constructor (-> @JsonIgnore), some other default configs made

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-04-14 11:31:41 +03:00
Avgustin Marinov
011d7f567e Refactor header authority controller authentication (#2954)
1. (breaking changes) hawkbit.server.ddi.security.rp.cnHeader and sslIssuerHashHeader are renamed to controllerIdHeader and authorityHeader correspondingly.
2. (breaking changes) their default values are changed: X-Ssl-Client-Cn -> X-Controller-Id and X-Ssl-Issuer-Hash-%d -> X-Authority
3. Now the authority header configuration is not a string forma but just a string. The implemenation checks for this header as comma or ; separated list or seeks for header iteration <authority_header>-%d (iteration starts from 0 or 1
4. Doc fixed
5. As there are breaking changes configuration changes may be needed: a) with changing the hawkbit.server.ddi.security.rp you could turn back the previous default headers (note X-Ssl-Issuer-Hash-%d shall now be X-Ssl-Issuer-Hash), or b) you may change the headers sent by the reverse proxy

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-03-12 10:36:37 +02:00
Avgustin Marinov
7a642f564e Remove the ROLE_CONTROLLER_ANONYMOUS (#2948)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-03-05 10:01:43 +02:00
Avgustin Marinov
5d043b2766 Improve WithUser testing (#2943)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-02-27 12:59:13 +02:00
Avgustin Marinov
ea9519deae Fix #2928 - add ddi containers volume (#2935)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-02-24 12:26:15 +02:00
Avgustin Marinov
520b887b70 [#2918] Refactor FileStreamingUtil (#2921)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-02-13 17:11:43 +02:00
Avgustin Marinov
62c76311e5 Fix some compile warnings (#2919)
* Fix some compile warnings
* Some classes made final
* JPA entities made not serializable

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-02-11 14:05:46 +02:00
Avgustin Marinov
87c4cd8cd1 Remove not used WeightValidationHelper (#2916)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-02-10 12:50:31 +02:00
Stanislav Trailov
c33156b134 Multi-Asssignments feature removal (#2893)
* Multi-Asssignments feature removal

Signed-off-by: strailov <Stanislav.Trailov@bosch.io>

* fix some sonar findings

Signed-off-by: strailov <Stanislav.Trailov@bosch.io>

* fixes after review

Signed-off-by: strailov <Stanislav.Trailov@bosch.io>

---------

Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
2026-02-04 16:59:09 +02:00
Avgustin Marinov
d9e52cb542 Fix #2880 findings (#2887)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-01-23 10:15:45 +02:00
Avgustin Marinov
97762360c3 Refactor REST Constants (#2881)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-01-22 17:06:44 +02:00
Avgustin Marinov
5d562abd3c Optimize API responses (#2880)
* remove generic 405 - put only where needed
* remove 429 from get/post update where not expected (not quota related in general)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-01-22 13:28:04 +02:00
Avgustin Marinov
d55f1ffa10 Refactor @ApiResponses annotations (#2879)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-01-22 09:10:10 +02:00
Avgustin Marinov
29da04f6da Remove unnecessary API module dependencies (#2842)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-12-02 13:53:36 +02:00
Avgustin Marinov
b8a05e3cbf Refactor tenant configuration management (#2840)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-11-28 15:37:12 +02:00
Avgustin Marinov
203598f3a4 Fix auth -> authentication in some props in SDK (#2839)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-11-28 09:13:41 +02:00
Avgustin Marinov
42384b7e31 Add AccessContext.asTenant and use where possible (#2838)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-11-27 16:27:56 +02:00
Avgustin Marinov
f6f62db0ad Refactor hawkbit core and security (#2833)
* Refactor hawkbit core and security

* improve access to the base core features - static
* thus easiear access
* and less boilerplate passing of instances

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>

* Refactor context classes

* make JSON context serialization default

* AccessContext

* Split hawkbit-security-core to other modules and remove it

---------

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-11-27 13:07:49 +02:00
Stanislav Trailov
58dbc32a80 429 Response status code on quota hit (#2834)
Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
2025-11-27 09:40:33 +02:00
Avgustin Marinov
598567e08f Remove site/ replaces by docs/ (#2803)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-11-13 15:56:41 +02:00
Avgustin Marinov
62139055b0 Remove deprecated (#2800)
* ActionFields.DETAILSTATUS removed and replaces with STATUS (so status is with changed semantic - not active but real status)
* MgmtAction.detailStatus removed and replaced with status (so status is with changed semantic - not active but real status)
* MgmtTargetTagRestApi.assignTargetsPut removed - use POST method
* ActionStatusFields.REPORTEDAT deprecation removed - it is a synonym of CREATEDAT but is part of timestamp/reported aspect while createdat is part of creted at/by
* MgmtDistributionSetRequestBodyPost.os/runtime/application is removed

and

* ActionStatusFields.TIMESTAMPT added

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-11-13 13:39:03 +02:00
Avgustin Marinov
a3cf835ae2 Fix sonar findings (#2769)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-10-22 15:12:37 +03:00
Avgustin Marinov
04cd9fb30d Refactor TenantAware - remove TenantRunner and replace with standard Runnable / Callable (#2755)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-10-14 16:36:42 +03:00
Avgustin Marinov
e23d2aa920 Add DeploymentManagement ACM test (#2726)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-10-08 11:07:15 +03:00
Avgustin Marinov
e747d55a38 Fix EntityMatcher case sentsitivity config (#2706)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-09-29 15:08:21 +03:00
Stanislav Trailov
7e5984b3c9 Fix DDI Open Api Config (#2703)
* Fix DDI Open Api Config

Signed-off-by: strailov <Stanislav.Trailov@bosch.io>

* leave name as it is, change the header only

Signed-off-by: strailov <Stanislav.Trailov@bosch.io>

---------

Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
2025-09-29 14:11:17 +03:00
Avgustin Marinov
c20ee8bdf3 Fix fine-grained permissions config (#2688)
* disabled by default
* evaluaton context considers fine-grained only when acm is enabled

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-09-24 09:40:27 +03:00
Avgustin Marinov
7980b5defb Remove Java security context serialization (#2677)
Remove Java security context serialization - it is replaced by JSON security context serialization (optimized as size). Backward incompatible change.
Java security context serialization was not used in default hawkbit runtime out of the box. So, it's assumed none uses it. 
Anyway, if anyone has enabled it, he could, in order to keep backward compatibility, get the java security context serialization from the previous hawkbit releases/commits and register it again as a spring bean in his hawkbit extension.

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-09-18 14:46:51 +03:00
Vasil Ilchev
20768a550c Sync property naming convention (#2664)
Co-authored-by: vasilchev <vasil.ilchev@bosch.com>
2025-09-10 14:55:51 +03:00
Avgustin Marinov
2d45e2a76c Fix Json serializer defaults (#2663)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-09-10 10:56:19 +03:00
Avgustin Marinov
1f71e01318 Implement JSON security context serializer (new default) - smaller info and human readable (#2652)
keeps backward compatibility by being able to fallback to JAVA_SERIALIZATION

+ fix DMF messages with status code

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-09-05 13:35:45 +03:00
Avgustin Marinov
2a636328a0 20250828 cleanup (#2639)
* Cleanup

* Refactor artifact management
2025-09-02 16:08:14 +03:00
Avgustin Marinov
b4edde8cc3 Refactor Management interfaces: find/get pattern (#2609)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-08-15 16:18:32 +03:00
Avgustin Marinov
441b78460d Improve Permission Management (#2604)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-08-12 14:09:27 +03:00
Avgustin Marinov
124fef189e Remove Rollout(Group) builders (#2603)
* Fix entityManager.merge for ds and sm

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>

* Remove Rollout(Group) builders

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>

* Remove EntityFactory

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>

---------

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-08-11 14:01:03 +03:00
Avgustin Marinov
bff77ac224 Cleanup TargetManagement (#2601)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-08-08 13:13:28 +03:00
Avgustin Marinov
c038c507a9 TargetManagement over RepositoryManagement (#2599)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-08-07 17:20:22 +03:00
Avgustin Marinov
6aa8ccaa9c Refactor DS Management (#2591)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-08-05 15:45:41 +03:00
Avgustin Marinov
43f717fc8d Improve JsonBuilder's (#2585)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-08-04 12:54:12 +03:00
Vasil Ilchev
c79e35b9de Fix not overriding cloud stream properties (#2582)
Co-authored-by: vasilchev <vasil.ilchev@bosch.com>
2025-08-01 18:15:56 +03:00
Vasil Ilchev
cca105c80e Move EventPublisher to hawkbit-repository-core making hawkbit-reposit… (#2576)
* Move EventPublisher to hawkbit-repository-core making hawkbit-repository-api non dependent to rabbit binders

* Move EventPublisherHolder to org.eclipse.hawkbit.repository.event

* Fix overriding default values of RemoteEvents and rabbit binder

---------

Co-authored-by: vasilchev <vasil.ilchev@bosch.com>
2025-08-01 08:48:07 +03:00
Avgustin Marinov
08cacf9034 Soft Module metadata as complex map value (#2568)
---------

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-07-30 17:29:02 +03:00
Vasil Ilchev
4a8e60764f Remote Events migrated from Spring Bus to Spring Cloud Stream (#2563)
* Remote Events migrated from Spring Bus to Spring Cloud Stream

---------

Co-authored-by: vasilchev <vasil.ilchev@bosch.com>
2025-07-30 16:58:00 +03:00
Avgustin Marinov
10da0288d9 Fix sonar findings (#2572)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-07-30 10:13:23 +03:00
Avgustin Marinov
2b66449ff1 Fine grained repository permissions (#2562)
1. Introduce @PrreAuthorize check based on hasPermission - allowing custom processing (compared with non-modifiable hasAuthority/Role processing)
2. Dedicated permissions could be implemented on management api level. Check is made by plugged in PermissionEvaluator
3. Thus common XXX_REPOSITORY permissions could differ for extending services
4. Change create/update entity builder pattern - not via EntityFactory but via clean static lombok based builders (with fine fluent api).
5. Implement abstract repository management jpa class that handles the boilerplate code from extending classes in single place consistently -> AbsreactJpaRepositoryManagement
6. Register management api-s as **Sevice**-s instead of **Bean**-s in order to make easier maintainable and get away from heavy argument forwading
7. Simplify custom hawkbit repository registration + adding proxy to handle exception mapping at lower level - thus not depending on Aspects for converting exceptions
8. Implemented general purpose 'copy' utility (ObjectCopyUtil) that using getter/setter patterns is able to copy (e.g. Create/Update) objects to other objects (e.g. JPA entity objects)
2025-07-28 14:57:33 +03:00
Avgustin Marinov
e7373275bf Add distribution set and target type fine grained permissions (#2545)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-07-14 14:52:36 +03:00
Avgustin Marinov
21581c4ea4 Fine-grained permissions (#2535)
* Fine-grained permissions

Adds support for permissions of type <permission>(/<rsql filter scope>)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>

* Apply review fixes

---------

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-07-10 13:51:49 +03:00
Avgustin Marinov
edd6dabb90 Move artifact encryption to hawkbit-artifact-api where it does belong (#2540)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-07-10 11:57:44 +03:00
Avgustin Marinov
7f97d6f441 Add support for pollingTime overrides (#2533)
* Add support for pollingTime overrides

* the current format HH:mm:ss is still supported
* add option for deviation percent (HH:mm:ss~\d{1,2}%) which allows the system to do some randomizing of the poll interval
* add support for overriding default polling time interval for devices matching some RSQL filters (in order), e.g. 01:00:00~10%, group == 'eu' -> 00:02:00~15%, status != in_sync -> 00:05:00
* IMPORTANT: overdue time is calculated according to the default polling time. So, the overdue status might be incorrect for targets with overridden poll interval

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>

* Remove min polling time from the tenant config - it is a system configuration

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>

* Add support for bigger poll intervals and overdue + duration format config support

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>

---------

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-07-07 16:33:55 +03:00
Avgustin Marinov
426bdbf179 Move Query Language (RSQL) in separate package and add Entity Matcher (#2531)
* Move Query Language (RSQL) in separate package - hawkbit-repository-ql
* Add Entity Matcher which match an entity object agains filter
* Spec to string utils now in runtime (as a library) - could be used in tests or to dump something in runtimes
* Move eclipselink/hibernate profiles in new QL module, this way provided / set to hawkbit-repository-jpa
* Remove unused javax.el imports
2025-07-03 14:41:55 +03:00