sourcepolicy: Add support for frontend policies

Allows frontends to pass in a list of policies in the solve request.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff
2022-12-02 17:45:30 +00:00
committed by Tonis Tiigi
parent 6e89b21e21
commit 7a08c9dbdf
11 changed files with 369 additions and 231 deletions

View File

@@ -47,7 +47,9 @@ import (
"github.com/moby/buildkit/solver/errdefs"
"github.com/moby/buildkit/solver/pb"
"github.com/moby/buildkit/solver/result"
"github.com/moby/buildkit/sourcepolicy"
sourcepolicypb "github.com/moby/buildkit/sourcepolicy/pb"
spb "github.com/moby/buildkit/sourcepolicy/pb"
"github.com/moby/buildkit/util/attestation"
binfotypes "github.com/moby/buildkit/util/buildinfo/types"
"github.com/moby/buildkit/util/contentutil"
@@ -8581,4 +8583,50 @@ func testSourcePolicy(t *testing.T, sb integration.Sandbox) {
}
})
}
t.Run("Frontend policies", func(t *testing.T) {
denied := "https://raw.githubusercontent.com/moby/buildkit/v0.10.1/README.md"
frontend := func(ctx context.Context, c gateway.Client) (*gateway.Result, error) {
st := llb.Image("busybox:1.34.1-uclibc").File(
llb.Copy(llb.HTTP(denied),
"README.md", "README.md"))
def, err := st.Marshal(sb.Context())
if err != nil {
return nil, err
}
return c.Solve(ctx, gateway.SolveRequest{
Definition: def.ToPB(),
SourcePolicies: []*spb.Policy{{
Rules: []*spb.Rule{
{
Action: spb.PolicyAction_DENY,
Source: &spb.Source{
Type: "http",
Identifier: denied,
},
},
},
}},
})
}
_, err = c.Build(sb.Context(), SolveOpt{}, "", frontend, nil)
require.ErrorContains(t, err, sourcepolicy.ErrSourceDenied.Error())
// Override frontend policy
_, err = c.Build(sb.Context(), SolveOpt{
SourcePolicy: &sourcepolicypb.Policy{
Rules: []*sourcepolicypb.Rule{
{
Action: sourcepolicypb.PolicyAction_ALLOW,
Source: &sourcepolicypb.Source{
Type: "http",
Identifier: denied,
},
},
},
},
}, "", frontend, nil)
require.NoError(t, err)
})
}

View File

