Compare commits

..

No commits in common. "e26477e8d1175368da37179eef7edc73face1b35" and "c066535843bba83f7f91e799ac65292b1a9a2348" have entirely different histories.

5 changed files with 11 additions and 38 deletions

Binary file not shown.

View File

@ -9,8 +9,6 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.URL;
import java.net.URLEncoder;
import java.security.KeyStore;
@ -74,8 +72,6 @@ public abstract class AbstractProcess {
public static ObjectMapper mapper;
public static ObjectMapper mapperYaml;
public static Proxy proxy;
public final RegistryClient client;
protected ApplicationConfig config;
@ -94,9 +90,6 @@ public abstract class AbstractProcess {
setTrustStoreCredentials();
if (config.getProxy() != null && config.getProxy().getHost() != null && !config.getProxy().getHost().isEmpty())
proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(config.getProxy().getHost(), config.getProxy().getPort()));
javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(new javax.net.ssl.HostnameVerifier() {
public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) {
return true;
@ -345,7 +338,7 @@ public abstract class AbstractProcess {
URL url = new URL(urlStr);
HttpsURLConnection con = (HttpsURLConnection) url.openConnection(proxy);
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setDoInput(true);
con.setDoOutput(true);
@ -457,7 +450,7 @@ public abstract class AbstractProcess {
URL url = new URL(urlStr);
HttpsURLConnection con = (HttpsURLConnection) url.openConnection(proxy);
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
con.setUseCaches(false);
con.setDoOutput(true);
configureHttpsConnection(con);

View File

@ -1,8 +1,6 @@
package cz.trask.migration.impl.v32;
import java.io.ByteArrayInputStream;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
@ -87,7 +85,7 @@ public class Wso2AppsToApicurio extends AbstractProcess {
HttpResponse exportedZip = makeRequest(
"GET", config.getSource().getAdminApiUrl() + "/export/applications?appName=" + app.getName()
+ "&appOwner=" + URLEncoder.encode(app.getOwner(), Charset.forName("UTF-8")) + "&withKeys=true",
+ "&appOwner=" + app.getOwner() + "&withKeys=true",
httpHeaders, Collections.emptyMap(), true);
List<ZipEntryData> zipEntries = ZipUtils.extractFilesFromZip(exportedZip.getResponseBytes());
@ -148,7 +146,7 @@ public class Wso2AppsToApicurio extends AbstractProcess {
ApplicationList listOfApps = null;
try {
String url = adminApiUrl.concat(String.format("/applications?limit=9999"));
String url = adminApiUrl.concat(String.format("/applications"));
log.debug("Getting Applications with token: '" + tokenResponse.getAccess_token() + "' URL: " + url);

View File

@ -21,8 +21,6 @@ public class ApplicationConfig {
private int maxThreads;
@JsonProperty("store_migrated_artifacts")
private boolean storeMigratedArtifacts = false;
@JsonProperty("proxy")
private Proxy proxy;
@Data
public static class TrustStore {
@ -68,16 +66,4 @@ public class ApplicationConfig {
private String wso2ApisDir;
}
@Data
public static class Proxy {
@JsonProperty("host")
private String host;
@JsonProperty("port")
private int port;
@JsonProperty("username")
private String username;
@JsonProperty("password")
private String password;
}
}

View File

@ -1,7 +1,3 @@
proxy:
host: proxy.jtfg.com
port: 3128
source:
registration_api_url: https://developerstest.jtfg.com/client-registration/v0.17/register
publisher_api_url: https://developerstest.jtfg.com/api/am/publisher
@ -12,12 +8,12 @@ source:
wso2_apis_dir: apis
target:
registration_api_url: https://wso2apiportal-int.apps.oshift-int.jtfg.com/client-registration/v0.17/register
publisher_api_url: https://wso2apiportal-int.apps.oshift-int.jtfg.com/api/am/publisher/v4/apis/import
admin_api_url: https://wso2apiportal-int.apps.oshift-int.jtfg.com/api/am/admin/v4
devportal_api_url: https://wso2apiportal-int.apps.oshift-int.jtfg.com/api/am/devportal
publisher_token_url: https://wso2apiportal-int.apps.oshift-int.jtfg.com/oauth2/token
wso2_user: YWRtaW46Tiw5YzEpeFh0NTNr
registration_api_url: https://localhost:9443/client-registration/v0.17/register
publisher_api_url: https://localhost:9443/api/am/publisher/v4/apis/import
admin_api_url: https://localhost:9443/api/am/admin/v4
devportal_api_url: https://localhost:9443/api/am/devportal
publisher_token_url: https://localhost:9443/oauth2/token
wso2_user: YWRtaW46YWRtaW4=
truststore:
path: client-truststore.jks
@ -32,6 +28,6 @@ apicurio:
default_api_group: api
overwrite_existing_application: true
max_threads: 1
max_threads: 8
store_migrated_artifacts: true