| | |
| | | |
| | | /** The configuration handler used to manage the password generators. */ |
| | | private PasswordGeneratorConfigManager passwordGeneratorConfigManager; |
| | | /** The default password policy for the Directory Server. */ |
| | | private PasswordPolicy defaultPasswordPolicy; |
| | | /** |
| | | * The default password policy for the Directory Server. Volatile so that |
| | | * getDefaultPasswordPolicy() can read the cached value without taking the |
| | | * authenticationPolicies monitor; all mutations happen under that monitor. |
| | | */ |
| | | private volatile PasswordPolicy defaultPasswordPolicy; |
| | | /** The configuration handler used to manage the authentication policies. */ |
| | | private PasswordPolicyConfigManager authenticationPolicyConfigManager; |
| | | /** The configuration handler used to manage the password storage schemes. */ |
| | |
| | | */ |
| | | public static PasswordPolicy getDefaultPasswordPolicy() |
| | | { |
| | | // This method is called on every authentication. Do not take the global |
| | | // monitor just to read the cached value: it is volatile and only mutated |
| | | // under the authenticationPolicies monitor. |
| | | PasswordPolicy cachedPolicy = directoryServer.defaultPasswordPolicy; |
| | | if (cachedPolicy != null) |
| | | { |
| | | return cachedPolicy; |
| | | } |
| | | |
| | | // Ensure default policy is synchronized. |
| | | synchronized (directoryServer.authenticationPolicies) |
| | | { |