OPENDJ-1149 (CR-2334) Passwords should not be held in memory for the lifetime of a client connection
Note this change does not cater for:
- the bind operations where the password is used to authenticate. The password is held in memory for as long as it takes to complete the bind operation (and the OS flushing the network packets, etc.)
- REST operations where the web container (and the OS network stack) holds a HTTPServletRequest object for as long as it takes to process the request.
AuthenticationInfo.java:
Removed simplePassword and saslCredentials fields + getters (never used) to ensure they are not held for the lifetime of an LDAP connection.
In few methods, reversed conditions to ensure accessed variables are all directly put under a null check.
CollectClientConnectionsFilter.java
Wiped out the password ASAP, even though this is a bit pointless since the password is held by the web container for the lifetime of a REST call, either in the headers or via HTTP basic authentication.
*.java:
Consequence of the changes to AuthenticationInfo ctors.