Skip to content

Commit

Permalink
Commit rest of changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vbatychko-modeln committed Jun 8, 2022
1 parent 0140115 commit c85dce1
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Plugin for Hashicorp's Vault, which connect it to Pleasant Password Server.
Download and build Go plugin sources:

```
go get -u https://github.com/bva/vault-pps-plugin.git
go install github.com/bva/vault-pps-plugin
```
You will need to define a plugin directory using the plugin_directory configuration directive in Vault configutration,
then place the vault-pss executable generated above in the directory.
Expand Down
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ import (
"os"
"net/http"
"crypto/tls"
"./pleasant"
"github.com/bva/vault-pps-plugin/pleasant"

"github.com/hashicorp/vault/helper/pluginutil"
"github.com/hashicorp/vault/logical"
"github.com/hashicorp/vault/logical/plugin"
"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/sdk/logical"
"github.com/hashicorp/vault/sdk/plugin"
)

func main() {
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true}

apiClientMeta := &pluginutil.APIClientMeta{}
apiClientMeta := &api.PluginAPIClientMeta{}
flags := apiClientMeta.FlagSet()
flags.Parse(os.Args[1:]) // Ignore command, strictly parse flags

tlsConfig := apiClientMeta.GetTLSConfig()
tlsProviderFunc := pluginutil.VaultPluginTLSProvider(tlsConfig)
tlsProviderFunc := api.VaultPluginTLSProvider(tlsConfig)

factoryFunc := pleasant.FactoryType(logical.TypeLogical)

Expand Down
4 changes: 2 additions & 2 deletions pleasant/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pleasant
import (
"context"
"sync"
"github.com/hashicorp/vault/logical"
"github.com/hashicorp/vault/logical/framework"
"github.com/hashicorp/vault/sdk/logical"
"github.com/hashicorp/vault/sdk/framework"
)

var(
Expand Down
4 changes: 2 additions & 2 deletions pleasant/path_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"

"github.com/hashicorp/errwrap"
"github.com/hashicorp/vault/logical"
"github.com/hashicorp/vault/logical/framework"
"github.com/hashicorp/vault/sdk/logical"
"github.com/hashicorp/vault/sdk/framework"
)

func pathConfigAccess(b *backend) []*framework.Path {
Expand Down
4 changes: 2 additions & 2 deletions pleasant/path_kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package pleasant
import (
"context"
"strings"
"github.com/hashicorp/vault/logical"
"github.com/hashicorp/vault/logical/framework"
"github.com/hashicorp/vault/sdk/logical"
"github.com/hashicorp/vault/sdk/framework"
)

// kvPaths is used to test CRUD and List operations. It is a simplified
Expand Down
4 changes: 2 additions & 2 deletions pleasant/pleasant.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package pleasant

import (
"github.com/hashicorp/vault/logical"
"github.com/go-resty/resty"
"github.com/hashicorp/vault/sdk/logical"
"gopkg.in/resty.v1"
"strings"
"time"
"fmt"
Expand Down

0 comments on commit c85dce1

Please sign in to comment.