Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-72

Agents receive 304 (Not Modified) though the server has updated policies

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.4.0
    • None
    • None

    Description

      After few grant/revoke command executions in HBase shell, I noticed that a HBase agent didn't get the the most up-to-date policy definition. Periodic polling gets 304 from the policy manager - hence the agent never get the up-to-date policy.

      Here are the commands executed in HBase shell:
      create 'employee','personal','payroll','medical'
      grant 'tom', 'RW', 'employee', 'medical'
      grant 'tom', 'R', 'employee', 'medical'

      On investigation, found that the update_time field on policies is earlier than the update_time of the permissions in the policy (see the following SQL output). Perhaps the policy's update_time was not updated for the change done to permissions via Grant/Revoke. If this is the case, the fix would be to ensure that update_time of all policies updated by grant/revoke is updated to the current time.

      mysql> select policy.id, policy.policy_name, policy.update_time, perm.update_time from x_resource policy, x_perm_map perm where perm.res_id = policy.id and perm.update_time > policy.update_time;
      -------------------------------------------------------------------+

      id policy_name update_time update_time

      -------------------------------------------------------------------+

      20 hbasedev-3-20140919204258 2014-09-19 20:42:58 2014-09-19 20:42:59
      20 hbasedev-3-20140919204258 2014-09-19 20:42:58 2014-09-19 20:42:59
      20 hbasedev-3-20140919204258 2014-09-19 20:42:58 2014-09-19 20:42:59
      20 hbasedev-3-20140919204258 2014-09-19 20:42:58 2014-09-19 20:42:59
      21 hbasedev-4-20140919204319 2014-09-19 20:43:19 2014-09-19 21:20:48
      21 hbasedev-4-20140919204319 2014-09-19 20:43:19 2014-09-19 21:20:48
      21 hbasedev-4-20140919204319 2014-09-19 20:43:19 2014-09-19 21:20:48

      -------------------------------------------------------------------+
      7 rows in set (0.00 sec)

      Attachments

        Issue Links

          Activity

            People

              vel Velmurugan Periasamy
              madhan Madhan Neethiraj
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: