Add attestation download API endpoint

Why are we doing this work

As part of Polish the MVC end-to-end Attestation workflow (#577701 - closed) this issue is to add the download API endpoint to the attestations API.

Relevant links

Non-functional requirements

Implementation plan

  • Add a new resource in lib/api/supply_chain/attestations.rb, ensuring FF check works and ensuring authorisation check works. The path should be /api/v4/projects/:project_id/attestations/:iid/download and should return the full contents of the attestation bundle file.

Verification steps

  1. Create the required attestations in production as required.
  2. Retrieve the bundle.
  3. Perform a verification.
Edited by Sam Roque-Worcel