7cb2a8b618
Testing / remote-protocol-compat (0.9.5) (push) Successful in 1m4s
Testing / test (push) Successful in 1m22s
Testing / remote-protocol-compat (0.9.3) (push) Successful in 1m7s
Package Extension / package-extension (push) Successful in 1m1s
Build & Publish Package / publish (push) Successful in 1m5s
- Split auth into focused package modules for agent keys, file keys, signing, and post-quantum transport helpers while keeping the public browser_cli.auth import surface intact. - Move transport encoding internals into a package with separate codec and binary-hoisting helpers, preserving browser_cli.transport compatibility. - Extract remote TCP auth/socket helpers and serve challenge setup out of the runtime paths to make connection handling easier to reason about. - Move the extension markdown extractor into a dedicated content/markdown folder with separate root selection, code normalization, renderer, and utils. - Centralize CLI Rich rendering helpers for tab/window tree and table output, and add rendering tests for the shared builders. - Remove local typing ignores in SDK/decorator/script plumbing and bump the package and extension version to 0.15.3.
68 lines
1.6 KiB
Python
68 lines
1.6 KiB
Python
"""Public auth API for browser-cli.
|
|
|
|
Implementation lives in focused modules:
|
|
- ``auth.agent``: SSH-agent/YubiKey helpers
|
|
- ``auth.keys``: file keys and authorized_keys management
|
|
- ``auth.signing``: canonical payload signing/verification
|
|
- ``auth.pq``: ML-KEM KEX and encrypted transport helpers
|
|
"""
|
|
from browser_cli.auth.agent import (
|
|
AgentKey,
|
|
agent_find_key,
|
|
agent_list_keys,
|
|
agent_roundtrip as _agent_roundtrip,
|
|
agent_sign_raw,
|
|
pack_ssh_string as _pack_str,
|
|
unpack_ssh_string as _unpack_str,
|
|
)
|
|
from browser_cli.auth.keys import (
|
|
add_authorized_key,
|
|
generate_keypair,
|
|
load_authorized_keys,
|
|
load_authorized_keys_with_names,
|
|
load_private_key,
|
|
public_key_hex,
|
|
)
|
|
from browser_cli.auth.pq import (
|
|
new_nonce,
|
|
pq_decrypt,
|
|
pq_encrypt,
|
|
pq_kex_client_encapsulate,
|
|
pq_kex_server_decapsulate,
|
|
pq_kex_server_keypair,
|
|
pq_transport_key as _pq_transport_key,
|
|
)
|
|
from browser_cli.auth.signing import (
|
|
auth_message as _auth_message,
|
|
canonical_payload,
|
|
sign,
|
|
verify,
|
|
)
|
|
from browser_cli.constants import DEFAULT_AUTHORIZED_KEYS_PATH, DEFAULT_KEY_PATH, PQ_KEX_ALG, PQ_TRANSPORT_ALG
|
|
|
|
__all__ = [
|
|
"AgentKey",
|
|
"DEFAULT_AUTHORIZED_KEYS_PATH",
|
|
"DEFAULT_KEY_PATH",
|
|
"PQ_KEX_ALG",
|
|
"PQ_TRANSPORT_ALG",
|
|
"add_authorized_key",
|
|
"agent_find_key",
|
|
"agent_list_keys",
|
|
"agent_sign_raw",
|
|
"canonical_payload",
|
|
"generate_keypair",
|
|
"load_authorized_keys",
|
|
"load_authorized_keys_with_names",
|
|
"load_private_key",
|
|
"new_nonce",
|
|
"pq_decrypt",
|
|
"pq_encrypt",
|
|
"pq_kex_client_encapsulate",
|
|
"pq_kex_server_decapsulate",
|
|
"pq_kex_server_keypair",
|
|
"public_key_hex",
|
|
"sign",
|
|
"verify",
|
|
]
|