api-layer icon indicating copy to clipboard operation
api-layer copied to clipboard

APIML does not support different type of keyring than safkeyring

Open pj892031 opened this issue 2 years ago • 3 comments

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

  1. Start an application on JDK11 using Java enabler
  2. 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

pj892031 avatar Nov 25 '22 15:11 pj892031

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.

balhar-jakub avatar Nov 28 '22 09:11 balhar-jakub

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 avatar Dec 09 '22 15:12 1000TurquoisePogs

@1000TurquoisePogs That's a good point.

balhar-jakub avatar Dec 12 '22 11:12 balhar-jakub

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.

balhar-jakub avatar Mar 08 '23 09:03 balhar-jakub

Thank you @balhar-jakub. Did you create issues in the other component repoitories to also support these other keyring types?

jalel01 avatar Mar 09 '23 08:03 jalel01

In answer to the above question: https://github.com/zowe/community/issues/1851

jalel01 avatar Mar 09 '23 08:03 jalel01