mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-18 04:05:42 +00:00
parent
d9b15ef6cb
commit
52ea9ea81e
@ -16,6 +16,8 @@ package org.openmetadata.service.secrets.converter;
|
||||
import java.util.List;
|
||||
import org.openmetadata.schema.security.ssl.ValidateSSLClientConfig;
|
||||
import org.openmetadata.schema.services.connections.database.GreenplumConnection;
|
||||
import org.openmetadata.schema.services.connections.database.common.IamAuthConfig;
|
||||
import org.openmetadata.schema.services.connections.database.common.basicAuth;
|
||||
import org.openmetadata.service.util.JsonUtils;
|
||||
|
||||
/**
|
||||
@ -24,6 +26,8 @@ import org.openmetadata.service.util.JsonUtils;
|
||||
public class GreenplumConnectionClassConverter extends ClassConverter {
|
||||
|
||||
private static final List<Class<?>> SSL_SOURCE_CLASS = List.of(ValidateSSLClientConfig.class);
|
||||
private static final List<Class<?>> CONFIG_SOURCE_CLASSES =
|
||||
List.of(basicAuth.class, IamAuthConfig.class);
|
||||
|
||||
public GreenplumConnectionClassConverter() {
|
||||
super(GreenplumConnection.class);
|
||||
@ -34,6 +38,9 @@ public class GreenplumConnectionClassConverter extends ClassConverter {
|
||||
GreenplumConnection greenplumConnection =
|
||||
(GreenplumConnection) JsonUtils.convertValue(object, this.clazz);
|
||||
|
||||
tryToConvert(greenplumConnection.getAuthType(), CONFIG_SOURCE_CLASSES)
|
||||
.ifPresent(greenplumConnection::setAuthType);
|
||||
|
||||
tryToConvert(greenplumConnection.getSslConfig(), SSL_SOURCE_CLASS)
|
||||
.ifPresent(greenplumConnection::setSslConfig);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user