feat(web-ng): native add-on import orchestration on a shared OCI client (#3425) #3479
No reviewers
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar!3479
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/native-addon-web-importer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
build-signing §4.1 (web-ng half) — imports a first-party native add-on from a trusted Forgejo release into a staged
AddonPackage, closing the loop with the merged core importer (#3476) + object-storage mirror (#3478) + DB test (#3477).Modules
ServiceRadarWebNG.Plugins.ForgejoOciClient— shared transport, extracted so the native importer (and, in a follow-up,FirstPartyImporter) reuse one client: repo/release/asset fetch, OCI manifest+blob fetch (registry bearer-token + docker-config auth, redirect handling), Cosign verify, trusted-host/URL validation, digest/string utils. Same injection seams asFirstPartyImporter(:first_party_plugin_import_http_client,:first_party_plugin_cosign_verifier, …) so existing config/tests apply.ServiceRadarWebNG.Plugins.NativeAddonImporter.import/1— resolve repo + release tag → fetchserviceradar-native-addon-index.json→ find entry → fetch + Cosign-verify the OCI manifest → assert each per-archtarball_digest/signature_digest+ thebundle_digestis a layer of the verified manifest and pull those blobs by digest (content-addressed) → extractaddon.yaml+config.schema.json→ assemble per-arch artifacts → coreimport_entry/4withNativeAddonArtifactMirror.mirror_fun/3+ aSystemActor.Trust split: web-ng owns transport + discovery (OCI + cosign); the core owns per-arch ed25519 verification + persistence.
Verification
mix compile --warnings-as-errors+mix credo --strictclean (both modules). The core (#3476/#3477) and mirror (#3478) it builds on are unit- and DB-tested.Remaining (tasks.md §4)
FirstPartyImporterto delegate toForgejoOciClient. The shared module is in use by the native importer; FPI still holds its own transport copies. The migration isimport ForgejoOciClient+ deleting ~50 now-duplicateddefps — all-or-nothing on the import (name/arity conflicts), so I kept it out of this PR to avoid destabilizing the working WASM path. It's a pure, test-gated dedup (FPI's test is unit-style, mocks http/cosign, no DB) — a clean focused follow-up.AddonPackage), mirroringfirst_party_importer_test.exs.🤖 Generated with Claude Code
lgtm