Files
codex/codex-rs/core-plugins/BUILD.bazel
T
Alex Ionescu 9340f3c232 Cache Plugin Service signing keys for archive verification (#63490)
## Why

Verifying each signed plugin archive fetched the signing keys again, even
when the same Plugin Service credentials and key ID were used.

## What changed

Reuse signing keys within a plugin manager for the same Plugin Service
endpoint and request headers until the server-provided
`cache_ttl_seconds` expires. Requests without a non-empty
`Authorization` header fetch keys every time.

Fetch keys when the requested key ID is missing or the cache expires.
Serialize refreshes within each scope and clear the previous keys before
fetching so a failed refresh leaves no cached keys to reuse.

## Testing

Add coverage for cache reuse and expiry, missing key IDs, invalidation
after a denied refresh, and recovery after a canceled refresh. Exercise
reuse and isolation across plugin managers through signed bundle downloads.

GitOrigin-RevId: cc1171d7914b904f6895a179cbb0cf55ffa537d3
2026-11-24 01:30:26 +00:00

16 lines
404 B
Python

load("//:defs.bzl", "codex_rust_crate")
codex_rust_crate(
name = "core-plugins",
compile_data = glob(
include = ["**"],
allow_empty = True,
exclude = [
"**/* *",
"BUILD.bazel",
"Cargo.toml",
],
) + ["//codex-rs/plugin-archive-verification:testdata/plugin_archive_signing_v1.json"],
crate_name = "codex_core_plugins",
)