Post Rotation Results & Errors

Results

Upon execution of the script, the following information is returned. The results are an an array containing instances of RotationResult for each script that was executed. The class RotationResult has the following attributes:

  • uid - Keeper Vault record UID that has the script attached

  • command - Command that was issued to the shell.

  • system - Operating system the script will run upon.

  • title - Title of the script file attached to the Keeper Vault record.

  • name - Name of the script attached to the Keeper Vault record.

  • success - Was the script successful?

    • Linux and macOS - Script returned in a 0 return code.

    • Windows - Script returned a True status.

  • stdout - The standard out from the execution of the script.

  • stderr - The standard error from the execution of the script.

Additionally, the following methods can be used to determine if the script was a success, or not:

With this, it is possible to customize logging:

Example in Python
for r in results:
    if r.was_failure:
        print(f"For record {r.uid}, the script {r.title} failed: {r.stderr}")

Errors

The class RotationResult has attribute stderr which logs the errors from execution of the script.

Results and Errors of Post-Rotation Execution Scripts

Although post rotation script results and information are available via the RotationResult class, errors and outputs of scripts are based on the type of shell the script is executed on. Keeper does not check the standard out or errors of the scripts as Keeper does not know what defined an error for a customer controlled script.

For example, if a BASH script does not contain a set -e, the script will continue even if part of the script fails. If the script exits with a 0 return code, the script will be flagged as successful.

Therefore, it is up to the user to properly handle the outputs and errors of the script.

Last updated