GeezerVison is showing github.com — OpenSSL exception with google-cloud-dlp 0.44.0-beta on OpenJDK 8 · Issue #3187 · googleapis/google-cloud-java
OpenSSL exception with google-cloud-dlp 0.44.0-beta on OpenJDK 8 #3187Labels api: dlpIssues related to the Sensitive Data Protection API.type: questionRequest for information or clarification. Not an issue. DescriptionI'm using Google DLP through the Google Cloud Java client library, and when I upgraded to the latest version, 0.44.0-beta, I started getting the CertificateException shown below. This runs fine when I run it on my Mac with the Oracle JDK 8, but when run in OpenJDK 8 in a Docker instance, I'm seeing the exception. I have to have this running on OpenJDK. I'm guessing that the certificate is signed by a CA that is unknown to OpenJDK. What's the easiest solution to this? Do I have to install a custom CA for OpenJDK? What's interesting is that the OverOps snapshot contains a call to this method:
public io.grpc.netty.shaded.io.netty.handler.ssl.util.SelfSignedCertificate(String fqdn, SecureRandom random, int bits, Date notBefore, Date notAfter)
and the fqdn parameter is actually set to example.com. The stack trace is as follows:
CertificateException: Issuer class type invalid.
at sun.security.x509.X509CertInfo.setIssuer(Object)
at sun.security.x509.X509CertInfo.set(String, Object)
at io.grpc.netty.shaded.io.netty.handler.ssl.util.OpenJdkSelfSignedCertGenerator.generate(String, KeyPair, SecureRandom, Date, Date)
at io.grpc.netty.shaded.io.netty.handler.ssl.util.SelfSignedCertificate.<init>(String, SecureRandom, int, Date, Date)
at io.grpc.netty.shaded.io.netty.handler.ssl.util.SelfSignedCertificate.<init>(String, Date, Date)
at io.grpc.netty.shaded.io.netty.handler.ssl.util.SelfSignedCertificate.<init>(Date, Date)
at io.grpc.netty.shaded.io.netty.handler.ssl.util.SelfSignedCertificate.<init>()
at io.grpc.netty.shaded.io.netty.handler.ssl.OpenSsl.<clinit>()
at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.defaultSslProvider()
at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.configure(SslContextBuilder)
at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.forClient()
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder$NettyTransportFactory$DefaultNettyTransportCreationParamsFilterFactory.<init>(NettyChannelBuilder$NettyTransportFactory, SslContext)
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder$NettyTransportFactory$DefaultNettyTransportCreationParamsFilterFactory.<init>(NettyChannelBuilder$NettyTransportFactory, SslContext, NettyChannelBuilder$1)
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder$NettyTransportFactory.<init>(NettyChannelBuilder$TransportCreationParamsFilterFactory, Class, Map, NegotiationType, SslContext, EventLoopGroup, int, int, int, long, long, boolean, TransportTracer)
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.buildTransportFactory()
at io.grpc.internal.AbstractManagedChannelImplBuilder.build()
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createSingleChannel()
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.createChannel()
at com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.getTransportChannel()
at com.google.api.gax.rpc.ClientContext.create(StubSettings)
at com.google.cloud.dlp.v2beta1.stub.GrpcDlpServiceStub.create(DlpServiceStubSettings)
at com.google.cloud.dlp.v2beta1.stub.DlpServiceStubSettings.createStub()
at com.google.cloud.dlp.v2beta1.DlpServiceClient.<init>(DlpServiceSettings)
at com.google.cloud.dlp.v2beta1.DlpServiceClient.create(DlpServiceSettings)
at XXXXXXXX.redactContent(Collection, String, Likelihood, List)
at XXXXXXXX.lambda$redact$0(Collection, String, Likelihood, List)
at java.util.concurrent.CompletableFuture$AsyncSupply.run()
at java.lang.Thread.run()
Activitygarrettjonesgoogle commented on Apr 25, 2018 This doesn't have the feel of something caused by google-cloud-java itself. What was the prior version you were using? henrik-io commented on Apr 26, 2018 Hi Garrett. I literally have made no other change than upgrade the DLP jar from 0.34.0-beta to 0.44.0-beta. There are no code, JRE/JDK, or deployment changes, etc. It's super reproducible in my case. By reverting back to 0.34.0-beta it worked fine again. garrettjonesgoogle commented on Apr 26, 2018 In 0.34.0-beta we depended on grpc 1.9.0, and in 0.44.0-beta we depend on grpc 1.10.1. I think it's likely an issue with 1.10.1 of grpc; you could try downgrading grpc to 1.9.0 to see if that fixes it. If it does, file an issue against https://github.com/grpc/grpc-java . If you have troubles with downgrading grpc, 0.42.0-beta was the last version of google-cloud-java to depend on grpc 1.9.0. henrik-io commented on Apr 26, 2018 OK, will do. I'm tied up with other stuff at the moment, but I may get some time early next week to try it. Thanks. sduskis commented on Oct 23, 2018 I'm going to close this, since it looks like a version specific issue and I'm guessing that the issue no longer exists. Please reopen if this is still an issue.
MetadataMetadataapi: dlpIssues related to the Sensitive Data Protection API.type: questionRequest for information or clarification. Not an issue. DevelopmentNo branches or pull requestsIssue actions
|