{@link KeyManager} implementation that distributes shared secret keys via ZooKeeper to all instances, so that alldistributed instances maintain the same local cache of keys. Instances of this class will perform leader election, so that one instance functions as the "active" leader at a time. The leader is responsible for periodically generating a new secret key (with the frequency based on the configured value for {@link Constants.Security#TOKEN_DIGEST_KEY_EXPIRATION}. Prior keys are retained for as long as necessary to ensure that any previously issued, non-expired tokens may be validated. Once a previously used key's age exceeds {@link Constants.Security#TOKEN_DIGEST_KEY_EXPIRATION} plus {@link Constants.Security#TOKEN_EXPIRATION}, the key can safely be removed.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.