Commit Graph

14 Commits

Author SHA1 Message Date
Avgustin Marinov
3e469fa58c Code format hawkbit-runtime (#1947)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-11-05 11:38:12 +02:00
Avgustin Marinov
8d78cea9d2 Web env none in tests where not needed (#1871)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-10-04 16:51:10 +03:00
Avgustin Marinov
52b3ccf885 Improve runtime apps logging configuration (#1809)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-08-09 16:48:22 +03:00
Avgustin Marinov
1f2dd28ab6 [#1712] Fix READ_TENANT_CONFIGURATION hierarchy and add tests (#1714)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-04-12 17:39:31 +03:00
Avgustin Marinov
0dcf646385 Fix properties files to make admin a DEFAULT tenant user (#1689)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-03-15 14:16:21 +02:00
Avgustin Marinov
536bb19382 Add Roles and Hierarchies (#1673)
Adds Roles (SpRole -> TENANT_ADMIN, REPOSITORY_ADMIN, ...) and
intuitive hierarcy rules for them

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-03-01 12:35:40 +02:00
Avgustin Marinov
57450bf31b Add fine graned role and permission for user management (#1670)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-02-29 12:01:35 +02:00
Avgustin Marinov
24d70827b7 Improve hawkBit user management (#1666)
1. Definded with properties users (static) are configured using property map (no need of indexes)
2. AuthenticationProvider that authenticates them is always registered (if not needed - don't configure them)
3. UserDetailsService (in case of missing - won't be registered)
4. Spring security user (spring.security.username) will be registered together with other users (if any). If any - it will be system-wide, otherwise tenant-scoped.
5. UserPrincipal renamed to TenantAwareUser in order to match its purpose.
6. Some if its fields are removes as not needed - to be closer to spring security user
7. DefaultRolloutApprovalStrategy now use UserAuthoritiesResolver instead of UserDetailsService as the central point of truth

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-02-26 16:56:37 +02:00
Avgustin Marinov
ec10950308 Swagger: little config cleanup (#1617)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-02-06 17:40:31 +02:00
Avgustin Marinov
6ddc2fae1b Allow DEFAULT tenant auto create in example runtimes (#1616)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-02-05 11:44:02 +02:00
Avgustin Marinov
7440d90f59 [#1383] Spring Boot 3 migration Step 2 (#1559)
* [#1383] Spring Boot 3 migration Step 2

Some of the steps:

1. Change spring version parent and versions in root pom.xml
2. update eclipselink versions
3. javax.annotation -> jakarta.annotation (*.java)
4. javax.persistence -> jakarta.persistence (*.java)
5. javax.servlet -> jakarta.servlet (*.java, pom.xml)
6. javax.validation:validation-api -> jakarta.validation:jakarta.validation-api (pom.xml)
7. javax.validation -> jakarta.validation (*.java)
8. javax.transaction -> jakarta.transaction (*.java)
9. replace spring-cloud-stream-binder-test (hawkbit-repository-test) with
```
<dependency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-stream-test-binder</artifactId>
</dependency>
```
, TestSupportBinderAutoConfiguration.class }) -> })
@Import(TestChannelBinderConfiguration.class)
10. Set to Simple UI standard parent
11. requestMatchers to securityMatcher
12. @SpringBootApplication(scanBasePackages = "org.eclipse.hawkbit") (otherwise for instance flyway doesn't work - suffix is default ".sql", not H2.sql and don't differentiate dbs? strange is there a change?)
13. @NonEmpty for Long leads to validation exception - replaced with @NotNull
14. RSQLUtilityTest.correctRsqlBuildsPredicate - fixed - mock query builder add method
15. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#spring-mvc-and-webflux-url-matching-changes - aliases as targers/ return 404 - remove trailing slash
16. firewall tests (allowedHostNameWithNotAllowedHost) doesn't throw 'rejected exception' but return 400 instead (as probably is expected anyway)

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

* Fix tenant listing to do not mix with multitenancy

Tenant metadata is not multitenancy aware while depend on distribution set type
which is. Thus querying all tenant metadata (in non tenant context) sometimes leads to
resolution of distribution set type which is tenant scoped and leads to problems.

So, now listing tenant lists just their ids - not fill entities.

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

---------

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2024-01-20 15:57:17 +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
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