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

AMAccessAuditEventBuilder#forRequest can generate an entry with :-1 for the port

    XMLWordPrintable

    Details

    • Yes
    • No
    • No
    • Yes and I used the same an in the description

      Description

      Bug description

      org.forgerock.openam.audit.AMAccessAuditEventBuilder#forRequest will generate a log entry for a request where the port number is shown as -1 when the request is to one of the default ports.

      Seen when looking at AM logs from an Identity Cloud instance.

      How to reproduce the issue

      Check audit log for AM-ACCESS-ATTEMPT events

      Expected behaviour
      "path": "https://openam-test.forgeblocks.com/am/oauth2/realms/root/realms/alpha/authorize",
      
      Current behaviour
      "path": "https://openam-test.forgeblocks.com:-1/am/oauth2/realms/root/realms/alpha/authorize",
      

      Work around

      N/A

      Code analysis

      org.forgerock.openam.audit.AMAccessAuditEventBuilder#forRequest method needs to take into account the value returned from uri.getPort() when building up the path string parameter.

        Attachments

          Issue Links

            Activity

              People

              markdr Mark de Reeper
              markdr Mark de Reeper
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: