Skip to content

Conversation

@Piskoo
Copy link
Collaborator

@Piskoo Piskoo commented Dec 22, 2025

Adds information about cas backend used in attestation process to the attestation

Part of attestation statement

  "predicate": {
    "casBackend": {
      "casBackendId": "07ddd65b-ed78-43ab-8914-659aab11f5c3",
      "casBackendName": "casb",
      "fallback": false
    },

Closes #2631

Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
@Piskoo Piskoo changed the title feat: store cas backend information in atttestation feat: store cas backend information in attestation Dec 22, 2025
@Piskoo Piskoo requested review from jiparis and migmartri December 22, 2025 14:03
@Piskoo Piskoo marked this pull request as ready for review December 22, 2025 14:03

// getCASBackend tries to get CAS upload credentials and set up a CAS client
func getCASBackend(ctx context.Context, client pb.AttestationServiceClient, workflowRunID, casCAPath, casURI string, casConnectionInsecure bool, logger zerolog.Logger, casBackend *casclient.CASBackend) (func() error, error) {
func getCASBackend(ctx context.Context, client pb.AttestationServiceClient, workflowRunID, casCAPath, casURI string, casConnectionInsecure bool, logger zerolog.Logger, casBackend *casclient.CASBackend, casBackendInfo **clientAPI.Attestation_CASBackend) (func() error, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this pattern super opaque. Why not returning the *Attestation_CASBackend always as part of the results?

func getCASBackend(ctx context.Context, client pb.AttestationServiceClient, workflowRunID, casCAPath, casURI string, casConnectionInsecure bool, logger zerolog.Logger, casBackend *casclient.CASBackend) (*clientAPI.Attestation_CASBackend, func() error, error) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add cas backend tracking to attestations

2 participants