Fix TenantAwareUserPropertes.User password (#1971)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -23,9 +23,9 @@ logging.level.server-security=INFO
|
|||||||
logging.pattern.console=%clr(%d{${logging.pattern.dateformat:yyyy-MM-dd'T'HH:mm:ss.SSSXXX}}){faint} %clr(${logging.pattern.level:%5p}) %clr(${PID:}){magenta} %clr(---){faint} %clr([${spring.application.name}] [%X{tenant}:%X{user}] [%15.15t]){faint} %clr(${logging.pattern.correlation:}){faint}%clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${logging.exception-conversion-word:%wEx}
|
logging.pattern.console=%clr(%d{${logging.pattern.dateformat:yyyy-MM-dd'T'HH:mm:ss.SSSXXX}}){faint} %clr(${logging.pattern.level:%5p}) %clr(${PID:}){magenta} %clr(---){faint} %clr([${spring.application.name}] [%X{tenant}:%X{user}] [%15.15t]){faint} %clr(${logging.pattern.correlation:}){faint}%clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${logging.exception-conversion-word:%wEx}
|
||||||
|
|
||||||
# Define DEFAULT tenant admin user admin/admin
|
# Define DEFAULT tenant admin user admin/admin
|
||||||
|
hawkbit.security.user.admin.tenant=DEFAULT
|
||||||
hawkbit.security.user.admin.password={noop}admin
|
hawkbit.security.user.admin.password={noop}admin
|
||||||
hawkbit.security.user.admin.roles=TENANT_ADMIN
|
hawkbit.security.user.admin.roles=TENANT_ADMIN
|
||||||
hawkbit.security.user.admin.tenant=DEFAULT
|
|
||||||
# allow to auto/implicit create DEFAULT tenant (on mgmt api call)
|
# allow to auto/implicit create DEFAULT tenant (on mgmt api call)
|
||||||
hawkbit.server.repository.implicitTenantCreateAllowed=true
|
hawkbit.server.repository.implicitTenantCreateAllowed=true
|
||||||
|
|
||||||
|
|||||||
@@ -34,5 +34,4 @@ public abstract class AbstractSecurityTest {
|
|||||||
.apply(SecurityMockMvcConfigurers.springSecurity()).dispatchOptions(true);
|
.apply(SecurityMockMvcConfigurers.springSecurity()).dispatchOptions(true);
|
||||||
mvc = builder.build();
|
mvc = builder.build();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
@@ -19,8 +19,10 @@ import org.junit.jupiter.api.Test;
|
|||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.test.context.TestPropertySource;
|
import org.springframework.test.context.TestPropertySource;
|
||||||
|
|
||||||
@TestPropertySource(properties = { "hawkbit.server.security.allowedHostNames=localhost",
|
@TestPropertySource(properties = {
|
||||||
"hawkbit.server.security.httpFirewallIgnoredPaths=/index.html" })
|
"hawkbit.server.security.allowedHostNames=localhost",
|
||||||
|
"hawkbit.server.security.httpFirewallIgnoredPaths=/index.html"
|
||||||
|
})
|
||||||
@Feature("Integration Test - Security")
|
@Feature("Integration Test - Security")
|
||||||
@Story("Allowed Host Names")
|
@Story("Allowed Host Names")
|
||||||
public class AllowedHostNamesTest extends AbstractSecurityTest {
|
public class AllowedHostNamesTest extends AbstractSecurityTest {
|
||||||
|
|||||||
@@ -33,11 +33,10 @@ public class TenantAwareUserProperties {
|
|||||||
@ToString
|
@ToString
|
||||||
public static class User {
|
public static class User {
|
||||||
|
|
||||||
|
private String tenant;
|
||||||
@ToString.Exclude
|
@ToString.Exclude
|
||||||
private String password;
|
private String password;
|
||||||
private List<String> roles = new ArrayList<>();
|
private List<String> roles = new ArrayList<>();
|
||||||
private List<String> permissions = new ArrayList<>();
|
private List<String> permissions = new ArrayList<>();
|
||||||
@NonNull
|
|
||||||
private String tenant;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user