Commit Graph

2664 Commits

Author SHA1 Message Date
Avgustin Marinov
8f8dbb4fa2 Fix sonar finding (#1518)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-14 11:06:14 +02:00
Avgustin Marinov
94d39a12c6 [#1510] Add Vaadin 8 UI discontinuation warning (#1517)
Could be disabled by setting spring property _hawkbit.server.ui.notification.text_ to empty value.
For instance by setting environment propery:
```shell
export HAWKBIT_SERVER_UI_NOTIFICATION_TEXT=
```

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-13 20:53:42 +02:00
Avgustin Marinov
d951cee6b2 [#1509] Sync Target type with SW and DS types / getByKey (Mgmt Layer) (#1516)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-13 16:42:10 +02:00
Avgustin Marinov
4ac42c80d7 [#1509] Sync Target type with SW and DS types (targettype.key search) (#1515)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-13 16:29:56 +02:00
Avgustin Marinov
767a7e6b11 [#1509] Sync Target type with SW and DS types (REST Layer) (#1514)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-13 14:33:32 +02:00
Avgustin Marinov
4b5a7d6e7d [#1509] Sync Target type with SW and DS types (Mgmt Layer) (#1513)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-13 11:48:51 +02:00
Avgustin Marinov
71a5319019 [#1509] Sync Target type with SW and DS types (#1512)
Unifies Target type with the other types
* _TargetType_ made to inhert type, thus
* _TargetType_ now has immutable _key_
* add _AbstractJpaTypeEntity_ abstraction that implement the common 'type' JPA functionallity

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-12 15:24:57 +02:00
Avgustin Marinov
4289f464c5 Update RolloutView.java / fix sonar finding 2023-12-10 16:12:45 +02:00
Avgustin Marinov
be7a678826 Update trivy-scan.yml (2) 2023-12-10 15:52:47 +02:00
Avgustin Marinov
61a1d58e4d Update trivy-scan.yml 2023-12-10 15:42:15 +02:00
Avgustin Marinov
38044c17a6 Fix trivy-scan (#1508) 2023-12-10 15:26:50 +02:00
Avgustin Marinov
dfd4edb7e6 Fix Sonar findings of Simple UI (#1507)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-10 00:52:28 +02:00
Avgustin Marinov
5468218615 Add DDI Server PreAuthorize enabled test (#1506)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-08 11:57:27 +02:00
Denislav Prinov
1ecdcc4edd Added an option to show a footer notification (#1504)
* Added an option to show a footer notification

Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com>

* Refactoring

Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com>

---------

Signed-off-by: Denislav Prinov <denislav.prinov@bosch.com>
2023-12-08 11:35:18 +02:00
Avgustin Marinov
1ae72d4ead Remove WithSpringContextRule (#1505)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-07 23:52:23 +02:00
Avgustin Marinov
aa1bad91e1 Add @PreAuthorize enabled check for applications (#1503)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-07 22:23:40 +02:00
Avgustin Marinov
c0f8a8c848 Mark new micro-service setup as experimental (#1502)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-07 15:15:12 +02:00
Avgustin Marinov
026ebe0f7f Allign docker doc (#1500)
* allign docker documentation
* remove fabric8 files as this is duplicated way for building docker images (along with docker files)

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-04 15:15:54 +02:00
Avgustin Marinov
3b66281c08 Initial draft of Simple UI (#1499)
A very simple UI based on Vaadin 24.
2023-12-04 15:00:18 +02:00
Avgustin Marinov
d0bb7b61d8 hawkbit docker containers made to wait for mysql (#1498)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-04 11:11:49 +02:00
Avgustin Marinov
341e8a4a0c Dockerfiles use non-root user (#1497)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-04 10:52:19 +02:00
Avgustin Marinov
855124eca8 Improve docker build script (#1496)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-04 09:02:59 +02:00
Avgustin Marinov
6a3b584bd1 Fix artifact repo in docker & compose (#1495)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-12-01 17:44:41 +02:00
Michael Herdt
960ab6872d Extend access control management (#1493)
* Fix ACM related executions.

* Introduce access controller for actions. Resolve some todos and fix distribution set invalidation strategy.

* Do only check for access if returned values are access controlled.

* Fix review findings.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.com>

---------

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.com>
2023-12-01 08:50:41 +02:00
Avgustin Marinov
a6fa75697f Splitting monolith app to micro services (#1490)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-30 15:41:12 +02:00
Avgustin Marinov
b362698af8 Move REST API Doc build in docs/ (#1492)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-29 09:52:40 +02:00
Avgustin Marinov
ad876720e8 Fixed Vaadin 8 discontinuation announcement date (#1491)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-28 11:50:03 +02:00
Avgustin Marinov
a015a23615 Adding dev docker builds (#1489)
Adds option to build docker images using locally built hawkBit apps. This allows for instance building images from snapshots.

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-27 17:32:08 +02:00
Avgustin Marinov
51255feb1b Improved Docker build and docker images (#1488)
* Using upacked Spring layers for faster boot
* Added option to pass JAVA_OPT to modify the environment variables in both flavours
* Build support for different hawkbit apps - could be used in future if hawkBit is split in multiple micro-services
* Removed templates and replacing with parameterized (via build ARGs) docker builds

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-27 15:51:04 +02:00
Avgustin Marinov
ce97ffc850 Fix CORS misconfiguration in socket.io (#1487)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-22 15:54:07 +02:00
Avgustin Marinov
304495ae25 Doc - Vaadin 8 Discontinuation (#1486)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-22 15:04:22 +02:00
Avgustin Marinov
98df011069 Doc release notes - added 0.3.0 (#1485)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-22 12:03:45 +02:00
Avgustin Marinov
e38303935b Improves address resolution (#1483)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-22 10:22:24 +02:00
Avgustin Marinov
3e4e0e5e42 Fix flatten mode (#1482)
change flatten mode to do not remove dependency management
thus allowing inheritance with keeping hawkbit dependencies

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-20 14:25:24 +02:00
Avgustin Marinov
b9ed57e58d Little doc improvemnts + Blog (#1481) 2023-11-20 13:27:11 +02:00
Avgustin Marinov
fc01ad95bb Feature/add default community license (#1480)
* Make use of dash maven plugin to generate dependencies

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

* Add (as default) commuity license header

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

---------

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-17 14:49:09 +02:00
Avgustin Marinov
f9eb61757c Make use of dash maven plugin to generate dependencies (#1479)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-17 14:14:20 +02:00
Michael Herdt
178b193162 Do not send DistributionSetDeletedEvent twice (#1478) 2023-11-17 11:40:16 +02:00
Avgustin Marinov
0021b03c9a CI friendly maven poms - use $revision for version (#1477)
https://maven.apache.org/maven-ci-friendly.html

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-16 17:23:01 +02:00
Avgustin Marinov
b982039a74 Feature/ctx aware and access controller2 (#1456)
* Introduce the AccessControlManager and use if for the TargetManagement and TargetTypeManagement.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Extend the access control manager by an API to serialize the current active context and persist it for scheduled background operations like auto-assignment.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Verify modification is permitted before performing automatic assignment

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Start with controlling distribution set type access. Perform some refactoring.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Support distribution set access control. Increase character limit to 512 chars for access control context. Refactor default implementations.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Introduce ContextRunner and define admin execution to check for duplicates before creating/updating entities.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Introduce Software Module, Module Type and Artifact control management. Fix tests.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Introduce access controlling test base. Add first test verifying the read operations for target types.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Finalize target type access controlling test.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Introduce ContextRunnerTest and TargetAccessControllingTest.
Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Introduce DistributionSetAccessControllingTest and fix missing access control specifications.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Extend test cases. Include only updatable targets into rollout.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Fix action visibility.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Modifiable->Updatable & UPDATE check where needed

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

* ContextRunner superseded by ContextAware

+ ContextRunner remaned to ContextAware (move as a cenral entry/concept).
  It now extends (and replace) TenantAware
+ SecurityContextTenantAware becomes ContextAware
+ Pluggable serialization mechanism
  (default Java serialization of contexts) for SecurityContextTenantAware
  (using SecurityContextSerializer)
+ AccessControl methods are added to ensure no entities fill be retrieved
  just to call access control - so, if all permitted - no additional db
  queries will be made
+ &lt;repo type&gt;AccessControl classes removed and replaced with
  AccessControl &lt;repo type&gt; generics
+ AccessControlService removed - every AccessControl is registered and
  overiden independently
+ access_control_context in DB increased to 4k (in order to support java
  security context serialization)
+ needed adaptaion of implemtation and tests done

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

* Refactor SoftModules & DistSets

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

* Refactoring of the Repositories

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

* Repostiotory level permissions

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

* Improvements

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

* Simplification of AccessControl interface

* Simplifications & management package

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

* Implementation improvements

+ Artifact management & repo reviewed and tuned
+ Action(Status) management & repo reviewed and tuned
+ SoftwareModule(Type/Meta) management & repo reviewed and tuned
+ DistributionSet(Type/Tag/Meta) management(+Invalidation) & repo reviewed and tuned
+ Target(Tag/Type/Meta) management & repo reviewed and tuned
+ TargetQueryFilter management & repo reviewed and tuned

* Apply suggestions from code review

Suggestions accepted. Thanks @herdt-michael

Co-authored-by: Michael Herdt <michael.herdt@bosch.com>

* Apply suggestions from code review 2

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

---------

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
Co-authored-by: Michael Herdt <Michael.Herdt@bosch.com>
2023-11-16 11:07:06 +02:00
Avgustin Marinov
8d487fde33 Doc add link to sonar reports (#1476)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-16 10:23:46 +02:00
Avgustin Marinov
23951c0931 Add M9 Release Notes (#1474) 2023-11-16 09:29:01 +02:00
Stanislav Trailov
0f3c67b23c update third-party dependencies (#1473)
Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io>
2023-11-13 11:57:39 +02:00
Avgustin Marinov
ac946e76ef OICD Pluggable permission mapper (#1469)
By default the resource_access/<client id>/roles claim is mapped to hawkBit permissions.
However, by registering a Spring bean _org.eclipse.hawkbit.autoconfigure.security.OidcUserManagementAutoConfiguration.JwtAuthoritiesExtractor_ a custom extractor permission mapper could be registered.

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-03 14:52:31 +02:00
Avgustin Marinov
7b67de3082 [#1360] Fix ConfigurationManagement#getState (#1467)
Fix access control: HAS_AUTH_READ_TARGET -> IS_CONTROLLER  or HAS_AUTH_READ_TARGET
(shall be accessibly by targets when confirmation base is requested)

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-03 09:32:10 +02:00
Avgustin Marinov
68e7daa1d8 Swagger - add bearer auth for MGMT API (#1468)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-02 16:53:39 +02:00
Stein.Codes
defa6c3b69 refactor: Java Security Ultimate Security Repo Scanner 2023 (#1455)
Disclaimer: Automated Commit Alert

Please be aware that this commit, generated through automated processes, may contain false alerts or not be precisely targeted. This automated commit is part of a large-scale effort to enhance software security over time. It is sent to various repositories to improve code quality and security. Exercise caution when reviewing the changes, and ensure that any necessary adjustments are made to maintain the integrity and functionality of the software.

Use this link to re-run the recipe: https://app.moderne.io/recipes/builder/TkgUEiqd7?organizationId=RWNsaXBzZSBGb3VuZGF0aW9u

Co-authored-by: Moderne <team@moderne.io>
2023-11-01 16:41:08 +02:00
Vít Holásek
6428422eed Fixed DataIntegrityViolationException with OIDC (#1348) (#1458)
Signed-off-by: Vít Holásek <xvh@seznam.cz>
2023-11-01 13:10:28 +02:00
Avgustin Marinov
042e867e5d Docker version upgraded to 17.0.9_9 (#1466)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-11-01 12:52:00 +02:00
Stanislav Trailov
5904bed838 bump spring cloud to 2021.0.8 to fix CVE-2023-4759 (#1464)
Signed-off-by: Stanislav Trailov <Stanislav.Trailov@bosch.io>
2023-10-26 12:03:25 +03:00