Uploaded image for project: 'OpenAM Agents'
  1. OpenAM Agents
  2. AMAGENTS-2216

New Policy Cache Mode: When realm or application for policy evaluation is changed new policy file is created, but the old one persist

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 6.0.0.0
    • Fix Version/s: None
    • Component/s: Web Agents

      Description

      Bug description

      New Policy Cache Mode: When realm or application for policy evaluation is changed new policy file is created, but the old one persist

      How to reproduce the issue

      1.) Create policy in default policy set AM

      2.) Create new policy set (e.g testPolicySet) and create a policy for it

      3.) Enable new policy mode
      export AM_POLICY_CACHE_DIR=/opt/cache
      export AM_POLICY_CACHE_MODE=on
      Note: variables need to be set in conf file on nginx

      4.) Start web server

      5.) Hit the agent's protected page

      6.) Observe policy directory (/opt/cache) and be sure policy file was downloaded

      # ls -l /opt/cache/
      -rw-r--r-- 1 www-data www-data 683 Dec  7 19:40 policy_3263908671.json
      

      7.) Go to agent profile AM Services tab / Application = and set new policy set (testPolicySet)

      8.) Hit agent again

      9.) Observe policy directory again (/opt/cache)

      Expected behaviour
      You can see only new policy file
      # ls -l /opt/cache/
      -rw-r--r-- 1 www-data www-data  617 Dec  7 19:58 policy_4179081475.json
      
      Current behaviour
      New file is created but the old one was not deleted
      # ls -l /opt/cache/
      -rw-r--r-- 1 www-data www-data  683 Dec  7 19:40 policy_3263908671.json
      -rw-r--r-- 1 www-data www-data  617 Dec  7 19:58 policy_4179081475.json
      

      Work around

      Delete old policy file by hand

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                richard.hruza Richard Hruza
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: