feat: z/OSMF JWT Preflight Check#4531
Conversation
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
| * or z/OS SAF keyrings. Supports PKCS12, JKS, and {@code safkeyring://} URIs. | ||
| */ | ||
| @SuppressWarnings("squid:S106") | ||
| public class Stores { |
There was a problem hiding this comment.
Isn't this class more or less the same as for the certificate analyzer?
Would it be possible to extract it to some of the libraries?
| * Thrown when keystore or truststore initialization fails | ||
| * (e.g. missing file, wrong password, invalid keyring format). | ||
| */ | ||
| public class StoresNotInitializeException extends RuntimeException { |
There was a problem hiding this comment.
It also lives in certificate-analyzer, if it is used in both it probably should go to some common module.
| * </ul> | ||
| */ | ||
| @SuppressWarnings("squid:S106") | ||
| public class SSLContextFactory { |
There was a problem hiding this comment.
Same as Stores and StoresNotInitializeException, does it make sense to duplicate the code instead of having it in a shared library?
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
|
Will be replaced by another PR |
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
…re-flight-check' into hrishikesh-nalawade/GH4526/jwt-pre-flight-check
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
This reverts commit 2b566bd.
This reverts commit fc8c14f.
This reverts commit 2088e48.
This reverts commit e2d0058.
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
| return new X509Certificate[0]; | ||
| } | ||
|
|
||
| public void checkClientTrusted(X509Certificate[] certs, String authType) { |
| // trust all | ||
| } | ||
|
|
||
| public void checkServerTrusted(X509Certificate[] certs, String authType) { |
|
|
||
| if (VERIFY_DISABLED.equals(verifyMode)) { | ||
| SSLContextFactory sslContextFactory = SSLContextFactory.initTrustAllSSLContext(); | ||
| HostnameVerifier noopVerifier = (hostname, session) -> true; |
|
|
||
| HostnameVerifier hostnameVerifier; | ||
| if (VERIFY_NONSTRICT.equals(verifyMode)) { | ||
| hostnameVerifier = (hostname, session) -> true; |
|




Description
A Java utility that verifies connectivity to the z/OSMF JWK endpoint before/after starting the Zowe API Mediation Layer. This tool helps diagnose configuration issues early such as incorrect hostnames, unreachable ports, missing certificates, or misconfigured z/OSMF by performing a lightweight HTTP(S) call to the z/OSMF JWK endpoint at
/jwt/ibm/api/zOSMFBuilder/jwkLinked to #4526
Type of change
Checklist: