Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
show role
grant role –name user
add role –id 1 –name user
remove role –id 1
show role_user_group
grant role_user_groupprinciple –role_id 1 –user_name sqoop
grant role_user_groupprinciple –role_id 1 –group_name sqoop
revoke role_user_groupprinciple –role_id 1 –user_name sqoop
revoke role_user_groupprinciple –role_id 1 –group_name sqoop
show privilege
grant privilege –resource_type link –resource_id 1 –role_id 1 –action_type read -with-grant-option yes
revoke privilege –resource_type link –resource_id 1 –role_id 1 –action_type read
  • Restful call API is handled by org.apache.sqoop.handler.AuthorizationRequestHandler.java in sqoop-server
    • GET /v1/role/{rid}
    • GET /v1/role/principle/type/{type}/name/{name}
      • Return details about one particular role with id:rid
      • Return all roles the particular principle has with principle (type, name)
      • Return all of them if rid equals to "all"
    • PUT /v1/role
      • Create new role without id:rid
      • Update existing role with id:rid
      • POST PUT data of JsonObject MRolerole (id, name)
    • DELETE /v1/role/{rid}
    • GET /v1/principle/{pid}
    • GET /v1/principle/role/{ridrole_user_group/{rugid}
      • Return details about one particular principle with id:pid
      • Return all principles the particular role _user_group with id:rugidhas with role (rid)
      • Return all of them if rugid pid equals to "all"
      PUT
    • GET /v1/role/{rid}
    • GET /v1/role/principle/type/{type}/name/{name}
      • Return details about one particular role with id:rid
      • Return all roles the particular principle has with principle (type, name)
      • Return all of them if rid equals to "all"
    • PUT /v1/grant
      • Create new grant
      • PUT data of JsonObject role(id) and principle (type, name)
      _user_group
      • Create new role without id:rugid
      • Update existing role_user_group with id:rid
      • POST data of JsonObject MRoleUserGroup
    • DELETE /v1/role_user_groupprinciple/{rugidgid}
    • GET /v1/privilege/{pid}
      • Return details about one particular privilege with id:pid
      • Return all of them if pid equals to "all"
    • PUT /v1/privilege
      • Create new role without id:pid
      • Update existing privilege with id:pid
      • POST PUT data of JsonObject MRoleUserGroup
    • DELETE /v1/privilege/{pid}

...