zowe / api-layer

The API Mediation Layer provides a single point of access for mainframe service REST APIs.
Eclipse Public License 2.0
54 stars 62 forks source link

zaas-client src/test/resources/keystores/truststore.p12 (EDC5129I No such file or directory.) error #3237

Closed recaph closed 1 month ago

recaph commented 9 months ago

Describe the bug REST API startup fails with followng error when apiml.gateway.ssl. are not provided even when server.ssl. has the necessary values.

Caused by: java.io.FileNotFoundException: src/test/resources/keystores/truststore.p12 (EDC5129I No such file or directory.)         
.at java.base/java.io.FileInputStream.open(FileInputStream.java:216) ~.na:na.                                                       
.at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157) ~.na:na.                                                     
.at java.base/java.io.FileInputStream.<init>(FileInputStream.java:111) ~.na:na.                                                     
.at org.zowe.apiml.zaasclient.service.internal.ZaasHttpsClientProvider.getCorrectInputStream(ZaasHttpsClientProvider.java:153) ~.zaa
s-client-2.12.3.jar!/:2.12.3.                                                                                                       
.at org.zowe.apiml.zaasclient.service.internal.ZaasHttpsClientProvider.getKeystore(ZaasHttpsClientProvider.java:134) ~.zaas-client-2
.12.3.jar!/:2.12.3.                                                                                                                 

Steps to Reproduce

  1. Start the spring boot application with server.ssl. values and do not provide apiml.gateway.ssl. values.

Expected behavior apiml.gateway.ssl should default to the server.ssl values appropriately or throw an actionable error instead

Details

REST API client (in case of REST API issue):

balhar-jakub commented 9 months ago

Thanks for the feedback. If you have a fix, it would be great if you can provide it, otherwise we will get to it in next quarter e.g. February time frame.

recaph commented 9 months ago

I can try to do something. but if team is ready to pick anytime before it, don't wait for me. thanks

richard-salac commented 1 month ago

ZaasClient reads properties from apiml.service.ssl. and those defaults to server.ssl. It is not related to apiml.gateway.* peoperties. @recaph Does this answer your question?

balhar-jakub commented 1 month ago

As there is no answer, there seems to be no further interest in this case. If you feel different, please feel free to reopen.