Sync against current library state

pull/2087/head
Jeff Mitchell 4 years ago
parent 2ecd550e27
commit 1f550722a2

@ -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-20220516125915-9a115b0fb887
github.com/hashicorp/nodeenrollment v0.0.0-20220519180751-27ee40a67a33
)
require (

@ -743,6 +743,10 @@ 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-20220516125915-9a115b0fb887 h1:Ov/lPq1YFKt6CLPCriEL21NqMndrJEKNLIZW9qJYpaE=
github.com/hashicorp/nodeenrollment v0.0.0-20220516125915-9a115b0fb887/go.mod h1:8l3RSuZJAibZKnqX6tvLaeoFzPhDf4oCRVsyFjU5Soc=
github.com/hashicorp/nodeenrollment v0.0.0-20220519052605-83a44d379ae6 h1:NrZnIV4TYGDymhzcx/xNIe02obXSrJsPJrPm+OZdXug=
github.com/hashicorp/nodeenrollment v0.0.0-20220519052605-83a44d379ae6/go.mod h1:8l3RSuZJAibZKnqX6tvLaeoFzPhDf4oCRVsyFjU5Soc=
github.com/hashicorp/nodeenrollment v0.0.0-20220519180751-27ee40a67a33 h1:kVIAR0iBLc224QqU4l9QQuJBN8MuEjanc7rHzuCIUVM=
github.com/hashicorp/nodeenrollment v0.0.0-20220519180751-27ee40a67a33/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=

@ -36,7 +36,7 @@ import (
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-secure-stdlib/mlock"
"github.com/hashicorp/go-secure-stdlib/pluginutil/v2"
"github.com/hashicorp/nodeenrollment/noderegistration"
"github.com/hashicorp/nodeenrollment/registration"
"github.com/hashicorp/nodeenrollment/rotation"
nodeefile "github.com/hashicorp/nodeenrollment/storage/file"
ua "go.uber.org/atomic"
@ -407,5 +407,5 @@ func (c *Controller) WorkerStatusUpdateTimes() *sync.Map {
}
func (c *Controller) AuthorizeNodeeWorker(keyId string) error {
return noderegistration.AuthorizeNode(c.baseContext, c.NodeeFileStorage, keyId)
return registration.AuthorizeNode(c.baseContext, c.NodeeFileStorage, keyId)
}

@ -6,8 +6,8 @@ import (
pbs "github.com/hashicorp/nodeenrollment/multihop"
"github.com/hashicorp/nodeenrollment/nodeauth"
"github.com/hashicorp/nodeenrollment/noderegistration"
"github.com/hashicorp/nodeenrollment/nodetls"
"github.com/hashicorp/nodeenrollment/registration"
"github.com/hashicorp/nodeenrollment/tls"
"github.com/hashicorp/nodeenrollment/types"
)
@ -33,7 +33,7 @@ func (m *multihopServiceServer) FetchNodeCredentials(ctx context.Context, req *t
if err != nil {
return nil, fmt.Errorf("%s: error getting current parameters: %w", op, err)
}
return noderegistration.FetchNodeCredentials(ctx, storage, req, opt...)
return registration.FetchNodeCredentials(ctx, storage, req, opt...)
}
func (m *multihopServiceServer) GenerateServerCertificates(ctx context.Context, req *types.GenerateServerCertificatesRequest) (*types.GenerateServerCertificatesResponse, error) {
@ -42,5 +42,5 @@ func (m *multihopServiceServer) GenerateServerCertificates(ctx context.Context,
if err != nil {
return nil, fmt.Errorf("%s: error getting current parameters: %w", op, err)
}
return nodetls.GenerateServerCertificates(ctx, storage, req, opt...)
return tls.GenerateServerCertificates(ctx, storage, req, opt...)
}

@ -186,9 +186,9 @@ func (w *Worker) Start() error {
return err
}
var nodeCreds types.NodeCredentials
if err := nodeCreds.GenerateRegistrationParameters(w.baseContext, w.NodeeFileStorage); err != nil {
return err
nodeCreds, err := types.NewNodeCredentials(w.baseContext, w.NodeeFileStorage)
if err != nil {
return fmt.Errorf("error generating new node creds: %w", err)
}
w.NodeeKeyId, err = nodee.KeyIdFromPkix(nodeCreds.CertificatePublicKeyPkix)
if err != nil {

Loading…
Cancel
Save