Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-4985

Policy Application creationDate is changed after update App. via REST

    Details

    • Sprint:
      Sprint 76 - Team Newton, Sprint 77 - Team Newton, Sprint 79 - Team Curie, Sustaining Sprint 12

      Description

      Policy Application creationDate is changed after update App. and it is equals to the lastModifiedDate.

      STEPS TO REPRODUCE:
      1. Create an pol. application

      curl --request POST --header "iPlanetDirectoryPro: <ADMIN TOKEN>" --header "Content-Type: application/json" --data '{ "name": "testPolApp", "attributeNames": [ ], "resources": [ "http://example.com:80/*", "http://example.com:80/*?*" ], "entitlementCombiner": "DenyOverride", "resourceComparator": "com.sun.identity.entitlement.URLResourceName", "subjects": [ "JwtClaim", "AuthenticatedUsers", "Identity", "AND", "OR", "NOT" ], "realm": "/", "description": "Test Application", "applicationType": "iPlanetAMWebAgentService", "actions": { "POST": true, "GET": true } }' "http://centos6-64.example.com:8080/openam/json/applications/?_action=create&_prettyPrint=true"
      {
        "name" : "testPolApp",
        "resources" : [ "http://example.com:80/*", "http://example.com:80/*?*" ],
        "actions" : {
          "POST" : true,
          "GET" : true
        },
        "attributeNames" : [ ],
        "description" : "Test Application",
        "realm" : "/",
        "creationDate" : 1415888742439,
        "lastModifiedDate" : 1415888742439,
        "conditions" : [ ],
        "createdBy" : "id=amadmin,ou=user,dc=openam,dc=forgerock,dc=org",
        "lastModifiedBy" : "id=amadmin,ou=user,dc=openam,dc=forgerock,dc=org",
        "applicationType" : "iPlanetAMWebAgentService",
        "subjects" : [ "JwtClaim", "AuthenticatedUsers", "Identity", "NOT", "AND", "OR" ],
        "entitlementCombiner" : "DenyOverride"
      }
      

      2. Update created application

      curl --request PUT --header "iPlanetDirectoryPro: <ADMIN TOKEN>" --header "Content-Type: application/json" --data '{ "attributeNames": [ ], "resources": [ "http://www.example.com:80/*", "http://www.example.com:80/*?*" ], "entitlementCombiner": "DenyOverride", "resourceComparator": "com.sun.identity.entitlement.URLResourceName", "subjects": [ "JwtClaim", "AuthenticatedUsers", "Identity", "AND", "OR", "NOT" ], "realm": "/", "description": "Test Application", "applicationType": "crestPolicyService", "actions": { "UPDATE": false, "QUERY": true, "PATCH": false, "CREATE": true, "DELETE": true, "READ": true, "ACTION": false } }' "http://centos6-64.example.com:8080/openam/json/applications/testPolApp/?_prettyPrint=true"
      {
        "name" : "testPolApp",
        "resources" : [ "http://www.example.com:80/*", "http://www.example.com:80/*?*" ],
        "actions" : {
          "UPDATE" : false,
          "QUERY" : true,
          "PATCH" : false,
          "CREATE" : true,
          "DELETE" : true,
          "READ" : true,
          "ACTION" : false
        },
        "attributeNames" : [ ],
        "description" : "Test Application",
        "realm" : "/",
        "creationDate" : 1415888927823,
        "lastModifiedDate" : 1415888927823,
        "conditions" : null,
        "createdBy" : "id=amadmin,ou=user,dc=openam,dc=forgerock,dc=org",
        "lastModifiedBy" : "id=amadmin,ou=user,dc=openam,dc=forgerock,dc=org",
        "applicationType" : "crestPolicyService",
        "subjects" : [ "JwtClaim", "AuthenticatedUsers", "Identity", "NOT", "AND", "OR" ],
        "entitlementCombiner" : "DenyOverride"
      }
      

      3.Compare creationDate and lastModifiedDate
      Observed result creationDate and lastModifiedDate has the same values

        "creationDate" : 1415888927823,
        "lastModifiedDate" : 1415888927823,
      

      Expected result: creationDate should contains value of creation

        "creationDate" : 1415888742439,
        "lastModifiedDate" : 1415888927823,
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                quentin.castel Quentin CASTEL [X] (Inactive)
                Reporter:
                richard.hruza Richard Hruza
                QA Assignee:
                Richard Hruza
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2h
                  2h
                  Remaining:
                  Time Spent - 0.25h Remaining Estimate - 1.75h
                  1.75h
                  Logged:
                  Time Spent - 0.25h Remaining Estimate - 1.75h
                  0.25h