Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Treatment reveal

std/secret::reveal


Generics

◻ T (any)

Inputs

⇥ secret: Block<Secret<T>>

Outputs

↦ error: Block<string>
↦ failed: Block<void>
↦ value: Block<T>


Reveals the value of a secret, as a plain value.

The secret policy must allow plain reveal, which is not the default. Secrets from the environment and from files (env:, file:) are never plainly revealed. The access is recorded as a debug event, and a refused or failed one is also written to the log.

If the value cannot be revealed, failed is emitted and error contains the reason.