Skip to content

improve the agent content protocol #19

@bsutton

Description

@bsutton

High: The agent content-key protocol copies keys through normal heap strings/vectors. ContentKeyStore exposes Vec, encode_put() hex-encodes keys into
String, parse_request() decodes into Vec, and GET responses format keys as "KEY ". See rust/lockbox_vault/src/lib.rs:76, rust/lockbox_vault/src/
lib.rs:286, rust/lockbox_vault/src/lib.rs:347, rust/lockbox_vault/src/lib.rs:359, rust/lockbox_vault/src/unix.rs:136, and rust/lockbox_vault/src/
windows.rs:316. The cache stores SecretBytes, but the IPC path defeats that.

Medium: Unix agent transport security is effectively unchecked. verify_agent_transport_security() always returns Ok(()), and handle_client() does not
verify peer uid/gid. The implementation relies on socket directory permissions, but the directory may be env-selected via LOCKBOX_AGENT_DIR, chmod errors
are ignored, and there is no ownership/mode validation. See rust/lockbox_vault/src/unix.rs:56, rust/lockbox_vault/src/unix.rs:125, and rust/
lockbox_vault/src/unix.rs:191. Add peer credential checks and make the doctor check real.

Metadata

Metadata

Assignees

No one assigned

    Labels

    nextidentifies items that are to be implemented next.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions