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>
* Fix some compile warnings
* Some classes made final
* JPA entities made not serializable
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
* Add missing open api schema for Creation of DistributionSet #2745
* Fixed Target Security Token lenght in doc - possible max value 128 chars
* Re-visit Security token doc
---------
Signed-off-by: vasilchev <vasil.ilchev@bosch.com>
* 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>
* 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>
* 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>
* actions.cleanup.onQuotaHit.percent -> action.cleanup.onQuotaHit.percent
* action.cleanup.enabled - removed - instead enabled / disable <=> expire < / >= 0
* action.cleanup.actionExpiry -> action.cleanup.auto.expiry and action.cleanup.auto.status - so both are under action.cleanup.auto, and differentiate from on quota hit
* auto db convert of props with one backward incompatibility - if you had action.cleanup.enabled=true and not set action.cleanup.actionExpiry (assuming default 30 days) - auto cleanup will be disabled
you should set action.cleanup.auto.expiry=2592000000 in order to get the old behavior
* Note that if you have configured global action cleanup the properties are changed also this config you shall change manually
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
* 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>
* the only non repository module using @PreAuthorize
* the only service for "sys admins" - it's a little bit out of scopes
* caches management is not supposed to be via REST
* delete tenant shall not be provided when we don't have create
* metrics shall be reported via metrics colectins services, or db
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
* (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>
* 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
* 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>
* Deprecate PUT /rest/v1/targettags/{targetTagId}/assigned -> use new POST method with same endpoint and params
* Remove deprecated DS tag mulit-assigned PUT method /rest/v1/distributionsettags/{distributionsetTagId}/assigned -> use already existing POST method with same endpoint and params
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* 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>
* docker containers using images with jre 21
* project is still building with target java 17 - so jar artifacts are java 17 compatible
* provided option to have different version for client libraries (e.g. ddi and management REST api)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
* Extend MGMT API to be possible to confirm/deny Actions on Targets as Operators.
* Added tests
* Fixed permissions in api doc
* added missing license header
---------
Co-authored-by: vasilchev <vasil.ilchev@bosch.com>