mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-03 17:39:15 +00:00
clarify comments and add assert client auth type
Original commit: elastic/x-pack-elasticsearch@0e3d134bc6
This commit is contained in:
parent
94e7d82a20
commit
b3f8495a03
@ -101,7 +101,10 @@ public class SecurityRestFilter extends RestFilter {
|
||||
threadContext.putTransient(PkiRealm.PKI_CERT_HEADER_NAME, certs);
|
||||
}
|
||||
} catch (SSLPeerUnverifiedException e) {
|
||||
// this happens when we only request client authentication and the client does not provide it
|
||||
// this happens when client authentication is optional and the client does not provide credentials. If client
|
||||
// authentication was required then this connection should be closed before ever getting into this class
|
||||
assert sslEngine.getNeedClientAuth() == false;
|
||||
assert sslEngine.getWantClientAuth();
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("SSL Peer did not present a certificate on channel [{}]", e, channel);
|
||||
} else if (logger.isDebugEnabled()) {
|
||||
|
@ -109,7 +109,10 @@ public interface ServerTransportFilter {
|
||||
threadContext.putTransient(PkiRealm.PKI_CERT_HEADER_NAME, certs);
|
||||
}
|
||||
} catch (SSLPeerUnverifiedException e) {
|
||||
// this happens when we only request client authentication and the client does not provide it
|
||||
// this happens when client authentication is optional and the client does not provide credentials. If client
|
||||
// authentication was required then this connection should be closed before ever getting into this class
|
||||
assert sslEngine.getNeedClientAuth() == false;
|
||||
assert sslEngine.getWantClientAuth();
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("SSL Peer did not present a certificate on channel [{}]", e, channel);
|
||||
} else if (logger.isDebugEnabled()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user