Run go fmt (#7823)
This commit is contained in:
parent
c92e9036e3
commit
59e526614d
|
@ -73,7 +73,7 @@ At least one must exist in the Common Name. Supports globbing.`,
|
|||
Description: `A comma-separated list of DNS names.
|
||||
At least one must exist in the SANs. Supports globbing.`,
|
||||
DisplayAttrs: &framework.DisplayAttributes{
|
||||
Name: "Allowed DNS SANs",
|
||||
Name: "Allowed DNS SANs",
|
||||
Group: "Constraints",
|
||||
},
|
||||
},
|
||||
|
@ -83,7 +83,7 @@ At least one must exist in the SANs. Supports globbing.`,
|
|||
Description: `A comma-separated list of Email Addresses.
|
||||
At least one must exist in the SANs. Supports globbing.`,
|
||||
DisplayAttrs: &framework.DisplayAttributes{
|
||||
Name: "Allowed Email SANs",
|
||||
Name: "Allowed Email SANs",
|
||||
Group: "Constraints",
|
||||
},
|
||||
},
|
||||
|
@ -93,7 +93,7 @@ At least one must exist in the SANs. Supports globbing.`,
|
|||
Description: `A comma-separated list of URIs.
|
||||
At least one must exist in the SANs. Supports globbing.`,
|
||||
DisplayAttrs: &framework.DisplayAttributes{
|
||||
Name: "Allowed URI SANs",
|
||||
Name: "Allowed URI SANs",
|
||||
Group: "Constraints",
|
||||
},
|
||||
},
|
||||
|
|
|
@ -71,9 +71,9 @@ func TestCFEndToEnd(t *testing.T) {
|
|||
// Configure a CA certificate like a Vault operator would in setting up CF.
|
||||
if _, err := client.Logical().Write("auth/cf/config", map[string]interface{}{
|
||||
"identity_ca_certificates": testCFCerts.CACertificate,
|
||||
"cf_api_addr": mockCFAPI.URL,
|
||||
"cf_username": cfAPI.AuthUsername,
|
||||
"cf_password": cfAPI.AuthPassword,
|
||||
"cf_api_addr": mockCFAPI.URL,
|
||||
"cf_username": cfAPI.AuthUsername,
|
||||
"cf_password": cfAPI.AuthPassword,
|
||||
}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
@ -259,10 +259,10 @@ func (c *AuthEnableCommand) Run(args []string) int {
|
|||
}
|
||||
|
||||
authOpts := &api.EnableAuthOptions{
|
||||
Type: authType,
|
||||
Description: c.flagDescription,
|
||||
Local: c.flagLocal,
|
||||
SealWrap: c.flagSealWrap,
|
||||
Type: authType,
|
||||
Description: c.flagDescription,
|
||||
Local: c.flagLocal,
|
||||
SealWrap: c.flagSealWrap,
|
||||
ExternalEntropyAccess: c.flagExternalEntropyAccess,
|
||||
Config: api.AuthConfigInput{
|
||||
DefaultLeaseTTL: c.flagDefaultLeaseTTL.String(),
|
||||
|
|
|
@ -6,7 +6,6 @@ import (
|
|||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"go.uber.org/atomic"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
|
@ -54,6 +53,7 @@ import (
|
|||
"github.com/mitchellh/cli"
|
||||
"github.com/mitchellh/go-testing-interface"
|
||||
"github.com/posener/complete"
|
||||
"go.uber.org/atomic"
|
||||
"golang.org/x/net/http/httpproxy"
|
||||
"google.golang.org/api/option"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
|
|
|
@ -11,7 +11,7 @@ func TestLoadConfigFile(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestLoadConfigFile_topLevel(t *testing.T) {
|
||||
testLoadConfigFile_topLevel(t,nil)
|
||||
testLoadConfigFile_topLevel(t, nil)
|
||||
}
|
||||
|
||||
func TestLoadConfigFile_json(t *testing.T) {
|
||||
|
@ -19,7 +19,7 @@ func TestLoadConfigFile_json(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestLoadConfigFile_json2(t *testing.T) {
|
||||
testLoadConfigFile_json2(t,nil)
|
||||
testLoadConfigFile_json2(t, nil)
|
||||
}
|
||||
|
||||
func TestLoadConfigDir(t *testing.T) {
|
||||
|
@ -34,6 +34,6 @@ func TestParseListeners(t *testing.T) {
|
|||
testParseListeners(t)
|
||||
}
|
||||
|
||||
func TestParseEntropy(t *testing.T){
|
||||
testParseEntropy(t,true)
|
||||
func TestParseEntropy(t *testing.T) {
|
||||
testParseEntropy(t, true)
|
||||
}
|
|
@ -222,7 +222,7 @@ func testParseEntropy(t *testing.T, oss bool) {
|
|||
case err != test.outErr:
|
||||
t.Fatalf("error mismatch: expected %#v got %#v", err, test.outErr)
|
||||
case err == nil && config.Entropy != nil && *config.Entropy != test.outEntropy:
|
||||
fmt.Printf("\n config.Entropy: %#v",config.Entropy)
|
||||
fmt.Printf("\n config.Entropy: %#v", config.Entropy)
|
||||
t.Fatalf("entropy config mismatch: expected %#v got %#v", test.outEntropy, *config.Entropy)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"github.com/hashicorp/hcl/hcl/ast"
|
||||
)
|
||||
|
||||
var(
|
||||
var (
|
||||
parseEntropy = parseEntropyOSS
|
||||
)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ func configureSeal(configSeal *server.Seal, infoKeys *[]string, info *map[string
|
|||
return configureAzureKeyVaultSeal(configSeal, infoKeys, info, logger, inseal)
|
||||
|
||||
case seal.OCIKMS:
|
||||
return configureOCIKMSSeal(configSeal, infoKeys, info, logger, inseal)
|
||||
return configureOCIKMSSeal(configSeal, infoKeys, info, logger, inseal)
|
||||
|
||||
case seal.Transit:
|
||||
return configureTransitSeal(configSeal, infoKeys, info, logger, inseal)
|
||||
|
|
|
@ -2,11 +2,12 @@ package ldap
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/vault/helper/testhelpers/docker"
|
||||
"github.com/hashicorp/vault/sdk/helper/ldaputil"
|
||||
"github.com/ory/dockertest"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func PrepareTestContainer(t *testing.T, version string) (cleanup func(), cfg *ldaputil.ConfigEntry) {
|
||||
|
|
|
@ -2,16 +2,16 @@ package teststorage
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/hashicorp/vault/helper/testhelpers"
|
||||
"github.com/hashicorp/vault/physical/raft"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
realtesting "testing"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/vault/helper/testhelpers"
|
||||
"github.com/hashicorp/vault/helper/testhelpers/consul"
|
||||
physConsul "github.com/hashicorp/vault/physical/consul"
|
||||
"github.com/hashicorp/vault/physical/raft"
|
||||
"github.com/hashicorp/vault/sdk/physical"
|
||||
physFile "github.com/hashicorp/vault/sdk/physical/file"
|
||||
"github.com/hashicorp/vault/sdk/physical/inmem"
|
||||
|
|
|
@ -6,7 +6,6 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/NYTimes/gziphandler"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
|
@ -17,6 +16,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/NYTimes/gziphandler"
|
||||
assetfs "github.com/elazarl/go-bindata-assetfs"
|
||||
"github.com/hashicorp/errwrap"
|
||||
"github.com/hashicorp/go-cleanhttp"
|
||||
|
|
|
@ -269,8 +269,8 @@ func TestSysMounts_headerAuth(t *testing.T) {
|
|||
"auth": nil,
|
||||
"data": map[string]interface{}{
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -282,8 +282,8 @@ func TestSysMounts_headerAuth(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -296,8 +296,8 @@ func TestSysMounts_headerAuth(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -309,8 +309,8 @@ func TestSysMounts_headerAuth(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -323,8 +323,8 @@ func TestSysMounts_headerAuth(t *testing.T) {
|
|||
},
|
||||
},
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -336,8 +336,8 @@ func TestSysMounts_headerAuth(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -350,8 +350,8 @@ func TestSysMounts_headerAuth(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -363,8 +363,8 @@ func TestSysMounts_headerAuth(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
|
|
@ -27,8 +27,8 @@ func TestSysAuth(t *testing.T) {
|
|||
"auth": nil,
|
||||
"data": map[string]interface{}{
|
||||
"token/": map[string]interface{}{
|
||||
"description": "token based credentials",
|
||||
"type": "token",
|
||||
"description": "token based credentials",
|
||||
"type": "token",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -42,8 +42,8 @@ func TestSysAuth(t *testing.T) {
|
|||
},
|
||||
},
|
||||
"token/": map[string]interface{}{
|
||||
"description": "token based credentials",
|
||||
"type": "token",
|
||||
"description": "token based credentials",
|
||||
"type": "token",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -103,8 +103,8 @@ func TestSysEnableAuth(t *testing.T) {
|
|||
"auth": nil,
|
||||
"data": map[string]interface{}{
|
||||
"foo/": map[string]interface{}{
|
||||
"description": "foo",
|
||||
"type": "noop",
|
||||
"description": "foo",
|
||||
"type": "noop",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -117,8 +117,8 @@ func TestSysEnableAuth(t *testing.T) {
|
|||
"options": map[string]interface{}{},
|
||||
},
|
||||
"token/": map[string]interface{}{
|
||||
"description": "token based credentials",
|
||||
"type": "token",
|
||||
"description": "token based credentials",
|
||||
"type": "token",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -132,8 +132,8 @@ func TestSysEnableAuth(t *testing.T) {
|
|||
},
|
||||
},
|
||||
"foo/": map[string]interface{}{
|
||||
"description": "foo",
|
||||
"type": "noop",
|
||||
"description": "foo",
|
||||
"type": "noop",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -146,8 +146,8 @@ func TestSysEnableAuth(t *testing.T) {
|
|||
"options": map[string]interface{}{},
|
||||
},
|
||||
"token/": map[string]interface{}{
|
||||
"description": "token based credentials",
|
||||
"type": "token",
|
||||
"description": "token based credentials",
|
||||
"type": "token",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -216,12 +216,12 @@ func TestSysDisableAuth(t *testing.T) {
|
|||
"token_type": "default-service",
|
||||
"force_no_cache": false,
|
||||
},
|
||||
"description": "token based credentials",
|
||||
"type": "token",
|
||||
"description": "token based credentials",
|
||||
"type": "token",
|
||||
"external_entropy_access": false,
|
||||
"local": false,
|
||||
"seal_wrap": false,
|
||||
"options": interface{}(nil),
|
||||
"local": false,
|
||||
"seal_wrap": false,
|
||||
"options": interface{}(nil),
|
||||
},
|
||||
},
|
||||
"token/": map[string]interface{}{
|
||||
|
@ -231,12 +231,12 @@ func TestSysDisableAuth(t *testing.T) {
|
|||
"token_type": "default-service",
|
||||
"force_no_cache": false,
|
||||
},
|
||||
"description": "token based credentials",
|
||||
"type": "token",
|
||||
"description": "token based credentials",
|
||||
"type": "token",
|
||||
"external_entropy_access": false,
|
||||
"local": false,
|
||||
"seal_wrap": false,
|
||||
"options": interface{}(nil),
|
||||
"local": false,
|
||||
"seal_wrap": false,
|
||||
"options": interface{}(nil),
|
||||
},
|
||||
}
|
||||
testResponseStatus(t, resp, 200)
|
||||
|
|
|
@ -29,8 +29,8 @@ func TestSysMounts(t *testing.T) {
|
|||
"auth": nil,
|
||||
"data": map[string]interface{}{
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -42,8 +42,8 @@ func TestSysMounts(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -56,8 +56,8 @@ func TestSysMounts(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -69,8 +69,8 @@ func TestSysMounts(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -83,8 +83,8 @@ func TestSysMounts(t *testing.T) {
|
|||
},
|
||||
},
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -96,8 +96,8 @@ func TestSysMounts(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -110,8 +110,8 @@ func TestSysMounts(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -123,8 +123,8 @@ func TestSysMounts(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -184,8 +184,8 @@ func TestSysMount(t *testing.T) {
|
|||
"auth": nil,
|
||||
"data": map[string]interface{}{
|
||||
"foo/": map[string]interface{}{
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -197,8 +197,8 @@ func TestSysMount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -210,8 +210,8 @@ func TestSysMount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -224,8 +224,8 @@ func TestSysMount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -237,8 +237,8 @@ func TestSysMount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -251,8 +251,8 @@ func TestSysMount(t *testing.T) {
|
|||
},
|
||||
},
|
||||
"foo/": map[string]interface{}{
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -264,8 +264,8 @@ func TestSysMount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -277,8 +277,8 @@ func TestSysMount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -291,8 +291,8 @@ func TestSysMount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -304,8 +304,8 @@ func TestSysMount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -385,8 +385,8 @@ func TestSysRemount(t *testing.T) {
|
|||
"auth": nil,
|
||||
"data": map[string]interface{}{
|
||||
"bar/": map[string]interface{}{
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -398,8 +398,8 @@ func TestSysRemount(t *testing.T) {
|
|||
"options": map[string]interface{}{},
|
||||
},
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -411,8 +411,8 @@ func TestSysRemount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -425,8 +425,8 @@ func TestSysRemount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -438,8 +438,8 @@ func TestSysRemount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -452,8 +452,8 @@ func TestSysRemount(t *testing.T) {
|
|||
},
|
||||
},
|
||||
"bar/": map[string]interface{}{
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -465,8 +465,8 @@ func TestSysRemount(t *testing.T) {
|
|||
"options": map[string]interface{}{},
|
||||
},
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -478,8 +478,8 @@ func TestSysRemount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -492,8 +492,8 @@ func TestSysRemount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -505,8 +505,8 @@ func TestSysRemount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -566,8 +566,8 @@ func TestSysUnmount(t *testing.T) {
|
|||
"auth": nil,
|
||||
"data": map[string]interface{}{
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -579,8 +579,8 @@ func TestSysUnmount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -593,8 +593,8 @@ func TestSysUnmount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -606,8 +606,8 @@ func TestSysUnmount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -620,8 +620,8 @@ func TestSysUnmount(t *testing.T) {
|
|||
},
|
||||
},
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -633,8 +633,8 @@ func TestSysUnmount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -647,8 +647,8 @@ func TestSysUnmount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -660,8 +660,8 @@ func TestSysUnmount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -803,8 +803,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"auth": nil,
|
||||
"data": map[string]interface{}{
|
||||
"foo/": map[string]interface{}{
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -816,8 +816,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": map[string]interface{}{},
|
||||
},
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -829,8 +829,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -843,8 +843,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -856,8 +856,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -870,8 +870,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
},
|
||||
},
|
||||
"foo/": map[string]interface{}{
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -883,8 +883,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": map[string]interface{}{},
|
||||
},
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -896,8 +896,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -910,8 +910,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -923,8 +923,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -1010,8 +1010,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"auth": nil,
|
||||
"data": map[string]interface{}{
|
||||
"foo/": map[string]interface{}{
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("259196400"),
|
||||
|
@ -1023,8 +1023,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -1036,8 +1036,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -1050,8 +1050,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -1063,8 +1063,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -1077,8 +1077,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
},
|
||||
},
|
||||
"foo/": map[string]interface{}{
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"description": "foo",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("259196400"),
|
||||
|
@ -1090,8 +1090,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"secret/": map[string]interface{}{
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"description": "key/value secret storage",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -1103,8 +1103,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": map[string]interface{}{"version": "1"},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -1117,8 +1117,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
@ -1130,8 +1130,8 @@ func TestSysTuneMount(t *testing.T) {
|
|||
"options": interface{}(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": json.Number("0"),
|
||||
|
|
|
@ -87,7 +87,7 @@ func NewAzureBackend(conf map[string]string, logger log.Logger) (physical.Backen
|
|||
environment, err = azure.EnvironmentFromURL(environmentUrl)
|
||||
if err != nil {
|
||||
errorMsg := fmt.Sprintf("failed to look up Azure environment descriptor for URL %q: {{err}}",
|
||||
environmentUrl)
|
||||
environmentUrl)
|
||||
return nil, errwrap.Wrapf(errorMsg, err)
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -5,6 +5,13 @@ import (
|
|||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/armon/go-metrics"
|
||||
"github.com/hashicorp/errwrap"
|
||||
log "github.com/hashicorp/go-hclog"
|
||||
|
@ -15,12 +22,6 @@ import (
|
|||
"github.com/oracle/oci-go-sdk/common/auth"
|
||||
"github.com/oracle/oci-go-sdk/objectstorage"
|
||||
"golang.org/x/net/context"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Verify Backend satisfies the correct interfaces
|
||||
|
|
|
@ -7,16 +7,17 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/armon/go-metrics"
|
||||
"github.com/hashicorp/errwrap"
|
||||
"github.com/hashicorp/go-uuid"
|
||||
"github.com/hashicorp/vault/sdk/physical"
|
||||
"github.com/oracle/oci-go-sdk/objectstorage"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/armon/go-metrics"
|
||||
"github.com/hashicorp/errwrap"
|
||||
"github.com/hashicorp/go-uuid"
|
||||
"github.com/hashicorp/vault/sdk/physical"
|
||||
"github.com/oracle/oci-go-sdk/objectstorage"
|
||||
)
|
||||
|
||||
// The lock implementation below prioritizes ensuring that there are not 2 primary at any given point in time
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
package oci
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/go-uuid"
|
||||
"github.com/hashicorp/vault/sdk/physical"
|
||||
"github.com/oracle/oci-go-sdk/common"
|
||||
"github.com/oracle/oci-go-sdk/objectstorage"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestOCIHABackend(t *testing.T) {
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
package oci
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
log "github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/go-uuid"
|
||||
"github.com/hashicorp/vault/sdk/helper/logging"
|
||||
|
@ -9,8 +12,6 @@ import (
|
|||
"github.com/oracle/oci-go-sdk/common"
|
||||
"github.com/oracle/oci-go-sdk/objectstorage"
|
||||
"golang.org/x/net/context"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestOCIBackend(t *testing.T) {
|
||||
|
|
|
@ -4,8 +4,9 @@ package base62
|
|||
|
||||
import (
|
||||
"crypto/rand"
|
||||
uuid "github.com/hashicorp/go-uuid"
|
||||
"io"
|
||||
|
||||
uuid "github.com/hashicorp/go-uuid"
|
||||
)
|
||||
|
||||
const charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
|
||||
|
|
|
@ -2,6 +2,7 @@ package entropy
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hashicorp/errwrap"
|
||||
)
|
||||
|
||||
|
@ -13,7 +14,7 @@ type Reader struct {
|
|||
source Sourcer
|
||||
}
|
||||
|
||||
func NewReader(source Sourcer) *Reader{
|
||||
func NewReader(source Sourcer) *Reader {
|
||||
return &Reader{source}
|
||||
}
|
||||
|
||||
|
@ -21,7 +22,7 @@ func NewReader(source Sourcer) *Reader{
|
|||
// If r returns an error having read at least len(p) bytes, the error is dropped.
|
||||
// It returns the number of bytes copied and an error if fewer bytes were read.
|
||||
// On return, n == len(p) if and only if err == nil.
|
||||
func (r *Reader) Read(p []byte) (n int, err error){
|
||||
func (r *Reader) Read(p []byte) (n int, err error) {
|
||||
requested := len(p)
|
||||
randBytes, err := r.source.GetRandom(requested)
|
||||
delivered := copy(p, randBytes)
|
||||
|
|
|
@ -4,8 +4,9 @@ import (
|
|||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/hashicorp/errwrap"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/errwrap"
|
||||
)
|
||||
|
||||
type mockSourcer struct{}
|
||||
|
|
|
@ -2,12 +2,12 @@ package keysutil
|
|||
|
||||
import (
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
"crypto/rand"
|
||||
|
||||
"github.com/hashicorp/vault/sdk/helper/jsonutil"
|
||||
"github.com/hashicorp/vault/sdk/logical"
|
||||
|
|
|
@ -75,7 +75,7 @@ func TokenFields() map[string]*framework.FieldSchema {
|
|||
Type: framework.TypeCommaStringSlice,
|
||||
Description: `Comma separated string or JSON list of CIDR blocks. If set, specifies the blocks of IP addresses which are allowed to use the generated token.`,
|
||||
DisplayAttrs: &framework.DisplayAttributes{
|
||||
Name: "Generated Token's Bound CIDRs",
|
||||
Name: "Generated Token's Bound CIDRs",
|
||||
Group: "Tokens",
|
||||
},
|
||||
},
|
||||
|
@ -84,7 +84,7 @@ func TokenFields() map[string]*framework.FieldSchema {
|
|||
Type: framework.TypeDurationSecond,
|
||||
Description: tokenExplicitMaxTTLHelp,
|
||||
DisplayAttrs: &framework.DisplayAttributes{
|
||||
Name: "Generated Token's Explicit Maximum TTL",
|
||||
Name: "Generated Token's Explicit Maximum TTL",
|
||||
Group: "Tokens",
|
||||
},
|
||||
},
|
||||
|
@ -93,7 +93,7 @@ func TokenFields() map[string]*framework.FieldSchema {
|
|||
Type: framework.TypeDurationSecond,
|
||||
Description: "The maximum lifetime of the generated token",
|
||||
DisplayAttrs: &framework.DisplayAttributes{
|
||||
Name: "Generated Token's Maximum TTL",
|
||||
Name: "Generated Token's Maximum TTL",
|
||||
Group: "Tokens",
|
||||
},
|
||||
},
|
||||
|
@ -102,7 +102,7 @@ func TokenFields() map[string]*framework.FieldSchema {
|
|||
Type: framework.TypeBool,
|
||||
Description: "If true, the 'default' policy will not automatically be added to generated tokens",
|
||||
DisplayAttrs: &framework.DisplayAttributes{
|
||||
Name: "Do Not Attach 'default' Policy To Generated Tokens",
|
||||
Name: "Do Not Attach 'default' Policy To Generated Tokens",
|
||||
Group: "Tokens",
|
||||
},
|
||||
},
|
||||
|
@ -111,7 +111,7 @@ func TokenFields() map[string]*framework.FieldSchema {
|
|||
Type: framework.TypeDurationSecond,
|
||||
Description: tokenPeriodHelp,
|
||||
DisplayAttrs: &framework.DisplayAttributes{
|
||||
Name: "Generated Token's Period",
|
||||
Name: "Generated Token's Period",
|
||||
Group: "Tokens",
|
||||
},
|
||||
},
|
||||
|
@ -120,7 +120,7 @@ func TokenFields() map[string]*framework.FieldSchema {
|
|||
Type: framework.TypeCommaStringSlice,
|
||||
Description: "Comma-separated list of policies",
|
||||
DisplayAttrs: &framework.DisplayAttributes{
|
||||
Name: "Generated Token's Policies",
|
||||
Name: "Generated Token's Policies",
|
||||
Group: "Tokens",
|
||||
},
|
||||
},
|
||||
|
@ -130,7 +130,7 @@ func TokenFields() map[string]*framework.FieldSchema {
|
|||
Default: "default-service",
|
||||
Description: "The type of token to generate, service or batch",
|
||||
DisplayAttrs: &framework.DisplayAttributes{
|
||||
Name: "Generated Token's Type",
|
||||
Name: "Generated Token's Type",
|
||||
Group: "Tokens",
|
||||
},
|
||||
},
|
||||
|
@ -139,7 +139,7 @@ func TokenFields() map[string]*framework.FieldSchema {
|
|||
Type: framework.TypeDurationSecond,
|
||||
Description: "The initial ttl of the token to generate",
|
||||
DisplayAttrs: &framework.DisplayAttributes{
|
||||
Name: "Generated Token's Initial TTL",
|
||||
Name: "Generated Token's Initial TTL",
|
||||
Group: "Tokens",
|
||||
},
|
||||
},
|
||||
|
@ -148,7 +148,7 @@ func TokenFields() map[string]*framework.FieldSchema {
|
|||
Type: framework.TypeInt,
|
||||
Description: "The maximum number of times a token may be used, a value of zero means unlimited",
|
||||
DisplayAttrs: &framework.DisplayAttributes{
|
||||
Name: "Maximum Uses of Generated Tokens",
|
||||
Name: "Maximum Uses of Generated Tokens",
|
||||
Group: "Tokens",
|
||||
},
|
||||
},
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
package identity
|
||||
|
||||
import (
|
||||
"github.com/go-ldap/ldap"
|
||||
"github.com/hashicorp/vault/sdk/helper/ldaputil"
|
||||
"testing"
|
||||
|
||||
"github.com/go-ldap/ldap"
|
||||
log "github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/vault/api"
|
||||
ldapcred "github.com/hashicorp/vault/builtin/credential/ldap"
|
||||
"github.com/hashicorp/vault/helper/namespace"
|
||||
ldaphelper "github.com/hashicorp/vault/helper/testhelpers/ldap"
|
||||
vaulthttp "github.com/hashicorp/vault/http"
|
||||
"github.com/hashicorp/vault/sdk/helper/ldaputil"
|
||||
"github.com/hashicorp/vault/sdk/logical"
|
||||
"github.com/hashicorp/vault/vault"
|
||||
)
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
package misc
|
||||
|
||||
import (
|
||||
"github.com/go-test/deep"
|
||||
"go.uber.org/atomic"
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/go-test/deep"
|
||||
"github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/vault/helper/testhelpers"
|
||||
"github.com/hashicorp/vault/http"
|
||||
"github.com/hashicorp/vault/sdk/helper/logging"
|
||||
"github.com/hashicorp/vault/sdk/physical/inmem"
|
||||
"github.com/hashicorp/vault/vault"
|
||||
"go.uber.org/atomic"
|
||||
)
|
||||
|
||||
func TestRecovery(t *testing.T) {
|
||||
|
|
|
@ -2,6 +2,7 @@ package vault
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/hashicorp/errwrap"
|
||||
"github.com/hashicorp/vault/sdk/helper/base62"
|
||||
"go.uber.org/atomic"
|
||||
|
|
|
@ -6,11 +6,12 @@ import (
|
|||
"crypto/x509"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/hashicorp/vault/vault/seal/shamir"
|
||||
"strings"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/vault/vault/seal/shamir"
|
||||
|
||||
"github.com/armon/go-metrics"
|
||||
"github.com/hashicorp/errwrap"
|
||||
"github.com/hashicorp/go-multierror"
|
||||
|
|
|
@ -2,15 +2,14 @@ package vault
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/hashicorp/vault/vault/seal"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
log "github.com/hashicorp/go-hclog"
|
||||
|
||||
"github.com/hashicorp/vault/sdk/helper/logging"
|
||||
"github.com/hashicorp/vault/sdk/logical"
|
||||
"github.com/hashicorp/vault/sdk/physical/inmem"
|
||||
"github.com/hashicorp/vault/vault/seal"
|
||||
)
|
||||
|
||||
func TestCore_Init(t *testing.T) {
|
||||
|
|
|
@ -3,11 +3,12 @@ package vault
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
log "github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/vault/sdk/framework"
|
||||
"github.com/hashicorp/vault/sdk/helper/compressutil"
|
||||
"github.com/hashicorp/vault/sdk/logical"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -150,11 +150,11 @@ func TestSystemBackend_mounts(t *testing.T) {
|
|||
// copy what's given
|
||||
exp := map[string]interface{}{
|
||||
"secret/": map[string]interface{}{
|
||||
"type": "kv",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"description": "key/value secret storage",
|
||||
"accessor": resp.Data["secret/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["secret/"].(map[string]interface{})["uuid"],
|
||||
"description": "key/value secret storage",
|
||||
"accessor": resp.Data["secret/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["secret/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": resp.Data["secret/"].(map[string]interface{})["config"].(map[string]interface{})["default_lease_ttl"].(int64),
|
||||
"max_lease_ttl": resp.Data["secret/"].(map[string]interface{})["config"].(map[string]interface{})["max_lease_ttl"].(int64),
|
||||
|
@ -167,11 +167,11 @@ func TestSystemBackend_mounts(t *testing.T) {
|
|||
},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"type": "system",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"accessor": resp.Data["sys/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["sys/"].(map[string]interface{})["uuid"],
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"accessor": resp.Data["sys/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["sys/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": resp.Data["sys/"].(map[string]interface{})["config"].(map[string]interface{})["default_lease_ttl"].(int64),
|
||||
"max_lease_ttl": resp.Data["sys/"].(map[string]interface{})["config"].(map[string]interface{})["max_lease_ttl"].(int64),
|
||||
|
@ -183,11 +183,11 @@ func TestSystemBackend_mounts(t *testing.T) {
|
|||
"options": map[string]string(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"accessor": resp.Data["cubbyhole/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["cubbyhole/"].(map[string]interface{})["uuid"],
|
||||
"accessor": resp.Data["cubbyhole/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["cubbyhole/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": resp.Data["cubbyhole/"].(map[string]interface{})["config"].(map[string]interface{})["default_lease_ttl"].(int64),
|
||||
"max_lease_ttl": resp.Data["cubbyhole/"].(map[string]interface{})["config"].(map[string]interface{})["max_lease_ttl"].(int64),
|
||||
|
@ -198,11 +198,11 @@ func TestSystemBackend_mounts(t *testing.T) {
|
|||
"options": map[string]string(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"accessor": resp.Data["identity/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["identity/"].(map[string]interface{})["uuid"],
|
||||
"accessor": resp.Data["identity/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["identity/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": resp.Data["identity/"].(map[string]interface{})["config"].(map[string]interface{})["default_lease_ttl"].(int64),
|
||||
"max_lease_ttl": resp.Data["identity/"].(map[string]interface{})["config"].(map[string]interface{})["max_lease_ttl"].(int64),
|
||||
|
@ -251,11 +251,11 @@ func TestSystemBackend_mount(t *testing.T) {
|
|||
// copy what's given
|
||||
exp := map[string]interface{}{
|
||||
"secret/": map[string]interface{}{
|
||||
"type": "kv",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"description": "key/value secret storage",
|
||||
"accessor": resp.Data["secret/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["secret/"].(map[string]interface{})["uuid"],
|
||||
"description": "key/value secret storage",
|
||||
"accessor": resp.Data["secret/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["secret/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": resp.Data["secret/"].(map[string]interface{})["config"].(map[string]interface{})["default_lease_ttl"].(int64),
|
||||
"max_lease_ttl": resp.Data["secret/"].(map[string]interface{})["config"].(map[string]interface{})["max_lease_ttl"].(int64),
|
||||
|
@ -268,11 +268,11 @@ func TestSystemBackend_mount(t *testing.T) {
|
|||
},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"type": "system",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"accessor": resp.Data["sys/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["sys/"].(map[string]interface{})["uuid"],
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"accessor": resp.Data["sys/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["sys/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": resp.Data["sys/"].(map[string]interface{})["config"].(map[string]interface{})["default_lease_ttl"].(int64),
|
||||
"max_lease_ttl": resp.Data["sys/"].(map[string]interface{})["config"].(map[string]interface{})["max_lease_ttl"].(int64),
|
||||
|
@ -284,11 +284,11 @@ func TestSystemBackend_mount(t *testing.T) {
|
|||
"options": map[string]string(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"accessor": resp.Data["cubbyhole/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["cubbyhole/"].(map[string]interface{})["uuid"],
|
||||
"accessor": resp.Data["cubbyhole/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["cubbyhole/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": resp.Data["cubbyhole/"].(map[string]interface{})["config"].(map[string]interface{})["default_lease_ttl"].(int64),
|
||||
"max_lease_ttl": resp.Data["cubbyhole/"].(map[string]interface{})["config"].(map[string]interface{})["max_lease_ttl"].(int64),
|
||||
|
@ -299,11 +299,11 @@ func TestSystemBackend_mount(t *testing.T) {
|
|||
"options": map[string]string(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"accessor": resp.Data["identity/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["identity/"].(map[string]interface{})["uuid"],
|
||||
"accessor": resp.Data["identity/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["identity/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": resp.Data["identity/"].(map[string]interface{})["config"].(map[string]interface{})["default_lease_ttl"].(int64),
|
||||
"max_lease_ttl": resp.Data["identity/"].(map[string]interface{})["config"].(map[string]interface{})["max_lease_ttl"].(int64),
|
||||
|
@ -314,11 +314,11 @@ func TestSystemBackend_mount(t *testing.T) {
|
|||
"options": map[string]string(nil),
|
||||
},
|
||||
"prod/secret/": map[string]interface{}{
|
||||
"description": "",
|
||||
"type": "kv",
|
||||
"description": "",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"accessor": resp.Data["prod/secret/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["prod/secret/"].(map[string]interface{})["uuid"],
|
||||
"accessor": resp.Data["prod/secret/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["prod/secret/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": int64(2100),
|
||||
"max_lease_ttl": int64(2700),
|
||||
|
@ -1456,11 +1456,11 @@ func TestSystemBackend_authTable(t *testing.T) {
|
|||
|
||||
exp := map[string]interface{}{
|
||||
"token/": map[string]interface{}{
|
||||
"type": "token",
|
||||
"type": "token",
|
||||
"external_entropy_access": false,
|
||||
"description": "token based credentials",
|
||||
"accessor": resp.Data["token/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["token/"].(map[string]interface{})["uuid"],
|
||||
"description": "token based credentials",
|
||||
"accessor": resp.Data["token/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["token/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": int64(0),
|
||||
"max_lease_ttl": int64(0),
|
||||
|
@ -1511,11 +1511,11 @@ func TestSystemBackend_enableAuth(t *testing.T) {
|
|||
|
||||
exp := map[string]interface{}{
|
||||
"foo/": map[string]interface{}{
|
||||
"type": "noop",
|
||||
"type": "noop",
|
||||
"external_entropy_access": false,
|
||||
"description": "",
|
||||
"accessor": resp.Data["foo/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["foo/"].(map[string]interface{})["uuid"],
|
||||
"description": "",
|
||||
"accessor": resp.Data["foo/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["foo/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": int64(2100),
|
||||
"max_lease_ttl": int64(2700),
|
||||
|
@ -1527,11 +1527,11 @@ func TestSystemBackend_enableAuth(t *testing.T) {
|
|||
"options": map[string]string{},
|
||||
},
|
||||
"token/": map[string]interface{}{
|
||||
"type": "token",
|
||||
"type": "token",
|
||||
"external_entropy_access": false,
|
||||
"description": "token based credentials",
|
||||
"accessor": resp.Data["token/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["token/"].(map[string]interface{})["uuid"],
|
||||
"description": "token based credentials",
|
||||
"accessor": resp.Data["token/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["token/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": int64(0),
|
||||
"max_lease_ttl": int64(0),
|
||||
|
@ -2296,11 +2296,11 @@ func TestSystemBackend_InternalUIMounts(t *testing.T) {
|
|||
exp = map[string]interface{}{
|
||||
"secret": map[string]interface{}{
|
||||
"secret/": map[string]interface{}{
|
||||
"type": "kv",
|
||||
"type": "kv",
|
||||
"external_entropy_access": false,
|
||||
"description": "key/value secret storage",
|
||||
"accessor": resp.Data["secret"].(map[string]interface{})["secret/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["secret"].(map[string]interface{})["secret/"].(map[string]interface{})["uuid"],
|
||||
"description": "key/value secret storage",
|
||||
"accessor": resp.Data["secret"].(map[string]interface{})["secret/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["secret"].(map[string]interface{})["secret/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": resp.Data["secret"].(map[string]interface{})["secret/"].(map[string]interface{})["config"].(map[string]interface{})["default_lease_ttl"].(int64),
|
||||
"max_lease_ttl": resp.Data["secret"].(map[string]interface{})["secret/"].(map[string]interface{})["config"].(map[string]interface{})["max_lease_ttl"].(int64),
|
||||
|
@ -2313,11 +2313,11 @@ func TestSystemBackend_InternalUIMounts(t *testing.T) {
|
|||
},
|
||||
},
|
||||
"sys/": map[string]interface{}{
|
||||
"type": "system",
|
||||
"type": "system",
|
||||
"external_entropy_access": false,
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"accessor": resp.Data["secret"].(map[string]interface{})["sys/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["secret"].(map[string]interface{})["sys/"].(map[string]interface{})["uuid"],
|
||||
"description": "system endpoints used for control, policy and debugging",
|
||||
"accessor": resp.Data["secret"].(map[string]interface{})["sys/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["secret"].(map[string]interface{})["sys/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": resp.Data["secret"].(map[string]interface{})["sys/"].(map[string]interface{})["config"].(map[string]interface{})["default_lease_ttl"].(int64),
|
||||
"max_lease_ttl": resp.Data["secret"].(map[string]interface{})["sys/"].(map[string]interface{})["config"].(map[string]interface{})["max_lease_ttl"].(int64),
|
||||
|
@ -2329,11 +2329,11 @@ func TestSystemBackend_InternalUIMounts(t *testing.T) {
|
|||
"options": map[string]string(nil),
|
||||
},
|
||||
"cubbyhole/": map[string]interface{}{
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"description": "per-token private secret storage",
|
||||
"type": "cubbyhole",
|
||||
"external_entropy_access": false,
|
||||
"accessor": resp.Data["secret"].(map[string]interface{})["cubbyhole/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["secret"].(map[string]interface{})["cubbyhole/"].(map[string]interface{})["uuid"],
|
||||
"accessor": resp.Data["secret"].(map[string]interface{})["cubbyhole/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["secret"].(map[string]interface{})["cubbyhole/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": resp.Data["secret"].(map[string]interface{})["cubbyhole/"].(map[string]interface{})["config"].(map[string]interface{})["default_lease_ttl"].(int64),
|
||||
"max_lease_ttl": resp.Data["secret"].(map[string]interface{})["cubbyhole/"].(map[string]interface{})["config"].(map[string]interface{})["max_lease_ttl"].(int64),
|
||||
|
@ -2344,11 +2344,11 @@ func TestSystemBackend_InternalUIMounts(t *testing.T) {
|
|||
"options": map[string]string(nil),
|
||||
},
|
||||
"identity/": map[string]interface{}{
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"description": "identity store",
|
||||
"type": "identity",
|
||||
"external_entropy_access": false,
|
||||
"accessor": resp.Data["secret"].(map[string]interface{})["identity/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["secret"].(map[string]interface{})["identity/"].(map[string]interface{})["uuid"],
|
||||
"accessor": resp.Data["secret"].(map[string]interface{})["identity/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["secret"].(map[string]interface{})["identity/"].(map[string]interface{})["uuid"],
|
||||
"config": map[string]interface{}{
|
||||
"default_lease_ttl": resp.Data["secret"].(map[string]interface{})["identity/"].(map[string]interface{})["config"].(map[string]interface{})["default_lease_ttl"].(int64),
|
||||
"max_lease_ttl": resp.Data["secret"].(map[string]interface{})["identity/"].(map[string]interface{})["config"].(map[string]interface{})["max_lease_ttl"].(int64),
|
||||
|
@ -2368,13 +2368,13 @@ func TestSystemBackend_InternalUIMounts(t *testing.T) {
|
|||
"force_no_cache": false,
|
||||
"token_type": "default-service",
|
||||
},
|
||||
"type": "token",
|
||||
"type": "token",
|
||||
"external_entropy_access": false,
|
||||
"description": "token based credentials",
|
||||
"accessor": resp.Data["auth"].(map[string]interface{})["token/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["auth"].(map[string]interface{})["token/"].(map[string]interface{})["uuid"],
|
||||
"local": false,
|
||||
"seal_wrap": false,
|
||||
"description": "token based credentials",
|
||||
"accessor": resp.Data["auth"].(map[string]interface{})["token/"].(map[string]interface{})["accessor"],
|
||||
"uuid": resp.Data["auth"].(map[string]interface{})["token/"].(map[string]interface{})["uuid"],
|
||||
"local": false,
|
||||
"seal_wrap": false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue