Package org.apache.accumulo.core.security

Examples of org.apache.accumulo.core.security.Authorizations


  private Authorizations getAuthorizations(Set<ByteBuffer> authorizations) {
    List<String> auths = new ArrayList<String>();
    for (ByteBuffer bbauth : authorizations) {
      auths.add(ByteBufferUtil.toString(bbauth));
    }
    return new Authorizations(auths.toArray(new String[0]));
  }
View Full Code Here


  public String createScanner(ByteBuffer login, String tableName, ScanOptions opts) throws org.apache.accumulo.proxy.thrift.AccumuloException,
      org.apache.accumulo.proxy.thrift.AccumuloSecurityException, org.apache.accumulo.proxy.thrift.TableNotFoundException, TException {
    try {
      Connector connector = getConnector(login);
     
      Authorizations auth;
      if (opts != null && opts.isSetAuthorizations()) {
        auth = getAuthorizations(opts.authorizations);
      } else {
        auth = connector.securityOperations().getUserAuthorizations(connector.whoami());
      }
View Full Code Here

      org.apache.accumulo.proxy.thrift.AccumuloSecurityException, org.apache.accumulo.proxy.thrift.TableNotFoundException, TException {
    try {
      Connector connector = getConnector(login);
     
      int threads = 10;
      Authorizations auth;
      if (opts != null && opts.isSetAuthorizations()) {
        auth = getAuthorizations(opts.authorizations);
      } else {
        auth = connector.securityOperations().getUserAuthorizations(connector.whoami());
      }
View Full Code Here

      fetchedColumns = InputConfigurator.deserializeFetchedColumns(columns);
    }

    if (in.readBoolean()) {
      String strAuths = in.readUTF();
      auths = new Authorizations(strAuths.getBytes(Charset.forName("UTF-8")));
    }

    if (in.readBoolean()) {
      principal = in.readUTF();
    }
View Full Code Here

        } catch (AccumuloSecurityException e) {
          throw new IOException(e);
        }
      }

      Authorizations authorizations = split.getAuths();
      if (null == authorizations) {
        authorizations = getScanAuthorizations(attempt);
      }

      String table = split.getTable();
View Full Code Here

    boolean offline = isOfflineScan(job);
    boolean isolated = isIsolated(job);
    boolean localIterators = usesLocalIterators(job);
    boolean mockInstance = (null != instance && MockInstance.class.equals(instance.getClass()));
    Set<Pair<Text,Text>> fetchedColumns = getFetchedColumns(job);
    Authorizations auths = getScanAuthorizations(job);
    String principal = getPrincipal(job);
    String tokenClass = getTokenClass(job);
    byte[] tokenBytes = getToken(job);

    AuthenticationToken token;
View Full Code Here

        } catch (AccumuloSecurityException e) {
          throw new IOException(e);
        }
      }

      Authorizations authorizations = split.getAuths();
      if (null == authorizations) {
        authorizations = getScanAuthorizations(job);
      }

      String table = split.getTable();
View Full Code Here

    boolean offline = isOfflineScan(context);
    boolean isolated = isIsolated(context);
    boolean localIterators = usesLocalIterators(context);
    boolean mockInstance = (null != instance && MockInstance.class.equals(instance.getClass()));
    Set<Pair<Text,Text>> fetchedColumns = getFetchedColumns(context);
    Authorizations auths = getScanAuthorizations(context);
    String principal = getPrincipal(context);
    String tokenClass = getTokenClass(context);
    byte[] tokenBytes = getToken(context);

    AuthenticationToken token;
View Full Code Here

  }
 
  public static class AuthConverter implements IStringConverter<Authorizations> {
    @Override
    public Authorizations convert(String value) {
      return new Authorizations(value.split(","));
    }
View Full Code Here

    bw.addMutation(m1);

    bw.flush();

    Scanner scanner = getConnector().createScanner("test", new Authorizations());

    int count = 0;
    for (Entry<Key,Value> entry : scanner) {
      count++;
      if (!entry.getValue().toString().equals("5")) {
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.security.Authorizations

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.