Pull request #679: RED-6670: Enabled to configure accessTokenLifeSpan for tenants
Merge in RED/persistence-service from RED-6670 to master * commit '422715d1bc1557c9affbc20a7bd6611d2a98a93a': RED-6670: Enabled to configure accessTokenLifeSpan for tenants
This commit is contained in:
commit
eb46cece2c
@ -45,6 +45,7 @@ import com.iqser.red.service.persistence.management.v1.processor.multitenancy.en
|
||||
import com.iqser.red.service.persistence.management.v1.processor.multitenancy.entity.SearchConnectionEntity;
|
||||
import com.iqser.red.service.persistence.management.v1.processor.multitenancy.entity.TenantEntity;
|
||||
import com.iqser.red.service.persistence.management.v1.processor.service.persistence.mulitenancy.repository.TenantRepository;
|
||||
import com.iqser.red.service.persistence.management.v1.processor.settings.FileManagementServiceSettings;
|
||||
import com.iqser.red.service.persistence.management.v1.processor.utils.jdbc.JDBCUtils;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.multitenancy.AzureStorageConnection;
|
||||
import com.iqser.red.service.persistence.service.v1.api.shared.model.multitenancy.DatabaseConnection;
|
||||
@ -87,6 +88,8 @@ public class TenantManagementService {
|
||||
private final KeyCloakRoleManagerService keyCloakRoleManagerService;
|
||||
private final KeyCloakAdminClientService keycloak;
|
||||
|
||||
private final FileManagementServiceSettings settings;
|
||||
|
||||
public TenantManagementService(EncryptionDecryptionService encryptionService,
|
||||
@Qualifier("tenantLiquibaseProperties") LiquibaseProperties liquibaseProperties,
|
||||
ResourceLoader resourceLoader,
|
||||
@ -94,7 +97,7 @@ public class TenantManagementService {
|
||||
AsyncMigrationStarterService asyncMigrationStarterService,
|
||||
GeneralConfigurationService generalConfigurationService,
|
||||
KeyCloakRoleManagerService keyCloakRoleManagerService,
|
||||
KeyCloakAdminClientService keycloak) {
|
||||
KeyCloakAdminClientService keycloak, FileManagementServiceSettings settings) {
|
||||
|
||||
this.encryptionService = encryptionService;
|
||||
this.liquibaseProperties = liquibaseProperties;
|
||||
@ -104,6 +107,7 @@ public class TenantManagementService {
|
||||
this.generalConfigurationService = generalConfigurationService;
|
||||
this.keyCloakRoleManagerService = keyCloakRoleManagerService;
|
||||
this.keycloak = keycloak;
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
|
||||
@ -236,6 +240,7 @@ public class TenantManagementService {
|
||||
redaction.setLoginTheme("redaction");
|
||||
redaction.setEmailTheme("redaction");
|
||||
redaction.setAccountTheme("redaction");
|
||||
redaction.setAccessTokenLifespan(settings.getTenantAccessTokenLifeSpan());
|
||||
|
||||
var redactionClient = new ClientRepresentation();
|
||||
redactionClient.setEnabled(true);
|
||||
|
||||
@ -41,6 +41,8 @@ public class FileManagementServiceSettings {
|
||||
|
||||
private double compressionThresholdRatio = 10;
|
||||
|
||||
private int tenantAccessTokenLifeSpan = 5;
|
||||
|
||||
private String applicationName = "RedactManager";
|
||||
private Set<String> defaultFilterTypes = new HashSet<>();
|
||||
private Set<String> defaultFilterHintTypes = new HashSet<>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user