Last year I had
posted a question about the concept of sessions in gRPC and the security around them. This question is related to that.
I'm currently digging through the Java implementation of gRPC (gRPC-core and grpc-netty-shaded) and I'm trying to see if I can find where transport errors or alerts translate into channels being closed. Specifically, I'd like to be able to show that if at the transport layer a TLS fatal alert is detected, that the channel on which that TLS session was riding is closed.
Assuming
Java's JSSE is used for TLS for the purpose of this discussion, I can trace through the library where fatal alerts are discovered (SSLSocketImpl) during attempts to read/write data. The connection is closed and an IOException is thrown that propagates up the stack; it is expected that whatever client was using the library will catch the exception and deal with it. What I can't find is where at the Channel layer that equates to a response by both client and server to close out that channel and, if necessary, establish a new one (where again authentication might take place).
Any helping pointing me to the right spot in the code will be a great help.
Eric
FYI - will be at gRPConf in a few weeks...