Madhan Neethiraj created ARGUS-72:
-------------------------------------

             Summary: Agents receive 304 (Not Modified) though the server has 
updated policies
                 Key: ARGUS-72
                 URL: https://issues.apache.org/jira/browse/ARGUS-72
             Project: Argus
          Issue Type: Bug
            Reporter: Madhan Neethiraj
            Assignee: Velmurugan Periasamy


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)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to