Skip to content

Commit c5d6a35

Browse files
dependabot[bot]cpanato
authored andcommitted
Bump github.com/hashicorp/go-plugin from 1.4.3 to 1.4.4 (sigstore#1843)
* Bump github.com/hashicorp/go-plugin from 1.4.3 to 1.4.4 Bumps [github.com/hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) from 1.4.3 to 1.4.4. - [Release notes](https://github.com/hashicorp/go-plugin/releases) - [Changelog](https://github.com/hashicorp/go-plugin/blob/master/CHANGELOG.md) - [Commits](hashicorp/go-plugin@v1.4.3...v1.4.4) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * update codegen Signed-off-by: cpanato <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: cpanato <[email protected]>
1 parent e43944d commit c5d6a35

File tree

7 files changed

+26
-12
lines changed

7 files changed

+26
-12
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ require (
7474
github.com/hashicorp/go-hclog v1.2.0
7575
github.com/hashicorp/go-immutable-radix v1.3.1
7676
github.com/hashicorp/go-multierror v1.1.1
77-
github.com/hashicorp/go-plugin v1.4.3
77+
github.com/hashicorp/go-plugin v1.4.4
7878
github.com/hashicorp/go-secure-stdlib/mlock v0.1.2
7979
github.com/hashicorp/go-secure-stdlib/strutil v0.1.2
8080
github.com/hashicorp/go-sockaddr v1.0.2

go.sum

+2-1
Original file line numberDiff line numberDiff line change
@@ -1323,8 +1323,9 @@ github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHh
13231323
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
13241324
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
13251325
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
1326-
github.com/hashicorp/go-plugin v1.4.3 h1:DXmvivbWD5qdiBts9TpBC7BYL1Aia5sxbRgQB+v6UZM=
13271326
github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ=
1327+
github.com/hashicorp/go-plugin v1.4.4 h1:NVdrSdFRt3SkZtNckJ6tog7gbpRrcbOjQi/rgF7JYWQ=
1328+
github.com/hashicorp/go-plugin v1.4.4/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s=
13281329
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
13291330
github.com/hashicorp/go-retryablehttp v0.6.4/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
13301331
github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=

third_party/VENDOR-LICENSE/github.com/hashicorp/go-plugin/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
`go-plugin` is a Go (golang) plugin system over RPC. It is the plugin system
44
that has been in use by HashiCorp tooling for over 4 years. While initially
55
created for [Packer](https://www.packer.io), it is additionally in use by
6-
[Terraform](https://www.terraform.io), [Nomad](https://www.nomadproject.io), and
7-
[Vault](https://www.vaultproject.io).
6+
[Terraform](https://www.terraform.io), [Nomad](https://www.nomadproject.io),
7+
[Vault](https://www.vaultproject.io), and
8+
[Boundary](https://www.boundaryproject.io).
89

910
While the plugin system is over RPC, it is currently only designed to work
1011
over a local [reliable] network. Plugins over a real network are not supported

third_party/VENDOR-LICENSE/github.com/hashicorp/go-plugin/client.go

+10-5
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,8 @@ func (c *Client) Start() (addr net.Addr, err error) {
574574

575575
c.config.TLSConfig = &tls.Config{
576576
Certificates: []tls.Certificate{cert},
577+
ClientAuth: tls.RequireAndVerifyClientCert,
578+
MinVersion: tls.VersionTLS12,
577579
ServerName: "localhost",
578580
}
579581
}
@@ -629,17 +631,19 @@ func (c *Client) Start() (addr net.Addr, err error) {
629631
// Wait for the command to end.
630632
err := cmd.Wait()
631633

632-
debugMsgArgs := []interface{}{
634+
msgArgs := []interface{}{
633635
"path", path,
634636
"pid", pid,
635637
}
636638
if err != nil {
637-
debugMsgArgs = append(debugMsgArgs,
639+
msgArgs = append(msgArgs,
638640
[]interface{}{"error", err.Error()}...)
641+
c.logger.Error("plugin process exited", msgArgs...)
642+
} else {
643+
// Log and make sure to flush the logs right away
644+
c.logger.Info("plugin process exited", msgArgs...)
639645
}
640646

641-
// Log and make sure to flush the logs write away
642-
c.logger.Debug("plugin process exited", debugMsgArgs...)
643647
os.Stderr.Sync()
644648

645649
// Set that we exited, which takes a lock
@@ -774,7 +778,7 @@ func (c *Client) Start() (addr net.Addr, err error) {
774778
}
775779

776780
// loadServerCert is used by AutoMTLS to read an x.509 cert returned by the
777-
// server, and load it as the RootCA for the client TLSConfig.
781+
// server, and load it as the RootCA and ClientCA for the client TLSConfig.
778782
func (c *Client) loadServerCert(cert string) error {
779783
certPool := x509.NewCertPool()
780784

@@ -791,6 +795,7 @@ func (c *Client) loadServerCert(cert string) error {
791795
certPool.AddCert(x509Cert)
792796

793797
c.config.TLSConfig.RootCAs = certPool
798+
c.config.TLSConfig.ClientCAs = certPool
794799
return nil
795800
}
796801

third_party/VENDOR-LICENSE/github.com/hashicorp/go-plugin/process_posix.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !windows
12
// +build !windows
23

34
package plugin

third_party/VENDOR-LICENSE/github.com/hashicorp/go-plugin/rpc_server.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ func (s *RPCServer) Serve(lis net.Listener) {
4545
for {
4646
conn, err := lis.Accept()
4747
if err != nil {
48-
log.Printf("[ERR] plugin: plugin server: %s", err)
48+
severity := "ERR"
49+
if errors.Is(err, net.ErrClosed) {
50+
severity = "DEBUG"
51+
}
52+
log.Printf("[%s] plugin: plugin server: %s", severity, err)
4953
return
5054
}
5155

third_party/VENDOR-LICENSE/github.com/hashicorp/go-plugin/server.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -304,13 +304,13 @@ func Serve(opts *ServeConfig) {
304304

305305
certPEM, keyPEM, err := generateCert()
306306
if err != nil {
307-
logger.Error("failed to generate client certificate", "error", err)
307+
logger.Error("failed to generate server certificate", "error", err)
308308
panic(err)
309309
}
310310

311311
cert, err := tls.X509KeyPair(certPEM, keyPEM)
312312
if err != nil {
313-
logger.Error("failed to parse client certificate", "error", err)
313+
logger.Error("failed to parse server certificate", "error", err)
314314
panic(err)
315315
}
316316

@@ -319,6 +319,8 @@ func Serve(opts *ServeConfig) {
319319
ClientAuth: tls.RequireAndVerifyClientCert,
320320
ClientCAs: clientCertPool,
321321
MinVersion: tls.VersionTLS12,
322+
RootCAs: clientCertPool,
323+
ServerName: "localhost",
322324
}
323325

324326
// We send back the raw leaf cert data for the client rather than the

0 commit comments

Comments
 (0)