org.apache.oozie.service
Class ProxyUserService

java.lang.Object
  extended by org.apache.oozie.service.ProxyUserService
All Implemented Interfaces:
Service

public class ProxyUserService
extends Object
implements Service

The ProxyUserService checks if a user of a request has proxyuser privileges.

This check is based on the following criteria:


Field Summary
static String CONF_PREFIX
           
static String GROUPS
           
static String HOSTS
           
 
Fields inherited from interface org.apache.oozie.service.Service
DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND
 
Constructor Summary
ProxyUserService()
           
 
Method Summary
 void destroy()
          Destroys the service.
 Class<? extends Service> getInterface()
          Returns the service interface.
 void init(Services services)
          Initializes the service.
 void validate(String proxyUser, String proxyHost, String doAsUser)
          Verifies a proxyuser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONF_PREFIX

public static final String CONF_PREFIX
See Also:
Constant Field Values

GROUPS

public static final String GROUPS
See Also:
Constant Field Values

HOSTS

public static final String HOSTS
See Also:
Constant Field Values
Constructor Detail

ProxyUserService

public ProxyUserService()
Method Detail

getInterface

public Class<? extends Service> getInterface()
Returns the service interface.

Specified by:
getInterface in interface Service
Returns:
ProxyUserService

init

public void init(Services services)
          throws ServiceException
Initializes the service.

Specified by:
init in interface Service
Parameters:
services - services singleton initializing the service.
Throws:
ServiceException - thrown if the service could not be configured correctly.

validate

public void validate(String proxyUser,
                     String proxyHost,
                     String doAsUser)
              throws IOException,
                     AccessControlException
Verifies a proxyuser.

Parameters:
proxyUser - user name of the proxy user.
proxyHost - host the proxy user is making the request from.
doAsUser - user the proxy user is impersonating.
Throws:
IOException - thrown if an error during the validation has occurred.
AccessControlException - thrown if the user is not allowed to perform the proxyuser request.

destroy

public void destroy()
Destroys the service.

Specified by:
destroy in interface Service


Copyright © 2013 Apache Software Foundation. All Rights Reserved.