/sp/adapter 的 PingFederate REST API 不工作

PingFederate REST API for /sp/adapter not working

PingFederate 8.2.2 用于我们的 systems.All REST APIs 以自动创建 PF 对象,但 /sp/adapter(https://pfhost:9999/pf-admin-api/v1/sp/adapters) 无法使用下面 JSON。手动如果我创建相同的配置,它 works.The 下面提到的 JSON 是从已经手动创建的 /sp/adapter 中检索的。但是当我使用相同的 JSON在API调用中提示错误如下,请帮忙解决这个问题。

错误:

{
  "resultId": "validation_error",
  "message": "Validation error(s) occurred. Please review the error(s) and address accordingly.",
  "validationErrors": [
    {
      "message": "'' is not a valid selection for 'Send Extended Attributes'",
      "fieldPath": "configuration.fields[21].value",
      "errorId": "plugin_validation_error"
    }
  ]
}

JSON:

{
      "id": "opentokenadapt1",
      "name": "opentokenadapt1",
      "pluginDescriptorRef": {
        "id": "com.pingidentity.adapters.opentoken.SpAuthnAdapter"
      },
      "configuration": {
        "tables": [],
        "fields": [
          {
            "name": "Password",
            "value": "Password123"
          },
          {
            "name": "Confirm Password",
            "value": "Password123"
          },
          {
            "name": "Transport Mode",
            "value": "2"
          },
          {
            "name": "Token Name",
            "value": "opentoken"
          },
          {
            "name": "Cipher Suite",
            "value": "2"
          },
          {
            "name": "Authentication Service",
            "value": ""
          },
          {
            "name": "Account Link Service",
            "value": ""
          },
          {
            "name": "Logout Service",
            "value": ""
          },
          {
            "name": "Cookie Domain",
            "value": ""
          },
          {
            "name": "Cookie Path",
            "value": "/"
          },
          {
            "name": "Token Lifetime",
            "value": "300"
          },
          {
            "name": "Session Lifetime",
            "value": "43200"
          },
          {
            "name": "Not Before Tolerance",
            "value": "0"
          },
          {
            "name": "Force SunJCE Provider",
            "value": "false"
          },
          {
            "name": "Use Verbose Error Messages",
            "value": "false"
          },
          {
            "name": "Obfuscate Password",
            "value": "true"
          },
          {
            "name": "Session Cookie",
            "value": "false"
          },
          {
            "name": "Secure Cookie",
            "value": "false"
          },
          {
            "name": "HTTP Only Flag",
            "value": "true"
          },
          {
            "name": "Send Subject as Query Parameter",
            "value": ""
          },
          {
            "name": "Subject Query Parameter                 ",
            "value": ""
          },
          {
            "name": "Send Extended Attributes",
            "value": ""
          },
          {
            "name": "Skip Trimming of Trailing Backslashes",
            "value": "false"
          }
        ]
      },
      "attributeContract": {
        "coreAttributes": [
          {
            "name": "subject"
          }
        ],
        "extendedAttributes": [
          {
            "name": "nsroles"
          }
        ]
      }
    }

"Send Extended Attributes" 需要一个有效值(不是您给它的空字符串)。可能的值为“0”(None)、“1”(Cookie)或“2”(查询参数)。

尝试缩小这些问题的一个技巧:尝试在 PingFederate 管理控制台 (UI) 中构建 SP 适配器实例,然后将其与您从 API.