mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-29 09:42:23 +00:00
MINOR: Mask Wherescape MSSQL Password (#23076)
(cherry picked from commit a382533f252c6c7f6280ea0cc8d3bda5ea56b7ad)
This commit is contained in:
parent
7cfff762c4
commit
ff65f7f8b8
@ -48,6 +48,7 @@ import org.openmetadata.schema.services.connections.pipeline.AirflowConnection;
|
|||||||
import org.openmetadata.schema.services.connections.pipeline.MatillionConnection;
|
import org.openmetadata.schema.services.connections.pipeline.MatillionConnection;
|
||||||
import org.openmetadata.schema.services.connections.pipeline.NifiConnection;
|
import org.openmetadata.schema.services.connections.pipeline.NifiConnection;
|
||||||
import org.openmetadata.schema.services.connections.pipeline.SSISConnection;
|
import org.openmetadata.schema.services.connections.pipeline.SSISConnection;
|
||||||
|
import org.openmetadata.schema.services.connections.pipeline.WherescapeConnection;
|
||||||
import org.openmetadata.schema.services.connections.search.ElasticSearchConnection;
|
import org.openmetadata.schema.services.connections.search.ElasticSearchConnection;
|
||||||
import org.openmetadata.schema.services.connections.security.RangerConnection;
|
import org.openmetadata.schema.services.connections.security.RangerConnection;
|
||||||
import org.openmetadata.schema.services.connections.storage.GCSConnection;
|
import org.openmetadata.schema.services.connections.storage.GCSConnection;
|
||||||
@ -98,6 +99,7 @@ public final class ClassConverterFactory {
|
|||||||
Map.entry(NifiConnection.class, new NifiConnectionClassConverter()),
|
Map.entry(NifiConnection.class, new NifiConnectionClassConverter()),
|
||||||
Map.entry(MatillionConnection.class, new MatillionConnectionClassConverter()),
|
Map.entry(MatillionConnection.class, new MatillionConnectionClassConverter()),
|
||||||
Map.entry(VertexAIConnection.class, new VertexAIConnectionClassConverter()),
|
Map.entry(VertexAIConnection.class, new VertexAIConnectionClassConverter()),
|
||||||
|
Map.entry(WherescapeConnection.class, new WherescapeConnectionClassConverter()),
|
||||||
Map.entry(RangerConnection.class, new RangerConnectionClassConverter()));
|
Map.entry(RangerConnection.class, new RangerConnectionClassConverter()));
|
||||||
Map.entry(Workflow.class, new WorkflowClassConverter());
|
Map.entry(Workflow.class, new WorkflowClassConverter());
|
||||||
Map.entry(CassandraConnection.class, new CassandraConnectionClassConverter());
|
Map.entry(CassandraConnection.class, new CassandraConnectionClassConverter());
|
||||||
|
|||||||
@ -0,0 +1,27 @@
|
|||||||
|
package org.openmetadata.service.secrets.converter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.openmetadata.schema.services.connections.database.MssqlConnection;
|
||||||
|
import org.openmetadata.schema.services.connections.pipeline.WherescapeConnection;
|
||||||
|
import org.openmetadata.schema.utils.JsonUtils;
|
||||||
|
|
||||||
|
/** Converter class to get an `SupersetConnection` object. */
|
||||||
|
public class WherescapeConnectionClassConverter extends ClassConverter {
|
||||||
|
|
||||||
|
private static final List<Class<?>> CONNECTION_CLASSES = List.of(MssqlConnection.class);
|
||||||
|
|
||||||
|
public WherescapeConnectionClassConverter() {
|
||||||
|
super(WherescapeConnection.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object convert(Object object) {
|
||||||
|
WherescapeConnection wherescapeConnection =
|
||||||
|
(WherescapeConnection) JsonUtils.convertValue(object, this.clazz);
|
||||||
|
|
||||||
|
tryToConvertOrFail(wherescapeConnection.getDatabaseConnection(), CONNECTION_CLASSES)
|
||||||
|
.ifPresent(wherescapeConnection::setDatabaseConnection);
|
||||||
|
|
||||||
|
return wherescapeConnection;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user