Skip to content

Commit

Permalink
import from github.com/openbao/openbao throughout project
Browse files Browse the repository at this point in the history
Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
  • Loading branch information
alrs committed Dec 11, 2023
1 parent 03f094a commit 520616c
Show file tree
Hide file tree
Showing 1,066 changed files with 3,408 additions and 3,408 deletions.
2 changes: 1 addition & 1 deletion api/auth/approle/approle.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"
"strings"

"github.com/hashicorp/vault/api"
"github.com/openbao/openbao/api"
)

type AppRoleAuth struct {
Expand Down
2 changes: 1 addition & 1 deletion api/auth/approle/approle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strings"
"testing"

"github.com/hashicorp/vault/api"
"github.com/openbao/openbao/api"
)

// testHTTPServer creates a test HTTP server that handles requests until
Expand Down
2 changes: 1 addition & 1 deletion api/auth/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-secure-stdlib/awsutil"
"github.com/hashicorp/go-uuid"
"github.com/hashicorp/vault/api"
"github.com/openbao/openbao/api"
)

type AWSAuth struct {
Expand Down
2 changes: 1 addition & 1 deletion api/auth/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"net/url"
"time"

"github.com/hashicorp/vault/api"
"github.com/openbao/openbao/api"
)

type AzureAuth struct {
Expand Down
2 changes: 1 addition & 1 deletion api/auth/gcp/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"cloud.google.com/go/compute/metadata"
credentials "cloud.google.com/go/iam/credentials/apiv1"
"github.com/hashicorp/vault/api"
"github.com/openbao/openbao/api"
credentialspb "google.golang.org/genproto/googleapis/iam/credentials/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion api/auth/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"os"

"github.com/hashicorp/vault/api"
"github.com/openbao/openbao/api"
)

type KubernetesAuth struct {
Expand Down
2 changes: 1 addition & 1 deletion api/auth/ldap/ldap.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"
"strings"

"github.com/hashicorp/vault/api"
"github.com/openbao/openbao/api"
)

type LDAPAuth struct {
Expand Down
2 changes: 1 addition & 1 deletion api/auth/ldap/ldap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strings"
"testing"

"github.com/hashicorp/vault/api"
"github.com/openbao/openbao/api"
)

// testHTTPServer creates a test HTTP server that handles requests until
Expand Down
2 changes: 1 addition & 1 deletion api/auth/userpass/userpass.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"
"strings"

"github.com/hashicorp/vault/api"
"github.com/openbao/openbao/api"
)

type UserpassAuth struct {
Expand Down
2 changes: 1 addition & 1 deletion api/auth/userpass/userpass_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strings"
"testing"

"github.com/hashicorp/vault/api"
"github.com/openbao/openbao/api"
)

// testHTTPServer creates a test HTTP server that handles requests until
Expand Down
2 changes: 1 addition & 1 deletion api/plugin_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package api

// NOTE: this file was copied from
// https://github.com/hashicorp/vault/blob/main/sdk/helper/consts/plugin_types.go
// https://github.com/openbao/openbao/blob/main/sdk/helper/consts/plugin_types.go
// Any changes made should be made to both files at the same time.

import "fmt"
Expand Down
4 changes: 2 additions & 2 deletions audit/audit.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ package audit
import (
"context"

"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/sdk/helper/salt"
"github.com/openbao/openbao/sdk/logical"
)

// Backend interface must be implemented for an audit
Expand Down
6 changes: 3 additions & 3 deletions audit/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (

"github.com/go-jose/go-jose/v3/jwt"

"github.com/hashicorp/vault/helper/namespace"
"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/helper/namespace"
"github.com/openbao/openbao/sdk/helper/salt"
"github.com/openbao/openbao/sdk/logical"
)

type AuditFormatWriter interface {
Expand Down
2 changes: 1 addition & 1 deletion audit/format_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"fmt"
"io"

"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/openbao/openbao/sdk/helper/salt"
)

// JSONFormatWriter is an AuditFormatWriter implementation that structures data into
Expand Down
8 changes: 4 additions & 4 deletions audit/format_json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
"testing"
"time"

"github.com/hashicorp/vault/helper/namespace"
"github.com/hashicorp/vault/sdk/helper/jsonutil"
"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/helper/namespace"
"github.com/openbao/openbao/sdk/helper/jsonutil"
"github.com/openbao/openbao/sdk/helper/salt"
"github.com/openbao/openbao/sdk/logical"
)

