Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caused by: java.security.cert.CertificateParsingException: Empty issuer DN not allowed in X509Certificates #74

Closed
droslean opened this issue Apr 4, 2023 · 8 comments

Comments

@droslean
Copy link

droslean commented Apr 4, 2023

The certificates that I generated include the issuer. However, I am still getting this error in orchestra pod. Is there any documentation that I can follow to re-create the certifications?

@mlbiam
Copy link
Contributor

mlbiam commented Apr 4, 2023

what's generating this exception? Can you please provide the entire stack trace?

@droslean
Copy link
Author

droslean commented Apr 4, 2023

Caused by: java.security.cert.CertificateParsingException: Empty issuer DN not allowed in X509Certificates
	at sun.security.x509.X509CertInfo.parse(X509CertInfo.java:658) ~[?:?]
	at sun.security.x509.X509CertInfo.<init>(X509CertInfo.java:169) ~[?:?]
	at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1842) ~[?:?]
	at sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:194) ~[?:?]
	at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:105) ~[?:?]
	at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:355) ~[?:?]
	at sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1316) ~[?:?]
	at sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1232) ~[?:?]
	at sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1175) ~[?:?]
	at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392) ~[?:?]
	at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443) ~[?:?]
	at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:421) ~[?:?]
	at sun.security.ssl.TransportContext.dispatch(TransportContext.java:183) ~[?:?]
	at sun.security.ssl.SSLTransport.decode(SSLTransport.java:172) ~[?:?]
	at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1507) ~[?:?]
	at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1417) ~[?:?]
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:456) ~[?:?]
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:427) ~[?:?]
	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:436) ~[httpclient-4.5.13.jar:4.5.13]
	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384) ~[httpclient-4.5.13.jar:4.5.13]
	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) ~[httpclient-4.5.13.jar:4.5.13]
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) ~[httpclient-4.5.13.jar:4.5.13]
	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) ~[httpclient-4.5.13.jar:4.5.13]
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.13.jar:4.5.13]
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.13.jar:4.5.13]
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.13.jar:4.5.13]
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient-4.5.13.jar:4.5.13]
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.13.jar:4.5.13]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.13.jar:4.5.13]
	at com.tremolosecurity.proxy.postProcess.UriRequestProcess.postProcess(UriRequestProcess.java:127) ~[unison-server-core-1.0.34.jar:?]
	at com.tremolosecurity.proxy.filter.HttpFilterChainImpl.nextFilter(HttpFilterChainImpl.java:92) ~[unison-server-core-1.0.34.jar:?]
	at com.tremolosecurity.proxy.filters.K8sInjectImpersonation.doFilter(K8sInjectImpersonation.java:92) ~[unison-applications-k8s-1.0.34.jar:?]
	at com.tremolosecurity.proxy.filter.HttpFilterChainImpl.nextFilter(HttpFilterChainImpl.java:86) ~[unison-server-core-1.0.34.jar:?]
	at com.tremolosecurity.proxy.filters.AzFilter.doFilter(AzFilter.java:95) ~[unison-server-core-1.0.34.jar:?]
	at com.tremolosecurity.proxy.filter.HttpFilterChainImpl.nextFilter(HttpFilterChainImpl.java:86) ~[unison-server-core-1.0.34.jar:?]
	at com.tremolosecurity.proxy.filters.SetNoCacheHeaders.doFilter(SetNoCacheHeaders.java:25) ~[unison-server-core-1.0.34.jar:?]
	at com.tremolosecurity.proxy.filter.HttpFilterChainImpl.nextFilter(HttpFilterChainImpl.java:86) ~[unison-server-core-1.0.34.jar:?]
	at com.tremolosecurity.proxy.ProxySys.doURI(ProxySys.java:97) ~[unison-server-core-1.0.34.jar:?]
	... 45 more

@mlbiam
Copy link
Contributor

mlbiam commented Apr 4, 2023

is this when trying to access the openunisn login portal or the kubernetes dashboard?

@droslean
Copy link
Author

droslean commented Apr 4, 2023

The kubernetes dashboard.

@mlbiam
Copy link
Contributor

mlbiam commented Apr 4, 2023

hmm, seems like the new cert was generated by the dashboard didn't get deleted to use the new cert. Try deleting the kubernetes-dashboard pod, once it re-launches, did that fix the issue?

If it doesn't, delete the kubernetes-dashboard-certs Secret in the kubernetes-dashboard namespace and "touch" the openunison orchestra object again to force a re-generation of the certificate.

@droslean
Copy link
Author

droslean commented Apr 4, 2023

The issue was fixed after #73 (comment)

@droslean droslean closed this as completed Apr 4, 2023
@droslean
Copy link
Author

droslean commented Apr 4, 2023

@mlbiam That error was in the orchestal pod, not in the kubernetes dashboard. Whan I was accessing the dashboard it would redirect me to a Openunison Internal Server error.

@mlbiam
Copy link
Contributor

mlbiam commented Apr 4, 2023

right. The openunison-orchestra Pod is a reverse proxy between you and the dashboard. The dashboard ships with an empty Secret for TLS and generates a random certificate that Java doesn't like. The operator generates a self0signed certificate that works much better. You received that error because the dashboard was using it's randomly generated cert (did you recently update the dashboard?). Forcing the operator to run corrected the issue because it deployed a new certificate and trusted it in OpenUnison.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants