Commit Graph

284 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
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
56da119979 Remove SYSTEM_ADMIN (#2936)
Not needed. Overlaping with system role. Could be added on top of others if needed

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-02-25 14:00:25 +02:00
Desislava Marinova
ff21d788b3 MECS-21328: Tenant metric label case unification (#2907) 2026-02-06 09:09:05 +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
Denislav Prinov
a86be566fc Fix Tenant key word change in Audit log message (#2899)
Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com>
2026-01-30 15:46:53 +02:00
Vasil Ilchev
ef169245d4 Add tenant to security context when audit log (#2885)
Signed-off-by: vasilchev <vasil.ilchev@bosch.com>
2026-01-27 11:15:49 +02:00
Avgustin Marinov
358e4a6d3f Remove GONE API response where unnecessary - 3 MgmtSoftwareModuleRestApi Methods (related to #2880) (#2888)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2026-01-23 11:03:13 +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
6988f5eafb Fix nop cache using (especially for testing) (#2841)
+ fix flaky tests that requires no caches

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-12-01 13:53:08 +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
Avgustin Marinov
7e4cc45315 Refactor maven modules (#2806)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-11-13 17:24:27 +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
d488ad6b5f Refactor caches (#2775) (#2777)
* TenantAwareCacheManager define CacheEvictEvent which could be used to evict entities in general way
* JpaTenantConfigurationManagement start using genera cache approach

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-10-28 14:13:53 +02:00
Avgustin Marinov
46c0c4aeaf Move default TenantResolver registration in hawkbit-core (#2778)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-10-28 08:33:50 +02:00
Avgustin Marinov
948ce408f2 Sync cache doc with the last update (#2776)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-10-27 09:47:47 +02:00
Avgustin Marinov
98daa696de Refactor caches (#2775)
* added static usage of cache in order access it easier
* added mandatory (in hawkbit-core) registration - always tenant aware caches shall be used - hawkbit depends on it
* added per cache and tenant name configuration
* (not really realted to caches) but in order to be easier evicted entities after commit handlers are now statically accessed

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-10-24 16:42:40 +03:00
Avgustin Marinov
e154e1b18a [#2429] Add completeness property for software modules (#2765)
* add `min artifacts` requirement on the Software Module Type level for Software Module completeness
* removed `complete` Distribution Set property from DB - calculated runtime
* Distribution Set and Software Module completeness is calcualted on demand in memory (TODO: implement cache)
* locking of Software Module now requires the software module to be `completed`
* removed 'complete' search field for DistributionSet type. Still keep (DEPRECATED) limited support for search with 'complete' -
  only on the first level of expression and with AND. I.e. complete==true, complete==false and id=in=(1, 3) is suppoted,
  while complete==false or id=in=(1, 3) and id=in(1, 3) and (type==os and complete==true) are not

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-10-22 09:57:45 +03:00
Avgustin Marinov
6ad20252ba Refactor UserAuthoritiesResolver - to run in tenant context (#2756)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-10-14 17:28:57 +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
ebfaa1d51e Fix sonar findings (#2705)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-09-29 13:19:08 +03:00
Avgustin Marinov
a6867219b1 Remove FieldValueConverter (#2699)
* (because) used only for ActionFields.STATUS
* could be part of new Node mapping mechanism
* simplify
* Deprecate ActionFields.STATUS, add / replace it with ActionFields.ACTIVE. In future STATUS will become the real action status (and DETAILSTATUS will be removed)
* Deprecate MgmtAction.getStatus add / replace it with MgmtAction.isActive. In future status will become the real action status (and detailStatus will be removed)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-09-26 16:57:10 +03:00
Avgustin Marinov
4434484d35 Deprecate VirtualPropertyReplacer (#2697)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-09-26 14:56:32 +03:00
Avgustin Marinov
b181b66ee5 Extend Query Langage Support (#2696)
* add option for parser replacement - so, one could replace the query language and don't use RSQL
* add easy way to modify query root Node 
* add easy Node modification utilities
* code refactored and naming more 'QL' than 'RSQL' oriented

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-09-26 14:19:25 +03:00
Avgustin Marinov
9ab0a8628e First level suppor for RsqlQueryFields shortcut support (#2686)
* now it is possible to have a showrtcut for a sub attributes (i.e. calling it directly with enum name, e.g. type -> type.key) with directly specifying the defaultSubEntityAttribute
* no need to have single sub attribute in order to have a default sub attribute
* added TYPE search field for TargetFields (sinonim of targettype)
* targettype is deprecated - to be decided if and when to be removed
* returned back "type" direct search (with meaning type.key) for DistributionSet and SoftwareModule as non-depricated
* add serche with "type" as type.key for Target

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-09-23 10:56:26 +03:00
Avgustin Marinov
dce133dfae Add some id based searches and software module search by type (#2681)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-09-19 15:45:43 +03:00
Avgustin Marinov
2a636328a0 20250828 cleanup (#2639)
* Cleanup

* Refactor artifact management
2025-09-02 16:08:14 +03:00
Stanislav Trailov
5b299e0a62 Allow to filter actions by createdAt and lastModifiedAt timestamp (#2546)
* Allow to filter actions by createdAt and lastModifiedAt timestamp

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

* add filtering options for created at/by & lastmodified at/by for all entities

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

* Unify ActionStatusFields like other field filters

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

* fix tests accordingly

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

* only deprecate reportedAt filter option

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

---------

Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
2025-08-12 08:18:24 +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
e2beb898f8 Trim string attrubutes of JPA entries (#2597)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-08-07 12:07:19 +03:00
Avgustin Marinov
7b24981a1d Implement TargetFilterQueryManagement with AbstractJpaRepositoryManagement (#2587)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-08-05 09:53:24 +03:00
Avgustin Marinov
d6978e5270 Fix ObjectCopyUtil (#2571)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-07-29 13:31:25 +03:00
Stanislav Trailov
08118f03d4 Remove 'typeName' from ds rsql filtering (#2570)
* Remove 'typeName' from ds rsql filtering

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

* add name to sub entity attributes

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

* remove formetter on/off

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

---------

Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
2025-07-29 10:57:43 +03:00
Florian BEZANNIER
d2b8e74056 Improve Simple UI (#2554)
* feat[Simple-UI]: add action status list

* fix[Simple-UI]: various ui issues

* chore: add devtool

* feat[Simple-UI: add DS metadata

* feat[Simple-UI]: add sort in DS view

* feat[Simple-UI]: add created at to DS view

* style[Simple-UI]: remove id from DS view

* feat[Simple-UI]: add rsql filter & url filter

* feat[Simple-UI]: if one ds in result show details

* feat[Simple-UI]: add filter from url to targetview

* feat[Simple-UI]: add link from target details view to DS

* feat[Simple-UI]: add sort & version on target view

* refacto[Simple-UI]: linkted text area

* feat[Simple-UI]: dynamic homepage depending on permissions

* feat[Simple-UI]: sort by newest version

* feat[Simple-UI]: add target address

* feat[Simple-UI]: sort by last modified target

* fix[Simple-UI]: securityToken null if no permission

* fix[Simple-UI]: green circle on bad update

* feat[Simple-UI]: use local date format

* docs: update user config

* fix: tag filter

* feat[Simple-UI]: search on multiple attributes

* refacto: rename TargetActions -> TargetActionsHistory

* refacto: move TargetActionsHistory to a new file
2025-07-28 16:07:25 +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
Stanislav Trailov
b4793fcce1 Introduce target grouping (#2538)
* Introduce target grouping

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

* minor refactor

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

* throw validation exception instead direct returning bad request response

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

* fix group query parameter

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

* remove wrongly added import

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

* add review fixes

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

* apply latest review changes

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

* apply latest changes after sybnc/review

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

* fix after review

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

---------

Signed-off-by: strailov <Stanislav.Trailov@bosch.io>
2025-07-14 15:48:37 +03:00
Avgustin Marinov
ef25aa59f0 Fix new line after @Test (#2486)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-06-20 17:42:55 +03:00
Avgustin Marinov
cb7f1107fe Remove allure (phase2) (#2483)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-06-20 15:51:06 +03:00
Avgustin Marinov
ba23ae3fc2 Remove allure (phase 1) - switch to surefire reporting (#2478)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-06-20 13:41:26 +03:00
Avgustin Marinov
0ebb755d4c Remove unused imports (#2417)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-05-23 11:20:53 +03:00
Avgustin Marinov
8184aad13c Simplify RSQL fields (#2416)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-05-23 11:17:54 +03:00
Avgustin Marinov
64ee8b9906 JpaSoftwareModule#metadata made map (#2412)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-05-21 16:59:25 +03:00
Avgustin Marinov
452d8618d7 JpaDistributionSet#metadata made Map (#2411)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-05-21 13:45:18 +03:00
Avgustin Marinov
ceba4f5cfb Unify target attributes and metadata (#2408)
* Unify target attributes and metadata

Currently, the target attributes are Map while the metadata,
which has the same concept is List.
This PR unifies them making the metadata also a Map

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-05-21 11:26:02 +03:00
Avgustin Marinov
91811f7aa8 Remove unused imports (#2407)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-05-19 08:54:18 +03:00
Avgustin Marinov
12140e468d [#2176] RSQL filtering with exist/not-exist support (#2396)
* [#2176] RSQL filtering with exist/not-exist support

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

* [#2176] Big Refactoring

* RSQL: all maps with joins with on

---------

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2025-05-16 16:13:04 +03:00