func TestFormatJSON_formatRequest(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion audit/format_jsonx.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"fmt"
"io"

"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/jefferai/jsonx"
"github.com/openbao/openbao/sdk/helper/salt"
)

// JSONxFormatWriter is an AuditFormatWriter implementation that structures data into
Expand Down
6 changes: 3 additions & 3 deletions audit/format_jsonx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"testing"
"time"

"github.com/hashicorp/vault/helper/namespace"
"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/helper/namespace"
"github.com/openbao/openbao/sdk/helper/salt"
"github.com/openbao/openbao/sdk/logical"
)

func TestFormatJSONx_formatRequest(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions audit/format_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"io"
"testing"

"github.com/hashicorp/vault/helper/namespace"
"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/hashicorp/vault/sdk/logical"
"github.com/mitchellh/copystructure"
"github.com/openbao/openbao/helper/namespace"
"github.com/openbao/openbao/sdk/helper/salt"
"github.com/openbao/openbao/sdk/logical"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion audit/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"context"
"io"

"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/sdk/logical"
)

// Formatter is an interface that is responsible for formatting a
Expand Down
6 changes: 3 additions & 3 deletions audit/hashstructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"time"

"github.com/hashicorp/go-secure-stdlib/strutil"
"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/hashicorp/vault/sdk/helper/wrapping"
"github.com/hashicorp/vault/sdk/logical"
"github.com/mitchellh/copystructure"
"github.com/mitchellh/reflectwalk"
"github.com/openbao/openbao/sdk/helper/salt"
"github.com/openbao/openbao/sdk/helper/wrapping"
"github.com/openbao/openbao/sdk/logical"
)

// HashString hashes the given opaque string and returns it
Expand Down
8 changes: 4 additions & 4 deletions audit/hashstructure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (

"github.com/go-test/deep"

"github.com/hashicorp/vault/sdk/helper/certutil"
"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/hashicorp/vault/sdk/helper/wrapping"
"github.com/hashicorp/vault/sdk/logical"
"github.com/mitchellh/copystructure"
"github.com/openbao/openbao/sdk/helper/certutil"
"github.com/openbao/openbao/sdk/helper/salt"
"github.com/openbao/openbao/sdk/helper/wrapping"
"github.com/openbao/openbao/sdk/logical"
)

func TestCopy_auth(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions builtin/audit/file/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"sync"
"sync/atomic"

"github.com/hashicorp/vault/audit"
"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/audit"
"github.com/openbao/openbao/sdk/helper/salt"
"github.com/openbao/openbao/sdk/logical"
)