@@ -8,6 +8,7 @@ import (
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/solver/pb"
"github.com/moby/buildkit/solver/result"
spb "github.com/moby/buildkit/sourcepolicy/pb"
"github.com/moby/buildkit/util/apicaps"
digest "github.com/opencontainers/go-digest"
ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
@@ -128,6 +129,7 @@ type SolveRequest struct {
FrontendOpt map[string]string
FrontendInputs map[string]*pb.Definition
CacheImports []CacheOptionsEntry
SourcePolicies []*spb.Policy
}
type CacheOptionsEntry struct {

View File

@@ -62,6 +62,7 @@ func (c *bridgeClient) Solve(ctx context.Context, req client.SolveRequest) (*cli
FrontendOpt: req.FrontendOpt,
FrontendInputs: req.FrontendInputs,
CacheImports: req.CacheImports,
SourcePolicies: req.SourcePolicies,
}, c.sid)
if err != nil {
return nil, c.wrapSolveError(err)

View File

@@ -629,6 +629,7 @@ func (lbf *llbBridgeForwarder) Solve(ctx context.Context, req *pb.SolveRequest)
FrontendOpt: req.FrontendOpt,
FrontendInputs: req.FrontendInputs,
CacheImports: cacheImports,
SourcePolicies: req.SourcePolicies,
}, lbf.sid)
if err != nil {
return nil, lbf.wrapSolveError(err)

View File

@@ -382,6 +382,7 @@ func (c *grpcClient) Solve(ctx context.Context, creq client.SolveRequest) (res *
AllowResultReturn: true,
AllowResultArrayRef: true,
CacheImports: cacheImports,
SourcePolicies: creq.SourcePolicies,
}
// backwards compatibility with inline return

View File

@@ -11,7 +11,8 @@ import (
proto "github.com/gogo/protobuf/proto"
types1 "github.com/moby/buildkit/api/types"
pb "github.com/moby/buildkit/solver/pb"
pb1 "github.com/moby/buildkit/util/apicaps/pb"
pb1 "github.com/moby/buildkit/sourcepolicy/pb"
pb2 "github.com/moby/buildkit/util/apicaps/pb"
github_com_opencontainers_go_digest "github.com/opencontainers/go-digest"
types "github.com/tonistiigi/fsutil/types"
grpc "google.golang.org/grpc"
@@ -893,6 +894,7 @@ type SolveRequest struct {
// apicaps:CapFrontendInputs
FrontendInputs map[string]*pb.Definition `protobuf:"bytes,13,rep,name=FrontendInputs,proto3" json:"FrontendInputs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Evaluate bool `protobuf:"varint,14,opt,name=Evaluate,proto3" json:"Evaluate,omitempty"`
SourcePolicies []*pb1.Policy `protobuf:"bytes,15,rep,name=SourcePolicies,proto3" json:"SourcePolicies,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -1001,6 +1003,13 @@ func (m *SolveRequest) GetEvaluate() bool {
return false
}
func (m *SolveRequest) GetSourcePolicies() []*pb1.Policy {
if m != nil {
return m.SourcePolicies
}
return nil
}
// CacheOptionsEntry corresponds to the control.CacheOptionsEntry
type CacheOptionsEntry struct {
Type string `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"`
@@ -1617,8 +1626,8 @@ func (m *PingRequest) XXX_DiscardUnknown() {
var xxx_messageInfo_PingRequest proto.InternalMessageInfo
type PongResponse struct {
FrontendAPICaps []pb1.APICap `protobuf:"bytes,1,rep,name=FrontendAPICaps,proto3" json:"FrontendAPICaps"`
LLBCaps []pb1.APICap `protobuf:"bytes,2,rep,name=LLBCaps,proto3" json:"LLBCaps"`
FrontendAPICaps []pb2.APICap `protobuf:"bytes,1,rep,name=FrontendAPICaps,proto3" json:"FrontendAPICaps"`
LLBCaps []pb2.APICap `protobuf:"bytes,2,rep,name=LLBCaps,proto3" json:"LLBCaps"`
Workers []*types1.WorkerRecord `protobuf:"bytes,3,rep,name=Workers,proto3" json:"Workers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -1658,14 +1667,14 @@ func (m *PongResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_PongResponse proto.InternalMessageInfo
func (m *PongResponse) GetFrontendAPICaps() []pb1.APICap {
func (m *PongResponse) GetFrontendAPICaps() []pb2.APICap {
if m != nil {
return m.FrontendAPICaps
}
return nil
}
func (m *PongResponse) GetLLBCaps() []pb1.APICap {
func (m *PongResponse) GetLLBCaps() []pb2.APICap {
if m != nil {
return m.LLBCaps
}
@@ -2618,158 +2627,161 @@ func init() {
func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) }
var fileDescriptor_f1a937782ebbded5 = []byte{
// 2409 bytes of a gzipped FileDescriptorProto
// 2452 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x59, 0xcf, 0x6f, 0x1b, 0xc7,
0xf5, 0xd7, 0x8a, 0x94, 0x44, 0x3e, 0xfe, 0x10, 0x3d, 0x71, 0xf2, 0x65, 0x16, 0x81, 0x23, 0xaf,
0x13, 0x45, 0x56, 0x1c, 0xd2, 0x5f, 0xda, 0x81, 0x5c, 0xbb, 0x75, 0x62, 0xfd, 0x82, 0x18, 0x4b,
0x36, 0x3b, 0x72, 0xe1, 0x22, 0x48, 0x81, 0xae, 0xb8, 0x43, 0x7a, 0xeb, 0xd5, 0xee, 0x76, 0x77,
0x68, 0x59, 0xc9, 0xa5, 0xbd, 0x15, 0x39, 0xf5, 0xd4, 0x5b, 0x50, 0xa0, 0x05, 0x7a, 0x6e, 0x2f,
0xbd, 0xb5, 0xe7, 0x00, 0xbd, 0xf4, 0xdc, 0x43, 0x50, 0xf8, 0x1f, 0xe8, 0xad, 0x40, 0x6f, 0xc5,
0x9b, 0x99, 0x25, 0x87, 0x3f, 0xb4, 0x24, 0xeb, 0x13, 0x67, 0xde, 0xbc, 0x1f, 0x33, 0xef, 0xcd,
0x7b, 0xef, 0x33, 0x4b, 0x28, 0x75, 0x6d, 0xce, 0xce, 0xec, 0xf3, 0x5a, 0x18, 0x05, 0x3c, 0x20,
0x6f, 0x9f, 0x06, 0x27, 0xe7, 0xb5, 0x93, 0x9e, 0xeb, 0x39, 0xcf, 0x5d, 0x5e, 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, 0x99, 0x39, 0x9b, 0x89, 0xf5, 0x15, 0xac, 0x52, 0x66, 0x3b, 0xfb, 0xae,
0xc7, 0x2e, 0xae, 0x99, 0x98, 0xad, 0xae, 0xc7, 0x5a, 0x08, 0x25, 0x92, 0x6c, 0x55, 0x73, 0x72,
0x17, 0x96, 0xa8, 0xed, 0x77, 0x99, 0x32, 0xfd, 0x5e, 0x8a, 0x69, 0x61, 0x04, 0x79, 0xa9, 0x14,
0xb1, 0xee, 0x41, 0xbe, 0x4f, 0xc3, 0x5a, 0xf3, 0xb8, 0xd3, 0x89, 0x99, 0xac, 0x5b, 0x19, 0xaa,
0x66, 0x48, 0x3f, 0x64, 0x7e, 0x57, 0x99, 0xce, 0x50, 0x35, 0xb3, 0xd6, 0x11, 0x7f, 0x27, 0x3b,
0x57, 0xae, 0x21, 0x90, 0xdd, 0x45, 0xbc, 0x65, 0x88, 0x04, 0x13, 0x63, 0xcb, 0xc1, 0x26, 0x68,
0x3b, 0xbb, 0x6e, 0x74, 0xf1, 0x01, 0xab, 0xb0, 0xb2, 0xeb, 0x46, 0xda, 0xf9, 0x92, 0x29, 0x59,
0xc7, 0xf6, 0xd8, 0xf6, 0x7a, 0x0e, 0x9e, 0x96, 0xb3, 0xc8, 0x57, 0x7d, 0x60, 0x84, 0x6a, 0x7d,
0x22, 0xfd, 0x28, 0xac, 0xa8, 0xcd, 0xdc, 0x80, 0x15, 0xe6, 0xf3, 0xc8, 0x65, 0x49, 0x0f, 0x25,
0x35, 0xf9, 0x34, 0xad, 0x89, 0xa7, 0xa9, 0xe8, 0xd5, 0x34, 0x61, 0xb1, 0xb6, 0x60, 0x15, 0x09,
0xe9, 0x81, 0x20, 0x90, 0xd5, 0x36, 0x29, 0xc6, 0xd6, 0x5d, 0xa8, 0x0c, 0x04, 0x95, 0xe9, 0x75,
0xc8, 0x22, 0x98, 0x54, 0x85, 0x78, 0x92, 0x5d, 0xb1, 0x6e, 0x5d, 0x83, 0xd5, 0x24, 0x5b, 0x2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, 0x0a, 0x69, 0x7c, 0x0e, 0x4b, 0x02, 0x1e, 0x93, 0x0f, 0x66,
0x7c, 0xd6, 0x98, 0x1b, 0xd3, 0x19, 0x95, 0xee, 0x36, 0xe4, 0x12, 0x88, 0x49, 0x36, 0x53, 0xb7,
0x37, 0x84, 0xa0, 0xcd, 0x0f, 0x67, 0xe2, 0x55, 0x46, 0x7e, 0x0a, 0x2b, 0x0a, 0x39, 0x92, 0xeb,
0x53, 0xe4, 0x06, 0x18, 0xd6, 0xdc, 0x9c, 0x85, 0x75, 0x70, 0x8c, 0x04, 0x21, 0xa6, 0x1e, 0x63,
0x04, 0x7f, 0xa6, 0x1e, 0x63, 0x0c, 0x72, 0xb6, 0x07, 0x0f, 0xc1, 0x54, 0x23, 0x23, 0x78, 0x33,
0xd5, 0xc8, 0x28, 0xec, 0x24, 0x4f, 0x21, 0x8b, 0xb0, 0x93, 0xa4, 0x95, 0x5f, 0x0d, 0x97, 0x9a,
0x69, 0x77, 0x62, 0x08, 0xaf, 0xfe, 0x04, 0xdb, 0x94, 0x78, 0xf3, 0xa7, 0x37, 0x28, 0xed, 0x13,
0x9e, 0x79, 0x7d, 0x06, 0xce, 0x81, 0x7a, 0xf5, 0x5e, 0xde, 0x98, 0xe1, 0x3b, 0xda, 0x74, 0xf5,
0x23, 0x5f, 0xec, 0x02, 0x28, 0xea, 0xe8, 0x83, 0xd4, 0x52, 0x44, 0x27, 0x00, 0x37, 0xb3, 0x3e,
0x33, 0xbf, 0x32, 0xf8, 0x15, 0xbe, 0xbd, 0x86, 0x91, 0x09, 0x69, 0xa4, 0xba, 0x63, 0x22, 0x06,
0x32, 0x6f, 0xcd, 0x25, 0xa3, 0x8c, 0xdb, 0x12, 0xf9, 0x28, 0x74, 0x43, 0xd2, 0x1b, 0x79, 0x1f,
0x21, 0x99, 0x33, 0xf2, 0x6d, 0x18, 0x37, 0x0d, 0xbc, 0x67, 0x88, 0x78, 0x53, 0x75, 0x6b, 0x4f,
0x81, 0xd4,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x91, 0x19, 0x8e, 0x91, 0x18, 0xc8, 0xbc, 0x3d, 0x95, 0x8c,
0x32, 0xee, 0x48, 0xe4, 0xa3, 0xd0, 0x0d, 0xc9, 0xbe, 0xc8, 0xbb, 0x08, 0xc9, 0x9c, 0x90, 0x6f,
0xcd, 0xb8, 0x65, 0xe0, 0x39, 0x43, 0xc4, 0x9b, 0xa9, 0x5b, 0x7b, 0x0a, 0x64, 0x9e, 0x33, 0x1d,
0x3a, 0x6f, 0x95, 0xbe, 0x7d, 0x73, 0xc5, 0xf8, 0xfb, 0x9b, 0x2b, 0xc6, 0x3f, 0xdf, 0x5c, 0x31,
0x4e, 0x0a, 0xe2, 0x7f, 0xce, 0xdb, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x91, 0xe5, 0xca,
0x70, 0x1e, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -4122,6 +4134,20 @@ func (m *SolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.SourcePolicies) > 0 {
for iNdEx := len(m.SourcePolicies) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.SourcePolicies[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGateway(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x7a
}
}
if m.Evaluate {
i--
if m.Evaluate {
@@ -6015,6 +6041,12 @@ func (m *SolveRequest) Size() (n int) {
if m.Evaluate {
n += 2
}
if len(m.SourcePolicies) > 0 {
for _, e := range m.SourcePolicies {
l = e.Size()
n += 1 + l + sovGateway(uint64(l))
}
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
@@ -9408,6 +9440,40 @@ func (m *SolveRequest) Unmarshal(dAtA []byte) error {
}
}
m.Evaluate = bool(v != 0)
case 15:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SourcePolicies", 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
}
m.SourcePolicies = append(m.SourcePolicies, &pb1.Policy{})
if err := m.SourcePolicies[len(m.SourcePolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGateway(dAtA[iNdEx:])
@@ -10761,7 +10827,7 @@ func (m *PongResponse) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.FrontendAPICaps = append(m.FrontendAPICaps, pb1.APICap{})
m.FrontendAPICaps = append(m.FrontendAPICaps, pb2.APICap{})
if err := m.FrontendAPICaps[len(m.FrontendAPICaps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -10795,7 +10861,7 @@ func (m *PongResponse) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.LLBCaps = append(m.LLBCaps, pb1.APICap{})
m.LLBCaps = append(m.LLBCaps, pb2.APICap{})
if err := m.LLBCaps[len(m.LLBCaps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}

View File

@@ -8,6 +8,7 @@ import "github.com/moby/buildkit/solver/pb/ops.proto";
import "github.com/moby/buildkit/api/types/worker.proto";
import "github.com/moby/buildkit/util/apicaps/pb/caps.proto";
import "github.com/tonistiigi/fsutil/types/stat.proto";
import "github.com/moby/buildkit/sourcepolicy/pb/policy.proto";
option (gogoproto.sizer_all) = true;
@@ -149,6 +150,8 @@ message SolveRequest {
map<string, pb.Definition> FrontendInputs = 13;
bool Evaluate = 14;
repeated moby.buildkit.v1.sourcepolicy.Policy SourcePolicies = 15;
}
// CacheOptionsEntry corresponds to the control.CacheOptionsEntry

View File

@@ -21,6 +21,7 @@ import (
"github.com/moby/buildkit/solver/llbsolver/provenance"
"github.com/moby/buildkit/solver/pb"
"github.com/moby/buildkit/sourcepolicy"
spb "github.com/moby/buildkit/sourcepolicy/pb"
"github.com/moby/buildkit/util/bklog"
"github.com/moby/buildkit/util/flightcontrol"
"github.com/moby/buildkit/util/progress"
@@ -63,7 +64,7 @@ func (b *llbBridge) Warn(ctx context.Context, dgst digest.Digest, msg string, op
})
}
func (b *llbBridge) loadResult(ctx context.Context, def *pb.Definition, cacheImports []gw.CacheOptionsEntry) (solver.CachedResultWithProvenance, error) {
func (b *llbBridge) loadResult(ctx context.Context, def *pb.Definition, cacheImports []gw.CacheOptionsEntry, pol []*spb.Policy) (solver.CachedResultWithProvenance, error) {
w, err := b.resolveWorker()
if err != nil {
return nil, err
@@ -77,8 +78,12 @@ func (b *llbBridge) loadResult(ctx context.Context, def *pb.Definition, cacheImp
return nil, err
}
var polEngine SourcePolicyEvaluator
if srcPol != nil {
polEngine = sourcepolicy.NewEngine(srcPol, sourcepolicy.MatcherFn(sourcepolicy.Match), sourcepolicy.MutateFn(sourcepolicy.Mutate))
if srcPol != nil || len(pol) > 0 {
if srcPol != nil {
pol = append([]*spb.Policy{srcPol}, pol...)
}
polEngine = sourcepolicy.NewEngine(pol, sourcepolicy.MatcherFn(sourcepolicy.Match), sourcepolicy.MutateFn(sourcepolicy.Mutate))
if err != nil {
return nil, err
}
@@ -219,7 +224,7 @@ func (rp *resultProxy) wrapError(err error) error {
}
func (rp *resultProxy) loadResult(ctx context.Context) (solver.CachedResultWithProvenance, error) {
res, err := rp.b.loadResult(ctx, rp.req.Definition, rp.req.CacheImports)
res, err := rp.b.loadResult(ctx, rp.req.Definition, rp.req.CacheImports, rp.req.SourcePolicies)
var ee *llberrdefs.ExecError
if errors.As(err, &ee) {
ee.EachRef(func(res solver.Result) error {

View File

@@ -26,7 +26,7 @@ import (
"github.com/moby/buildkit/solver"
"github.com/moby/buildkit/solver/llbsolver/provenance"
"github.com/moby/buildkit/solver/result"
sourcepolicypb "github.com/moby/buildkit/sourcepolicy/pb"
spb "github.com/moby/buildkit/sourcepolicy/pb"
"github.com/moby/buildkit/util/attestation"
"github.com/moby/buildkit/util/buildinfo"
"github.com/moby/buildkit/util/compression"
@@ -385,7 +385,7 @@ func (s *Solver) recordBuildHistory(ctx context.Context, id string, req frontend
}, nil
}
func (s *Solver) Solve(ctx context.Context, id string, sessionID string, req frontend.SolveRequest, exp ExporterRequest, ent []entitlements.Entitlement, post []Processor, internal bool, srcPol *sourcepolicypb.Policy) (_ *client.SolveResponse, err error) {
func (s *Solver) Solve(ctx context.Context, id string, sessionID string, req frontend.SolveRequest, exp ExporterRequest, ent []entitlements.Entitlement, post []Processor, internal bool, srcPol *spb.Policy) (_ *client.SolveResponse, err error) {
j, err := s.solver.NewJob(id)
if err != nil {
return nil, err
@@ -953,10 +953,10 @@ func loadEntitlements(b solver.Builder) (entitlements.Set, error) {
return ent, nil
}
func loadSourcePolicy(b solver.Builder) (*sourcepolicypb.Policy, error) {
set := make(map[sourcepolicypb.Rule]struct{}, 0)
func loadSourcePolicy(b solver.Builder) (*spb.Policy, error) {
set := make(map[spb.Rule]struct{}, 0)
err := b.EachValue(context.TODO(), keySourcePolicy, func(v interface{}) error {
x, ok := v.(sourcepolicypb.Policy)
x, ok := v.(spb.Policy)
if !ok {
return errors.Errorf("invalid source policy %T", v)
}
@@ -968,9 +968,9 @@ func loadSourcePolicy(b solver.Builder) (*sourcepolicypb.Policy, error) {
if err != nil {
return nil, err
}
var srcPol *sourcepolicypb.Policy
var srcPol *spb.Policy
if len(set) > 0 {
srcPol = &sourcepolicypb.Policy{}
srcPol = &spb.Policy{}
for k := range set {
k := k
srcPol.Rules = append(srcPol.Rules, &k)

View File

@@ -25,14 +25,14 @@ var (
// Rule matching is delegated to the `Matcher` interface.
// Mutations are delegated to the `Mutater` interface.
type Engine struct {
pol *spb.Policy
pol []*spb.Policy
matcher Matcher
mutater Mutater
sources map[string]*Source
}
// NewEngine creates a new source policy engine.
func NewEngine(pol *spb.Policy, matcher Matcher, mutater Mutater) *Engine {
func NewEngine(pol []*spb.Policy, matcher Matcher, mutater Mutater) *Engine {
if matcher == nil {
matcher = DefaultMatcher
}
@@ -71,7 +71,7 @@ func (e *Engine) source(src *spb.Source) *Source {
//
// An error is returned when the source is denied by the policy.
func (e *Engine) Evaluate(ctx context.Context, op *pb.Op) (bool, error) {
if len(e.pol.Rules) == 0 {
if len(e.pol) == 0 {
return false, nil
}
@@ -94,7 +94,7 @@ func (e *Engine) Evaluate(ctx context.Context, op *pb.Op) (bool, error) {
ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("orig", *srcOp).WithField("updated", op.GetSource()))
}
mut, err := e.evaluateRules(ctx, srcOp, &st)
mut, err := e.evaluatePolicies(ctx, srcOp, &st)
if mut {
mutated = true
}
@@ -109,7 +109,7 @@ func (e *Engine) Evaluate(ctx context.Context, op *pb.Op) (bool, error) {
return mutated, nil
}
func (e *Engine) evaluateRules(ctx context.Context, srcOp *pb.SourceOp, st *evalState) (bool, error) {
func (e *Engine) evaluatePolicies(ctx context.Context, srcOp *pb.SourceOp, st *evalState) (bool, error) {
ident := srcOp.GetIdentifier()
scheme, ref, found := strings.Cut(ident, "://")
if !found || ref == "" {
@@ -121,13 +121,20 @@ func (e *Engine) evaluateRules(ctx context.Context, srcOp *pb.SourceOp, st *eval
"ref": ref,
}))
for _, rule := range e.pol.Rules {
mut, err := e.evaluateRule(ctx, rule, scheme, ref, srcOp, st)
if err != nil {
return false, err
for _, pol := range e.pol {
mut, err := e.evaluatePolicy(ctx, pol, srcOp, st, scheme, ref)
if mut || err != nil {
return mut, err
}
if mut {
return true, nil
}
return false, nil
}
func (e *Engine) evaluatePolicy(ctx context.Context, pol *spb.Policy, srcOp *pb.SourceOp, st *evalState, scheme, ref string) (bool, error) {
for _, rule := range pol.Rules {
mut, err := e.evaluateRule(ctx, rule, scheme, ref, srcOp, st)
if mut || err != nil {
return mut, err
}
}
return false, nil

View File

@@ -26,39 +26,41 @@ func TestEngineEvaluate(t *testing.T) {
}
func testConvertMultiple(t *testing.T) {
pol := &spb.Policy{
Rules: []*spb.Rule{
{
Action: spb.PolicyAction_CONVERT,
Source: &spb.Source{
Type: "docker-image",
Identifier: "docker.io/library/busybox:latest",
pol := []*spb.Policy{
{
Rules: []*spb.Rule{
{
Action: spb.PolicyAction_CONVERT,
Source: &spb.Source{
Type: "docker-image",
Identifier: "docker.io/library/busybox:latest",
},
Destination: &spb.Destination{
Type: "docker-image",
Identifier: "docker.io/library/alpine:latest",
},
},
Destination: &spb.Destination{
Type: "docker-image",
Identifier: "docker.io/library/alpine:latest",
{
Action: spb.PolicyAction_CONVERT,
Source: &spb.Source{
Type: "docker-image",
Identifier: "docker.io/library/alpine:latest",
},
Destination: &spb.Destination{
Type: "docker-image",
Identifier: "docker.io/library/debian:buster",
},
},
},
{
Action: spb.PolicyAction_CONVERT,
Source: &spb.Source{
Type: "docker-image",
Identifier: "docker.io/library/alpine:latest",
},
Destination: &spb.Destination{
Type: "docker-image",
Identifier: "docker.io/library/debian:buster",
},
},
{
Action: spb.PolicyAction_CONVERT,
Source: &spb.Source{
Type: "docker-image",
Identifier: "docker.io/library/debian:buster",
},
Destination: &spb.Destination{
Type: "docker-image",
Identifier: "docker.io/library/debian:bullseye",
{
Action: spb.PolicyAction_CONVERT,
Source: &spb.Source{
Type: "docker-image",
Identifier: "docker.io/library/debian:buster",
},
Destination: &spb.Destination{
Type: "docker-image",
Identifier: "docker.io/library/debian:bullseye",
},
},
},
},
@@ -81,18 +83,20 @@ func testConvertMultiple(t *testing.T) {
}
func testConvertWildcard(t *testing.T) {
pol := &spb.Policy{
Rules: []*spb.Rule{
{
Action: spb.PolicyAction_CONVERT,
Source: &spb.Source{
Type: "docker-image",
Identifier: `docker.io/library/golang:*`,
MatchType: spb.MatchType_WILDCARD,
},
Destination: &spb.Destination{
Type: "docker-image",
Identifier: "fakereg.io/library/golang:${1}",
pol := []*spb.Policy{
{
Rules: []*spb.Rule{
{
Action: spb.PolicyAction_CONVERT,
Source: &spb.Source{
Type: "docker-image",
Identifier: `docker.io/library/golang:*`,
MatchType: spb.MatchType_WILDCARD,
},
Destination: &spb.Destination{
Type: "docker-image",
Identifier: "fakereg.io/library/golang:${1}",
},
},
},
},
@@ -142,7 +146,7 @@ func testConvertRegex(t *testing.T) {
}
ctx := context.Background()
e := NewEngine(pol, nil, nil)
e := NewEngine([]*spb.Policy{pol}, nil, nil)
mutated, err := e.Evaluate(ctx, op)
require.True(t, mutated)
@@ -175,7 +179,7 @@ func testConvertHTTP(t *testing.T) {
}
ctx := context.Background()
e := NewEngine(pol, nil, nil)
e := NewEngine([]*spb.Policy{pol}, nil, nil)
mutated, err := e.Evaluate(ctx, op)
require.True(t, mutated)
@@ -220,7 +224,7 @@ func testConvertLoop(t *testing.T) {
}
ctx := context.Background()
e := NewEngine(pol, nil, nil)
e := NewEngine([]*spb.Policy{pol}, nil, nil)
mutated, err := e.Evaluate(ctx, op)
require.True(t, mutated)
@@ -274,7 +278,7 @@ func testAllowConvertDeny(t *testing.T) {
}
ctx := context.Background()
e := NewEngine(pol, nil, nil)
e := NewEngine([]*spb.Policy{pol}, nil, nil)
mutated, err := e.Evaluate(ctx, op)
require.True(t, mutated)
@@ -315,7 +319,7 @@ func testConvertDeny(t *testing.T) {
}
ctx := context.Background()
e := NewEngine(pol, nil, nil)
e := NewEngine([]*spb.Policy{pol}, nil, nil)
mutated, err := e.Evaluate(ctx, op)
require.True(t, mutated)
@@ -359,7 +363,7 @@ func testConvert(t *testing.T) {
}
ctx := context.Background()
e := NewEngine(pol, nil, nil)
e := NewEngine([]*spb.Policy{pol}, nil, nil)
mutated, err := e.Evaluate(ctx, op)
require.True(t, mutated)
@@ -397,7 +401,7 @@ func testAllowDeny(t *testing.T) {
}
ctx := context.Background()
e := NewEngine(pol, nil, nil)
e := NewEngine([]*spb.Policy{pol}, nil, nil)
mutated, err := e.Evaluate(ctx, op)
require.False(t, mutated)
@@ -437,7 +441,7 @@ func testDenyAll(t *testing.T) {
},
}
e := NewEngine(pol, nil, nil)
e := NewEngine([]*spb.Policy{pol}, nil, nil)
ctx := context.Background()
op := &pb.Op{