Class VMParamsZkCredentialsInjector

  • All Implemented Interfaces:
    ZkCredentialsInjector

    public class VMParamsZkCredentialsInjector
    extends Object
    implements ZkCredentialsInjector
    Reads credentials from System Properties and injects them into DigestZkCredentialsProvider & DigestZkACLProvider Usage:
       -DzkCredentialsInjector=org.apache.solr.common.cloud.VMParamsZkCredentialsInjector \
       -DzkDigestUsername=admin-user -DzkDigestPassword=CHANGEME-ADMIN-PASSWORD \
       -DzkDigestReadonlyUsername=readonly-user -DzkDigestReadonlyPassword=CHANGEME-READONLY-PASSWORD
     
    Or from a Java property file:
       -DzkCredentialsInjector=org.apache.solr.common.cloud.VMParamsZkCredentialsInjector \
       -DzkDigestCredentialsFile=SOLR_HOME_DIR/server/etc/zookeepercredentials.properties
     
    Example of a Java property file:
     zkDigestUsername=admin-user
     zkDigestPassword=CHANGEME-ADMIN-PASSWORD
     zkDigestReadonlyUsername=readonly-user
     zkDigestReadonlyPassword=CHANGEME-READONLY-PASSWORD
     
    • Field Detail

      • DEFAULT_DIGEST_USERNAME_VM_PARAM_NAME

        public static final String DEFAULT_DIGEST_USERNAME_VM_PARAM_NAME
        See Also:
        Constant Field Values
      • DEFAULT_DIGEST_PASSWORD_VM_PARAM_NAME

        public static final String DEFAULT_DIGEST_PASSWORD_VM_PARAM_NAME
        See Also:
        Constant Field Values
      • DEFAULT_DIGEST_READONLY_USERNAME_VM_PARAM_NAME

        public static final String DEFAULT_DIGEST_READONLY_USERNAME_VM_PARAM_NAME
        See Also:
        Constant Field Values
      • DEFAULT_DIGEST_READONLY_PASSWORD_VM_PARAM_NAME

        public static final String DEFAULT_DIGEST_READONLY_PASSWORD_VM_PARAM_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • VMParamsZkCredentialsInjector

        public VMParamsZkCredentialsInjector()
      • VMParamsZkCredentialsInjector

        public VMParamsZkCredentialsInjector​(String zkDigestAllUsernameVMParamName,
                                             String zkDigestAllPasswordVMParamName,
                                             String zkDigestReadonlyUsernameVMParamName,
                                             String zkDigestReadonlyPasswordVMParamName)