@Override public void createLocalUser(TInfo tinfo, TCredentials credentials, String principal, ByteBuffer password) throws ThriftSecurityException { AuthenticationToken token; if (null != context.getSaslParams()) { try { token = new KerberosToken(); } catch (IOException e) { log.warn("Failed to create KerberosToken"); throw new ThriftSecurityException(e.getMessage(), SecurityErrorCode.DEFAULT_SECURITY_ERROR); } } else { token = new PasswordToken(password); } Credentials newUser = new Credentials(principal, token); security.createUser(credentials, newUser, new Authorizations()); }
/** * Construct a server context from the server's configuration */ public AccumuloServerContext(ServerConfigurationFactory confFactory, AuthenticationTokenSecretManager secretManager) { super(confFactory.getInstance(), getCredentials(confFactory.getInstance()), confFactory.getConfiguration()); this.confFactory = confFactory; this.secretManager = secretManager; if (null != getSaslParams()) { // Server-side "client" check to make sure we're logged in as a user we expect to be enforceKerberosLogin(); } }
return TServerUtils.startTServer(serverType, timedProcessor, serverName, threadName, minThreads, simpleTimerThreadpoolSize, timeBetweenThreadChecks, maxMessageSize, service.getServerSslParams(), service.getSaslParams(), service.getClientTimeoutInMillis(), addresses); } catch (TTransportException e) { return TServerUtils.startTServer(serverType, timedProcessor, serverName, threadName, minThreads, simpleTimerThreadpoolSize, timeBetweenThreadChecks, maxMessageSize, service.getServerSslParams(), service.getSaslParams(), service.getClientTimeoutInMillis(), addr); } catch (TTransportException tte) {