feat(supplier): the supplier uploads an SBOM through its invite (#1027)
The second half of the phase 3 API: what the portal's supplier page shows
and the upload through an invite.
- `GET …/supplier-invites/{invite}/supplier-view`: the component by the
customer's name for it, the link's end, the CSAF provider and the uploads
through this invite, nothing else of the workspace.
- `POST …/supplier-invites/{invite}/sboms` (multipart `file`, optional
`csaf_provider`): takes the customer's own upload path, now
`onboarding::attach_upload`, so it is read and refused the same way, becomes
the component's SBOM, replacing the one before, and starts a scan. A CSAF
provider given with it (https only) becomes the component's.
- Every upload is recorded in `supplier_uploads` with its invite, time, file
name and outcome; a refused one keeps its code. The invite list carries each
invite's uploads and which one is current.
- An expired or withdrawn invite answers 410 and records nothing; a workspace
the registry has read-only, halted or archived answers 403; an invite takes
at most 20 uploads a day (429).
- Deleting a target deletes its uploads with its invites.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
This commit is contained in:
1 parent
dc14c77e84
commit
de856bd5ba
7 files changed
+954
-37
No files matched your search
@@ -145,6 +145,24 @@ form, and it is stored only when you save it as your own statement.
|
||||
`withdrawn`.
|
||||
- `POST …/supplier-invites/{invite}/withdraw` with `{"withdrawn_by"}`
|
||||
withdraws an invite. A second withdrawal keeps the first.
|
||||
- `GET …/supplier-invites/{invite}/supplier-view` is what the supplier's
|
||||
page shows: the component by your name for it, until when the link is
|
||||
valid, the CSAF provider, and the uploads through this invite. Nothing
|
||||
else of your workspace is in it.
|
||||
- `POST …/supplier-invites/{invite}/sboms` (multipart: `file`, optionally
|
||||
`csaf_provider`) is the supplier's upload. It is read and refused exactly
|
||||
as your own upload is. An accepted SBOM becomes the component's SBOM,
|
||||
replacing the previous one, and starts a scan, which counts like your
|
||||
own scans. A CSAF provider given with it becomes the component's.
|
||||
|
||||
Every upload is recorded with its invite, its time, the file name, and
|
||||
whether it was accepted. A refused one keeps its `code`: `too_large`,
|
||||
`too_many_components`, `empty`, `unknown_format`, `malformed`, or
|
||||
`csaf_provider` for one that is not https. The supplier sees its uploads,
|
||||
and each invite in the list carries them. An expired or withdrawn invite
|
||||
answers `410` with `expired` or `withdrawn`, and records nothing. A
|
||||
workspace that takes no changes answers `403` (`read_only`). An invite
|
||||
takes at most 20 uploads a day; more answer `429` (`too_many_uploads`).
|
||||
|
||||
`GET /api/v1/platform/tenants/{id}/targets` names each supplier
|
||||
component's `supplier`: these are the targets a supplier can be invited
|
||||
|
||||
Reference in new issue
Block a user