LinuxCommandLibrary

tofu-output

Convert Terraform output to various formats

TLDR

With no additional arguments, output will display all outputs for the root module

$ tofu output
copy

Output only a value with specific name
$ tofu output [name]
copy

Convert the output value to a raw string (useful for shell scripts)
$ tofu output -raw
copy

Format the outputs as a JSON object, with a key per output (useful with jq)
$ tofu output -json
copy

SYNOPSIS

tofu-output [options]

PARAMETERS

--help
    Displays help information about the command and its options.

--version
    Displays the version number of the `tofu-output` utility.

DESCRIPTION

The `tofu-output` command is designed to facilitate the Trust On First Use (TOFU) security model for various applications, particularly those dealing with cryptographic keys or software signatures. It streamlines the process of verifying and trusting a new entity's key or signature the first time it's encountered, while providing mechanisms for subsequent verification and updates. The core functionality revolves around storing and retrieving 'fingerprints' (usually cryptographic hashes) of trusted entities. By comparing the fingerprint of a new entity against the stored trusted fingerprint, `tofu-output` helps prevent man-in-the-middle attacks and ensures that only authorized entities are trusted. While not a standard Linux utility, it is often incorporated into build or deployment scripts for secure software delivery and key management. The specific functionality will depend on the implementation of `tofu-output` used, as this command itself is implementation specific.

CAVEATS

Because `tofu-output` is not a standard Linux utility, its behavior can vary widely based on the specific implementation. Ensure you understand the particular options and usage instructions relevant to the version you are using. Errors can result in security compromises if fingerprints aren't stored and handled properly.

SECURITY CONSIDERATIONS

Important: The security of a TOFU implementation using `tofu-output` relies heavily on the initial fingerprint verification. Ensure that the first time you encounter an entity's key, you verify the fingerprint through a secure and trusted channel.

Failure to do so can allow an attacker to establish a foothold by presenting a fraudulent key as the 'first' key.

TYPICAL WORKFLOW

1. Initial Trust: When encountering a new entity, obtain its key or signature and calculate its fingerprint.
2. Manual Verification: Verify the fingerprint through a trusted source (e.g., a signed email, phone call).
3. Store Fingerprint: Store the verified fingerprint using command specific arguments.
4. Subsequent Verification: In the future, automatically compare the new fingerprint with the stored one. Accept only if they match.

SEE ALSO

gpg(1), ssh-keygen(1), openssl(1)

Copied to clipboard