Skip to content

[Defect] Need ability to support SNI #735

@sandy-adi

Description

@sandy-adi

Currently when zuul routes to origins over https, it creates an SSLHandler without setting the SNI. This works for most cases, but for cases where the service may require SNI the SSL handshake fails. Here's the snippet from the initChannel method of DefaultOriginChannelInitializer

if (connectionPoolConfig.isSecure()) {
   pipeline.addLast("ssl", sslContext.newHandler(ch.alloc()));
}

if this can be updated to something along the lines below, it will help route to origins that need the SNI

SslHandler sslHandler = null;
if (connectionPoolConfig.isSecure()) {
    String sni = connectionPoolConfig.getSNI();
    if (sni != null) {
        int securePort = connectionPoolConfig.getSecurePort();
        sslHandler = sslContext.newHandler(ch.alloc(), sni, securePort);
    }else {
        sslHandler = sslContext.newHandler(ch.alloc());
    }
    pipeline.addLast("ssl", sslHandler);
}

Please let me know if this looks like the right approach, We've an issue right now because of this and would like to address it as soon as possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions