Uploaded image for project: 'Syncope'
  1. Syncope
  2. SYNCOPE-1567

Mapping does not allow relationships

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.15, 2.1.6
    • 2.0.16, 2.1.7, 3.0.0-M0
    • core
    • None

    Description

      Attempting to use a relationship in the internal attribute field of a resource mapping results in an error of "Invalid mapping <relationship> not allowed".

       

      Steps to reproduce using the standalone demo data:

      1. Confirm that RelationshipType "neighborhood" exists
      2. Create table in testdb
      CREATE TABLE PUBLIC.PRINTERS (CREATE TABLE PUBLIC.PRINTERS ( USERNAME VARCHAR(100), MODEL VARCHAR(100), STATUS VARCHAR(100));
      
      1. Edit H2 connector to allow for table and key override
      2. 3. Create new resource for PRINTERS table based on USER object and map userId to USERNAME and relationship[neighborhood][PRINTER].model to MODEL.  REST details are below.  REST call will fail with 400 error 

       

      {
        "status": 400,
        "type": "InvalidMapping",
        "elements": [
          "'relationships[neighborhood][PRINTER].model' not allowed"
        ]
      }
      

       

      REST payload for http://localhost:9080/syncope/rest/resources/Printers

       

      {
        "key": "Printers",
        "connector": "5aa5b8be-7521-481a-9651-c557aea078c1",
        "connectorDisplayName": "H2",
        "orgUnit": null,
        "propagationPriority": null,
        "randomPwdIfNotProvided": false,
        "enforceMandatoryCondition": false,
        "createTraceLevel": "ALL",
        "updateTraceLevel": "ALL",
        "deleteTraceLevel": "ALL",
        "provisioningTraceLevel": "ALL",
        "passwordPolicy": null,
        "accountPolicy": null,
        "pullPolicy": null,
        "pushPolicy": null,
        "overrideCapabilities": false,
        "provisions": [
          {
            "key": "2c090bbd-41e6-4b23-890b-bd41e6fb2363",
            "anyType": "USER",
            "objectClass": "__ACCOUNT__",
            "syncToken": null,
            "ignoreCaseMatch": false,
            "uidOnCreate": null,
            "mapping": {
              "connObjectLink": null,
              "connObjectKeyItem": {
                "key": "b9ee5e12-ff29-4935-ae5e-12ff294935c7",
                "intAttrName": "userId",
                "extAttrName": "USERNAME",
                "connObjectKey": true,
                "password": false,
                "mandatoryCondition": "true",
                "purpose": "PROPAGATION",
                "propagationJEXLTransformer": null,
                "pullJEXLTransformer": null,
                "transformers": []
              },
              "items": [
                {
                  "key": "b9ee5e12-ff29-4935-ae5e-12ff294935c7",
                  "intAttrName": "userId",
                  "extAttrName": "USERNAME",
                  "connObjectKey": true,
                  "password": false,
                  "mandatoryCondition": "true",
                  "purpose": "PROPAGATION",
                  "propagationJEXLTransformer": null,
                  "pullJEXLTransformer": null,
                  "transformers": []
                },
                {
                  "key": "5c1f2776-af5f-45aa-9f27-76af5f95aa9d",
                  "intAttrName": "relationships[neighborhood][PRINTER].model",
                  "extAttrName": "MODEL",
                  "connObjectKey": false,
                  "password": false,
                  "mandatoryCondition": "false",
                  "purpose": "PROPAGATION",
                  "propagationJEXLTransformer": null,
                  "pullJEXLTransformer": null,
                  "transformers": []
                }
              ],
              "linkingItems": []
            },
            "auxClasses": [],
            "virSchemas": []
          }
        ],
        "confOverride": [
          {
            "schema": {
              "name": "table",
              "displayName": "Table",
              "helpMessage": "Enter the name of the table in the database that contains the accounts.",
              "type": "java.lang.String",
              "required": true,
              "order": 7,
              "confidential": false,
              "defaultValues": [
                ""
              ]
            },
            "overridable": true,
            "values": [
              "PRINTERS"
            ]
          },
          {
            "schema": {
              "name": "keyColumn",
              "displayName": "Key Column",
              "helpMessage": "This mandatory column value will be used as the unique identifier for rows in the table.",
              "type": "java.lang.String",
              "required": true,
              "order": 8,
              "confidential": false,
              "defaultValues": [
                ""
              ]
            },
            "overridable": true,
            "values": [
              "USERNAME"
            ]
          }
        ],
        "capabilitiesOverride": [
          "AUTHENTICATE",
          "CREATE",
          "UPDATE",
          "DELETE",
          "SEARCH",
          "SYNC"
        ],
        "propagationActions": []
      }
      

       

      Attachments

        Activity

          People

            ilgrosso Francesco Chicchiriccò
            jlawhorn Jim Lawhorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: