Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Init version of this doc

...

To configure the CDAP app in HUE, simply run ''' '''

...

copy the cdap app source code into $HUE_ROOT and run commands below: 

Code Block
themeConfluence
languagebash
firstline1
interface AuthEnforcer {
	/**
     * Enforces authorization for the specified {@link Principal} for the specified {@link Action} on the specified {@link EntityId}.
     *
     * @param principal the principal that performs the actions. This could be a user, group or a role
     * @param entity the entity on which an action is being performed
     * @param action the action being performed
     * @throws AuthorizationException if the principal is not authorized to perform action on the entity
     */
	void enforce(Principal principal, EntityId entity, Action action) throws AuthorizationException;
}

...

$HUE_ROOT/tools/app_reg/app_reg.py --install cdap --relative-paths

and the setup script will automatically add all required fields into hue's configuration file.

 

Note: May move some customized settings into HUE's configuration (located in $HUE_ROOT/desktop/config.dist/hue.ini) when project moves on, i.e. root host address of CDAP's rest api etc.

Currently no specific configuration is required in CDAP side.

Routes

This section explain the routes defined in Hue's CDAP app. In Django (as Hue is written in Django), routes is named as urls.py that use regex to define the format. MAKO is used as the html template engine.

URLResponse
GET /cdap/index.mako
GET /cdap/entity/entity_id/json of entity properties
GET /cdap/acl/entity_id/json of entity ACLs
POST /cdap/acl/add/entity_id/ --data {groupid, operation}200 ok
POST /cdap/acl/revoke/entity_id/ --data {groupid}200 ok