summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio D. Gasparini <claudio.gasparini@intl.att.com>2021-04-07 12:48:39 +0000
committerClaudio D. Gasparini <claudio.gasparini@intl.att.com>2021-04-07 14:56:59 +0200
commit59b99324415863308bd499d0589b4ba7a425ba9e (patch)
treec4bc279bd837394fbb71467c123b302b40c10572
parent232f7290449f8f707762740f70a8346f18cdb067 (diff)
Remove trust all for BasicAuthRestClientService
following global requirement expected in Istanbul, which forbids disabling host name verification Issue-ID: CCSDK-3245 Signed-off-by: Claudio D. Gasparini <claudio.gasparini@intl.att.com> Change-Id: I89c37a94cb3999a8f1813d3fc33958421b183de1
-rw-r--r--ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt18
1 files changed, 0 insertions, 18 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt
index 5ab848893..be9b849f6 100644
--- a/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt
+++ b/ms/blueprintsprocessor/modules/commons/rest-lib/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/rest/service/BasicAuthRestClientService.kt
@@ -16,15 +16,8 @@
package org.onap.ccsdk.cds.blueprintsprocessor.rest.service
-import org.apache.http.conn.ssl.NoopHostnameVerifier
-import org.apache.http.conn.ssl.SSLConnectionSocketFactory
-import org.apache.http.conn.ssl.TrustAllStrategy
-import org.apache.http.impl.client.CloseableHttpClient
-import org.apache.http.impl.client.HttpClients
import org.apache.http.message.BasicHeader
-import org.apache.http.ssl.SSLContextBuilder
import org.onap.ccsdk.cds.blueprintsprocessor.rest.BasicAuthRestClientProperties
-import org.onap.ccsdk.cds.blueprintsprocessor.rest.utils.WebClientUtils
import org.springframework.http.HttpHeaders
import org.springframework.http.MediaType
import java.net.URI
@@ -55,17 +48,6 @@ class BasicAuthRestClientService(
return uri.resolve(uri).toString()
}
- override fun httpClient(): CloseableHttpClient {
- val sslContext = SSLContextBuilder.create()
-
- sslContext.loadTrustMaterial(TrustAllStrategy.INSTANCE)
- val csf = SSLConnectionSocketFactory(sslContext.build(), NoopHostnameVerifier())
- return HttpClients.custom()
- .addInterceptorFirst(WebClientUtils.logRequest())
- .addInterceptorLast(WebClientUtils.logResponse())
- .setSSLSocketFactory(csf).build()
- }
-
override fun convertToBasicHeaders(headers: Map<String, String>):
Array<BasicHeader> {
val customHeaders: MutableMap<String, String> = headers.toMutableMap()