Which IIQ version are you inquiring about?
8.4
Share all details about your problem, including any error messages you may have received.
I’ve developed an IIQ plugin that triggers some Java Code. The Java code contains an HTTP client helper (ApacheHttpClient wrapper):
package com.my.code.http.client.helper;
import com.my.code.Consts;
import sailpoint.integration.ApacheHttpClient;
import java.util.HashMap;
import java.util.Map;
public class HttpClientHelper {
private final ApacheHttpClient client;
private final Map<String, String> baseHeaders = new HashMap<>();
public HttpClientHelper(String methodId, String correlationId) throws Exception {
baseHeaders.put(Consts.METHOD_ID_HEADER_NAME, methodId);
baseHeaders.put(Consts.CORRELATION_ID_HEADER_NAME, correlationId);
this.client = new ApacheHttpClient();
client.setup(true, 443, null, null, "30", new HashMap<String, String>());
}
public Map<String, String> createHeaders(Map<String, String> headers) {
Map<String, String> joinedHeaders = new HashMap<>();
joinedHeaders.putAll(this.baseHeaders);
joinedHeaders.putAll(headers);
return joinedHeaders;
}
public int post(String url, String body, Map<String, String> headers) throws Exception {
return client.post(url, body, this.createHeaders(headers));
}
public int get(String url, Map<String, String> headers) throws Exception {
return client.get(url, this.createHeaders(headers));
}
public String getBody() {
return client.getBody();
}
public void validateResponse(int responseCode) throws RuntimeException {
if (responseCode < 200 || responseCode >= 300) {
String error = "HTTP Status: " + responseCode + ", Response: " + getBody();
throw new RuntimeException(error);
}
}
}
For some reason, the ApacheHttpClient doesn’t perform server certificate validation. If I try to access a server using the code above with a self-signed certificate that IIQ’s OS doesn’t trust, it still works instead of throwing an SSL error.
I expect the ApacheHttpClient to perform SSL validation since I’m not passing any flags that might affect its default behavior (for example, trustAllCerts).
Is there some IIQ global definition regarding performing SSL validation?