public static SaslConnectionParams from(AccumuloConfiguration config, AuthenticationToken token) { if (!config.getBoolean(Property.INSTANCE_RPC_SASL_ENABLED)) { return null; } return new SaslConnectionParams(config, token); }
@Override public boolean equals(Object o) { if (!(o instanceof ThriftTransportKey)) return false; ThriftTransportKey ttk = (ThriftTransportKey) o; return server.equals(ttk.server) && timeout == ttk.timeout && (!isSsl() || (ttk.isSsl() && sslParams.equals(ttk.sslParams))) && (!isSasl() || (ttk.isSasl() && saslParams.equals(ttk.saslParams))); }
final SaslMechanism mechanism = saslParams.getMechanism(); saslParams.getKerberosServerPrimary(), hostname, mechanism); saslParams.getKerberosServerPrimary(), hostname, saslParams.getSaslProperties(), saslParams.getCallbackHandler(), transport);
serverPrimary + "/_HOST@" + SaslConnectionParams.getDefaultRealm());
public ClientContext(SingletonReservation reservation, ClientInfo info, AccumuloConfiguration serverConf) { this.info = info; this.hadoopConf = info.getHadoopConf(); zooCache = new ZooCacheFactory().getZooCache(info.getZooKeepers(), info.getZooKeepersSessionTimeOut()); this.serverConf = serverConf; timeoutSupplier = memoizeWithExpiration( () -> getConfiguration().getTimeInMillis(Property.GENERAL_RPC_TIMEOUT)); sslSupplier = memoizeWithExpiration(() -> SslConnectionParams.forClient(getConfiguration())); saslSupplier = memoizeWithExpiration( () -> SaslConnectionParams.from(getConfiguration(), getCredentials().getToken())); this.singletonReservation = Objects.requireNonNull(reservation); this.tableops = new TableOperationsImpl(this); this.namespaceops = new NamespaceOperationsImpl(this, tableops); }
public SaslConnectionParams(AccumuloConfiguration conf, AuthenticationToken token) { this(ClientConfiguration.fromMap(getProperties(conf)), token); }
@Override public String toString() { String prefix = ""; if (isSsl()) { prefix = "ssl:"; } else if (isSasl()) { prefix = saslParams.toString() + ":"; } return prefix + server + " (" + Long.toString(timeout) + ")"; }
org.apache.accumulo.core.client.ClientConfiguration.ClientProperty.KERBEROS_SERVER_PRIMARY .getKey()) + "/_HOST@" + SaslConnectionParams.getDefaultRealm();
final SaslMechanism mechanism = saslParams.getMechanism(); saslParams.getKerberosServerPrimary(), hostname, mechanism); saslParams.getKerberosServerPrimary(), hostname, saslParams.getSaslProperties(), saslParams.getCallbackHandler(), transport);
serverPrimary + "/_HOST@" + SaslConnectionParams.getDefaultRealm());
@Override public boolean equals(Object o) { if (!(o instanceof ThriftTransportKey)) return false; ThriftTransportKey ttk = (ThriftTransportKey) o; return server.equals(ttk.server) && timeout == ttk.timeout && (!isSsl() || (ttk.isSsl() && sslParams.equals(ttk.sslParams))) && (!isSasl() || (ttk.isSasl() && saslParams.equals(ttk.saslParams))); }
@Override public SaslConnectionParams get() { // Use the clientConf if we have it if (null != clientConf) { if (!clientConf.hasSasl()) { return null; } return new SaslConnectionParams(clientConf, getCredentials().getToken()); } AccumuloConfiguration conf = getConfiguration(); if (!conf.getBoolean(Property.INSTANCE_RPC_SASL_ENABLED)) { return null; } return new SaslConnectionParams(conf, getCredentials().getToken()); } };
+ SaslConnectionParams.getDefaultRealm();