Package org.apache.accumulo.core.client.security.tokens

Examples of org.apache.accumulo.core.client.security.tokens.AuthenticationToken


  }
 
  public static void dropTable(State state, Properties props) throws Exception {
    String sourceUser = props.getProperty("source", "system");
    String principal;
    AuthenticationToken token;
    if (sourceUser.equals("table")) {
      principal = WalkingSecurity.get(state).getTabUserName();
      token = WalkingSecurity.get(state).getTabToken();
    } else {
      principal = WalkingSecurity.get(state).getSysUserName();
View Full Code Here


      tabPerm = TablePermission.valueOf(perm);
    String tableName = WalkingSecurity.get(state).getTableName();
    boolean hasPerm = WalkingSecurity.get(state).hasTablePermission(target, tableName, tabPerm);
    boolean canGive;
    String sourceUser;
    AuthenticationToken sourceToken;
    if ("system".equals(sourceUserProp)) {
      sourceUser = WalkingSecurity.get(state).getSysUserName();
      sourceToken = WalkingSecurity.get(state).getSysToken();
    } else if ("table".equals(sourceUserProp)) {
      sourceUser = WalkingSecurity.get(state).getTabUserName();
View Full Code Here

    if (!isConnectorInfoSet(job))
      throw new IOException("Connector info has not been set.");
    try {
      // if the instance isn't configured, it will complain here
      String principal = getPrincipal(job);
      AuthenticationToken token = getAuthenticationToken(job);
      Connector c = getInstance(job).getConnector(principal, token);
      if (!c.securityOperations().authenticateUser(principal, token))
        throw new IOException("Unable to authenticate user");
    } catch (AccumuloException e) {
      throw new IOException(e);
View Full Code Here

        mockInstance = false;
      }

      Authorizations auths = getScanAuthorizations(context);
      String principal = getPrincipal(context);
      AuthenticationToken token = getAuthenticationToken(context);

      boolean autoAdjust = tableConfig.shouldAutoAdjustRanges();
      List<Range> ranges = autoAdjust ? Range.mergeOverlapping(tableConfig.getRanges()) : tableConfig.getRanges();
      if (ranges.isEmpty()) {
        ranges = new ArrayList<Range>(1);
View Full Code Here

      String principal = split.getPrincipal();
      if (null == principal) {
        principal = getPrincipal(attempt);
      }

      AuthenticationToken token = split.getToken();
      if (null == token) {
        token = getAuthenticationToken(attempt);
      }

      Authorizations authorizations = split.getAuths();
View Full Code Here

    _inst = new ZooKeeperInstance(getProperties().getProperty("accumulo.instanceName"),
        getProperties().getProperty("accumulo.zooKeepers"));
    try {
      String principal = getProperties().getProperty("accumulo.username");
      AuthenticationToken token = new PasswordToken(getProperties().getProperty("accumulo.password"));
      _connector = _inst.getConnector(principal, token);
    } catch (AccumuloException e) {
      throw new DBException(e);
    } catch (AccumuloSecurityException e) {
      throw new DBException(e);
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.client.security.tokens.AuthenticationToken

Copyright © 2018 www.massapicom. All rights reserved.
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.