[
https://issues.apache.org/jira/browse/KNOX-3094?focusedWorklogId=957752&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-957752
]
ASF GitHub Bot logged work on KNOX-3094:
----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Feb/25 14:21
Start Date: 19/Feb/25 14:21
Worklog Time Spent: 10m
Work Description: pzampino commented on code in PR #992:
URL: https://github.com/apache/knox/pull/992#discussion_r1961766505
##########
gateway-spi/src/main/java/org/apache/knox/gateway/util/TruststoreSSLContextUtils.java:
##########
@@ -48,4 +52,25 @@ public static SSLContext getTruststoreSSLContext(KeyStore
truststore) {
return sslContext;
}
+ public static X509TrustManager getTrustManager(KeyStore truststore) {
+ try {
+ if (truststore != null) {
+ TrustManagerFactory trustManagerFactory =
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
+ trustManagerFactory.init(truststore);
+ TrustManager[] trustManagers = trustManagerFactory.getTrustManagers();
+ if (trustManagers != null) {
+ for (TrustManager tm : trustManagers) {
+ if (tm instanceof X509TrustManager) {
+ return (X509TrustManager) tm;
+ }
+ }
+ }
+ throw new IllegalStateException("Unexpected default trust managers:" +
Arrays.toString(trustManagers));
Review Comment:
What is the consequence of throwing this exception? The
DiscoveryApiClient#configureSsl() method does not catch it, so it will bubble
up. Do you know where it will eventually be handled and how?
Issue Time Tracking
-------------------
Worklog Id: (was: 957752)
Time Spent: 20m (was: 10m)
> Update CM API swagger to 7.13.1
> -------------------------------
>
> Key: KNOX-3094
> URL: https://issues.apache.org/jira/browse/KNOX-3094
> Project: Apache Knox
> Issue Type: Task
> Components: cm-discovery
> Affects Versions: 2.1.0
> Reporter: Tamás Marcinkovics
> Assignee: Tamás Marcinkovics
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> As a pre-requisite for the CM service discovery update task KNOX-3084, we
> need to update com.cloudera.api.swagger:cloudera-manager-api-swagger to
> 7.13.1.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)