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

XUI Console sending bad data for secondary configurations

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 14.0.0-M8
    • Fix Version/s: 14.0.0
    • Component/s: console, XUI
    • Labels:
    • Target Version/s:
    • Rank:
      1|hzsof3:

      Description

      Secondary Configurations in the OpenAM console are not possible to save in OpenAM 14.0.0, as they are sending an escaped json string rather than a json object.

      For example creating an audit log handler sends the initial payload of

      {"csvFileRotation":{"rotationTimes":[]},"csvBuffering":{"bufferingEnabled":true},"_id":"something"}
      

      which is a valid JSON configuration. Updating it then sends

      "{\"csvFileRotation\":{\"rotationInterval\":\"-1\",\"rotationTimes\":[],\"rotationEnabled\":true,\"rotationFileSuffix\":\"-yyyy.MM.dd-HH.mm.ss\",\"rotationMaxFileSize\":\"100000000\",\"rotationFilePrefix\":null},\"commonHandler\":{\"topics\":[\"access\",\"activity\",\"config\",\"authentication\"],\"enabled\":true},\"csvFileRetention\":{\"retentionMinFreeSpaceRequired\":\"-1\",\"retentionMaxNumberOfHistoryFiles\":\"1\",\"retentionMaxDiskSpaceToUse\":\"-1\"},\"csvSecurity\":{\"securitySignatureInterval\":\"900\",\"securityPassword\":null,\"securityFilename\":\"%BASE_DIR%/%SERVER_URI%/Logger.jks\",\"securityEnabled\":false},\"commonHandlerPlugin\":{\"handlerFactory\":\"org.forgerock.openam.audit.events.handlers.CsvAuditEventHandlerFactory\"},\"csvBuffering\":{\"bufferingAutoFlush\":false,\"bufferingEnabled\":true},\"csvConfig\":{\"location\":\"%BASE_DIR%/%SERVER_URI%/log/\"},\"_id\":\"something\",\"_type\":{\"_id\":\"CSV\",\"name\":\"CSV\",\"collection\":true}}"
      

      As a result the response from the update is HTTP-400 (Bad Request) "The request could not be processed because the provided content is not a JSON object"

      To reproduce:

      • Log into OpenAM as amadmin
      • Navigate to Configure -> Global Configuration -> Audit Logging -> Secondary Configurations -> Global JSON Handler
      • Click Save
      • Expected
        Success
      • Actual
        HTTP-400 and error message.

      This happens for all secondary configuration instances, including

      • RADIUS server
      • Dashboard
      • Scripting

      It is also happens for realm configuration, as well as global.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julian.kigwana@forgerock.com Julian Kigwana [X] (Inactive)
                Reporter:
                samdrew Sam Drew
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: