Update nodeenrollment dep
This commit is contained in:
1 parent
2f06513a3a
commit
0581e164f1
8 files changed
+21
-21
No files matched your search
@@ -91,7 +91,7 @@ require github.com/hashicorp/go-dbw v0.0.0-20220412153211-c470aec9369f // this i
|
||||
|
||||
require (
|
||||
github.com/hashicorp/go-kms-wrapping/extras/kms/v2 v2.0.0-20220512190651-85bdcdd684e6
|
||||
github.com/hashicorp/nodeenrollment v0.0.0-20220513140413-5b932ff6843f
|
||||
github.com/hashicorp/nodeenrollment v0.0.0-20220516125915-9a115b0fb887
|
||||
)
|
||||
|
||||
require (
|
||||
|
||||
@@ -741,8 +741,8 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l
|
||||
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hashicorp/nodeenrollment v0.0.0-20220513140413-5b932ff6843f h1:HZzIMCecyDlRB8uWy/UIIC5RjfdORDKf6bpi0KLhcu0=
|
||||
github.com/hashicorp/nodeenrollment v0.0.0-20220513140413-5b932ff6843f/go.mod h1:8l3RSuZJAibZKnqX6tvLaeoFzPhDf4oCRVsyFjU5Soc=
|
||||
github.com/hashicorp/nodeenrollment v0.0.0-20220516125915-9a115b0fb887 h1:Ov/lPq1YFKt6CLPCriEL21NqMndrJEKNLIZW9qJYpaE=
|
||||
github.com/hashicorp/nodeenrollment v0.0.0-20220516125915-9a115b0fb887/go.mod h1:8l3RSuZJAibZKnqX6tvLaeoFzPhDf4oCRVsyFjU5Soc=
|
||||
github.com/hashicorp/vault/api v1.3.1 h1:pkDkcgTh47PRjY1NEFeofqR4W/HkNUi9qIakESO2aRM=
|
||||
github.com/hashicorp/vault/api v1.3.1/go.mod h1:QeJoWxMFt+MsuWcYhmwRLwKEXrjwAFFywzhptMsTIUw=
|
||||
github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M=
|
||||
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
"github.com/hashicorp/boundary/internal/types/scope"
|
||||
"github.com/hashicorp/go-secure-stdlib/parseutil"
|
||||
"github.com/hashicorp/go-secure-stdlib/strutil"
|
||||
"github.com/hashicorp/nodeenrollment/nodetypes"
|
||||
"github.com/hashicorp/nodeenrollment/types"
|
||||
"github.com/mitchellh/cli"
|
||||
"github.com/posener/complete"
|
||||
"go.uber.org/atomic"
|
||||
@@ -689,7 +689,7 @@ func (c *Command) Run(args []string) int {
|
||||
case <-c.Context.Done():
|
||||
return
|
||||
case <-time.After(time.Second):
|
||||
waitingNodes, err := c.controller.NodeeFileStorage.List(c.Context, (*nodetypes.NodeInformation)(nil))
|
||||
waitingNodes, err := c.controller.NodeeFileStorage.List(c.Context, (*types.NodeInformation)(nil))
|
||||
if err != nil {
|
||||
c.UI.Error(fmt.Errorf("Error listing dev worker for authentication: %w", err).Error())
|
||||
errorEncountered.Store(true)
|
||||
|
||||
@@ -37,8 +37,8 @@ import (
|
||||
"github.com/hashicorp/go-secure-stdlib/mlock"
|
||||
"github.com/hashicorp/go-secure-stdlib/pluginutil/v2"
|
||||
"github.com/hashicorp/nodeenrollment/noderegistration"
|
||||
nodeefile "github.com/hashicorp/nodeenrollment/nodestorage/file"
|
||||
"github.com/hashicorp/nodeenrollment/rotation"
|
||||
nodeefile "github.com/hashicorp/nodeenrollment/storage/file"
|
||||
ua "go.uber.org/atomic"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
@@ -43,7 +43,7 @@ import (
|
||||
"github.com/hashicorp/go-cleanhttp"
|
||||
"github.com/hashicorp/go-secure-stdlib/listenerutil"
|
||||
"github.com/hashicorp/go-secure-stdlib/strutil"
|
||||
"github.com/hashicorp/nodeenrollment/nodetypes"
|
||||
"github.com/hashicorp/nodeenrollment/types"
|
||||
"github.com/mr-tron/base58"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
@@ -573,14 +573,14 @@ func handleNodes(c *Controller) http.Handler {
|
||||
}
|
||||
var err error
|
||||
var currVals vals
|
||||
waitingNodes, err := c.NodeeFileStorage.List(c.baseContext, (*nodetypes.NodeInformation)(nil))
|
||||
waitingNodes, err := c.NodeeFileStorage.List(c.baseContext, (*types.NodeInformation)(nil))
|
||||
if err != nil {
|
||||
_, _ = w.Write([]byte(err.Error()))
|
||||
w.WriteHeader(500)
|
||||
return
|
||||
}
|
||||
for _, keyId := range waitingNodes {
|
||||
ni, err := nodetypes.LoadNodeInformation(c.baseContext, c.NodeeFileStorage, keyId)
|
||||
ni, err := types.LoadNodeInformation(c.baseContext, c.NodeeFileStorage, keyId)
|
||||
if err != nil {
|
||||
_, _ = w.Write([]byte(err.Error()))
|
||||
w.WriteHeader(500)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/hashicorp/nodeenrollment/nodeauth"
|
||||
"github.com/hashicorp/nodeenrollment/noderegistration"
|
||||
"github.com/hashicorp/nodeenrollment/nodetls"
|
||||
"github.com/hashicorp/nodeenrollment/nodetypes"
|
||||
"github.com/hashicorp/nodeenrollment/types"
|
||||
)
|
||||
|
||||
type multihopServiceServer struct {
|
||||
@@ -27,7 +27,7 @@ func NewMultihopServiceServer(
|
||||
|
||||
var _ pbs.MultihopServiceServer = (*multihopServiceServer)(nil)
|
||||
|
||||
func (m *multihopServiceServer) FetchNodeCredentials(ctx context.Context, req *nodetypes.FetchNodeCredentialsRequest) (*nodetypes.FetchNodeCredentialsResponse, error) {
|
||||
func (m *multihopServiceServer) FetchNodeCredentials(ctx context.Context, req *types.FetchNodeCredentialsRequest) (*types.FetchNodeCredentialsResponse, error) {
|
||||
const op = "workers.(multihopServiceServer).FetchNodeCredentials"
|
||||
_, storage, opt, err := m.currentParams()
|
||||
if err != nil {
|
||||
@@ -36,7 +36,7 @@ func (m *multihopServiceServer) FetchNodeCredentials(ctx context.Context, req *n
|
||||
return noderegistration.FetchNodeCredentials(ctx, storage, req, opt...)
|
||||
}
|
||||
|
||||
func (m *multihopServiceServer) GenerateServerCertificates(ctx context.Context, req *nodetypes.GenerateServerCertificatesRequest) (*nodetypes.GenerateServerCertificatesResponse, error) {
|
||||
func (m *multihopServiceServer) GenerateServerCertificates(ctx context.Context, req *types.GenerateServerCertificatesRequest) (*types.GenerateServerCertificatesResponse, error) {
|
||||
const op = "workers.(multihopServiceServer).GenerateServerCertificates"
|
||||
_, storage, opt, err := m.currentParams()
|
||||
if err != nil {
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
nodee "github.com/hashicorp/nodeenrollment"
|
||||
"github.com/hashicorp/nodeenrollment/multihop"
|
||||
"github.com/hashicorp/nodeenrollment/nodeauth"
|
||||
"github.com/hashicorp/nodeenrollment/nodetypes"
|
||||
"github.com/hashicorp/nodeenrollment/types"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
@@ -83,9 +83,9 @@ func (w *Worker) configureForWorker(ln *base.ServerListener, logger *log.Logger)
|
||||
fetchCredsFn := func(
|
||||
ctx context.Context,
|
||||
_ nodee.Storage,
|
||||
req *nodetypes.FetchNodeCredentialsRequest,
|
||||
req *types.FetchNodeCredentialsRequest,
|
||||
_ ...nodee.Option,
|
||||
) (*nodetypes.FetchNodeCredentialsResponse, error) {
|
||||
) (*types.FetchNodeCredentialsResponse, error) {
|
||||
client := w.controllerMultihopConn.Load()
|
||||
if client == nil {
|
||||
return nil, nodeauth.NewTempError(errors.New("error fetching controller connection, client is nil"))
|
||||
@@ -100,9 +100,9 @@ func (w *Worker) configureForWorker(ln *base.ServerListener, logger *log.Logger)
|
||||
generateServerCertificatesFn := func(
|
||||
ctx context.Context,
|
||||
_ nodee.Storage,
|
||||
req *nodetypes.GenerateServerCertificatesRequest,
|
||||
req *types.GenerateServerCertificatesRequest,
|
||||
_ ...nodee.Option,
|
||||
) (*nodetypes.GenerateServerCertificatesResponse, error) {
|
||||
) (*types.GenerateServerCertificatesResponse, error) {
|
||||
client := w.controllerMultihopConn.Load()
|
||||
if client == nil {
|
||||
return nil, nodeauth.NewTempError(errors.New("error fetching controller connection, client is nil"))
|
||||
|
||||
@@ -28,8 +28,8 @@ import (
|
||||
"github.com/hashicorp/go-secure-stdlib/mlock"
|
||||
nodee "github.com/hashicorp/nodeenrollment"
|
||||
"github.com/hashicorp/nodeenrollment/nodeauth"
|
||||
nodeefile "github.com/hashicorp/nodeenrollment/nodestorage/file"
|
||||
"github.com/hashicorp/nodeenrollment/nodetypes"
|
||||
nodeefile "github.com/hashicorp/nodeenrollment/storage/file"
|
||||
"github.com/hashicorp/nodeenrollment/types"
|
||||
ua "go.uber.org/atomic"
|
||||
"google.golang.org/grpc/resolver"
|
||||
"google.golang.org/grpc/resolver/manual"
|
||||
@@ -181,12 +181,12 @@ func (w *Worker) Start() error {
|
||||
|
||||
var err error
|
||||
w.NodeeFileStorage, err = nodeefile.NewFileStorage(w.baseContext,
|
||||
nodeefile.WithFileStorageBaseDirectory(w.conf.RawConfig.Worker.StoragePath))
|
||||
nodeefile.WithBaseDirectory(w.conf.RawConfig.Worker.StoragePath))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var nodeCreds nodetypes.NodeCredentials
|
||||
var nodeCreds types.NodeCredentials
|
||||
if err := nodeCreds.GenerateRegistrationParameters(w.baseContext, w.NodeeFileStorage); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user