mirror of
https://github.com/apache/nifi.git
synced 2025-02-06 01:58:32 +00:00
NIFI-10668 Persist proxy password in remote process group (#6557)
* NIFI-10668 Persist proxy password in remote process group
This commit is contained in:
parent
91e267e6e3
commit
2049268372
@ -24,7 +24,7 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class VersionedProcessGroup extends VersionedComponent {
|
||||
public class VersionedProcessGroup extends VersionedComponent {
|
||||
|
||||
private Set<VersionedProcessGroup> processGroups = new HashSet<>();
|
||||
private Set<VersionedRemoteProcessGroup> remoteProcessGroups = new HashSet<>();
|
||||
|
@ -32,6 +32,7 @@ public class VersionedRemoteProcessGroup extends VersionedComponent {
|
||||
private String proxyHost;
|
||||
private Integer proxyPort;
|
||||
private String proxyUser;
|
||||
private String proxyPassword;
|
||||
|
||||
private Set<VersionedRemoteGroupPort> inputPorts;
|
||||
private Set<VersionedRemoteGroupPort> outputPorts;
|
||||
@ -157,6 +158,14 @@ public class VersionedRemoteProcessGroup extends VersionedComponent {
|
||||
this.proxyUser = proxyUser;
|
||||
}
|
||||
|
||||
public String getProxyPassword() {
|
||||
return proxyPassword;
|
||||
}
|
||||
|
||||
public void setProxyPassword(String proxyPassword) {
|
||||
this.proxyPassword = proxyPassword;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ComponentType getComponentType() {
|
||||
return ComponentType.REMOTE_PROCESS_GROUP;
|
||||
|
@ -2918,6 +2918,7 @@ public class StandardVersionedComponentSynchronizer implements VersionedComponen
|
||||
rpg.setProxyHost(proposed.getProxyHost());
|
||||
rpg.setProxyPort(proposed.getProxyPort());
|
||||
rpg.setProxyUser(proposed.getProxyUser());
|
||||
rpg.setProxyPassword(decrypt(proposed.getProxyPassword(), syncOptions.getPropertyDecryptor()));
|
||||
rpg.setTransportProtocol(SiteToSiteTransportProtocol.valueOf(proposed.getTransportProtocol()));
|
||||
rpg.setYieldDuration(proposed.getYieldDuration());
|
||||
|
||||
|
@ -782,6 +782,9 @@ public class NiFiRegistryFlowMapper {
|
||||
rpg.setProxyHost(remoteGroup.getProxyHost());
|
||||
rpg.setProxyPort(remoteGroup.getProxyPort());
|
||||
rpg.setProxyUser(remoteGroup.getProxyUser());
|
||||
if (flowMappingOptions.isMapSensitiveConfiguration()) {
|
||||
rpg.setProxyPassword(encrypt(remoteGroup.getProxyPassword()));
|
||||
}
|
||||
rpg.setTargetUri(remoteGroup.getTargetUri());
|
||||
rpg.setTargetUris(remoteGroup.getTargetUris());
|
||||
rpg.setTransportProtocol(remoteGroup.getTransportProtocol().name());
|
||||
|
Loading…
x
Reference in New Issue
Block a user