func Factory(ctx context.Context, conf *audit.BackendConfig) (audit.Backend, error) {
Expand Down Expand Up @@ -143,7 +143,7 @@ func Factory(ctx context.Context, conf *audit.BackendConfig) (audit.Backend, err
default:
// Ensure that the file can be successfully opened for writing;
// otherwise it will be too late to catch later without problems
// (ref: https://github.com/hashicorp/vault/issues/550)
// (ref: https://github.com/openbao/openbao/issues/550)
if err := b.open(); err != nil {
return nil, fmt.Errorf("sanity check failed; unable to open %q for writing: %w", path, err)
}
Expand Down
8 changes: 4 additions & 4 deletions builtin/audit/file/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"testing"
"time"

"github.com/hashicorp/vault/audit"
"github.com/hashicorp/vault/helper/namespace"
"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/audit"
"github.com/openbao/openbao/helper/namespace"
"github.com/openbao/openbao/sdk/helper/salt"
"github.com/openbao/openbao/sdk/logical"
)

func TestAuditFile_fileModeNew(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions builtin/audit/socket/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (

"github.com/hashicorp/go-multierror"
"github.com/hashicorp/go-secure-stdlib/parseutil"
"github.com/hashicorp/vault/audit"
"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/audit"
"github.com/openbao/openbao/sdk/helper/salt"
"github.com/openbao/openbao/sdk/logical"
)

func Factory(ctx context.Context, conf *audit.BackendConfig) (audit.Backend, error) {
Expand Down
6 changes: 3 additions & 3 deletions builtin/audit/syslog/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"sync"

gsyslog "github.com/hashicorp/go-syslog"
"github.com/hashicorp/vault/audit"
"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/audit"
"github.com/openbao/openbao/sdk/helper/salt"
"github.com/openbao/openbao/sdk/logical"
)

func Factory(ctx context.Context, conf *audit.BackendConfig) (audit.Backend, error) {
Expand Down
10 changes: 5 additions & 5 deletions builtin/credential/approle/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"context"
"sync"

"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/helper/consts"
"github.com/hashicorp/vault/sdk/helper/locksutil"
"github.com/hashicorp/vault/sdk/helper/salt"
"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/sdk/framework"
"github.com/openbao/openbao/sdk/helper/consts"
"github.com/openbao/openbao/sdk/helper/locksutil"
"github.com/openbao/openbao/sdk/helper/salt"
"github.com/openbao/openbao/sdk/logical"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion builtin/credential/approle/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/sdk/logical"
)

func createBackendWithStorage(t *testing.T) (*backend, logical.Storage) {
Expand Down
6 changes: 3 additions & 3 deletions builtin/credential/approle/cmd/approle/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"os"

hclog "github.com/hashicorp/go-hclog"
"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/builtin/credential/approle"
"github.com/hashicorp/vault/sdk/plugin"
"github.com/openbao/openbao/api"
"github.com/openbao/openbao/builtin/credential/approle"
"github.com/openbao/openbao/sdk/plugin"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions builtin/credential/approle/path_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"time"

"github.com/hashicorp/go-secure-stdlib/parseutil"
"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/helper/cidrutil"
"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/sdk/framework"
"github.com/openbao/openbao/sdk/helper/cidrutil"
"github.com/openbao/openbao/sdk/logical"
)

func pathLogin(b *backend) *framework.Path {
Expand Down
2 changes: 1 addition & 1 deletion builtin/credential/approle/path_login_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"time"

"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/sdk/logical"
)

func TestAppRole_BoundCIDRLogin(t *testing.T) {
Expand Down
16 changes: 8 additions & 8 deletions builtin/credential/approle/path_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import (
"github.com/hashicorp/go-secure-stdlib/parseutil"
"github.com/hashicorp/go-secure-stdlib/strutil"
uuid "github.com/hashicorp/go-uuid"
"github.com/hashicorp/vault/helper/parseip"
"github.com/hashicorp/vault/sdk/framework"
"github.com/hashicorp/vault/sdk/helper/cidrutil"
"github.com/hashicorp/vault/sdk/helper/consts"
"github.com/hashicorp/vault/sdk/helper/locksutil"
"github.com/hashicorp/vault/sdk/helper/policyutil"
"github.com/hashicorp/vault/sdk/helper/tokenutil"
"github.com/hashicorp/vault/sdk/logical"
"github.com/openbao/openbao/helper/parseip"
"github.com/openbao/openbao/sdk/framework"
"github.com/openbao/openbao/sdk/helper/cidrutil"
"github.com/openbao/openbao/sdk/helper/consts"
"github.com/openbao/openbao/sdk/helper/locksutil"
"github.com/openbao/openbao/sdk/helper/policyutil"
"github.com/openbao/openbao/sdk/helper/tokenutil"
"github.com/openbao/openbao/sdk/logical"
)

// roleStorageEntry stores all the options that are set on an role
Expand Down
8 changes: 4 additions & 4 deletions builtin/credential/approle/path_role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (

"github.com/go-test/deep"
"github.com/hashicorp/go-sockaddr"
"github.com/hashicorp/vault/sdk/helper/policyutil"
"github.com/hashicorp/vault/sdk/helper/testhelpers/schema"
"github.com/hashicorp/vault/sdk/helper/tokenutil"
"github.com/hashicorp/vault/sdk/logical"
"github.com/mitchellh/mapstructure"
"github.com/openbao/openbao/sdk/helper/policyutil"
"github.com/openbao/openbao/sdk/helper/testhelpers/schema"
"github.com/openbao/openbao/sdk/helper/tokenutil"
"github.com/openbao/openbao/sdk/logical"
)

func (b *backend) requestNoErr(t *testing.T, req *logical.Request) *logical.Response {
Expand Down
Loading

0 comments on commit 520616c

Please sign in to comment.