Skip to content

Commit

Permalink
chore(deps): bump github.com/hashicorp/vault/sdk from 0.9.1 to 0.9.2 (#…
Browse files Browse the repository at this point in the history
…41)

* chore(deps): bump github.com/hashicorp/vault/sdk from 0.9.1 to 0.9.2

Bumps [github.com/hashicorp/vault/sdk](https://github.com/hashicorp/vault) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/hashicorp/vault/releases)
- [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md)
- [Commits](hashicorp/vault@v0.9.1...v0.9.2)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/vault/sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* add existence check for config path

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ville Vesilehto <ville@vesilehto.fi>
  • Loading branch information
dependabot[bot] and thevilledev committed Jul 26, 2023
1 parent 03ec39f commit b8a943d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
require (
github.com/hashicorp/go-hclog v1.5.0
github.com/hashicorp/vault/api v1.9.2
github.com/hashicorp/vault/sdk v0.9.1
github.com/hashicorp/vault/sdk v0.9.2
gopkg.in/dnaeon/go-vcr.v3 v3.1.2
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ github.com/hashicorp/hcl v1.0.1-vault-5 h1:kI3hhbbyzr4dldA8UdTb7ZlVVlI2DACdCfz31
github.com/hashicorp/hcl v1.0.1-vault-5/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM=
github.com/hashicorp/vault/api v1.9.2 h1:YjkZLJ7K3inKgMZ0wzCU9OHqc+UqMQyXsPXnf3Cl2as=
github.com/hashicorp/vault/api v1.9.2/go.mod h1:jo5Y/ET+hNyz+JnKDt8XLAdKs+AM0G5W0Vp1IrFI8N8=
github.com/hashicorp/vault/sdk v0.9.1 h1:fMkjCfqC5ohA2b7p1kv5poe488pFhBl9oaz2FkDkDAQ=
github.com/hashicorp/vault/sdk v0.9.1/go.mod h1:YmQ899tcCpwEgH6fOfU7AY0OURy8EqYj8sEdRac25TM=
github.com/hashicorp/vault/sdk v0.9.2 h1:H1kitfl1rG2SHbeGEyvhEqmIjVKE3E6c2q3ViKOs6HA=
github.com/hashicorp/vault/sdk v0.9.2/go.mod h1:gG0lA7P++KefplzvcD3vrfCmgxVAM7Z/SqX5NeOL/98=
github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 h1:xixZ2bWeofWV68J+x6AzmKuVM/JWCQwkWm6GW/MUR6I=
github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
Expand Down
9 changes: 9 additions & 0 deletions internal/plugin/path_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func (b *backend) pathConfig() []*framework.Path {
Callback: b.pathConfigDelete,
},
},
ExistenceCheck: b.pathConfigExistence(),
},
}
}
Expand Down Expand Up @@ -187,3 +188,11 @@ func (b *backend) pathConfigDelete(ctx context.Context, req *logical.Request,

return &logical.Response{}, nil
}

func (b *backend) pathConfigExistence() framework.ExistenceFunc {
return func(ctx context.Context, req *logical.Request, data *framework.FieldData) (bool, error) {
_, err := b.getConfig(ctx, req.Storage)

return err != nil, err
}
}
3 changes: 0 additions & 3 deletions internal/plugin/path_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ func (b *backend) pathToken() []*framework.Path {
logical.ReadOperation: &framework.PathOperation{
Callback: b.pathTokenWrite,
},
logical.CreateOperation: &framework.PathOperation{
Callback: b.pathTokenWrite,
},
logical.UpdateOperation: &framework.PathOperation{
Callback: b.pathTokenWrite,
},
Expand Down

0 comments on commit b8a943d

Please sign in to comment.