Uploaded image for project: 'OpenICF'
  1. OpenICF
  2. OPENICF-843

ServiceNow: We are able to create role without 'name'


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: servicenow-connector-
    • Component/s: ServiceNow Connector
    • Labels:
    • Environment:
      Linux Mint 18.2 Cinnamon 64-bit,
      openjdk version "1.8.0_151",
      OpenIDM version "6.0.0-SNAPSHOT" (revision: 1963b7d),
      ServiceNow Connector (SCM-Revision: 43c3b928790359cc0a5f618d2240ed3e8cb47cf2)


      'name' attribute in 'role' table for default dev serviceNow instance is mandatory, but 'name' property is not mandatory at provisioner>objectTypes>role. This property should be required. Because now we can create a role without name, but it should not be possible.

      "name" : {
                          "type" : "string",
                          "nativeName" : "name",
                          "nativeType" : "string"

      Steps to reproduce:

      1. Download OpenIDM and ServiceNow connector
      2. Unzip OpenIDM and prepare OpenIDM for add ServiceNow connector according documentation
      3. Start OpenIDM
      4. Log in as openidm-admin at browser on URL http://localhost:8080/admin
      5. Add Connector - Navigate to Configure > Connector and click on New Connector
      6. Select Connector type to ServiceNow Connector and fill all required fields
      7. Click on Save button
      8. Add role without 'name'
        curl -X POST \
          'http://localhost:8080/openidm/system/serviceNow/role?_action=create' \
          -H 'content-type: application/json' \
          -H 'x-openidm-password: openidm-admin' \
          -H 'x-openidm-username: openidm-admin' \
          -d '{
                "description": "TESTING",
                "__NAME__": "TESTING"

      Actual result: The role was created without 'name'. Although we are not able to create role without 'name' in serviceNow instance.

      curl -X POST \
        'http://localhost:8080/openidm/system/serviceNow/role?_action=create' \
        -H 'content-type: application/json' \
        -H 'x-openidm-password: openidm-admin' \
        -H 'x-openidm-username: openidm-admin' \
        -d '{
              "description": "TESTING",
              "__NAME__": "TESTING"
          "_id": "0123456789",
          "sys_created_by": "admin",
          "sys_update_name": "sys_user_role_*",
          "elevated_privilege": "false",
          "grantable": "true",
          "sys_scope": "global",
          "description": "TESTING",
          "sys_package": "global",
          "sys_class_name": "sys_user_role",
          "sys_created_on": "2018-03-16",
          "can_delegate": "true",
          "sys_updated_on": "2018-03-16",
          "sys_updated_by": "admin",
          "sys_mod_count": "0",
          "sys_id": "0123456789",
          "__NAME__": ""

      Expected result: We should not be able to create role without 'name' attribute. Because 'name' attribute is mandatory and unique.




            • Assignee:
              petr.jurica Petr Jurica [X] (Inactive)
              miroslav.meca Miroslav Meca
              QA Assignee:
              Miroslav Meca
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: