Class ZuulPskServer
java.lang.Object
org.bouncycastle.tls.AbstractTlsPeer
org.bouncycastle.tls.AbstractTlsServer
com.netflix.zuul.netty.server.psk.ZuulPskServer
- All Implemented Interfaces:
org.bouncycastle.tls.TlsPeer
,org.bouncycastle.tls.TlsServer
public class ZuulPskServer
extends org.bouncycastle.tls.AbstractTlsServer
-
Field Summary
FieldsFields inherited from class org.bouncycastle.tls.AbstractTlsServer
certificateStatusRequest, cipherSuites, clientExtensions, clientProtocolNames, clientSentECPointFormats, context, encryptThenMACOffered, maxFragmentLengthOffered, offeredCipherSuites, protocolVersions, selectedCipherSuite, selectedProtocolName, serverExtensions, statusRequestV2, truncatedHMacOffered, trustedCAKeys
-
Constructor Summary
ConstructorsConstructorDescriptionZuulPskServer
(org.bouncycastle.tls.crypto.TlsCrypto crypto, com.netflix.spectator.api.Registry registry, ExternalTlsPskProvider externalTlsPskProvider, io.netty.channel.ChannelHandlerContext ctx, Set<org.bouncycastle.tls.ProtocolName> supportedApplicationProtocols) -
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.tls.TlsCredentials
org.bouncycastle.tls.TlsPSKExternal
getExternalPSK
(Vector clientPskIdentities) TODO: Ask BC folks to see if getExternalPSK can throw a checked exception https://github.com/bcgit/bc-java/issues/1673 We are using SneakyThrows here because getExternalPSK is an override and we cant have throws in the method signature and we dont want to catch and wrap in RuntimeException.protected Vector
void
getServerExtensionsForConnection
(Hashtable serverExtensions) org.bouncycastle.tls.ProtocolVersion
protected int[]
protected org.bouncycastle.tls.ProtocolVersion[]
void
notifyAlertRaised
(short alertLevel, short alertDescription, String message, Throwable cause) void
notifyAlertReceived
(short alertLevel, short alertDescription) void
void
void
processClientExtensions
(Hashtable clientExtensions) Methods inherited from class org.bouncycastle.tls.AbstractTlsServer
allowCertificateStatus, allowEncryptThenMAC, allowMultiCertStatus, allowTruncatedHMac, allowTrustedCAIndication, checkServerExtensions, getAllowedClientCertificateTypes, getCertificateRequest, getCertificateStatus, getCipherSuites, getDetailMessageNoCipherSuite, getDHConfig, getECDHConfig, getMaximumNegotiableCurveBits, getMaximumNegotiableFiniteFieldBits, getNewConnectionID, getNewSessionID, getNewSessionTicket, getProtocolVersions, getPSKIdentityManager, getSelectedCipherSuite, getServerSupplementalData, getSessionToResume, getSRPLoginParameters, getSupportedGroups, init, isSelectableCipherSuite, notifyClientCertificate, notifyClientVersion, notifyFallback, notifyOfferedCipherSuites, notifySession, preferLocalCipherSuites, preferLocalClientCertificateTypes, processClientSupplementalData, selectCipherSuite, selectDH, selectDHDefault, selectECDH, selectECDHDefault, selectProtocolName, selectProtocolName, shouldSelectProtocolNameEarly
Methods inherited from class org.bouncycastle.tls.AbstractTlsPeer
allowLegacyResumption, cancel, getCrypto, getHandshakeResendTimeMillis, getHandshakeTimeoutMillis, getHeartbeat, getHeartbeatPolicy, getKeyExchangeFactory, getMaxCertificateChainLength, getMaxHandshakeMessageSize, getPskKeyExchangeModes, getRenegotiationPolicy, notifyCloseHandle, notifyConnectionClosed, notifySecureRenegotiation, requiresCloseNotify, requiresExtendedMasterSecret, shouldCheckSigAlgOfPeerCerts, shouldUseExtendedMasterSecret, shouldUseExtendedPadding, shouldUseGMTUnixTime
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bouncycastle.tls.TlsPeer
allowLegacyResumption, cancel, getCrypto, getHandshakeResendTimeMillis, getHandshakeTimeoutMillis, getHeartbeat, getHeartbeatPolicy, getKeyExchangeFactory, getMaxCertificateChainLength, getMaxHandshakeMessageSize, getPskKeyExchangeModes, getRenegotiationPolicy, notifyCloseHandle, notifyConnectionClosed, notifySecureRenegotiation, requiresCloseNotify, requiresExtendedMasterSecret, shouldCheckSigAlgOfPeerCerts, shouldUseExtendedMasterSecret, shouldUseExtendedPadding, shouldUseGMTUnixTime
-
Field Details
-
TLS_HANDSHAKE_USING_EXTERNAL_PSK
-
-
Constructor Details
-
ZuulPskServer
public ZuulPskServer(org.bouncycastle.tls.crypto.TlsCrypto crypto, com.netflix.spectator.api.Registry registry, ExternalTlsPskProvider externalTlsPskProvider, io.netty.channel.ChannelHandlerContext ctx, Set<org.bouncycastle.tls.ProtocolName> supportedApplicationProtocols)
-
-
Method Details
-
getCredentials
public org.bouncycastle.tls.TlsCredentials getCredentials() -
getProtocolNames
- Overrides:
getProtocolNames
in classorg.bouncycastle.tls.AbstractTlsServer
-
notifyHandshakeBeginning
- Specified by:
notifyHandshakeBeginning
in interfaceorg.bouncycastle.tls.TlsPeer
- Overrides:
notifyHandshakeBeginning
in classorg.bouncycastle.tls.AbstractTlsServer
- Throws:
IOException
-
notifyHandshakeComplete
- Specified by:
notifyHandshakeComplete
in interfaceorg.bouncycastle.tls.TlsPeer
- Overrides:
notifyHandshakeComplete
in classorg.bouncycastle.tls.AbstractTlsPeer
- Throws:
IOException
-
getSupportedVersions
protected org.bouncycastle.tls.ProtocolVersion[] getSupportedVersions()- Overrides:
getSupportedVersions
in classorg.bouncycastle.tls.AbstractTlsPeer
-
getSupportedCipherSuites
protected int[] getSupportedCipherSuites()- Specified by:
getSupportedCipherSuites
in classorg.bouncycastle.tls.AbstractTlsPeer
-
getServerVersion
- Specified by:
getServerVersion
in interfaceorg.bouncycastle.tls.TlsServer
- Overrides:
getServerVersion
in classorg.bouncycastle.tls.AbstractTlsServer
- Throws:
IOException
-
getExternalPSK
TODO: Ask BC folks to see if getExternalPSK can throw a checked exception https://github.com/bcgit/bc-java/issues/1673 We are using SneakyThrows here because getExternalPSK is an override and we cant have throws in the method signature and we dont want to catch and wrap in RuntimeException. SneakyThrows allows up to compile and it will throw the exception at runtime.- Specified by:
getExternalPSK
in interfaceorg.bouncycastle.tls.TlsServer
- Overrides:
getExternalPSK
in classorg.bouncycastle.tls.AbstractTlsServer
-
notifyAlertRaised
public void notifyAlertRaised(short alertLevel, short alertDescription, String message, Throwable cause) - Specified by:
notifyAlertRaised
in interfaceorg.bouncycastle.tls.TlsPeer
- Overrides:
notifyAlertRaised
in classorg.bouncycastle.tls.AbstractTlsPeer
-
notifyAlertReceived
public void notifyAlertReceived(short alertLevel, short alertDescription) - Specified by:
notifyAlertReceived
in interfaceorg.bouncycastle.tls.TlsPeer
- Overrides:
notifyAlertReceived
in classorg.bouncycastle.tls.AbstractTlsPeer
-
processClientExtensions
- Specified by:
processClientExtensions
in interfaceorg.bouncycastle.tls.TlsServer
- Overrides:
processClientExtensions
in classorg.bouncycastle.tls.AbstractTlsServer
- Throws:
IOException
-
getServerExtensions
- Specified by:
getServerExtensions
in interfaceorg.bouncycastle.tls.TlsServer
- Overrides:
getServerExtensions
in classorg.bouncycastle.tls.AbstractTlsServer
- Throws:
IOException
-
getServerExtensionsForConnection
- Specified by:
getServerExtensionsForConnection
in interfaceorg.bouncycastle.tls.TlsServer
- Overrides:
getServerExtensionsForConnection
in classorg.bouncycastle.tls.AbstractTlsServer
- Throws:
IOException
-
getApplicationProtocol
-