Update usage of shared-secure-libs (#1393)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2021-07-12 21:06:22 -04:00
1 parent a0c0d17c1d
commit 2cbcf9a563
91 files changed
+137 -1429

No files matched your search

-1
View File
@@ -56,5 +56,4 @@ func TestEventFlags_Validate(t *testing.T) {
require.NoError(err)
})
}
}
+1 -1
View File
@@ -13,7 +13,7 @@ import (
"github.com/hashicorp/boundary/internal/kms"
"github.com/hashicorp/boundary/internal/target"
"github.com/hashicorp/boundary/internal/types/scope"
"github.com/hashicorp/vault/sdk/helper/base62"
"github.com/hashicorp/shared-secure-libs/base62"
)
func (b *Server) CreateInitialLoginRole(ctx context.Context) (*iam.Role, error) {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"strings"
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/vault/sdk/helper/logging"
"github.com/hashicorp/shared-secure-libs/logging"
)
func ProcessLogLevelAndFormat(flagLogLevel, flagLogFormat, configLogLevel, configLogFormat string) (hclog.Level, logging.LogFormat, error) {
+5 -9
View File
@@ -25,18 +25,16 @@ import (
"github.com/hashicorp/boundary/internal/kms"
"github.com/hashicorp/boundary/internal/observability/event"
"github.com/hashicorp/boundary/internal/types/scope"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/boundary/version"
"github.com/hashicorp/errwrap"
"github.com/hashicorp/go-hclog"
wrapping "github.com/hashicorp/go-kms-wrapping"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/shared-secure-libs/configutil"
"github.com/hashicorp/shared-secure-libs/gatedwriter"
"github.com/hashicorp/shared-secure-libs/logging"
"github.com/hashicorp/shared-secure-libs/mlock"
"github.com/hashicorp/shared-secure-libs/reloadutil"
"github.com/hashicorp/vault/sdk/helper/logging"
"github.com/hashicorp/vault/sdk/helper/mlock"
"github.com/hashicorp/vault/sdk/logical"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/jinzhu/gorm"
"github.com/mitchellh/cli"
"google.golang.org/grpc/grpclog"
@@ -465,10 +463,8 @@ func (b *Server) SetupKMSes(ui cli.Ui, config *config.Config) error {
wrapper, wrapperConfigError := configutil.ConfigureWrapper(kms, &b.InfoKeys, &b.Info, kmsLogger)
kms.Purpose = origPurpose
if wrapperConfigError != nil {
if !errwrap.ContainsType(wrapperConfigError, new(logical.KeyNotFoundError)) {
return fmt.Errorf(
"Error parsing KMS configuration: %s", wrapperConfigError)
}
return fmt.Errorf(
"Error parsing KMS configuration: %s", wrapperConfigError)
}
if wrapper == nil {
return fmt.Errorf(
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/accounts"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"github.com/hashicorp/boundary/api"
"github.com/hashicorp/boundary/api/accounts"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/vault/sdk/helper/password"
"github.com/hashicorp/shared-secure-libs/password"
"github.com/hashicorp/shared-secure-libs/strutil"
)
func init() {
@@ -9,7 +9,7 @@ import (
"github.com/hashicorp/boundary/api/accounts"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -9,7 +9,7 @@ import (
"github.com/hashicorp/boundary/api/accounts"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -7,8 +7,8 @@ import (
"github.com/hashicorp/boundary/api/accounts"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/vault/sdk/helper/password"
"github.com/hashicorp/shared-secure-libs/password"
"github.com/hashicorp/shared-secure-libs/strutil"
)
func init() {
@@ -9,7 +9,7 @@ import (
"github.com/hashicorp/boundary/api"
"github.com/hashicorp/boundary/api/authmethods"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/vault/sdk/helper/password"
"github.com/hashicorp/shared-secure-libs/password"
"github.com/mitchellh/cli"
"github.com/mitchellh/go-wordwrap"
"github.com/posener/complete"
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/authmethods"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -9,7 +9,7 @@ import (
"github.com/hashicorp/boundary/api/authmethods"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -9,7 +9,7 @@ import (
"github.com/hashicorp/boundary/api/authmethods"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/authtokens"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"github.com/hashicorp/boundary/api"
"github.com/hashicorp/boundary/api/authtokens"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
)
const selfFlag = "self"
+1 -1
View File
@@ -26,7 +26,7 @@ import (
targetspb "github.com/hashicorp/boundary/internal/gen/controller/api/resources/targets"
"github.com/hashicorp/boundary/internal/proxy"
"github.com/hashicorp/go-cleanhttp"
"github.com/hashicorp/vault/sdk/helper/base62"
"github.com/hashicorp/shared-secure-libs/base62"
"github.com/mitchellh/cli"
"github.com/mr-tron/base58"
"github.com/posener/complete"
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/credentiallibraries"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -9,7 +9,7 @@ import (
"github.com/hashicorp/boundary/api/credentiallibraries"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/credentialstores"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -9,7 +9,7 @@ import (
"github.com/hashicorp/boundary/api/credentialstores"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/sdk/wrapper"
wrapping "github.com/hashicorp/go-kms-wrapping"
"github.com/hashicorp/shared-secure-libs/configutil"
"github.com/hashicorp/vault/sdk/helper/mlock"
"github.com/hashicorp/shared-secure-libs/mlock"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"github.com/hashicorp/boundary/sdk/wrapper"
wrapping "github.com/hashicorp/go-kms-wrapping"
"github.com/hashicorp/shared-secure-libs/configutil"
"github.com/hashicorp/vault/sdk/helper/mlock"
"github.com/hashicorp/shared-secure-libs/mlock"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
+1 -1
View File
@@ -19,8 +19,8 @@ import (
"github.com/hashicorp/boundary/internal/servers/worker"
"github.com/hashicorp/boundary/internal/target"
"github.com/hashicorp/boundary/internal/types/scope"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/configutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/groups"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/hostcatalogs"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -9,7 +9,7 @@ import (
"github.com/hashicorp/boundary/api/hostcatalogs"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/hosts"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -9,7 +9,7 @@ import (
"github.com/hashicorp/boundary/api/hosts"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/hostsets"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -9,7 +9,7 @@ import (
"github.com/hashicorp/boundary/api/hostsets"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/managedgroups"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -9,7 +9,7 @@ import (
"github.com/hashicorp/boundary/api/managedgroups"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/roles"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/scopes"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
+1 -1
View File
@@ -23,7 +23,7 @@ import (
wrapping "github.com/hashicorp/go-kms-wrapping"
"github.com/hashicorp/go-multierror"
"github.com/hashicorp/shared-secure-libs/configutil"
"github.com/hashicorp/vault/sdk/helper/mlock"
"github.com/hashicorp/shared-secure-libs/mlock"
"github.com/mitchellh/cli"
"github.com/posener/complete"
"go.uber.org/atomic"
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/sessions"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
+1 -1
View File
@@ -14,7 +14,7 @@ import (
"github.com/hashicorp/boundary/globals"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/credential"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/go-wordwrap"
"github.com/posener/complete"
)
@@ -11,7 +11,7 @@ import (
"github.com/hashicorp/boundary/api/targets"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
@@ -9,7 +9,7 @@ import (
"github.com/hashicorp/boundary/api/targets"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"github.com/hashicorp/boundary/api/users"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)
+2 -2
View File
@@ -12,11 +12,11 @@ import (
"time"
"github.com/hashicorp/boundary/internal/observability/event"
"github.com/hashicorp/boundary/sdk/strutil"
wrapping "github.com/hashicorp/go-kms-wrapping"
"github.com/hashicorp/hcl"
"github.com/hashicorp/shared-secure-libs/configutil"
"github.com/hashicorp/vault/sdk/helper/parseutil"
"github.com/hashicorp/shared-secure-libs/parseutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/mapstructure"
)
-1
View File
@@ -421,6 +421,5 @@ func TestController_EventingConfig(t *testing.T) {
assert.NotEmpty(c)
assert.Equal(tt.wantEventerConfig, c.Eventing)
})
}
}
+2 -2
View File
@@ -8,7 +8,7 @@ import (
"path/filepath"
"text/template"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/iancoleman/strcase"
)
@@ -90,7 +90,7 @@ import (
"github.com/hashicorp/boundary/api/{{ .Pkg }}"
"github.com/hashicorp/boundary/internal/cmd/base"
"github.com/hashicorp/boundary/internal/cmd/common"
"github.com/hashicorp/boundary/sdk/strutil"
"github.com/hashicorp/shared-secure-libs/strutil"
"github.com/mitchellh/cli"
"github.com/posener/complete"
)