Skip to content

OpenSSL exception with google-cloud-dlp 0.44.0-beta on OpenJDK 8 #3187

Closed

Description

@henrik-io

I'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()

Activity

  1. garrettjonesgoogle commented on Apr 25, 2018

    @garrettjonesgoogle
    Contributor

    This doesn't have the feel of something caused by google-cloud-java itself. What was the prior version you were using?

  2. henrik-io commented on Apr 26, 2018

    @henrik-io
    Author

    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.

  3. garrettjonesgoogle commented on Apr 26, 2018

    @garrettjonesgoogle
    Contributor

    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.

  4. henrik-io commented on Apr 26, 2018

    @henrik-io
    Author

    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.

  5. added
    🚨 criticalP0 critical issue. Requires immediate fix
    triage meI really want to be triaged.
    api: dlpIssues related to the Sensitive Data Protection API.
    on Jun 8, 2018
  6. added
    type: questionRequest for information or clarification. Not an issue.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    and removed
    🚨 criticalP0 critical issue. Requires immediate fix
    triage meI really want to be triaged.
    on Jun 20, 2018
  7. removed
    🚨 criticalP0 critical issue. Requires immediate fix
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Oct 23, 2018
  8. sduskis commented on Oct 23, 2018

    @sduskis
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: dlpIssues related to the Sensitive Data Protection API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions