mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
rebase: bump github.com/hashicorp/vault/api from 1.3.0 to 1.3.1
Bumps [github.com/hashicorp/vault/api](https://github.com/hashicorp/vault) from 1.3.0 to 1.3.1. - [Release notes](https://github.com/hashicorp/vault/releases) - [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md) - [Commits](https://github.com/hashicorp/vault/compare/v1.3.0...v1.3.1) --- updated-dependencies: - dependency-name: github.com/hashicorp/vault/api dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
bce5c3dc7c
commit
9c1c1306cb
1
vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go
generated
vendored
1
vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go
generated
vendored
@ -32,6 +32,7 @@ func DefaultPooledTransport() *http.Transport {
|
||||
IdleConnTimeout: 90 * time.Second,
|
||||
TLSHandshakeTimeout: 10 * time.Second,
|
||||
ExpectContinueTimeout: 1 * time.Second,
|
||||
ForceAttemptHTTP2: true,
|
||||
MaxIdleConnsPerHost: runtime.GOMAXPROCS(0) + 1,
|
||||
}
|
||||
return transport
|
||||
|
2
vendor/github.com/hashicorp/vault/api/README.md
generated
vendored
2
vendor/github.com/hashicorp/vault/api/README.md
generated
vendored
@ -3,6 +3,6 @@ Vault API
|
||||
|
||||
This provides the `github.com/hashicorp/vault/api` package which contains code useful for interacting with a Vault server.
|
||||
|
||||
For examples of how to use this module, see the [vault-examples](https://github.com/hashicorp/vault-examples/tree/main/go) repo.
|
||||
For examples of how to use this module, see the [vault-examples](https://github.com/hashicorp/vault-examples) repo.
|
||||
|
||||
[](https://godoc.org/github.com/hashicorp/vault/api)
|
4
vendor/github.com/hashicorp/vault/api/auth_token.go
generated
vendored
4
vendor/github.com/hashicorp/vault/api/auth_token.go
generated
vendored
@ -1,6 +1,8 @@
|
||||
package api
|
||||
|
||||
import "context"
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
// TokenAuth is used to perform token backend operations on Vault
|
||||
type TokenAuth struct {
|
||||
|
12
vendor/github.com/hashicorp/vault/api/client.go
generated
vendored
12
vendor/github.com/hashicorp/vault/api/client.go
generated
vendored
@ -20,9 +20,9 @@ import (
|
||||
"unicode"
|
||||
|
||||
"github.com/hashicorp/errwrap"
|
||||
cleanhttp "github.com/hashicorp/go-cleanhttp"
|
||||
retryablehttp "github.com/hashicorp/go-retryablehttp"
|
||||
rootcerts "github.com/hashicorp/go-rootcerts"
|
||||
"github.com/hashicorp/go-cleanhttp"
|
||||
"github.com/hashicorp/go-retryablehttp"
|
||||
"github.com/hashicorp/go-rootcerts"
|
||||
"github.com/hashicorp/go-secure-stdlib/parseutil"
|
||||
"golang.org/x/net/http2"
|
||||
"golang.org/x/time/rate"
|
||||
@ -880,8 +880,10 @@ func (c *Client) SetReadYourWrites(preventStaleReads bool) {
|
||||
c.config.modifyLock.Lock()
|
||||
defer c.config.modifyLock.Unlock()
|
||||
|
||||
if preventStaleReads && c.replicationStateStore == nil {
|
||||
c.replicationStateStore = &replicationStateStore{}
|
||||
if preventStaleReads {
|
||||
if c.replicationStateStore == nil {
|
||||
c.replicationStateStore = &replicationStateStore{}
|
||||
}
|
||||
} else {
|
||||
c.replicationStateStore = nil
|
||||
}
|
||||
|
6
vendor/github.com/hashicorp/vault/api/logical.go
generated
vendored
6
vendor/github.com/hashicorp/vault/api/logical.go
generated
vendored
@ -8,6 +8,7 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/hashicorp/errwrap"
|
||||
"github.com/hashicorp/vault/sdk/helper/jsonutil"
|
||||
@ -235,12 +236,13 @@ func (c *Logical) DeleteWithData(path string, data map[string][]string) (*Secret
|
||||
|
||||
func (c *Logical) Unwrap(wrappingToken string) (*Secret, error) {
|
||||
var data map[string]interface{}
|
||||
wt := strings.TrimSpace(wrappingToken)
|
||||
if wrappingToken != "" {
|
||||
if c.c.Token() == "" {
|
||||
c.c.SetToken(wrappingToken)
|
||||
c.c.SetToken(wt)
|
||||
} else if wrappingToken != c.c.Token() {
|
||||
data = map[string]interface{}{
|
||||
"token": wrappingToken,
|
||||
"token": wt,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
34
vendor/github.com/hashicorp/vault/api/sys_hastatus.go
generated
vendored
Normal file
34
vendor/github.com/hashicorp/vault/api/sys_hastatus.go
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
func (c *Sys) HAStatus() (*HAStatusResponse, error) {
|
||||
r := c.c.NewRequest("GET", "/v1/sys/ha-status")
|
||||
|
||||
ctx, cancelFunc := context.WithCancel(context.Background())
|
||||
defer cancelFunc()
|
||||
resp, err := c.c.RawRequestWithContext(ctx, r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
var result HAStatusResponse
|
||||
err = resp.DecodeJSON(&result)
|
||||
return &result, err
|
||||
}
|
||||
|
||||
type HAStatusResponse struct {
|
||||
Nodes []HANode
|
||||
}
|
||||
|
||||
type HANode struct {
|
||||
Hostname string `json:"hostname"`
|
||||
APIAddress string `json:"api_address"`
|
||||
ClusterAddress string `json:"cluster_address"`
|
||||
ActiveNode bool `json:"active_node"`
|
||||
LastEcho *time.Time `json:"last_echo"`
|
||||
}
|
2
vendor/github.com/hashicorp/vault/api/sys_mounts.go
generated
vendored
2
vendor/github.com/hashicorp/vault/api/sys_mounts.go
generated
vendored
@ -154,6 +154,7 @@ type MountConfigInput struct {
|
||||
PassthroughRequestHeaders []string `json:"passthrough_request_headers,omitempty" mapstructure:"passthrough_request_headers"`
|
||||
AllowedResponseHeaders []string `json:"allowed_response_headers,omitempty" mapstructure:"allowed_response_headers"`
|
||||
TokenType string `json:"token_type,omitempty" mapstructure:"token_type"`
|
||||
AllowedManagedKeys []string `json:"allowed_managed_keys,omitempty" mapstructure:"allowed_managed_keys"`
|
||||
|
||||
// Deprecated: This field will always be blank for newer server responses.
|
||||
PluginName string `json:"plugin_name,omitempty" mapstructure:"plugin_name"`
|
||||
@ -181,6 +182,7 @@ type MountConfigOutput struct {
|
||||
PassthroughRequestHeaders []string `json:"passthrough_request_headers,omitempty" mapstructure:"passthrough_request_headers"`
|
||||
AllowedResponseHeaders []string `json:"allowed_response_headers,omitempty" mapstructure:"allowed_response_headers"`
|
||||
TokenType string `json:"token_type,omitempty" mapstructure:"token_type"`
|
||||
AllowedManagedKeys []string `json:"allowed_managed_keys,omitempty" mapstructure:"allowed_managed_keys"`
|
||||
|
||||
// Deprecated: This field will always be blank for newer server responses.
|
||||
PluginName string `json:"plugin_name,omitempty" mapstructure:"plugin_name"`
|
||||
|
19
vendor/github.com/hashicorp/vault/api/sys_raft.go
generated
vendored
19
vendor/github.com/hashicorp/vault/api/sys_raft.go
generated
vendored
@ -368,3 +368,22 @@ func (c *Sys) RaftAutopilotConfiguration() (*AutopilotConfig, error) {
|
||||
|
||||
return &result, err
|
||||
}
|
||||
|
||||
// PutRaftAutopilotConfiguration allows modifying the raft autopilot configuration
|
||||
func (c *Sys) PutRaftAutopilotConfiguration(opts *AutopilotConfig) error {
|
||||
r := c.c.NewRequest("POST", "/v1/sys/storage/raft/autopilot/configuration")
|
||||
|
||||
if err := r.SetJSONBody(opts); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ctx, cancelFunc := context.WithCancel(context.Background())
|
||||
defer cancelFunc()
|
||||
resp, err := c.c.RawRequestWithContext(ctx, r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user