Package io.grpc.xds.internal.security
Class SslContextProviderSupplier
java.lang.Object
io.grpc.xds.internal.security.SslContextProviderSupplier
- All Implemented Interfaces:
Closeable
,Closeable
,AutoCloseable
Enables Client or server side to initialize this object with the received
EnvoyServerProtoData.BaseTlsContext
and communicate it to the consumer i.e. SecurityProtocolNegotiators
to lazily evaluate the SslContextProvider
. The supplier prevents credentials leakage in
cases where the user is not using xDS credentials but the client/server contains a non-default
EnvoyServerProtoData.BaseTlsContext
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private SslContextProvider
private final EnvoyServerProtoData.BaseTlsContext
private final TlsContextManager
-
Constructor Summary
ConstructorsConstructorDescriptionSslContextProviderSupplier
(EnvoyServerProtoData.BaseTlsContext tlsContext, TlsContextManager tlsContextManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Called by consumer when tlsContext changes.boolean
private SslContextProvider
int
hashCode()
boolean
private void
releaseSslContextProvider
(SslContextProvider toRelease) toString()
void
updateSslContext
(SslContextProvider.Callback callback) Updates SslContext via the passed callback.
-
Field Details
-
tlsContext
-
tlsContextManager
-
sslContextProvider
-
shutdown
private boolean shutdown
-
-
Constructor Details
-
SslContextProviderSupplier
public SslContextProviderSupplier(EnvoyServerProtoData.BaseTlsContext tlsContext, TlsContextManager tlsContextManager)
-
-
Method Details
-
getTlsContext
-
updateSslContext
Updates SslContext via the passed callback. -
releaseSslContextProvider
-
getSslContextProvider
-
isShutdown
public boolean isShutdown() -
close
public void close()Called by consumer when tlsContext changes. -
equals
-
hashCode
public int hashCode() -
toString
-