Package org.apache.hadoop.oncrpc.security

Examples of org.apache.hadoop.oncrpc.security.SecurityHandler


  }

  @Override
  public RMDIR3Response rmdir(XDR xdr, RpcInfo info) {
    RMDIR3Response response = new RMDIR3Response(Nfs3Status.NFS3_OK);
    SecurityHandler securityHandler = getSecurityHandler(info);
    DFSClient dfsClient = clientCache.getDfsClient(securityHandler.getUser());
    if (dfsClient == null) {
      response.setStatus(Nfs3Status.NFS3ERR_SERVERFAULT);
      return response;
    }
   
View Full Code Here


  }

  @Override
  public RENAME3Response rename(XDR xdr, RpcInfo info) {
    RENAME3Response response = new RENAME3Response(Nfs3Status.NFS3_OK);
    SecurityHandler securityHandler = getSecurityHandler(info);
    DFSClient dfsClient = clientCache.getDfsClient(securityHandler.getUser());
    if (dfsClient == null) {
      response.setStatus(Nfs3Status.NFS3ERR_SERVERFAULT);
      return response;
    }
   
View Full Code Here

    if (!checkAccessPrivilege(info, AccessPrivilege.READ_WRITE)) {
      response.setStatus(Nfs3Status.NFS3ERR_ACCES);
      return response;
    }

    SecurityHandler securityHandler = getSecurityHandler(info);
    DFSClient dfsClient = clientCache.getDfsClient(securityHandler.getUser());
    if (dfsClient == null) {
      response.setStatus(Nfs3Status.NFS3ERR_SERVERFAULT);
      return response;
    }
View Full Code Here

    return dlisting;
  }
 
  @Override
  public READDIR3Response readdir(XDR xdr, RpcInfo info) {
    SecurityHandler securityHandler = getSecurityHandler(info);
    SocketAddress remoteAddress = info.remoteAddress();
    return readdir(xdr, securityHandler, remoteAddress);
  }
View Full Code Here

        dirStatus.getModificationTime(), dirList);
  }

  @Override
  public READDIRPLUS3Response readdirplus(XDR xdr, RpcInfo info) {
    SecurityHandler securityHandler = getSecurityHandler(info);
    SocketAddress remoteAddress = info.remoteAddress();
    return readdirplus(xdr, securityHandler, remoteAddress);
  }
View Full Code Here

    if (!checkAccessPrivilege(info, AccessPrivilege.READ_ONLY)) {
      response.setStatus(Nfs3Status.NFS3ERR_ACCES);
      return response;
    }
   
    SecurityHandler securityHandler = getSecurityHandler(info);
    DFSClient dfsClient = clientCache.getDfsClient(securityHandler.getUser());
    if (dfsClient == null) {
      response.setStatus(Nfs3Status.NFS3ERR_SERVERFAULT);
      return response;
    }
   
View Full Code Here

    if (!checkAccessPrivilege(info, AccessPrivilege.READ_ONLY)) {
      response.setStatus(Nfs3Status.NFS3ERR_ACCES);
      return response;
    }
   
    SecurityHandler securityHandler = getSecurityHandler(info);
    DFSClient dfsClient = clientCache.getDfsClient(securityHandler.getUser());
    if (dfsClient == null) {
      response.setStatus(Nfs3Status.NFS3ERR_SERVERFAULT);
      return response;
    }
   
View Full Code Here

    if (!checkAccessPrivilege(info, AccessPrivilege.READ_ONLY)) {
      response.setStatus(Nfs3Status.NFS3ERR_ACCES);
      return response;
    }
   
    SecurityHandler securityHandler = getSecurityHandler(info);
    DFSClient dfsClient = clientCache.getDfsClient(securityHandler.getUser());
    if (dfsClient == null) {
      response.setStatus(Nfs3Status.NFS3ERR_SERVERFAULT);
      return response;
    }
   
View Full Code Here

  @Override
  public COMMIT3Response commit(XDR xdr, RpcInfo info) {
    //Channel channel, int xid,
    //    SecurityHandler securityHandler, InetAddress client) {
    COMMIT3Response response = new COMMIT3Response(Nfs3Status.NFS3_OK);
    SecurityHandler securityHandler = getSecurityHandler(info);
    DFSClient dfsClient = clientCache.getDfsClient(securityHandler.getUser());
    if (dfsClient == null) {
      response.setStatus(Nfs3Status.NFS3ERR_SERVERFAULT);
      return response;
    }
   
View Full Code Here

  public void testWriteStableHow() throws IOException, InterruptedException {
    NfsConfiguration config = new NfsConfiguration();
    DFSClient client = null;
    MiniDFSCluster cluster = null;
    RpcProgramNfs3 nfsd;
    SecurityHandler securityHandler = Mockito.mock(SecurityHandler.class);
    Mockito.when(securityHandler.getUser()).thenReturn(
        System.getProperty("user.name"));
    String currentUser = System.getProperty("user.name");
    config.set(
            DefaultImpersonationProvider.getProxySuperuserGroupConfKey(currentUser),
            "*");
 
View Full Code Here

TOP

Related Classes of org.apache.hadoop.oncrpc.security.SecurityHandler

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.