1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// SPDX-License-Identifier: Apache-2.0
//! A Bedrock bearer token, and how long it lives (AGENT-4).
//!
//! Minting one signs a SigV4 query presign with the caller's AWS credentials, which reaches
//! the credential chain, so the minter is in `microvms-edges` (at
//! `microvms_core::agents::bedrock::mint`). This module holds what the agent helpers carry.
//!
//! # The token is a credential
//!
//! [`BearerToken`]'s `Debug` is written by hand and prints its length and nothing else,
//! because a derived one would put the token in every log line that formats it. It
//! reaches the guest as a file over the authenticated channel and never as an argv
//! element or an env var on the wire.
use ;
/// The reference implementation's `TOKEN_DURATION`: the default and the ceiling.
pub const MAX_LIFETIME: Duration = from_secs;
/// A minted bearer token. Opaque; `Debug` shows only the length.
;
/// A token and when it stops working.