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

ExternalCommandCertificateValidator handles stdout and stderr incorrectly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 6.14.0
    • Component/s: None
    • Labels:
      None
    • Stakeholder:
      Customer
    • Issue discovered during:
      Ad Hoc
    • Sprint:
      EJBCA Sprint 14, EJBCA Sprint 15

      Description

      There are multiple issues with handling of stdout and stderr in the ExternalCommandCertificateValidator

       

      1. Checkbox "Fail on output to error out" is not handled. The code checks if it should fail on error code instead.
      } else if (isFailOnErrorCode() && ExternalProcessTools.containsErrout(out)) {
       messages.add("Invalid: External command logged to ERROUT. Exit code was " + exitCode + ". Command failed.");
       }

      Should be:

      } else if (isFailOnStandardError() && ExternalProcessTools.containsErrout(out)) {
       messages.add("Invalid: External command logged to ERROUT. Exit code was " + exitCode + ". Command failed.");
       }

      2. The flags "Log standard out" and "Log error out" does not log anything to server.log. At least not consistenly.

      The flags detrmine (correctly) if the result from the command should be added to the internal output returned from the execution, but it is not obviously logged after that.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tomas Tomas Gustavsson
                Reporter:
                tomas Tomas Gustavsson
                Verified by:
                Bastian Fredriksson
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: