pub struct IbctKeyConfig {
pub key_id: String,
pub key_hex: String,
}Expand description
An IBCT signing key entry in the A2A server configuration.
Multiple entries allow key rotation: keep old keys until all tokens signed with them expire.
Serialize is hand-written and redacts key_hex to "[REDACTED]" (mirroring the
Debug impl below); Deserialize is derived and reads the real hex key untouched, since
config loading and the --init wizard both need the real value on the way in.
§Tradeoff
A future “load config → mutate → save TOML” flow that persists an inline
[a2a] ibct_keys[].key_hex would round-trip through this redacting Serialize and write
back key_hex = "[REDACTED]", corrupting the key. This is acceptable today: no such flow
exists, --migrate-config operates on the TOML text directly (never through
Config/Serialize), and the documented direction is vault-resolved keys via
A2aServerConfig::ibct_signing_key_vault_ref
(which takes precedence over ibct_keys[0]), making inline key_hex a legacy path. If a
struct-based config save flow is ever added, this type should graduate to a split
config/diagnostic-shape design instead of redacting in place.
Fields§
§key_id: StringUnique key identifier. Must match the key_id field in issued IBCT tokens.
key_hex: StringHex-encoded HMAC-SHA256 signing key.
Trait Implementations§
Source§impl Clone for IbctKeyConfig
impl Clone for IbctKeyConfig
Source§fn clone(&self) -> IbctKeyConfig
fn clone(&self) -> IbctKeyConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more