Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-8956

SCEP RA mode should not log on error level for normal handled error cases

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Cosmetic
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 7.4.0
    • Component/s: Protocols
    • Labels:
    • Issue discovered during:
      Another issue
    • Sprint:
      EJBCA Team Alice -2020 w10

      Description

      When using SCEP in RA mode, many normal issues that are handled graceuflly are logged with log.error, which is too high. For example if the request does not fulfill the end entity profile. 

      2020-03-18 08:51:18,140 INFO  [org.ejbca.core.protocol.scep.ScepRaModeExtension] (default task-209) Subject DN field 'COUNTRY' must exist.: org.ejbca.core.model.ra.raadmin.EndEntityProfileValidationExcept
      ion: Subject DN field 'COUNTRY' must exist.
              at deployment.ejbca.ear//org.ejbca.core.model.ra.raadmin.EndEntityProfile.checkIfAllRequiredFieldsExists(EndEntityProfile.java:2517)
              at deployment.ejbca.ear//org.ejbca.core.model.ra.raadmin.EndEntityProfile.doesUserFulfillEndEntityProfileWithoutPassword(EndEntityProfile.java:1581)
      ...
      2020-03-18 08:51:18,141 ERROR [org.ejbca.core.protocol.scep.ScepMessageDispatcherSessionBean] (default task-209) Error. Failed to add or edit user: scepuser
       
      

      This is something that can be expected and should only be logged at INFO level, or max warn.

      Also to the client HTTP 501 (not implemented) is returned, which is wrong. BAD_REQUEST is more matching, albeit it's not perfect for all error conditions that can occur in ScepRaModeExtension.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tomas Tomas Gustavsson
              Reporter:
              tomas Tomas Gustavsson
              Verified by:
              Mike Agrenius Kushner
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 10 minutes
                  10m
                  Remaining:
                  Remaining Estimate - 10 minutes
                  10m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified