Hi,
1st, this is a really sweet tool!!!
Is there a way when utilizing a remote ZAP API service programmatically, you can make REST service calls to it programmatically from a different machine? For instance, I'm using the java client API in which there is a class ClientApi.java which builds the rest URL and sends the request. When it builds the URL for every REST service request it constructs it like this:
private static URL buildZapRequestUrl(
String format,
String component,
String type,
String method,
Map<String, String> params) throws MalformedURLException {
StringBuilder sb = new StringBuilder();
sb.append(format);
sb.append('/');
sb.append(component);
sb.append('/');
sb.append(type);
sb.append('/');
sb.append(method);
sb.append('/');
if (params != null) {
sb.append('?');
for (Map.Entry<String, String> p : params.entrySet()) {
sb.append(encodeQueryParam(p.getKey()));
sb.append('=');
if (p.getValue() != null) {
sb.append(encodeQueryParam(p.getValue()));
}
sb.append('&');
}
}
return new URL(sb.toString());
}
As you can observe, its constructing the REST URL in such a way where a user can only make a REST service request locally as the URL will always have
sb.append("http://zap/"). I need a way where I can call the ZAP REST API service hosted on a remote ZAP instance vs. locally. Does ZAP support this or can ZAP API only be used from the local machine hosting ZAP? Or possibly there is some network configuration I can do in order to accomplish this?