Codota Logo
org.apache.hadoop.security.authorize
Code IndexAdd Codota to your IDE (free)

How to use org.apache.hadoop.security.authorize

Best Java code snippets using org.apache.hadoop.security.authorize (Showing top 20 results out of 540)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: apache/hbase

@Override
public void refreshAuthManager(PolicyProvider pp) {
 // Ignore warnings that this should be accessed in a static way instead of via an instance;
 // it'll break if you go via static route.
 synchronized (authManager) {
  authManager.refresh(this.conf, pp);
 }
}
origin: apache/ignite

/** {@inheritDoc} */
@Override public AccessControlList getQueueAdmins(String queueName) throws IOException {
  return new AccessControlList("*");
}
origin: org.apache.hadoop/hadoop-common

/**
 * Construct a new ACL from String representation of users and groups
 * 
 * The arguments are comma separated lists
 * 
 * @param users comma separated list of users
 * @param groups comma separated list of groups
 */
public AccessControlList(String users, String groups) {
 buildACL(new String[] {users, groups});
}
origin: org.apache.hadoop/hadoop-common

/**
 * Authorize the superuser which is doing doAs
 * 
 * @param user ugi of the effective or proxy user which contains a real user
 * @param remoteAddress the ip address of client
 * @throws AuthorizationException
 */
public static void authorize(UserGroupInformation user, 
  String remoteAddress) throws AuthorizationException {
 if (sip==null) {
  // In a race situation, It is possible for multiple threads to satisfy this condition.
  // The last assignment will prevail.
  refreshSuperUserGroupsConfiguration(); 
 }
 sip.authorize(user, remoteAddress);
}

origin: apache/hbase

 public static void init(Configuration conf, ServiceAuthorizationManager authManager) {
  // set service-level authorization security policy
  System.setProperty("hadoop.policy.file", "hbase-policy.xml");
  if (conf.getBoolean(ServiceAuthorizationManager.SERVICE_AUTHORIZATION_CONFIG, false)) {
   authManager.refresh(conf, new HBasePolicyProvider());
   ProxyUsers.refreshSuperUserGroupsConfiguration(conf);
  }
 }
}
origin: org.apache.hadoop/hadoop-common

/**
 * Refreshes configuration using the default Proxy user prefix for properties.
 * @param conf configuration
 */
public static void refreshSuperUserGroupsConfiguration(Configuration conf) {
 refreshSuperUserGroupsConfiguration(conf, CONF_HADOOP_PROXYUSER);
}

origin: org.apache.hadoop/hadoop-common

/**
 * Serializes the AccessControlList object
 */
@Override
public void write(DataOutput out) throws IOException {
 String aclString = getAclString();
 Text.writeString(out, aclString);
}
origin: org.apache.hadoop/hadoop-common

/**
 * Refreshes configuration using the specified Proxy user prefix for
 * properties.
 *
 * @param conf configuration
 * @param proxyUserPrefix proxy user configuration prefix
 */
public static void refreshSuperUserGroupsConfiguration(Configuration conf,
  String proxyUserPrefix) {
 Preconditions.checkArgument(proxyUserPrefix != null && 
   !proxyUserPrefix.isEmpty(), "prefix cannot be NULL or empty");
 // sip is volatile. Any assignment to it as well as the object's state
 // will be visible to all the other threads. 
 ImpersonationProvider ip = getInstance(conf);
 ip.init(proxyUserPrefix);
 sip = ip;
 ProxyServers.refresh(conf);
}
origin: apache/hbase

 @Override
 public Service[] getServices() {
  return new Service [] {
   new Service("security.client.protocol.acl",
    AuthenticationProtos.AuthenticationService.BlockingInterface.class)};
 }
});
origin: org.apache.hadoop/hadoop-common

 @Override
 public RefreshServiceAclResponseProto refreshServiceAcl(
   RpcController controller, RefreshServiceAclRequestProto request)
   throws ServiceException {
  try {
   impl.refreshServiceAcl();
  } catch (IOException e) {
   throw new ServiceException(e);
  }
  return VOID_REFRESH_SERVICE_ACL_RESPONSE;
 }
}
origin: org.apache.hadoop/hadoop-common

public boolean isUserAllowed(UserGroupInformation ugi) {
 return isUserInList(ugi);
}
origin: org.apache.hadoop/hadoop-common

/**
 * Returns comma-separated concatenated single String of the set 'users'
 *
 * @return comma separated list of users
 */
private String getUsersString() {
 return getString(users);
}
origin: org.apache.hadoop/hadoop-common

 public static boolean isProxyServer(String remoteAddr) { 
  if (proxyServers == null) {
   refresh(); 
  }
  return proxyServers.contains(remoteAddr);
 }
}
origin: org.apache.hadoop/hadoop-common

/**
 * Refresh the service authorization ACL for the service handled by this server
 * using the specified Configuration.
 */
@Private
public void refreshServiceAclWithLoadedConfiguration(Configuration conf,
  PolicyProvider provider) {
 serviceAuthorizationManager.refreshWithLoadedConfiguration(conf, provider);
}
/**
origin: org.apache.hadoop/hadoop-common

@Override
public void printStackTrace() {
 printStackTrace(System.err);
}
origin: org.apache.hadoop/hadoop-common

 @Override
 public Writable newInstance() { return new AccessControlList(); }
});
origin: org.apache.hadoop/hadoop-common

/**
 * Refresh the service authorization ACL for the service handled by this server.
 */
public void refreshServiceAcl(Configuration conf, PolicyProvider provider) {
 serviceAuthorizationManager.refresh(conf, provider);
}
origin: org.apache.hadoop/hadoop-common

/**
 * Construct a new ACL from a String representation of the same.
 * 
 * The String is a a comma separated list of users and groups.
 * The user list comes first and is separated by a space followed 
 * by the group list. For e.g. "user1,user2 group1,group2"
 * 
 * @param aclString String representation of the ACL
 */
public AccessControlList(String aclString) {
 buildACL(aclString.split(" ", 2));
}

origin: org.apache.hadoop/hadoop-common

/**
 * Returns comma-separated concatenated single String of the set 'groups'
 *
 * @return comma separated list of groups
 */
private String getGroupsString() {
 return getString(groups);
}
origin: apache/hive

public Builder setAdmins(String admins) {
 if (admins != null) {
  setContextAttribute(ADMINS_ACL, new AccessControlList(admins));
 }
 return this;
}
org.apache.hadoop.security.authorize

Most used classes

  • AccessControlList
  • ProxyUsers
  • AuthorizationException
  • Service
  • ServiceAuthorizationManager
  • ProxyServers,
  • RefreshAuthorizationPolicyProtocol,
  • PolicyProvider,
  • ImpersonationProvider,
  • TestAccessControlList,
  • TestProxyUsers,
  • TestServiceAuthorization$TestPolicyProvider,
  • ConfiguredPolicy,
  • ConnectionPermission,
  • TestServiceLevelAuthorization
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now