Skip to main content

Module aws_import

Module aws_import 

Source
Expand description

Vault import: an agent has the Vault copy a secret from AWS Secrets Manager, so the person never types it and the agent never sees it (docs/specs/SPEC_VAULT_PARITY_ENTRY_HISTORY_REASONS_AND_IMPORT_2026_11_06.md §7).

This is the part with no server in it: checking what the agent asked for (before anything is asked of the person), reading the secret with the host’s AWS CLI, picking the value out and keeping it. The value lives in Zeroizing buffers from the CLI’s stdout to the sealed row. The CLI’s stdout is never logged, kept or put in an error; the error sentences are fixed ones, with at most a cleaned first line of the CLI’s stderr (AWS’s own words, which hold no value).

Structs§

Described
A secret as its description gives it: dates and a setting, nothing of its value.
ImportRequest
What an agent asks import for.
Imported
What an import made or changed.
Plan
An import that has been checked: nothing in it needs the store again, except to put the value in.
Source
Where the secret is: its id (or ARN), the field of a JSON secret to take, and how to reach AWS.

Enums§

Target
Where the value goes.
Via
How the CLI is given its credentials.

Constants§

IMPORTED
The Activity action, and what a version replaced by an import is marked with.
NO_SUCH_SECRET
What AWS says of a secret that isn’t there.
SERVICE
The service the card names.

Functions§

check
Every check of an import, before the person is asked: the reason, the source, and the entry or Vault the value goes in, for an agent that may use only the Vaults it is let into.
check_grant
Whether a container agent may read under the grant profile, before the person is asked (the broker checks again when it mints): the grant exists, is on, and is open to the agent.
check_place
The region and the profile a read runs under, trimmed, or why one can’t be used.
check_source
source with its optional parts trimmed, or why it can’t be used. Narrow character sets: the id and key go to the CLI as arguments and to the person’s card, so nothing else is let through.
describe_secret
Reads a secret’s description: metadata only, so the value never leaves AWS. A secret that isn’t there fails with NO_SUCH_SECRET.
note
The record of an import’s outcome (done, denied, failed): who, from where, why. No value.
perform
Reads the secret, picks the value and keeps it. The store is written on the blocking pool.
pick
The value to keep: the whole secret, or the string or number at key in a JSON one. What is parsed and not kept is wiped before it is dropped.
pick_both
A login’s two values out of one JSON secret: the password at key and the user name at user_key. Both are picked before anything is written, and a key that is missing, holds no text or holds nothing is refused by name. What is parsed and not kept is wiped. With no user_key this is pick.
read_secret
Runs the AWS CLI’s Secrets Manager read and returns the secret’s text. The CLI’s stdout is the secret: it is wiped when this returns, and nothing of it goes into an error.
read_value_blocking
The value at source, for a caller that isn’t async: the secret’s text, or the string or number at source.key in a JSON one, read with the host’s own AWS login. This is the one reader of Secrets Manager the Vault’s backed entries and the identity model’s SecretRef::SecretsManager share. Call it on a blocking thread (a use already runs on one); with no runtime (a test) it makes its own for the one call. The value is wiped when dropped and nothing of it goes into an error.
store_value
Puts value in: a new entry, or the main value of the one named, whose old value is kept 7 days as a version. The imported line goes in with the agent’s reason and references; it holds no value.