api-layer
api-layer copied to clipboard
APIML does not support different type of keyring than safkeyring
Describe the bug
Since JDK 11 offers keyring support IBM suggests using protocol safkeyringjce
instead of safkeyring
. There are also other types such as a safkeyringhybrid
Steps to Reproduce
- Start an application on JDK11 using Java enabler
- Try to onboard to the API ML
Expected behavior A service is onboarded.
Screenshots If applicable, add screenshots to help explain your problem.
Logs
2022-11-25 14:24:56.900 [ main] ERROR security.HttpsFactory - error
java.net.MalformedURLException: Incorrect key ring format: safkeyringjce://USERID/RINGID. Make sure you use format safkeyring:////userId/keyRing
at org.zowe.apiml.security.SecurityUtils.keyRingUrl(SecurityUtils.java:211) ~[common-service-core-2.4.0.jar!/:2.4.0]
at org.zowe.apiml.security.HttpsFactory.keyRingUrl(HttpsFactory.java:153) ~[common-service-core-2.4.0.jar!/:2.4.0]
at org.zowe.apiml.security.HttpsFactory.loadTrustMaterial(HttpsFactory.java:138) ~[common-service-core-2.4.0.jar!/:2.4.0]
at org.zowe.apiml.security.HttpsFactory.createSecureSslContext(HttpsFactory.java:211) ~[common-service-core-2.4.0.jar!/:2.4.0]
at org.zowe.apiml.security.HttpsFactory.createSslContext(HttpsFactory.java:248) ~[common-service-core-2.4.0.jar!/:2.4.0]
at org.zowe.apiml.security.HttpsFactory.createEurekaJerseyClientBuilder(HttpsFactory.java:300) ~[common-service-core-2.4.0.jar!/:2.4.0]
at org.zowe.apiml.eurekaservice.client.impl.ApiMediationClientImpl.initializeEurekaClient(ApiMediationClientImpl.java:155) ~[onboarding-enabler-java-2.4.0.jar!/:2.4.0]
at org.zowe.apiml.eurekaservice.client.impl.ApiMediationClientImpl.register(ApiMediationClientImpl.java:105) ~[onboarding-enabler-java-2.4.0.jar!/:2.4.0]
Details
- Version and build number: 2.4.0, master, since the begging
- Test environment: [either defined Zowe test environment: Marist (1, 2, 3), River, or your own environment: z/OS version and z/OSMF version]
API Catalog Web UI (in case of API Catalog issue):
- OS: [e.g. macOS, Windows]
- Browser [e.g. Chrome, Safari]
- Version [e.g. 71.0.3578.98]
REST API client (in case of REST API issue):
- Technology: [e.g. Spring Boot, Node.js]
- OS: [e.g. Windows 10]
Additional context Add any other context about the problem here.
Willingness to help If you are willing to help with debugging and reproducing the problem or with fixing the problem, please state your willingness to assist in the created issue.
https://github.com/zowe/api-layer/wiki/Issue-management
I am reclassifying this as Enhancement as Zowe doesn't claim Java 11 Support. This is an important enhancement to provide valid support for Java 11, though.
Keep in mind it's not just apiml. I'm sure nodejs doesnt support the other formats either, and if gskit does, whether zss is doing that properly hasnt been tested.
@1000TurquoisePogs That's a good point.
The API Mediation Layer as of 2.7 supports other keyring types. The other components within Zowe server side doesn't have to accept the other keyring types and as of now, we can't guarantee that whole Zowe server side will work properly. Anyway we do intend to close this issue as the part specific for API ML was done.
Thank you @balhar-jakub. Did you create issues in the other component repoitories to also support these other keyring types?
In answer to the above question: https://github.com/zowe/community/issues/1851