提交 ac4040fb 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!64 bugfix: fix build-arg can not be properly read

Merge pull request !64 from DCCooper/bugfix
...@@ -78,6 +78,8 @@ type BuildRequest struct { ...@@ -78,6 +78,8 @@ type BuildRequest struct {
CapAddList []string `protobuf:"bytes,11,rep,name=capAddList,proto3" json:"capAddList,omitempty"` CapAddList []string `protobuf:"bytes,11,rep,name=capAddList,proto3" json:"capAddList,omitempty"`
// entityID is an id to descript a physic building // entityID is an id to descript a physic building
EntityID string `protobuf:"bytes,12,opt,name=entityID,proto3" json:"entityID,omitempty"` EntityID string `protobuf:"bytes,12,opt,name=entityID,proto3" json:"entityID,omitempty"`
// encrypted indicated the build args are encrypted
Encrypted bool `protobuf:"varint,13,opt,name=encrypted,proto3" json:"encrypted,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -191,6 +193,13 @@ func (m *BuildRequest) GetEntityID() string { ...@@ -191,6 +193,13 @@ func (m *BuildRequest) GetEntityID() string {
return "" return ""
} }
func (m *BuildRequest) GetEncrypted() bool {
if m != nil {
return m.Encrypted
}
return false
}
type ImportRequest struct { type ImportRequest struct {
// reference is reference of the import image // reference is reference of the import image
Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"` Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"`
...@@ -1524,94 +1533,95 @@ func init() { ...@@ -1524,94 +1533,95 @@ func init() {
func init() { proto.RegisterFile("api/services/control.proto", fileDescriptor_d71ef680555cb937) } func init() { proto.RegisterFile("api/services/control.proto", fileDescriptor_d71ef680555cb937) }
var fileDescriptor_d71ef680555cb937 = []byte{ var fileDescriptor_d71ef680555cb937 = []byte{
// 1394 bytes of a gzipped FileDescriptorProto // 1410 bytes of a gzipped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db, 0x5d, 0x41, 0x1f, 0x27, 0x74, 0x4f, 0x10,
0xbf, 0xa4, 0x13, 0x22, 0x76, 0x27, 0x2c, 0x95, 0x9c, 0xc5, 0xc3, 0x8c, 0x33, 0xc9, 0xd0, 0x26, 0x7e, 0x49, 0x67, 0x44, 0xec, 0xcd, 0x58, 0x2c, 0x39, 0x0b, 0x47, 0x09, 0x67, 0x92, 0xa1, 0x1e,
0x15, 0x79, 0x8c, 0x87, 0xaf, 0x72, 0x1a, 0x4f, 0x87, 0x97, 0xf7, 0x7a, 0x37, 0x22, 0xc6, 0xa2, 0x15, 0x69, 0x88, 0x47, 0xaf, 0x52, 0x1a, 0xce, 0x47, 0x97, 0xf7, 0xfa, 0x37, 0x02, 0xc6, 0x82,
0x98, 0xec, 0x6a, 0xee, 0xab, 0xfc, 0x7c, 0x97, 0x24, 0x99, 0x9c, 0x15, 0xc2, 0xbd, 0xdb, 0x8b, 0x90, 0xec, 0x69, 0xee, 0xab, 0xf4, 0x7c, 0x8f, 0x44, 0x89, 0x5c, 0x64, 0xc2, 0xfd, 0xdb, 0xab,
0x4c, 0x49, 0x13, 0x22, 0x24, 0x4e, 0xb2, 0x42, 0x20, 0xf8, 0xdd, 0x85, 0xee, 0xa1, 0x32, 0x15, 0x4c, 0x49, 0x23, 0x22, 0x24, 0x8e, 0x92, 0x4c, 0xc0, 0xfb, 0xdb, 0x86, 0xce, 0x91, 0x52, 0xe5,
0x92, 0x5f, 0x72, 0x22, 0x24, 0xda, 0x81, 0x75, 0x6d, 0xfa, 0x6c, 0x96, 0x11, 0xdf, 0xe9, 0x3b, 0x93, 0x5f, 0x52, 0x22, 0x24, 0xda, 0x85, 0x2d, 0xad, 0x7a, 0xba, 0x48, 0x88, 0x6b, 0x0d, 0xac,
0x83, 0xf5, 0xb0, 0x02, 0x90, 0x0f, 0xab, 0x9a, 0x18, 0x1d, 0xfb, 0x2d, 0xcd, 0xb3, 0x24, 0xba, 0xe1, 0x96, 0x5f, 0x02, 0xc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 0xd4, 0x6f, 0xff, 0xaa, 0x2c, 0xd7, 0xce, 0x57, 0xbb, 0xdc, 0xab,
0x96, 0x96, 0xfe, 0xe2, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe1, 0xbf, 0x3d, 0x15, 0x87, 0x0e,
0x00, 0x00, 0x00, 0x00,
} }
......
...@@ -71,6 +71,8 @@ message BuildRequest { ...@@ -71,6 +71,8 @@ message BuildRequest {
repeated string capAddList = 11; repeated string capAddList = 11;
// entityID is an id to descript a physic building // entityID is an id to descript a physic building
string entityID = 12; string entityID = 12;
// encrypted indicated the build args are encrypted
bool encrypted = 13;
} }
message ImportRequest { message ImportRequest {
......
...@@ -100,7 +100,7 @@ func NewBuilder(ctx context.Context, store store.Store, req *pb.BuildRequest, ru ...@@ -100,7 +100,7 @@ func NewBuilder(ctx context.Context, store store.Store, req *pb.BuildRequest, ru
rsaKey: key, rsaKey: key,
} }
args, err := b.parseBuildArgs(req.GetBuildArgs()) args, err := b.parseBuildArgs(req.GetBuildArgs(), req.GetEncrypted())
if err != nil { if err != nil {
return nil, errors.Wrap(err, "parse build-arg failed") return nil, errors.Wrap(err, "parse build-arg failed")
} }
...@@ -193,11 +193,10 @@ func (b *Builder) Logger() *logrus.Entry { ...@@ -193,11 +193,10 @@ func (b *Builder) Logger() *logrus.Entry {
return logrus.WithField(util.LogKeySessionID, b.ctx.Value(util.LogFieldKey(util.LogKeySessionID))) return logrus.WithField(util.LogKeySessionID, b.ctx.Value(util.LogFieldKey(util.LogKeySessionID)))
} }
func (b *Builder) parseBuildArgs(buildArgs []string) (map[string]string, error) { func (b *Builder) parseBuildArgs(buildArgs []string, encrypted bool) (map[string]string, error) {
args := make(map[string]string, len(buildArgs)) args := make(map[string]string, len(buildArgs))
errKey := b.rsaKey.Validate()
for _, arg := range buildArgs { for _, arg := range buildArgs {
if errKey == nil { if encrypted {
v, err := util.DecryptRSA(arg, b.rsaKey, crypto.SHA512) v, err := util.DecryptRSA(arg, b.rsaKey, crypto.SHA512)
if err != nil { if err != nil {
return nil, err return nil, err
......
...@@ -1238,11 +1238,11 @@ func TestParseRequestBuildArgs(t *testing.T) { ...@@ -1238,11 +1238,11 @@ func TestParseRequestBuildArgs(t *testing.T) {
assert.NilError(t, encErr) assert.NilError(t, encErr)
args = append(args, encryptedArg) args = append(args, encryptedArg)
} }
argsParsed, err = b.parseBuildArgs(args) argsParsed, err = b.parseBuildArgs(args, tt.decrypt)
b.buildOpts.BuildArgs = argsParsed b.buildOpts.BuildArgs = argsParsed
} else { } else {
b.rsaKey = &rsa.PrivateKey{} b.rsaKey = &rsa.PrivateKey{}
argsParsed, err = b.parseBuildArgs(tt.buildArgs) argsParsed, err = b.parseBuildArgs(tt.buildArgs, tt.decrypt)
b.buildOpts.BuildArgs = argsParsed b.buildOpts.BuildArgs = argsParsed
} }
......
...@@ -266,6 +266,7 @@ func parseStaticBuildOpts() (*pb.BuildStatic, time.Time, error) { ...@@ -266,6 +266,7 @@ func parseStaticBuildOpts() (*pb.BuildStatic, time.Time, error) {
func runBuild(ctx context.Context, cli Cli) (string, error) { func runBuild(ctx context.Context, cli Cli) (string, error) {
var ( var (
isIsulad bool isIsulad bool
encrypted bool
buildResp *pb.BuildResponse buildResp *pb.BuildResponse
err error err error
content string content string
...@@ -287,7 +288,7 @@ func runBuild(ctx context.Context, cli Cli) (string, error) { ...@@ -287,7 +288,7 @@ func runBuild(ctx context.Context, cli Cli) (string, error) {
if content, digest, err = readDockerfile(); err != nil { if content, digest, err = readDockerfile(); err != nil {
return "", err return "", err
} }
if err = encryptBuildArgs(util.DefaultRSAKeyPath); err != nil { if encrypted, err = encryptBuildArgs(util.DefaultRSAKeyPath); err != nil {
return "", errors.Wrap(err, "encrypt --build-arg failed") return "", errors.Wrap(err, "encrypt --build-arg failed")
} }
imageIDFilePath, err = getAbsPath(buildOpts.imageIDFile) imageIDFilePath, err = getAbsPath(buildOpts.imageIDFile)
...@@ -315,6 +316,7 @@ func runBuild(ctx context.Context, cli Cli) (string, error) { ...@@ -315,6 +316,7 @@ func runBuild(ctx context.Context, cli Cli) (string, error) {
BuildStatic: buildStatic, BuildStatic: buildStatic,
Iidfile: buildOpts.imageIDFile, Iidfile: buildOpts.imageIDFile,
AdditionalTag: buildOpts.additionalTag, AdditionalTag: buildOpts.additionalTag,
Encrypted: encrypted,
}) })
if err != nil { if err != nil {
return "", err return "", err
...@@ -358,7 +360,7 @@ func runBuild(ctx context.Context, cli Cli) (string, error) { ...@@ -358,7 +360,7 @@ func runBuild(ctx context.Context, cli Cli) (string, error) {
} }
// encrypts those sensitive args before transporting via GRPC // encrypts those sensitive args before transporting via GRPC
func encryptBuildArgs(path string) error { func encryptBuildArgs(path string) (bool, error) {
var hasSensiArg bool var hasSensiArg bool
for _, v := range buildOpts.buildArgs { for _, v := range buildOpts.buildArgs {
const kvNums = 2 const kvNums = 2
...@@ -370,12 +372,12 @@ func encryptBuildArgs(path string) error { ...@@ -370,12 +372,12 @@ func encryptBuildArgs(path string) error {
} }
} }
if !hasSensiArg { if !hasSensiArg {
return nil return hasSensiArg, nil
} }
key, err := util.ReadPublicKey(path) key, err := util.ReadPublicKey(path)
if err != nil { if err != nil {
return err return hasSensiArg, err
} }
const possibleArgCaps = 10 const possibleArgCaps = 10
...@@ -383,13 +385,13 @@ func encryptBuildArgs(path string) error { ...@@ -383,13 +385,13 @@ func encryptBuildArgs(path string) error {
for _, v := range buildOpts.buildArgs { for _, v := range buildOpts.buildArgs {
encryptedArg, encErr := util.EncryptRSA(v, key, sha512.New()) encryptedArg, encErr := util.EncryptRSA(v, key, sha512.New())
if encErr != nil { if encErr != nil {
return encErr return hasSensiArg, encErr
} }
args = append(args, encryptedArg) args = append(args, encryptedArg)
} }
buildOpts.buildArgs = args buildOpts.buildArgs = args
return nil return hasSensiArg, nil
} }
func runStatus(ctx context.Context, cli Cli) error { func runStatus(ctx context.Context, cli Cli) error {
......
...@@ -511,7 +511,7 @@ func TestEncryptBuildArgs(t *testing.T) { ...@@ -511,7 +511,7 @@ func TestEncryptBuildArgs(t *testing.T) {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {
buildOpts.buildArgs = tt.args buildOpts.buildArgs = tt.args
buildOpts.encryptKey = "" buildOpts.encryptKey = ""
if err := encryptBuildArgs(keyPath); (err == nil) != (!tt.err) { if _, err := encryptBuildArgs(keyPath); (err == nil) != (!tt.err) {
t.FailNow() t.FailNow()
} }
if tt.encrypt { if tt.encrypt {
......
...@@ -132,7 +132,7 @@ func TestRunnerRun(t *testing.T) { ...@@ -132,7 +132,7 @@ func TestRunnerRun(t *testing.T) {
runner := NewOCIRunner(&OCIRunOpts{ runner := NewOCIRunner(&OCIRunOpts{
Ctx: context.Background(), Ctx: context.Background(),
Spec: spec, Spec: spec,
RuntimePath: "", RuntimePath: "/aaaaa",
BundlePath: bundlePath, BundlePath: bundlePath,
NoPivot: false, NoPivot: false,
Output: cliLog, Output: cliLog,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册