Repository navigation
feat(plugins): add signed registry index client - #1726
Open
developerkunal wants to merge 5 commits into
Open
developerkunal wants to merge 5 commits into
developerkunal wants to merge 5 commits into
Conversation
developerkunal
force-pushed
the
DXCDT-2602/registry-client
branch
from
October 24, 2026 15:30
522d4e7 to
14e0f88
Compare
developerkunal
force-pushed
the
DXCDT-2602/registry-client
branch
from
November 2, 2026 11:12
14e0f88 to
d921ea4
Compare
developerkunal
force-pushed
the
DXCDT-2602/registry-client
branch
from
November 2, 2026 19:34
d921ea4 to
527c48c
Compare
developerkunal
force-pushed
the
DXCDT-2602/registry-client
branch
from
November 24, 2026 11:33
527c48c to
a4ae0b8
Compare
developerkunal
force-pushed
the
DXCDT-2602/registry-client
branch
from
November 24, 2026 12:03
a4ae0b8 to
3b7773e
Compare
bkiran6398
force-pushed
the
DXCDT-2602/registry-client
branch
from
November 27, 2026 06:23
3b7773e to
1abe1f1
Compare
developerkunal
force-pushed
the
DXCDT-2602/registry-client
branch
from
November 30, 2026 17:24
1abe1f1 to
d576bd1
Compare
Fetch the plugin registry index, refuse anything that is not correctly signed, fresh and newer than what this machine has seen, and keep a verified copy on disk. A normal build trusts no keys yet, so it fails closed until the production key is embedded. - Ed25519 signature over the raw index bytes, embedded keys looked up by key ID, rollback and expiry checks, a revocation and deprecation list, and a policy block with offline grace and check interval. - Index and per-plugin files are validated against an embedded schema, with duplicate keys, case variant keys and unsorted permission lists rejected, and each version's permissions hash recomputed with the manifest algorithm. - A client with Refresh, Load and EnsureFresh. Files are staged and renamed in a fail closed order under a cross process file lock, the cache is verified again on every load, and a verified cache is used when the network, a rollback or a busy lock prevents a refresh. - Registries list in the CLI config with the built in auth0 entry, https only fetches including every redirect hop, and size caps on every read. - registrytest fixtures and a plugintest build tag that trusts a throwaway key and allows loopback http, so the flow can be tested without publishing. Contract vectors are shipped for the catalog pipeline. - Shared helpers in the plugins package: strict JSON decoding that rejects duplicate keys, a normalized permissions function and a platform lookup.
The index schema now rejects the same control and format characters in artifact URLs and text fields that the manifest schema rejects, and the schema equality test covers the URL definition.
A registry that leaves offlineGraceDays out of its policy now gives installed plugins 7 days without a reachable registry instead of 30, which matches the security model. Tests that used clock offsets around 30 days now use offsets around 7.
…index A version record can carry permissions.secrets, the union of the secret paths its commands ask to keep. The list must be sorted and distinct like the other permission lists, and the contract vectors cover a valid record, a bare name and an unsorted list.
The index schema uses the same pattern as plugin.json for permissions.secrets, and a contract vector refuses a name that is not ASCII.
developerkunal
force-pushed
the
DXCDT-2602/registry-client
branch
from
December 1, 2026 17:11
d576bd1 to
d426b4d
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Changes
Adds
internal/plugins/registry, a client that fetches the plugin registry, verifies it with TUF (The Update Framework) through go-tuf v2, and keeps a verified copy on disk. This is a library only, so nothing changes for users yet.Fail closed by default. A normal build embeds no root of trust yet, so every refresh fails until the production root is added under DXCDT-2611. One
root.jsonis embedded in the binary, and no environment variable, config entry or flag can add or replace it.Verified before the index is used
index.jsonis the one target. It is accepted only with the length and hash that the signed targets file gives.permissionsHashis recomputed with the manifest algorithm.Client behavior
Loadre-verifies the saved copy every time, including the chain of roots, and never uses the network.EnsureFreshfalls back to the verified cache and marks it stale without advancing the last refresh time. A registry that keeps failing therefore makes installed plugins unrunnable once the offline grace period (30 days by default) passes. Signature, threshold, hash and length failures never fall back, and neither do an expired root, snapshot or targets file.Config. The config gains an optional
registrieslist. The built inauth0registry is always there, a configuredauth0entry can only change its URL, which is now the base URL of the metadata directory, and any other name is rejected because custom registries are not supported yet.Existing code.
ParseManifestandParseInstalledManifestnow reject duplicate JSON keys, which is a deliberate stricter behavior.Dependencies. Adds
github.com/theupdateframework/go-tuf/v2and the modules it needs.📚 References
DXCDT-2602. This is part of the plugin framework stack and builds on the PR below it, DXCDT-2601.
🔬 Testing
The new code is covered by unit tests.
📝 Checklist