diff --git a/client/client_test.go b/client/client_test.go index c824172a21c5..e6916a30a677 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -38,6 +38,7 @@ import ( "github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/exporter/containerimage/exptypes" gateway "github.com/moby/buildkit/frontend/gateway/client" + gatewaypb "github.com/moby/buildkit/frontend/gateway/pb" "github.com/moby/buildkit/identity" "github.com/moby/buildkit/session" "github.com/moby/buildkit/session/secrets/secretsprovider" @@ -173,6 +174,7 @@ func TestIntegration(t *testing.T) { testExportAnnotations, testExportAnnotationsMediaTypes, testExportAttestations, + testAttestationDefaultSubject, ) tests = append(tests, diffOpTestCases()...) integration.Run(t, tests, mirrors) @@ -6488,25 +6490,28 @@ func testExportAttestations(t *testing.T, sb integration.Sandbox) { if err != nil { return nil, err } - res.AddAttestation(pk, &result.InTotoAttestation{ - PredicateRefKey: "foo", - PredicatePath: "/attestation.json", - PredicateType: "https://example.com/attestations/v1.0", - Subjects: []result.InTotoSubject{ - &result.InTotoSubjectSelf{}, + res.AddAttestation(pk, result.Attestation{ + Kind: gatewaypb.AttestationKindInToto, + Path: "/attestation.json", + InToto: result.InTotoAttestation{ + PredicateType: "https://example.com/attestations/v1.0", + Subjects: []result.InTotoSubject{{ + Kind: gatewaypb.InTotoSubjectKindSelf, + }}, }, - }, map[string]gateway.Reference{"foo": refAttest}) - res.AddAttestation(pk, &result.InTotoAttestation{ - PredicateRefKey: "bar", - PredicatePath: "/attestation2.json", - PredicateType: "https://example.com/attestations2/v1.0", - Subjects: []result.InTotoSubject{ - &result.InTotoSubjectRaw{ + }, refAttest) + res.AddAttestation(pk, result.Attestation{ + Kind: gatewaypb.AttestationKindInToto, + Path: "/attestation2.json", + InToto: result.InTotoAttestation{ + PredicateType: "https://example.com/attestations2/v1.0", + Subjects: []result.InTotoSubject{{ + Kind: gatewaypb.InTotoSubjectKindRaw, Name: "/attestation.json", Digest: []digest.Digest{successDigest}, - }, + }}, }, - }, map[string]gateway.Reference{"bar": refAttest}) + }, refAttest) } dt, err := json.Marshal(expPlatforms) @@ -6606,6 +6611,138 @@ func testExportAttestations(t *testing.T, sb integration.Sandbox) { checkAllReleasable(t, c, sb, true) } +func testAttestationDefaultSubject(t *testing.T, sb integration.Sandbox) { + requiresLinux(t) + c, err := New(sb.Context(), sb.Address()) + require.NoError(t, err) + + registry, err := sb.NewRegistry() + if errors.Is(err, integration.ErrRequirements) { + t.Skip(err.Error()) + } + + ps := []ocispecs.Platform{ + platforms.MustParse("linux/amd64"), + } + + success := []byte(`{"success": true}`) + + frontend := func(ctx context.Context, c gateway.Client) (*gateway.Result, error) { + res := gateway.NewResult() + expPlatforms := &exptypes.Platforms{} + + for _, p := range ps { + pk := platforms.Format(p) + expPlatforms.Platforms = append(expPlatforms.Platforms, exptypes.Platform{ID: pk, Platform: p}) + + // build image + st := llb.Scratch().File( + llb.Mkfile("/greeting", 0600, []byte(fmt.Sprintf("hello %s!", pk))), + ) + def, err := st.Marshal(ctx) + if err != nil { + return nil, err + } + r, err := c.Solve(ctx, gateway.SolveRequest{ + Definition: def.ToPB(), + }) + if err != nil { + return nil, err + } + ref, err := r.SingleRef() + if err != nil { + return nil, err + } + _, err = ref.ToState() + if err != nil { + return nil, err + } + res.AddRef(pk, ref) + + // build attestations + st = llb.Scratch().File(llb.Mkfile("/attestation.json", 0600, success)) + def, err = st.Marshal(ctx) + if err != nil { + return nil, err + } + r, err = c.Solve(ctx, gateway.SolveRequest{ + Definition: def.ToPB(), + }) + if err != nil { + return nil, err + } + refAttest, err := r.SingleRef() + if err != nil { + return nil, err + } + _, err = ref.ToState() + if err != nil { + return nil, err + } + res.AddAttestation(pk, result.Attestation{ + Kind: gatewaypb.AttestationKindInToto, + Path: "/attestation.json", + InToto: result.InTotoAttestation{ + PredicateType: "https://example.com/attestations/v1.0", + }, + }, refAttest) + } + + dt, err := json.Marshal(expPlatforms) + if err != nil { + return nil, err + } + res.AddMeta(exptypes.ExporterPlatformsKey, dt) + + return res, nil + } + + target := registry + "/buildkit/testattestationsemptysubject:latest" + _, err = c.Build(sb.Context(), SolveOpt{ + Exports: []ExportEntry{ + { + Type: ExporterImage, + Attrs: map[string]string{ + "name": target, + "push": "true", + }, + }, + }, + }, "", frontend, nil) + require.NoError(t, err) + + desc, provider, err := contentutil.ProviderFromRef(target) + require.NoError(t, err) + + imgs, err := testutil.ReadImages(sb.Context(), provider, desc) + require.NoError(t, err) + require.Equal(t, len(ps)*2, len(imgs.Images)) + + var bases []*testutil.ImageInfo + for _, p := range ps { + pk := platforms.Format(p) + bases = append(bases, imgs.Find(pk)) + } + + atts := imgs.Filter("unknown/unknown") + require.Equal(t, len(ps), len(atts.Images)) + for i, att := range atts.Images { + var attest intoto.Statement + require.NoError(t, json.Unmarshal(att.LayersRaw[0], &attest)) + + require.Equal(t, "https://in-toto.io/Statement/v0.1", attest.Type) + require.Equal(t, "https://example.com/attestations/v1.0", attest.PredicateType) + require.Equal(t, map[string]interface{}{"success": true}, attest.Predicate) + subjects := []intoto.Subject{{ + Name: "_", + Digest: map[string]string{ + "sha256": bases[i].Desc.Digest.Encoded(), + }, + }} + require.Equal(t, subjects, attest.Subject) + } +} + func makeSSHAgentSock(t *testing.T, agent agent.Agent) (p string, err error) { tmpDir, err := integration.Tmpdir(t) if err != nil { diff --git a/exporter/containerimage/writer.go b/exporter/containerimage/writer.go index bfdb04c0e5a9..a6520b544652 100644 --- a/exporter/containerimage/writer.go +++ b/exporter/containerimage/writer.go @@ -19,6 +19,7 @@ import ( cacheconfig "github.com/moby/buildkit/cache/config" "github.com/moby/buildkit/exporter" "github.com/moby/buildkit/exporter/containerimage/exptypes" + gatewaypb "github.com/moby/buildkit/frontend/gateway/pb" "github.com/moby/buildkit/session" "github.com/moby/buildkit/snapshot" "github.com/moby/buildkit/solver" @@ -104,7 +105,7 @@ func (ic *ImageWriter) Commit(ctx context.Context, inp *exporter.Source, session attestCount += len(attests) } if count := attestCount + len(p.Platforms); count != len(inp.Refs) { - return nil, errors.Errorf("number of required refs does not match references %d %d", count, len(inp.Refs)) + return nil, errors.Errorf("number of required refs (%d) does not match number of references (%d)", count, len(inp.Refs)) } if attestCount > 0 { @@ -264,11 +265,11 @@ func (ic *ImageWriter) extractAttestations(ctx context.Context, s session.Group, for i, att := range attestations { i, att := i, att eg.Go(func() error { - switch att := att.(type) { - case *result.InTotoAttestation: - ref, ok := refs[att.PredicateRefKey] + switch att.Kind { + case gatewaypb.AttestationKindInToto: + ref, ok := refs[att.Ref] if !ok { - return errors.Errorf("key %s not found in refs map", att.PredicateRefKey) + return errors.Errorf("key %s not found in refs map", att.Ref) } mount, err := ref.Mount(ctx, true, s) @@ -282,7 +283,7 @@ func (ic *ImageWriter) extractAttestations(ctx context.Context, s session.Group, return err } defer lm.Unmount() - predicate, err := os.ReadFile(path.Join(src, att.PredicatePath)) + predicate, err := os.ReadFile(path.Join(src, att.Path)) if err != nil { return err } @@ -292,24 +293,30 @@ func (ic *ImageWriter) extractAttestations(ctx context.Context, s session.Group, statements[i] = intoto.Statement{ StatementHeader: intoto.StatementHeader{ Type: intoto.StatementInTotoV01, - PredicateType: att.PredicateType, + PredicateType: att.InToto.PredicateType, }, Predicate: json.RawMessage(predicate), } - for _, subject := range att.Subjects { - switch subject2 := subject.(type) { - case *result.InTotoSubjectSelf: - statements[i].Subject = append(statements[i].Subject, intoto.Subject{ - Name: "_", - Digest: result.DigestToDigestMap(desc.Digest), - }) - case *result.InTotoSubjectRaw: - statements[i].Subject = append(statements[i].Subject, intoto.Subject{ - Name: subject2.Name, - Digest: subject2.DigestMap(), - }) + + if len(att.InToto.Subjects) == 0 { + att.InToto.Subjects = []result.InTotoSubject{{ + Kind: gatewaypb.InTotoSubjectKindSelf, + }} + } + + statements[i].Subject = make([]intoto.Subject, len(att.InToto.Subjects)) + for j, subject := range att.InToto.Subjects { + statements[i].Subject[j].Name = "_" + if subject.Name != "" { + statements[i].Subject[j].Name = subject.Name + } + switch subject.Kind { + case gatewaypb.InTotoSubjectKindSelf: + statements[i].Subject[j].Digest = result.DigestMap(desc.Digest) + case gatewaypb.InTotoSubjectKindRaw: + statements[i].Subject[j].Digest = result.DigestMap(subject.Digest...) default: - return errors.Errorf("unknown attestation subject type %T", subject) + return errors.Errorf("unknown attestation subject kind %q", subject.Kind) } } } diff --git a/frontend/gateway/client/attestation.go b/frontend/gateway/client/attestation.go new file mode 100644 index 000000000000..56fedb0b5529 --- /dev/null +++ b/frontend/gateway/client/attestation.go @@ -0,0 +1,46 @@ +package client + +import ( + pb "github.com/moby/buildkit/frontend/gateway/pb" + "github.com/moby/buildkit/solver/result" +) + +func AttestationToPB(a *result.Attestation) (*pb.Attestation, error) { + subjects := make([]*pb.InTotoSubject, len(a.InToto.Subjects)) + for i, subject := range a.InToto.Subjects { + subjects[i] = &pb.InTotoSubject{ + Kind: subject.Kind, + Name: subject.Name, + Digest: subject.Digest, + } + } + + return &pb.Attestation{ + Kind: a.Kind, + Path: a.Path, + Ref: a.Ref, + InTotoPredicateType: a.InToto.PredicateType, + InTotoSubjects: subjects, + }, nil +} + +func AttestationFromPB(a *pb.Attestation) (*result.Attestation, error) { + subjects := make([]result.InTotoSubject, len(a.InTotoSubjects)) + for i, subject := range a.InTotoSubjects { + subjects[i] = result.InTotoSubject{ + Kind: subject.Kind, + Name: subject.Name, + Digest: subject.Digest, + } + } + + return &result.Attestation{ + Kind: a.Kind, + Path: a.Path, + Ref: a.Ref, + InToto: result.InTotoAttestation{ + PredicateType: a.InTotoPredicateType, + Subjects: subjects, + }, + }, nil +} diff --git a/frontend/gateway/gateway.go b/frontend/gateway/gateway.go index 2154782b7020..327fee6fb7cb 100644 --- a/frontend/gateway/gateway.go +++ b/frontend/gateway/gateway.go @@ -709,7 +709,7 @@ func (lbf *llbBridgeForwarder) Solve(ctx context.Context, req *pb.SolveRequest) pbRes.Attestations = map[string]*pb.Attestations{} for k, atts := range res.Attestations { for _, att := range atts { - pbAtt, err := pb.ToAttestationPB(att) + pbAtt, err := gwclient.AttestationToPB(&att) if err != nil { return nil, err } @@ -916,11 +916,11 @@ func (lbf *llbBridgeForwarder) Return(ctx context.Context, in *pb.ReturnRequest) if in.Result.Attestations != nil { for k, pbAtts := range in.Result.Attestations { for _, pbAtt := range pbAtts.Attestation { - att, err := pb.FromAttestationPB(pbAtt) + att, err := gwclient.AttestationFromPB(pbAtt) if err != nil { return nil, err } - r.AddAttestation(k, att, nil) + r.AddAttestation(k, *att, nil) } } } diff --git a/frontend/gateway/grpcclient/client.go b/frontend/gateway/grpcclient/client.go index 3013992d6cdf..8a8c794a8465 100644 --- a/frontend/gateway/grpcclient/client.go +++ b/frontend/gateway/grpcclient/client.go @@ -165,7 +165,7 @@ func (c *grpcClient) Run(ctx context.Context, f client.BuildFunc) (retError erro attestations := map[string]*pb.Attestations{} for k, as := range res.Attestations { for _, a := range as { - pbAtt, err := pb.ToAttestationPB(a) + pbAtt, err := client.AttestationToPB(&a) if err != nil { retError = err continue @@ -466,11 +466,11 @@ func (c *grpcClient) Solve(ctx context.Context, creq client.SolveRequest) (res * if resp.Result.Attestations != nil { for p, as := range resp.Result.Attestations { for _, a := range as.Attestation { - att, err := pb.FromAttestationPB(a) + att, err := client.AttestationFromPB(a) if err != nil { return nil, err } - res.AddAttestation(p, att, nil) + res.AddAttestation(p, *att, nil) } } } diff --git a/frontend/gateway/pb/attestation.go b/frontend/gateway/pb/attestation.go deleted file mode 100644 index 838d14e3de6a..000000000000 --- a/frontend/gateway/pb/attestation.go +++ /dev/null @@ -1,75 +0,0 @@ -package moby_buildkit_v1_frontend //nolint:revive - -import ( - "github.com/moby/buildkit/solver/result" - "github.com/pkg/errors" -) - -func ToAttestationPB(a result.Attestation) (*Attestations_Attestation, error) { - switch a := a.(type) { - case *result.InTotoAttestation: - subjects := []*InToto_Subject{} - for _, subject := range a.Subjects { - switch s := subject.(type) { - case *result.InTotoSubjectRaw: - subjects = append(subjects, &InToto_Subject{ - Subject: &InToto_Subject_Raw{ - Raw: &InToto_Subject_RawSubject{ - Name: s.Name, - Digest: s.Digest, - }, - }, - }) - case *result.InTotoSubjectSelf: - subjects = append(subjects, &InToto_Subject{ - Subject: &InToto_Subject_Self{ - Self: &InToto_Subject_SelfSubject{}, - }, - }) - default: - return nil, errors.Errorf("unknown in toto subject type %T", s) - } - } - - intoto := &InToto{ - PredicateType: a.PredicateType, - PredicatePath: a.PredicatePath, - PredicateRefKey: a.PredicateRefKey, - Subjects: subjects, - } - return &Attestations_Attestation{ - Attestation: &Attestations_Attestation_Intoto{intoto}, - }, nil - default: - return nil, errors.Errorf("unknown result type %T", a) - } -} - -func FromAttestationPB(a *Attestations_Attestation) (result.Attestation, error) { - switch a := a.Attestation.(type) { - case *Attestations_Attestation_Intoto: - subjects := []result.InTotoSubject{} - for _, pbSubject := range a.Intoto.Subjects { - switch pbSubject := pbSubject.Subject.(type) { - case *InToto_Subject_Raw: - subjects = append(subjects, &result.InTotoSubjectRaw{ - Name: pbSubject.Raw.Name, - Digest: pbSubject.Raw.Digest, - }) - case *InToto_Subject_Self: - subjects = append(subjects, &result.InTotoSubjectSelf{}) - default: - return nil, errors.Errorf("unknown in toto subject type %T", pbSubject) - } - } - - return &result.InTotoAttestation{ - PredicateType: a.Intoto.PredicateType, - PredicatePath: a.Intoto.PredicatePath, - PredicateRefKey: a.Intoto.PredicateRefKey, - Subjects: subjects, - }, nil - default: - return nil, errors.Errorf("unknown attestation type %T", a) - } -} diff --git a/frontend/gateway/pb/gateway.pb.go b/frontend/gateway/pb/gateway.pb.go index 39908cbd3f20..762ce2cfbf39 100644 --- a/frontend/gateway/pb/gateway.pb.go +++ b/frontend/gateway/pb/gateway.pb.go @@ -33,6 +33,53 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type AttestationKind int32 + +const ( + AttestationKindInToto AttestationKind = 0 +) + +var AttestationKind_name = map[int32]string{ + 0: "InToto", +} + +var AttestationKind_value = map[string]int32{ + "InToto": 0, +} + +func (x AttestationKind) String() string { + return proto.EnumName(AttestationKind_name, int32(x)) +} + +func (AttestationKind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{0} +} + +type InTotoSubjectKind int32 + +const ( + InTotoSubjectKindSelf InTotoSubjectKind = 0 + InTotoSubjectKindRaw InTotoSubjectKind = 1 +) + +var InTotoSubjectKind_name = map[int32]string{ + 0: "Self", + 1: "Raw", +} + +var InTotoSubjectKind_value = map[string]int32{ + "Self": 0, + "Raw": 1, +} + +func (x InTotoSubjectKind) String() string { + return proto.EnumName(InTotoSubjectKind_name, int32(x)) +} + +func (InTotoSubjectKind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{1} +} + type Result struct { // Types that are valid to be assigned to Result: // @@ -314,10 +361,10 @@ func (m *RefMap) GetRefs() map[string]*Ref { } type Attestations struct { - Attestation []*Attestations_Attestation `protobuf:"bytes,1,rep,name=attestation,proto3" json:"attestation,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Attestation []*Attestation `protobuf:"bytes,1,rep,name=attestation,proto3" json:"attestation,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *Attestations) Reset() { *m = Attestations{} } @@ -353,35 +400,36 @@ func (m *Attestations) XXX_DiscardUnknown() { var xxx_messageInfo_Attestations proto.InternalMessageInfo -func (m *Attestations) GetAttestation() []*Attestations_Attestation { +func (m *Attestations) GetAttestation() []*Attestation { if m != nil { return m.Attestation } return nil } -type Attestations_Attestation struct { - // Types that are valid to be assigned to Attestation: - // - // *Attestations_Attestation_Intoto - Attestation isAttestations_Attestation_Attestation `protobuf_oneof:"Attestation"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type Attestation struct { + Kind AttestationKind `protobuf:"varint,1,opt,name=kind,proto3,enum=moby.buildkit.v1.frontend.AttestationKind" json:"kind,omitempty"` + Ref string `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"` + Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` + InTotoPredicateType string `protobuf:"bytes,4,opt,name=inTotoPredicateType,proto3" json:"inTotoPredicateType,omitempty"` + InTotoSubjects []*InTotoSubject `protobuf:"bytes,5,rep,name=inTotoSubjects,proto3" json:"inTotoSubjects,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Attestations_Attestation) Reset() { *m = Attestations_Attestation{} } -func (m *Attestations_Attestation) String() string { return proto.CompactTextString(m) } -func (*Attestations_Attestation) ProtoMessage() {} -func (*Attestations_Attestation) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{4, 0} +func (m *Attestation) Reset() { *m = Attestation{} } +func (m *Attestation) String() string { return proto.CompactTextString(m) } +func (*Attestation) ProtoMessage() {} +func (*Attestation) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{5} } -func (m *Attestations_Attestation) XXX_Unmarshal(b []byte) error { +func (m *Attestation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Attestations_Attestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Attestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Attestations_Attestation.Marshal(b, m, deterministic) + return xxx_messageInfo_Attestation.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -391,145 +439,74 @@ func (m *Attestations_Attestation) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *Attestations_Attestation) XXX_Merge(src proto.Message) { - xxx_messageInfo_Attestations_Attestation.Merge(m, src) +func (m *Attestation) XXX_Merge(src proto.Message) { + xxx_messageInfo_Attestation.Merge(m, src) } -func (m *Attestations_Attestation) XXX_Size() int { +func (m *Attestation) XXX_Size() int { return m.Size() } -func (m *Attestations_Attestation) XXX_DiscardUnknown() { - xxx_messageInfo_Attestations_Attestation.DiscardUnknown(m) -} - -var xxx_messageInfo_Attestations_Attestation proto.InternalMessageInfo - -type isAttestations_Attestation_Attestation interface { - isAttestations_Attestation_Attestation() - MarshalTo([]byte) (int, error) - Size() int -} - -type Attestations_Attestation_Intoto struct { - Intoto *InToto `protobuf:"bytes,1,opt,name=intoto,proto3,oneof" json:"intoto,omitempty"` +func (m *Attestation) XXX_DiscardUnknown() { + xxx_messageInfo_Attestation.DiscardUnknown(m) } -func (*Attestations_Attestation_Intoto) isAttestations_Attestation_Attestation() {} +var xxx_messageInfo_Attestation proto.InternalMessageInfo -func (m *Attestations_Attestation) GetAttestation() isAttestations_Attestation_Attestation { +func (m *Attestation) GetKind() AttestationKind { if m != nil { - return m.Attestation - } - return nil -} - -func (m *Attestations_Attestation) GetIntoto() *InToto { - if x, ok := m.GetAttestation().(*Attestations_Attestation_Intoto); ok { - return x.Intoto - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Attestations_Attestation) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Attestations_Attestation_Intoto)(nil), - } -} - -type InToto struct { - PredicateType string `protobuf:"bytes,1,opt,name=predicateType,proto3" json:"predicateType,omitempty"` - PredicateRefKey string `protobuf:"bytes,2,opt,name=predicateRefKey,proto3" json:"predicateRefKey,omitempty"` - PredicatePath string `protobuf:"bytes,3,opt,name=predicatePath,proto3" json:"predicatePath,omitempty"` - Subjects []*InToto_Subject `protobuf:"bytes,4,rep,name=subjects,proto3" json:"subjects,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *InToto) Reset() { *m = InToto{} } -func (m *InToto) String() string { return proto.CompactTextString(m) } -func (*InToto) ProtoMessage() {} -func (*InToto) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{5} -} -func (m *InToto) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InToto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InToto.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + return m.Kind } + return AttestationKindInToto } -func (m *InToto) XXX_Merge(src proto.Message) { - xxx_messageInfo_InToto.Merge(m, src) -} -func (m *InToto) XXX_Size() int { - return m.Size() -} -func (m *InToto) XXX_DiscardUnknown() { - xxx_messageInfo_InToto.DiscardUnknown(m) -} - -var xxx_messageInfo_InToto proto.InternalMessageInfo -func (m *InToto) GetPredicateType() string { +func (m *Attestation) GetRef() string { if m != nil { - return m.PredicateType + return m.Ref } return "" } -func (m *InToto) GetPredicateRefKey() string { +func (m *Attestation) GetPath() string { if m != nil { - return m.PredicateRefKey + return m.Path } return "" } -func (m *InToto) GetPredicatePath() string { +func (m *Attestation) GetInTotoPredicateType() string { if m != nil { - return m.PredicatePath + return m.InTotoPredicateType } return "" } -func (m *InToto) GetSubjects() []*InToto_Subject { +func (m *Attestation) GetInTotoSubjects() []*InTotoSubject { if m != nil { - return m.Subjects + return m.InTotoSubjects } return nil } -type InToto_Subject struct { - // Types that are valid to be assigned to Subject: - // - // *InToto_Subject_Self - // *InToto_Subject_Raw - Subject isInToto_Subject_Subject `protobuf_oneof:"Subject"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type InTotoSubject struct { + Kind InTotoSubjectKind `protobuf:"varint,1,opt,name=kind,proto3,enum=moby.buildkit.v1.frontend.InTotoSubjectKind" json:"kind,omitempty"` + Digest []github_com_opencontainers_go_digest.Digest `protobuf:"bytes,2,rep,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *InToto_Subject) Reset() { *m = InToto_Subject{} } -func (m *InToto_Subject) String() string { return proto.CompactTextString(m) } -func (*InToto_Subject) ProtoMessage() {} -func (*InToto_Subject) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{5, 0} +func (m *InTotoSubject) Reset() { *m = InTotoSubject{} } +func (m *InTotoSubject) String() string { return proto.CompactTextString(m) } +func (*InTotoSubject) ProtoMessage() {} +func (*InTotoSubject) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{6} } -func (m *InToto_Subject) XXX_Unmarshal(b []byte) error { +func (m *InTotoSubject) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *InToto_Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *InTotoSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_InToto_Subject.Marshal(b, m, deterministic) + return xxx_messageInfo_InTotoSubject.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -539,144 +516,26 @@ func (m *InToto_Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *InToto_Subject) XXX_Merge(src proto.Message) { - xxx_messageInfo_InToto_Subject.Merge(m, src) +func (m *InTotoSubject) XXX_Merge(src proto.Message) { + xxx_messageInfo_InTotoSubject.Merge(m, src) } -func (m *InToto_Subject) XXX_Size() int { +func (m *InTotoSubject) XXX_Size() int { return m.Size() } -func (m *InToto_Subject) XXX_DiscardUnknown() { - xxx_messageInfo_InToto_Subject.DiscardUnknown(m) -} - -var xxx_messageInfo_InToto_Subject proto.InternalMessageInfo - -type isInToto_Subject_Subject interface { - isInToto_Subject_Subject() - MarshalTo([]byte) (int, error) - Size() int -} - -type InToto_Subject_Self struct { - Self *InToto_Subject_SelfSubject `protobuf:"bytes,1,opt,name=self,proto3,oneof" json:"self,omitempty"` -} -type InToto_Subject_Raw struct { - Raw *InToto_Subject_RawSubject `protobuf:"bytes,2,opt,name=raw,proto3,oneof" json:"raw,omitempty"` +func (m *InTotoSubject) XXX_DiscardUnknown() { + xxx_messageInfo_InTotoSubject.DiscardUnknown(m) } -func (*InToto_Subject_Self) isInToto_Subject_Subject() {} -func (*InToto_Subject_Raw) isInToto_Subject_Subject() {} +var xxx_messageInfo_InTotoSubject proto.InternalMessageInfo -func (m *InToto_Subject) GetSubject() isInToto_Subject_Subject { +func (m *InTotoSubject) GetKind() InTotoSubjectKind { if m != nil { - return m.Subject - } - return nil -} - -func (m *InToto_Subject) GetSelf() *InToto_Subject_SelfSubject { - if x, ok := m.GetSubject().(*InToto_Subject_Self); ok { - return x.Self - } - return nil -} - -func (m *InToto_Subject) GetRaw() *InToto_Subject_RawSubject { - if x, ok := m.GetSubject().(*InToto_Subject_Raw); ok { - return x.Raw - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*InToto_Subject) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*InToto_Subject_Self)(nil), - (*InToto_Subject_Raw)(nil), - } -} - -type InToto_Subject_SelfSubject struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *InToto_Subject_SelfSubject) Reset() { *m = InToto_Subject_SelfSubject{} } -func (m *InToto_Subject_SelfSubject) String() string { return proto.CompactTextString(m) } -func (*InToto_Subject_SelfSubject) ProtoMessage() {} -func (*InToto_Subject_SelfSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{5, 0, 0} -} -func (m *InToto_Subject_SelfSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InToto_Subject_SelfSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InToto_Subject_SelfSubject.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InToto_Subject_SelfSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_InToto_Subject_SelfSubject.Merge(m, src) -} -func (m *InToto_Subject_SelfSubject) XXX_Size() int { - return m.Size() -} -func (m *InToto_Subject_SelfSubject) XXX_DiscardUnknown() { - xxx_messageInfo_InToto_Subject_SelfSubject.DiscardUnknown(m) -} - -var xxx_messageInfo_InToto_Subject_SelfSubject proto.InternalMessageInfo - -type InToto_Subject_RawSubject struct { - Digest []github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,rep,name=Digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"Digest"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *InToto_Subject_RawSubject) Reset() { *m = InToto_Subject_RawSubject{} } -func (m *InToto_Subject_RawSubject) String() string { return proto.CompactTextString(m) } -func (*InToto_Subject_RawSubject) ProtoMessage() {} -func (*InToto_Subject_RawSubject) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{5, 0, 1} -} -func (m *InToto_Subject_RawSubject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InToto_Subject_RawSubject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InToto_Subject_RawSubject.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil + return m.Kind } + return InTotoSubjectKindSelf } -func (m *InToto_Subject_RawSubject) XXX_Merge(src proto.Message) { - xxx_messageInfo_InToto_Subject_RawSubject.Merge(m, src) -} -func (m *InToto_Subject_RawSubject) XXX_Size() int { - return m.Size() -} -func (m *InToto_Subject_RawSubject) XXX_DiscardUnknown() { - xxx_messageInfo_InToto_Subject_RawSubject.DiscardUnknown(m) -} - -var xxx_messageInfo_InToto_Subject_RawSubject proto.InternalMessageInfo -func (m *InToto_Subject_RawSubject) GetName() string { +func (m *InTotoSubject) GetName() string { if m != nil { return m.Name } @@ -695,7 +554,7 @@ func (m *ReturnRequest) Reset() { *m = ReturnRequest{} } func (m *ReturnRequest) String() string { return proto.CompactTextString(m) } func (*ReturnRequest) ProtoMessage() {} func (*ReturnRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{6} + return fileDescriptor_f1a937782ebbded5, []int{7} } func (m *ReturnRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -748,7 +607,7 @@ func (m *ReturnResponse) Reset() { *m = ReturnResponse{} } func (m *ReturnResponse) String() string { return proto.CompactTextString(m) } func (*ReturnResponse) ProtoMessage() {} func (*ReturnResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{7} + return fileDescriptor_f1a937782ebbded5, []int{8} } func (m *ReturnResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -787,7 +646,7 @@ func (m *InputsRequest) Reset() { *m = InputsRequest{} } func (m *InputsRequest) String() string { return proto.CompactTextString(m) } func (*InputsRequest) ProtoMessage() {} func (*InputsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{8} + return fileDescriptor_f1a937782ebbded5, []int{9} } func (m *InputsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -827,7 +686,7 @@ func (m *InputsResponse) Reset() { *m = InputsResponse{} } func (m *InputsResponse) String() string { return proto.CompactTextString(m) } func (*InputsResponse) ProtoMessage() {} func (*InputsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{9} + return fileDescriptor_f1a937782ebbded5, []int{10} } func (m *InputsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -879,7 +738,7 @@ func (m *ResolveImageConfigRequest) Reset() { *m = ResolveImageConfigReq func (m *ResolveImageConfigRequest) String() string { return proto.CompactTextString(m) } func (*ResolveImageConfigRequest) ProtoMessage() {} func (*ResolveImageConfigRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{10} + return fileDescriptor_f1a937782ebbded5, []int{11} } func (m *ResolveImageConfigRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -962,7 +821,7 @@ func (m *ResolveImageConfigResponse) Reset() { *m = ResolveImageConfigRe func (m *ResolveImageConfigResponse) String() string { return proto.CompactTextString(m) } func (*ResolveImageConfigResponse) ProtoMessage() {} func (*ResolveImageConfigResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{11} + return fileDescriptor_f1a937782ebbded5, []int{12} } func (m *ResolveImageConfigResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1023,7 +882,7 @@ func (m *SolveRequest) Reset() { *m = SolveRequest{} } func (m *SolveRequest) String() string { return proto.CompactTextString(m) } func (*SolveRequest) ProtoMessage() {} func (*SolveRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{12} + return fileDescriptor_f1a937782ebbded5, []int{13} } func (m *SolveRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1135,7 +994,7 @@ func (m *CacheOptionsEntry) Reset() { *m = CacheOptionsEntry{} } func (m *CacheOptionsEntry) String() string { return proto.CompactTextString(m) } func (*CacheOptionsEntry) ProtoMessage() {} func (*CacheOptionsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{13} + return fileDescriptor_f1a937782ebbded5, []int{14} } func (m *CacheOptionsEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1192,7 +1051,7 @@ func (m *SolveResponse) Reset() { *m = SolveResponse{} } func (m *SolveResponse) String() string { return proto.CompactTextString(m) } func (*SolveResponse) ProtoMessage() {} func (*SolveResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{14} + return fileDescriptor_f1a937782ebbded5, []int{15} } func (m *SolveResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1248,7 +1107,7 @@ func (m *ReadFileRequest) Reset() { *m = ReadFileRequest{} } func (m *ReadFileRequest) String() string { return proto.CompactTextString(m) } func (*ReadFileRequest) ProtoMessage() {} func (*ReadFileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{15} + return fileDescriptor_f1a937782ebbded5, []int{16} } func (m *ReadFileRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1310,7 +1169,7 @@ func (m *FileRange) Reset() { *m = FileRange{} } func (m *FileRange) String() string { return proto.CompactTextString(m) } func (*FileRange) ProtoMessage() {} func (*FileRange) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{16} + return fileDescriptor_f1a937782ebbded5, []int{17} } func (m *FileRange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1364,7 +1223,7 @@ func (m *ReadFileResponse) Reset() { *m = ReadFileResponse{} } func (m *ReadFileResponse) String() string { return proto.CompactTextString(m) } func (*ReadFileResponse) ProtoMessage() {} func (*ReadFileResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{17} + return fileDescriptor_f1a937782ebbded5, []int{18} } func (m *ReadFileResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1413,7 +1272,7 @@ func (m *ReadDirRequest) Reset() { *m = ReadDirRequest{} } func (m *ReadDirRequest) String() string { return proto.CompactTextString(m) } func (*ReadDirRequest) ProtoMessage() {} func (*ReadDirRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{18} + return fileDescriptor_f1a937782ebbded5, []int{19} } func (m *ReadDirRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1474,7 +1333,7 @@ func (m *ReadDirResponse) Reset() { *m = ReadDirResponse{} } func (m *ReadDirResponse) String() string { return proto.CompactTextString(m) } func (*ReadDirResponse) ProtoMessage() {} func (*ReadDirResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{19} + return fileDescriptor_f1a937782ebbded5, []int{20} } func (m *ReadDirResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1522,7 +1381,7 @@ func (m *StatFileRequest) Reset() { *m = StatFileRequest{} } func (m *StatFileRequest) String() string { return proto.CompactTextString(m) } func (*StatFileRequest) ProtoMessage() {} func (*StatFileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{20} + return fileDescriptor_f1a937782ebbded5, []int{21} } func (m *StatFileRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1576,7 +1435,7 @@ func (m *StatFileResponse) Reset() { *m = StatFileResponse{} } func (m *StatFileResponse) String() string { return proto.CompactTextString(m) } func (*StatFileResponse) ProtoMessage() {} func (*StatFileResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{21} + return fileDescriptor_f1a937782ebbded5, []int{22} } func (m *StatFileResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1622,7 +1481,7 @@ func (m *PingRequest) Reset() { *m = PingRequest{} } func (m *PingRequest) String() string { return proto.CompactTextString(m) } func (*PingRequest) ProtoMessage() {} func (*PingRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{22} + return fileDescriptor_f1a937782ebbded5, []int{23} } func (m *PingRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1664,7 +1523,7 @@ func (m *PongResponse) Reset() { *m = PongResponse{} } func (m *PongResponse) String() string { return proto.CompactTextString(m) } func (*PongResponse) ProtoMessage() {} func (*PongResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{23} + return fileDescriptor_f1a937782ebbded5, []int{24} } func (m *PongResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1731,7 +1590,7 @@ func (m *WarnRequest) Reset() { *m = WarnRequest{} } func (m *WarnRequest) String() string { return proto.CompactTextString(m) } func (*WarnRequest) ProtoMessage() {} func (*WarnRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{24} + return fileDescriptor_f1a937782ebbded5, []int{25} } func (m *WarnRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1812,7 +1671,7 @@ func (m *WarnResponse) Reset() { *m = WarnResponse{} } func (m *WarnResponse) String() string { return proto.CompactTextString(m) } func (*WarnResponse) ProtoMessage() {} func (*WarnResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{25} + return fileDescriptor_f1a937782ebbded5, []int{26} } func (m *WarnResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1858,7 +1717,7 @@ func (m *NewContainerRequest) Reset() { *m = NewContainerRequest{} } func (m *NewContainerRequest) String() string { return proto.CompactTextString(m) } func (*NewContainerRequest) ProtoMessage() {} func (*NewContainerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{26} + return fileDescriptor_f1a937782ebbded5, []int{27} } func (m *NewContainerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1939,7 +1798,7 @@ func (m *NewContainerResponse) Reset() { *m = NewContainerResponse{} } func (m *NewContainerResponse) String() string { return proto.CompactTextString(m) } func (*NewContainerResponse) ProtoMessage() {} func (*NewContainerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{27} + return fileDescriptor_f1a937782ebbded5, []int{28} } func (m *NewContainerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1979,7 +1838,7 @@ func (m *ReleaseContainerRequest) Reset() { *m = ReleaseContainerRequest func (m *ReleaseContainerRequest) String() string { return proto.CompactTextString(m) } func (*ReleaseContainerRequest) ProtoMessage() {} func (*ReleaseContainerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{28} + return fileDescriptor_f1a937782ebbded5, []int{29} } func (m *ReleaseContainerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2025,7 +1884,7 @@ func (m *ReleaseContainerResponse) Reset() { *m = ReleaseContainerRespon func (m *ReleaseContainerResponse) String() string { return proto.CompactTextString(m) } func (*ReleaseContainerResponse) ProtoMessage() {} func (*ReleaseContainerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{29} + return fileDescriptor_f1a937782ebbded5, []int{30} } func (m *ReleaseContainerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2075,7 +1934,7 @@ func (m *ExecMessage) Reset() { *m = ExecMessage{} } func (m *ExecMessage) String() string { return proto.CompactTextString(m) } func (*ExecMessage) ProtoMessage() {} func (*ExecMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{30} + return fileDescriptor_f1a937782ebbded5, []int{31} } func (m *ExecMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2231,7 +2090,7 @@ func (m *InitMessage) Reset() { *m = InitMessage{} } func (m *InitMessage) String() string { return proto.CompactTextString(m) } func (*InitMessage) ProtoMessage() {} func (*InitMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{31} + return fileDescriptor_f1a937782ebbded5, []int{32} } func (m *InitMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2307,7 +2166,7 @@ func (m *ExitMessage) Reset() { *m = ExitMessage{} } func (m *ExitMessage) String() string { return proto.CompactTextString(m) } func (*ExitMessage) ProtoMessage() {} func (*ExitMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{32} + return fileDescriptor_f1a937782ebbded5, []int{33} } func (m *ExitMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2360,7 +2219,7 @@ func (m *StartedMessage) Reset() { *m = StartedMessage{} } func (m *StartedMessage) String() string { return proto.CompactTextString(m) } func (*StartedMessage) ProtoMessage() {} func (*StartedMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{33} + return fileDescriptor_f1a937782ebbded5, []int{34} } func (m *StartedMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2399,7 +2258,7 @@ func (m *DoneMessage) Reset() { *m = DoneMessage{} } func (m *DoneMessage) String() string { return proto.CompactTextString(m) } func (*DoneMessage) ProtoMessage() {} func (*DoneMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{34} + return fileDescriptor_f1a937782ebbded5, []int{35} } func (m *DoneMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2441,7 +2300,7 @@ func (m *FdMessage) Reset() { *m = FdMessage{} } func (m *FdMessage) String() string { return proto.CompactTextString(m) } func (*FdMessage) ProtoMessage() {} func (*FdMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{35} + return fileDescriptor_f1a937782ebbded5, []int{36} } func (m *FdMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2503,7 +2362,7 @@ func (m *ResizeMessage) Reset() { *m = ResizeMessage{} } func (m *ResizeMessage) String() string { return proto.CompactTextString(m) } func (*ResizeMessage) ProtoMessage() {} func (*ResizeMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{36} + return fileDescriptor_f1a937782ebbded5, []int{37} } func (m *ResizeMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2559,7 +2418,7 @@ func (m *SignalMessage) Reset() { *m = SignalMessage{} } func (m *SignalMessage) String() string { return proto.CompactTextString(m) } func (*SignalMessage) ProtoMessage() {} func (*SignalMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{37} + return fileDescriptor_f1a937782ebbded5, []int{38} } func (m *SignalMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2596,6 +2455,8 @@ func (m *SignalMessage) GetName() string { } func init() { + proto.RegisterEnum("moby.buildkit.v1.frontend.AttestationKind", AttestationKind_name, AttestationKind_value) + proto.RegisterEnum("moby.buildkit.v1.frontend.InTotoSubjectKind", InTotoSubjectKind_name, InTotoSubjectKind_value) proto.RegisterType((*Result)(nil), "moby.buildkit.v1.frontend.Result") proto.RegisterMapType((map[string]*Attestations)(nil), "moby.buildkit.v1.frontend.Result.AttestationsEntry") proto.RegisterMapType((map[string][]byte)(nil), "moby.buildkit.v1.frontend.Result.MetadataEntry") @@ -2605,11 +2466,8 @@ func init() { proto.RegisterType((*RefMap)(nil), "moby.buildkit.v1.frontend.RefMap") proto.RegisterMapType((map[string]*Ref)(nil), "moby.buildkit.v1.frontend.RefMap.RefsEntry") proto.RegisterType((*Attestations)(nil), "moby.buildkit.v1.frontend.Attestations") - proto.RegisterType((*Attestations_Attestation)(nil), "moby.buildkit.v1.frontend.Attestations.Attestation") - proto.RegisterType((*InToto)(nil), "moby.buildkit.v1.frontend.InToto") - proto.RegisterType((*InToto_Subject)(nil), "moby.buildkit.v1.frontend.InToto.Subject") - proto.RegisterType((*InToto_Subject_SelfSubject)(nil), "moby.buildkit.v1.frontend.InToto.Subject.SelfSubject") - proto.RegisterType((*InToto_Subject_RawSubject)(nil), "moby.buildkit.v1.frontend.InToto.Subject.RawSubject") + proto.RegisterType((*Attestation)(nil), "moby.buildkit.v1.frontend.Attestation") + proto.RegisterType((*InTotoSubject)(nil), "moby.buildkit.v1.frontend.InTotoSubject") proto.RegisterType((*ReturnRequest)(nil), "moby.buildkit.v1.frontend.ReturnRequest") proto.RegisterType((*ReturnResponse)(nil), "moby.buildkit.v1.frontend.ReturnResponse") proto.RegisterType((*InputsRequest)(nil), "moby.buildkit.v1.frontend.InputsRequest") @@ -2651,153 +2509,154 @@ func init() { func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 2321 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x8a, 0x14, 0x3f, 0x1e, 0x49, 0x59, 0x99, 0xa4, 0x29, 0xb3, 0x08, 0x1c, 0x65, 0xeb, - 0x3a, 0xb4, 0xe3, 0x2c, 0x53, 0xd9, 0x86, 0x5c, 0xbb, 0x4d, 0x6a, 0xea, 0x03, 0x62, 0x2c, 0xd9, - 0xea, 0xc8, 0x81, 0xd1, 0x20, 0x05, 0xba, 0xe2, 0x0e, 0xe9, 0xad, 0x57, 0x3b, 0xdb, 0xd9, 0xa1, - 0x65, 0x25, 0x97, 0xf6, 0x3f, 0xe8, 0xa9, 0xd7, 0x02, 0x3d, 0xf5, 0xd8, 0x53, 0x8f, 0x45, 0x8f, - 0x01, 0x7a, 0xe9, 0xa5, 0x40, 0xd1, 0x43, 0x50, 0xf8, 0x2f, 0xe8, 0xa9, 0x40, 0x6f, 0xc5, 0x9b, - 0x9d, 0x25, 0x87, 0x14, 0xbd, 0xa4, 0xe0, 0x93, 0x66, 0xde, 0xbe, 0xf7, 0x9b, 0x79, 0xdf, 0x6f, - 0x28, 0x68, 0x0c, 0x3c, 0xc9, 0x4e, 0xbd, 0x33, 0x37, 0x16, 0x5c, 0x72, 0xf2, 0xce, 0x09, 0x3f, - 0x3e, 0x73, 0x8f, 0x87, 0x41, 0xe8, 0x3f, 0x0b, 0xa4, 0xfb, 0xfc, 0x07, 0x6e, 0x5f, 0xf0, 0x48, - 0xb2, 0xc8, 0xb7, 0x3f, 0x1a, 0x04, 0xf2, 0xe9, 0xf0, 0xd8, 0xed, 0xf1, 0x93, 0xf6, 0x80, 0x0f, - 0x78, 0x5b, 0x49, 0x1c, 0x0f, 0xfb, 0x6a, 0xa7, 0x36, 0x6a, 0x95, 0x22, 0xd9, 0x1b, 0xd3, 0xec, - 0x03, 0xce, 0x07, 0x21, 0xf3, 0xe2, 0x20, 0xd1, 0xcb, 0xb6, 0x88, 0x7b, 0xed, 0x44, 0x7a, 0x72, - 0x98, 0x68, 0x99, 0x1b, 0x86, 0x0c, 0x5e, 0xa4, 0x9d, 0x5d, 0xa4, 0x9d, 0xf0, 0xf0, 0x39, 0x13, - 0xed, 0xf8, 0xb8, 0xcd, 0xe3, 0x8c, 0xbb, 0xfd, 0x4a, 0x6e, 0x2f, 0x0e, 0xda, 0xf2, 0x2c, 0x66, - 0x49, 0xfb, 0x94, 0x8b, 0x67, 0x4c, 0x68, 0x81, 0x9b, 0xaf, 0x14, 0x18, 0xca, 0x20, 0x44, 0xa9, - 0x9e, 0x17, 0x27, 0x78, 0x08, 0xfe, 0xd5, 0x42, 0xa6, 0xda, 0x92, 0x47, 0x41, 0x22, 0x83, 0x60, - 0x10, 0xb4, 0xfb, 0x89, 0x92, 0x49, 0x4f, 0x41, 0x25, 0x52, 0x76, 0xe7, 0x6f, 0x45, 0x28, 0x51, - 0x96, 0x0c, 0x43, 0x49, 0xae, 0x42, 0x43, 0xb0, 0xfe, 0x36, 0x8b, 0x05, 0xeb, 0x79, 0x92, 0xf9, - 0x4d, 0x6b, 0xdd, 0x6a, 0x55, 0xf7, 0x96, 0xe8, 0x24, 0x99, 0x7c, 0x0e, 0xab, 0x82, 0xf5, 0x13, - 0x83, 0x71, 0x79, 0xdd, 0x6a, 0xd5, 0x36, 0x3e, 0x74, 0x5f, 0xe9, 0x0c, 0x97, 0xb2, 0xfe, 0x81, - 0x17, 0x8f, 0x45, 0xf6, 0x96, 0xe8, 0x14, 0x08, 0xd9, 0x80, 0x82, 0x60, 0xfd, 0x66, 0x41, 0x61, - 0x5d, 0xce, 0xc7, 0xda, 0x5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c, 0xec, 0xeb, 0x35, 0x56, 0x2c, 0x04, 0x21, 0x7b, 0x50, 0x10, 0xde, 0xa9, 0x8e, 0x8d, 0x5b, - 0x8b, 0x63, 0x51, 0xef, 0x74, 0x0c, 0x85, 0x10, 0x76, 0x03, 0x6a, 0xc6, 0x01, 0x76, 0x08, 0x30, - 0xe6, 0x21, 0x9f, 0x41, 0x69, 0x3b, 0x18, 0xb0, 0x44, 0xaa, 0xa0, 0xa9, 0x76, 0x36, 0xbe, 0xf9, - 0xf6, 0xbd, 0xa5, 0x7f, 0x7d, 0xfb, 0xde, 0x75, 0xa3, 0xad, 0xf0, 0x98, 0x45, 0x3d, 0x1e, 0x49, - 0x2f, 0x88, 0x98, 0xc0, 0xee, 0xf8, 0x91, 0xaf, 0x44, 0xdc, 0x54, 0x92, 0x6a, 0x04, 0x42, 0xa0, - 0x18, 0x79, 0x27, 0x59, 0x36, 0xaa, 0x75, 0xa7, 0x3a, 0x32, 0x8f, 0x23, 0xa1, 0x41, 0x99, 0x1c, - 0x8a, 0x88, 0xb2, 0x5f, 0x0d, 0x91, 0xff, 0x87, 0x59, 0x1d, 0x59, 0x20, 0x9e, 0xd2, 0x0a, 0x4a, - 0xb5, 0x00, 0x69, 0xc1, 0x0a, 0x13, 0x82, 0x0b, 0x6d, 0x1f, 0xe2, 0xa6, 0x2d, 0xdb, 0x15, 0x71, - 0xcf, 0x3d, 0x52, 0x2d, 0x9b, 0xa6, 0x0c, 0xce, 0x1a, 0xac, 0x66, 0xa7, 0x26, 0x31, 0x8f, 0x12, - 0xe6, 0x5c, 0x82, 0x46, 0x37, 0x8a, 0x87, 0x32, 0xd1, 0xf7, 0x70, 0xfe, 0x62, 0xc1, 0x6a, 0x46, - 0x49, 0x79, 0xc8, 0x97, 0x50, 0x1b, 0x57, 0x86, 0xac, 0x04, 0xdc, 0xcd, 0xf5, 0x82, 0x29, 0x6f, - 0x94, 0x15, 0x5d, 0x11, 0x4c, 0x38, 0xfb, 0x21, 0xac, 0x4d, 0x33, 0xcc, 0xa8, 0x0f, 0x57, 0x26, - 0xeb, 0xc3, 0x74, 0xb9, 0x32, 0xea, 0xc1, 0x3f, 0x2c, 0x78, 0x87, 0x32, 0x35, 0x83, 0x74, 0x4f, - 0xbc, 0x01, 0xdb, 0xe2, 0x51, 0x3f, 0x18, 0x64, 0x66, 0x5e, 0x53, 0xb5, 0x30, 0x43, 0xc6, 0xb2, - 0xd8, 0x82, 0xca, 0x61, 0xe8, 0xc9, 0x3e, 0x17, 0x27, 0x1a, 0xbc, 0x8e, 0xe0, 0x19, 0x8d, 0x8e, - 0xbe, 0x92, 0x75, 0xa8, 0x69, 0xe0, 0x03, 0xee, 0x33, 0x9d, 0x49, 0x26, 0x89, 0x34, 0xa1, 0xbc, - 0xcf, 0x07, 0x0f, 0xd1, 0xef, 0x45, 0xf5, 0x35, 0xdb, 0x12, 0x07, 0xea, 0x9a, 0x51, 0xa8, 0xb4, - 0x5e, 0x59, 0xb7, 0x5a, 0x2b, 0x74, 0x82, 0x46, 0xde, 0x85, 0xea, 0x11, 0x4b, 0x92, 0x80, 0x47, - 0xdd, 0xed, 0x66, 0x49, 0xc9, 0x8f, 0x09, 0xce, 0xaf, 0x2d, 0xb0, 0x67, 0xe9, 0xa5, 0x9d, 0x64, - 0xc6, 0xae, 0xf5, 0x9a, 0xb1, 0xfb, 0x36, 0x94, 0x52, 0x74, 0xdd, 0x58, 0xf5, 0xce, 0xf9, 0xf3, - 0x0a, 0xd4, 0x8f, 0xf0, 0x02, 0x99, 0x35, 0x5d, 0x80, 0xb1, 0x13, 0x74, 0xe0, 0x4e, 0xbb, 0xc6, - 0xe0, 0x20, 0x36, 0x54, 0x76, 0x75, 0x90, 0xe8, 0xc4, 0x18, 0xed, 0xc9, 0x17, 0x50, 0xcb, 0xd6, - 0x8f, 0x62, 0xd9, 0x2c, 0xa8, 0x28, 0xbb, 0x93, 0x13, 0x65, 0xe6, 0x4d, 0x5c, 0x43, 0x54, 0xc7, - 0x98, 0x41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6, 0xd4, 0xf0, 0x95, 0xab, 0xc6, 0xb9, 0x79, 0xeb, 0x09, 0x14, 0x71, - 0x8e, 0x22, 0x79, 0xf5, 0xc4, 0x18, 0xb4, 0xec, 0x3c, 0x77, 0x4d, 0x0c, 0x60, 0x3f, 0xc7, 0xba, - 0xab, 0xde, 0xa2, 0xf9, 0x15, 0xd7, 0xf8, 0x01, 0xc9, 0xbe, 0xb6, 0x00, 0xe7, 0x18, 0x5e, 0xbf, - 0xe3, 0x5a, 0x0b, 0xfc, 0x8a, 0x33, 0x1f, 0x7e, 0xea, 0xf7, 0x22, 0x0e, 0x75, 0xb3, 0x9d, 0x12, - 0x37, 0x47, 0x74, 0xc6, 0x24, 0x62, 0xb7, 0x17, 0xe6, 0xd7, 0x07, 0x7e, 0x8d, 0x6f, 0x82, 0xc9, - 0x56, 0x4b, 0x36, 0x72, 0xcd, 0x31, 0xb3, 0xa9, 0xdb, 0x37, 0x2f, 0x24, 0xa3, 0x0f, 0xf7, 0xd2, - 0x56, 0xae, 0xdb, 0x35, 0xc9, 0xef, 0x4c, 0xa3, 0x96, 0x6f, 0x2f, 0xc8, 0xd7, 0xb2, 0x3e, 0xb6, - 0x30, 0xce, 0x70, 0x84, 0xcb, 0xc5, 0x36, 0x66, 0xdb, 0xdc, 0x38, 0x33, 0x67, 0xc1, 0x4e, 0xfd, - 0x9b, 0x97, 0x97, 0xad, 0xbf, 0xbf, 0xbc, 0x6c, 0xfd, 0xfb, 0xe5, 0x65, 0xeb, 0xb8, 0xa4, 0xfe, - 0x2b, 0x76, 0xf3, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x93, 0xc5, 0x33, 0x68, 0x67, 0x1c, 0x00, - 0x00, + // 2349 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x39, 0xcd, 0x6f, 0x1b, 0xc7, + 0xf5, 0x5a, 0x91, 0x12, 0xc9, 0xc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, 0x35, 0x36, 0x23, 0xfe, 0x04, 0x5b, 0x83, 0x7c, 0x2e, 0xa7, 0x37, + 0x05, 0xe3, 0x1b, 0x97, 0x73, 0x7d, 0x01, 0xcc, 0x11, 0x7b, 0xfd, 0xd4, 0xac, 0x2d, 0xf0, 0xa1, + 0x69, 0x3e, 0xfb, 0x89, 0x4f, 0x5a, 0x21, 0x94, 0xcc, 0x8e, 0x4f, 0xea, 0x29, 0xa4, 0x33, 0x86, + 0x25, 0xa7, 0xb1, 0x30, 0xbe, 0xbe, 0xf0, 0x4b, 0x7c, 0xb6, 0x8c, 0x4f, 0x03, 0xa4, 0x99, 0x6a, + 0x8e, 0x99, 0x73, 0x87, 0x73, 0xf3, 0x42, 0x34, 0xfa, 0x72, 0x4f, 0x4d, 0x1b, 0x7a, 0xa2, 0x20, + 0xe9, 0xcd, 0x73, 0x38, 0x95, 0x38, 0x0b, 0xe2, 0xd5, 0xac, 0x0f, 0x2c, 0x8c, 0x33, 0x9c, 0x32, + 0x53, 0x79, 0x1b, 0xe3, 0x77, 0x6a, 0x9c, 0x99, 0xe3, 0xea, 0x56, 0xe9, 0x9b, 0x17, 0x57, 0xad, + 0xbf, 0xbe, 0xb8, 0x6a, 0xfd, 0xf3, 0xc5, 0x55, 0xeb, 0x64, 0x55, 0xfe, 0x15, 0x76, 0xf3, 0xbf, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x78, 0x82, 0xaf, 0xf3, 0x5c, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3669,7 +3528,7 @@ func (m *Attestations) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Attestations_Attestation) Marshal() (dAtA []byte, err error) { +func (m *Attestation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3679,12 +3538,12 @@ func (m *Attestations_Attestation) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Attestations_Attestation) MarshalTo(dAtA []byte) (int, error) { +func (m *Attestation) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Attestations_Attestation) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Attestation) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3693,222 +3552,65 @@ func (m *Attestations_Attestation) MarshalToSizedBuffer(dAtA []byte) (int, error i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if m.Attestation != nil { - { - size := m.Attestation.Size() - i -= size - if _, err := m.Attestation.MarshalTo(dAtA[i:]); err != nil { - return 0, err + if len(m.InTotoSubjects) > 0 { + for iNdEx := len(m.InTotoSubjects) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.InTotoSubjects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGateway(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x2a } } + if len(m.InTotoPredicateType) > 0 { + i -= len(m.InTotoPredicateType) + copy(dAtA[i:], m.InTotoPredicateType) + i = encodeVarintGateway(dAtA, i, uint64(len(m.InTotoPredicateType))) + i-- + dAtA[i] = 0x22 + } + if len(m.Path) > 0 { + i -= len(m.Path) + copy(dAtA[i:], m.Path) + i = encodeVarintGateway(dAtA, i, uint64(len(m.Path))) + i-- + dAtA[i] = 0x1a + } + if len(m.Ref) > 0 { + i -= len(m.Ref) + copy(dAtA[i:], m.Ref) + i = encodeVarintGateway(dAtA, i, uint64(len(m.Ref))) + i-- + dAtA[i] = 0x12 + } + if m.Kind != 0 { + i = encodeVarintGateway(dAtA, i, uint64(m.Kind)) + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } -func (m *Attestations_Attestation_Intoto) MarshalTo(dAtA []byte) (int, error) { +func (m *InTotoSubject) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InTotoSubject) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Attestations_Attestation_Intoto) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Intoto != nil { - { - size, err := m.Intoto.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGateway(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *InToto) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InToto) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InToto) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Subjects) > 0 { - for iNdEx := len(m.Subjects) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Subjects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGateway(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.PredicatePath) > 0 { - i -= len(m.PredicatePath) - copy(dAtA[i:], m.PredicatePath) - i = encodeVarintGateway(dAtA, i, uint64(len(m.PredicatePath))) - i-- - dAtA[i] = 0x1a - } - if len(m.PredicateRefKey) > 0 { - i -= len(m.PredicateRefKey) - copy(dAtA[i:], m.PredicateRefKey) - i = encodeVarintGateway(dAtA, i, uint64(len(m.PredicateRefKey))) - i-- - dAtA[i] = 0x12 - } - if len(m.PredicateType) > 0 { - i -= len(m.PredicateType) - copy(dAtA[i:], m.PredicateType) - i = encodeVarintGateway(dAtA, i, uint64(len(m.PredicateType))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *InToto_Subject) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InToto_Subject) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InToto_Subject) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Subject != nil { - { - size := m.Subject.Size() - i -= size - if _, err := m.Subject.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *InToto_Subject_Self) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InToto_Subject_Self) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Self != nil { - { - size, err := m.Self.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGateway(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *InToto_Subject_Raw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InToto_Subject_Raw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Raw != nil { - { - size, err := m.Raw.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGateway(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *InToto_Subject_SelfSubject) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InToto_Subject_SelfSubject) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InToto_Subject_SelfSubject) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func (m *InToto_Subject_RawSubject) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InToto_Subject_RawSubject) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InToto_Subject_RawSubject) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *InTotoSubject) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3922,7 +3624,7 @@ func (m *InToto_Subject_RawSubject) MarshalToSizedBuffer(dAtA []byte) (int, erro copy(dAtA[i:], m.Name) i = encodeVarintGateway(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } if len(m.Digest) > 0 { for iNdEx := len(m.Digest) - 1; iNdEx >= 0; iNdEx-- { @@ -3930,9 +3632,14 @@ func (m *InToto_Subject_RawSubject) MarshalToSizedBuffer(dAtA []byte) (int, erro copy(dAtA[i:], m.Digest[iNdEx]) i = encodeVarintGateway(dAtA, i, uint64(len(m.Digest[iNdEx]))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 } } + if m.Kind != 0 { + i = encodeVarintGateway(dAtA, i, uint64(m.Kind)) + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } @@ -5371,20 +5078,20 @@ func (m *InitMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x20 } if len(m.Fds) > 0 { - dAtA30 := make([]byte, len(m.Fds)*10) - var j29 int + dAtA27 := make([]byte, len(m.Fds)*10) + var j26 int for _, num := range m.Fds { for num >= 1<<7 { - dAtA30[j29] = uint8(uint64(num)&0x7f | 0x80) + dAtA27[j26] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j29++ + j26++ } - dAtA30[j29] = uint8(num) - j29++ + dAtA27[j26] = uint8(num) + j26++ } - i -= j29 - copy(dAtA[i:], dAtA30[:j29]) - i = encodeVarintGateway(dAtA, i, uint64(j29)) + i -= j26 + copy(dAtA[i:], dAtA27[:j26]) + i = encodeVarintGateway(dAtA, i, uint64(j26)) i-- dAtA[i] = 0x1a } @@ -5808,53 +5515,29 @@ func (m *Attestations) Size() (n int) { return n } -func (m *Attestations_Attestation) Size() (n int) { +func (m *Attestation) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Attestation != nil { - n += m.Attestation.Size() + if m.Kind != 0 { + n += 1 + sovGateway(uint64(m.Kind)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Attestations_Attestation_Intoto) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Intoto != nil { - l = m.Intoto.Size() - n += 1 + l + sovGateway(uint64(l)) - } - return n -} -func (m *InToto) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.PredicateType) + l = len(m.Ref) if l > 0 { n += 1 + l + sovGateway(uint64(l)) } - l = len(m.PredicateRefKey) + l = len(m.Path) if l > 0 { n += 1 + l + sovGateway(uint64(l)) } - l = len(m.PredicatePath) + l = len(m.InTotoPredicateType) if l > 0 { n += 1 + l + sovGateway(uint64(l)) } - if len(m.Subjects) > 0 { - for _, e := range m.Subjects { + if len(m.InTotoSubjects) > 0 { + for _, e := range m.InTotoSubjects { l = e.Size() n += 1 + l + sovGateway(uint64(l)) } @@ -5865,63 +5548,15 @@ func (m *InToto) Size() (n int) { return n } -func (m *InToto_Subject) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Subject != nil { - n += m.Subject.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *InToto_Subject_Self) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Self != nil { - l = m.Self.Size() - n += 1 + l + sovGateway(uint64(l)) - } - return n -} -func (m *InToto_Subject_Raw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Raw != nil { - l = m.Raw.Size() - n += 1 + l + sovGateway(uint64(l)) - } - return n -} -func (m *InToto_Subject_SelfSubject) Size() (n int) { +func (m *InTotoSubject) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *InToto_Subject_RawSubject) Size() (n int) { - if m == nil { - return 0 + if m.Kind != 0 { + n += 1 + sovGateway(uint64(m.Kind)) } - var l int - _ = l if len(m.Digest) > 0 { for _, s := range m.Digest { l = len(s) @@ -7702,7 +7337,7 @@ func (m *Attestations) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Attestation = append(m.Attestation, &Attestations_Attestation{}) + m.Attestation = append(m.Attestation, &Attestation{}) if err := m.Attestation[len(m.Attestation)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -7729,7 +7364,7 @@ func (m *Attestations) Unmarshal(dAtA []byte) error { } return nil } -func (m *Attestations_Attestation) Unmarshal(dAtA []byte) error { +func (m *Attestation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -7759,10 +7394,10 @@ func (m *Attestations_Attestation) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Intoto", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) } - var msglen int + m.Kind = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGateway @@ -7772,81 +7407,14 @@ func (m *Attestations_Attestation) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Kind |= AttestationKind(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &InToto{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Attestation = &Attestations_Attestation_Intoto{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGateway(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGateway - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InToto) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InToto: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InToto: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PredicateType", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7874,11 +7442,11 @@ func (m *InToto) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PredicateType = string(dAtA[iNdEx:postIndex]) + m.Ref = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PredicateRefKey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7906,11 +7474,11 @@ func (m *InToto) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PredicateRefKey = string(dAtA[iNdEx:postIndex]) + m.Path = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PredicatePath", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InTotoPredicateType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7938,11 +7506,11 @@ func (m *InToto) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PredicatePath = string(dAtA[iNdEx:postIndex]) + m.InTotoPredicateType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InTotoSubjects", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7969,8 +7537,8 @@ func (m *InToto) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Subjects = append(m.Subjects, &InToto_Subject{}) - if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.InTotoSubjects = append(m.InTotoSubjects, &InTotoSubject{}) + if err := m.InTotoSubjects[len(m.InTotoSubjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7996,7 +7564,7 @@ func (m *InToto) Unmarshal(dAtA []byte) error { } return nil } -func (m *InToto_Subject) Unmarshal(dAtA []byte) error { +func (m *InTotoSubject) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -8019,17 +7587,17 @@ func (m *InToto_Subject) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Subject: wiretype end group for non-group") + return fmt.Errorf("proto: InTotoSubject: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Subject: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: InTotoSubject: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Self", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) } - var msglen int + m.Kind = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGateway @@ -8039,165 +7607,12 @@ func (m *InToto_Subject) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + m.Kind |= InTotoSubjectKind(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &InToto_Subject_SelfSubject{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Subject = &InToto_Subject_Self{v} - iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGateway - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGateway - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &InToto_Subject_RawSubject{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Subject = &InToto_Subject_Raw{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGateway(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGateway - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InToto_Subject_SelfSubject) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SelfSubject: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SelfSubject: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGateway(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGateway - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InToto_Subject_RawSubject) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGateway - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RawSubject: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RawSubject: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType) } @@ -8229,7 +7644,7 @@ func (m *InToto_Subject_RawSubject) Unmarshal(dAtA []byte) error { } m.Digest = append(m.Digest, github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } diff --git a/frontend/gateway/pb/gateway.proto b/frontend/gateway/pb/gateway.proto index ed0937e247d2..314fa94c09ca 100644 --- a/frontend/gateway/pb/gateway.proto +++ b/frontend/gateway/pb/gateway.proto @@ -65,34 +65,35 @@ message RefMap { } message Attestations { - message Attestation { - oneof Attestation { - InToto intoto = 1; - } - } - repeated Attestation attestation = 1; -} - -message InToto { - string predicateType = 1; - string predicateRefKey = 2; - string predicatePath = 3; - - message Subject { - message SelfSubject { - } - message RawSubject { - repeated string Digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; - string name = 2; - } - oneof Subject { - SelfSubject self = 1; - RawSubject raw = 2; - } - } - repeated Subject subjects = 4; + repeated Attestation attestation = 1; +} + +message Attestation { + AttestationKind kind = 1; + + string ref = 2; + string path = 3; + string inTotoPredicateType = 4; + repeated InTotoSubject inTotoSubjects = 5; } +enum AttestationKind { + option (gogoproto.goproto_enum_prefix) = false; + InToto = 0 [(gogoproto.enumvalue_customname) = "AttestationKindInToto"]; +} + +message InTotoSubject { + InTotoSubjectKind kind = 1; + + repeated string digest = 2 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; + string name = 3; +} + +enum InTotoSubjectKind { + option (gogoproto.goproto_enum_prefix) = false; + Self = 0 [(gogoproto.enumvalue_customname) = "InTotoSubjectKindSelf"]; + Raw = 1 [(gogoproto.enumvalue_customname) = "InTotoSubjectKindRaw"]; +} message ReturnRequest { Result result = 1; diff --git a/solver/pb/caps.go b/solver/pb/caps.go index df863f200eda..3863385fcf3c 100644 --- a/solver/pb/caps.go +++ b/solver/pb/caps.go @@ -449,10 +449,9 @@ func init() { Status: apicaps.CapStatusExperimental, }) - // FIXME: enable once attestations gateway api is stable - // Caps.Init(apicaps.Cap{ - // ID: CapAttestations, - // Enabled: true, - // Status: apicaps.CapStatusExperimental, - // }) + Caps.Init(apicaps.Cap{ + ID: CapAttestations, + Enabled: true, + Status: apicaps.CapStatusExperimental, + }) } diff --git a/solver/result/attestation.go b/solver/result/attestation.go index 2db3dfac468f..51ec1c0bf257 100644 --- a/solver/result/attestation.go +++ b/solver/result/attestation.go @@ -1,47 +1,35 @@ package result import ( + pb "github.com/moby/buildkit/frontend/gateway/pb" digest "github.com/opencontainers/go-digest" ) -type Attestation interface { - isAttestation() -} +type Attestation struct { + Kind pb.AttestationKind -type InTotoAttestation struct { - PredicateType string - PredicateRefKey string - PredicatePath string - Subjects []InTotoSubject -} + Ref string + Path string -func (a *InTotoAttestation) isAttestation() {} - -type InTotoSubject interface { - isInTotoSubject() + InToto InTotoAttestation } -type InTotoSubjectSelf struct{} +type InTotoAttestation struct { + PredicateType string + Subjects []InTotoSubject +} -func (as *InTotoSubjectSelf) isInTotoSubject() {} +type InTotoSubject struct { + Kind pb.InTotoSubjectKind -type InTotoSubjectRaw struct { Name string Digest []digest.Digest } -func (as *InTotoSubjectRaw) isInTotoSubject() {} - -func (as *InTotoSubjectRaw) DigestMap() map[string]string { +func DigestMap(ds ...digest.Digest) map[string]string { m := map[string]string{} - for _, d := range as.Digest { + for _, d := range ds { m[d.Algorithm().String()] = d.Encoded() } return m } - -func DigestToDigestMap(d digest.Digest) map[string]string { - return map[string]string{ - d.Algorithm().String(): d.Encoded(), - } -} diff --git a/solver/result/result.go b/solver/result/result.go index 1fa6c2ff617d..8401ffbc5914 100644 --- a/solver/result/result.go +++ b/solver/result/result.go @@ -39,23 +39,16 @@ func (r *Result[T]) AddRef(k string, ref T) { r.mu.Unlock() } -func (r *Result[T]) AddAttestation(k string, v Attestation, refs map[string]T) { +func (r *Result[T]) AddAttestation(k string, v Attestation, ref T) { r.mu.Lock() if r.Attestations == nil { r.Attestations = map[string][]Attestation{} } - - // if the attestation refs aren't already internal, then insert them - switch v := v.(type) { - case *InTotoAttestation: - if !strings.HasPrefix(v.PredicateRefKey, attestationRefPrefix) { - internalKey := attestationRefPrefix + identity.NewID() - r.Refs[internalKey] = refs[v.PredicateRefKey] - v.PredicateRefKey = internalKey - } + if !strings.HasPrefix(v.Ref, attestationRefPrefix) { + v.Ref = "attestation:" + identity.NewID() + r.Refs[v.Ref] = ref } r.Attestations[k] = append(r.Attestations[k], v) - r.mu.Unlock() }