Package org.apache.accumulo.core.security.thrift

Examples of org.apache.accumulo.core.security.thrift.ThriftSecurityException$ThriftSecurityExceptionStandardScheme


    @Override
    public List<ActiveScan> getActiveScans(TInfo tinfo, AuthInfo credentials) throws ThriftSecurityException, TException {
     
      try {
        if (!authenticator.hasSystemPermission(credentials, credentials.user, SystemPermission.SYSTEM))
          throw new ThriftSecurityException(credentials.user, SecurityErrorCode.PERMISSION_DENIED);
      } catch (AccumuloSecurityException e) {
        throw e.asThriftException();
      }
     
      return sessionManager.getActiveScans();
View Full Code Here


   
    @Override
    public void chop(TInfo tinfo, AuthInfo credentials, String lock, TKeyExtent textent) throws TException {
      try {
        if (!authenticator.hasSystemPermission(credentials, credentials.user, SystemPermission.SYSTEM))
          throw new ThriftSecurityException(credentials.user, SecurityErrorCode.PERMISSION_DENIED);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
      KeyExtent ke = new KeyExtent(textent);
     
View Full Code Here

   
    @Override
    public void compact(TInfo tinfo, AuthInfo credentials, String lock, String tableId, ByteBuffer startRow, ByteBuffer endRow) throws TException {
      try {
        if (!authenticator.hasSystemPermission(credentials, credentials.user, SystemPermission.SYSTEM))
          throw new ThriftSecurityException(credentials.user, SecurityErrorCode.PERMISSION_DENIED);
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
     
      KeyExtent ke = new KeyExtent(new Text(tableId), ByteBufferUtil.toText(endRow), ByteBufferUtil.toText(startRow));
View Full Code Here

          log.debug("Failed to scan !METADATA table to wait for flush " + tableId, e);
        } catch (TabletDeletedException tde) {
          log.debug("Failed to scan !METADATA table to wait for flush " + tableId, tde);
        } catch (AccumuloSecurityException e) {
          log.warn(e.getMessage(), e);
          throw new ThriftSecurityException();
        } catch (TableNotFoundException e) {
          log.error(e.getMessage(), e);
          throw new ThriftTableOperationException();
        }
      }
View Full Code Here

    }
   
    private void authenticate(AuthInfo credentials) throws ThriftSecurityException {
      try {
        if (!authenticator.authenticateUser(credentials, credentials.user, credentials.password))
          throw new ThriftSecurityException(credentials.user, SecurityErrorCode.BAD_CREDENTIALS);
      } catch (AccumuloSecurityException e) {
        throw e.asThriftException();
      }
    }
View Full Code Here

    @Override
    public void update(TInfo tinfo, AuthInfo credentials, TKeyExtent tkeyExtent, TMutation tmutation) throws NotServingTabletException,
        ConstraintViolationException, ThriftSecurityException {
      try {
        if (!authenticator.hasTablePermission(credentials, credentials.user, new String(tkeyExtent.getTable()), TablePermission.WRITE))
          throw new ThriftSecurityException(credentials.user, SecurityErrorCode.PERMISSION_DENIED);
      } catch (AccumuloSecurityException e) {
        throw e.asThriftException();
      }
     
      KeyExtent keyExtent = new KeyExtent(tkeyExtent);
View Full Code Here

      String tableId = new String(tkeyExtent.table);
      try {
        if (!authenticator.hasSystemPermission(credentials, credentials.user, SystemPermission.ALTER_TABLE)
            && !authenticator.hasSystemPermission(credentials, credentials.user, SystemPermission.SYSTEM)
            && !authenticator.hasTablePermission(credentials, credentials.user, tableId, TablePermission.ALTER_TABLE))
          throw new ThriftSecurityException(credentials.user, SecurityErrorCode.PERMISSION_DENIED);
      } catch (AccumuloSecurityException e) {
        throw e.asThriftException();
      }
     
      KeyExtent keyExtent = new KeyExtent(tkeyExtent);
View Full Code Here

        boolean fatal = false;
        try {
          log.debug("Got " + request + " message from user: " + credentials.user);
          if (!authenticator.hasSystemPermission(credentials, credentials.user, SystemPermission.SYSTEM)) {
            log.warn("Got " + request + " message from user: " + credentials.user);
            throw new ThriftSecurityException(credentials.user, SecurityErrorCode.PERMISSION_DENIED);
          }
        } catch (AccumuloSecurityException e) {
          log.warn("Got " + request + " message from unauthenticatable user: " + e.getUser());
          if (e.getUser().equals(SecurityConstants.SYSTEM_USERNAME)) {
            log.fatal("Got message from a service with a mismatched configuration. Please ensure a compatible configuration.", e);
View Full Code Here

    @Override
    public List<ActiveScan> getActiveScans(TInfo tinfo, AuthInfo credentials) throws ThriftSecurityException, TException {
     
      try {
        if (!authenticator.hasSystemPermission(credentials, credentials.user, SystemPermission.SYSTEM))
          throw new ThriftSecurityException(credentials.user, SecurityErrorCode.PERMISSION_DENIED);
      } catch (AccumuloSecurityException e) {
        throw e.asThriftException();
      }
     
      return sessionManager.getActiveScans();
View Full Code Here

          log.debug("Failed to scan !METADATA table to wait for flush " + tableId, e);
        } catch (TabletDeletedException tde) {
          log.debug("Failed to scan !METADATA table to wait for flush " + tableId, tde);
        } catch (AccumuloSecurityException e) {
          log.warn(e.getMessage(), e);
          throw new ThriftSecurityException();
        } catch (TableNotFoundException e) {
          log.error(e.getMessage(), e);
          throw new ThriftTableOperationException();
        }
      }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.security.thrift.ThriftSecurityException$ThriftSecurityExceptionStandardScheme

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.