-
Type:
Bug
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 12.0.0, 12.0.1
-
Component/s: entitlements, policy, rest
-
Labels:
-
Environment:OpenAM 12.0.0-SNAPSHOT Build 11401 (2014-November-13 02:36)
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,
- is related to
-
OPENAM-5129 Application Resource does not allow Applications to be updated after policies have been created in it
-
- Closed
-