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

Policy Condition AND & OR, do not retain all conditions in array unless they are logical conditions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 12.0.0
    • Fix Version/s: None
    • Component/s: policy
    • Environment:
      OpenAM 12.0.0-SNAPSHOT Build 11103 (2014-October-16 05:38)
    • Rank:
      1|hzoshr:

      Description

      curl --request POST --header "iPlanetDirectoryPro: AQIC5wM2LY4SfcwPcsnKBMLsj8dYVtzPS0_yoZ3GSVmQwNw.*AAJTSQACMDEAAlNLABQtNzI1OTE5NzI2NDAyOTU3MDA0Nw..*" --header "Content-Type: application/json" --data '{ "resources": ["http://example.com:80/amim.html"], "name": "amimPolicy", "subject": {"type": "AuthenticatedUsers"}, "active": true, "actionValues": {"GET": true, "POST": false},  "condition" : {"type": "AND", "conditions": [{"type" : "AMIdentityMembership", "amIdentityName": ["id=staff,ou=group,dc=openam,dc=forgerock,dc=org"]}, {"type" : "AMIdentityMembership", "amIdentityName": ["id=admin,ou=group,dc=openam,dc=forgerock,dc=org"]}]} }' "http://amrwalktest.internal.forgerock.com:18080/openam/json/policies/?_action=create&_prettyPrint=true"
      {
        "name" : "amimPolicy",
        "active" : true,
        "applicationName" : "iPlanetAMWebAgentService",
        "actionValues" : {
          "POST" : false,
          "GET" : true
        },
        "resources" : [ "http://example.com:80/amim.html" ],
        "subject" : {
          "type" : "AuthenticatedUsers"
        },
        "condition" : {
          "type" : "AND",
          "conditions" : [ {
            "type" : "AMIdentityMembership",
            "amIdentityName" : [ "id=staff,ou=group,dc=openam,dc=forgerock,dc=org" ]
          } ]
        }
      

      As you can see only one of the conditions has retained by the config.

        Attachments

          Activity

            People

            Assignee:
            amrwalk Alex Walker [X] (Inactive)
            Reporter:
            amrwalk Alex Walker [X] (Inactive)
            QA Assignee:
            Alex Walker [X] Alex Walker [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: