You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by "Francesco Chicchiriccò (Jira)" <ji...@apache.org> on 2020/05/20 07:16:00 UTC

[jira] [Assigned] (SYNCOPE-1567) Mapping does not allow relationships

     [ https://issues.apache.org/jira/browse/SYNCOPE-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Francesco Chicchiriccò reassigned SYNCOPE-1567:
-----------------------------------------------

    Assignee: Francesco Chicchiriccò

> Mapping does not allow relationships
> ------------------------------------
>
>                 Key: SYNCOPE-1567
>                 URL: https://issues.apache.org/jira/browse/SYNCOPE-1567
>             Project: Syncope
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.0.15, 2.1.6
>            Reporter: Jim Lawhorn
>            Assignee: Francesco Chicchiriccò
>            Priority: Major
>             Fix For: 2.0.16, 2.1.7, 3.0.0
>
>
> 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:
>  # Confirm that RelationshipType "neighborhood" exists
>  # Create table in testdb
> {code:sql}
> CREATE TABLE PUBLIC.PRINTERS (CREATE TABLE PUBLIC.PRINTERS ( USERNAME VARCHAR(100), MODEL VARCHAR(100), STATUS VARCHAR(100));
> {code}
>  # Edit H2 connector to allow for table and key override
>  # 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 
>  
> {code:java}
> {
>   "status": 400,
>   "type": "InvalidMapping",
>   "elements": [
>     "'relationships[neighborhood][PRINTER].model' not allowed"
>   ]
> }
> {code}
>  
> REST payload for [http://localhost:9080/syncope/rest/resources/Printers]
>  
> {code:java}
> {
>   "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": []
> }
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)