vault: github.com/hashicorp/vault/vendor/github.com/hashicorp/vault-plugin-secrets-kv Index | Files

package kv

import "github.com/hashicorp/vault/vendor/github.com/hashicorp/vault-plugin-secrets-kv"

Index

Package Files

backend.go delete_version_after.go passthrough.go path_config.go path_data.go path_delete.go path_destroy.go path_metadata.go types.pb.go upgrade.go

func Factory Uses

func Factory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error)

Factory will return a logical backend of type versionedKVBackend or PassthroughBackend based on the config passed in.

func LeaseSwitchedPassthroughBackend Uses

func LeaseSwitchedPassthroughBackend(ctx context.Context, conf *logical.BackendConfig, leases bool) (logical.Backend, error)

LeaseSwitchedPassthroughBackend returns a PassthroughBackend with leases switched on or off

func LeasedPassthroughBackendFactory Uses

func LeasedPassthroughBackendFactory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error)

LeasedPassthroughBackendFactory returns a PassthroughBackend with leases switched on

func PassthroughBackendFactory Uses

func PassthroughBackendFactory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error)

PassthroughBackendFactory returns a PassthroughBackend with leases switched off

func VersionedKVFactory Uses

func VersionedKVFactory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error)

Factory returns a new backend as logical.Backend.

type Configuration Uses

type Configuration struct {
    MaxVersions          uint32             `protobuf:"varint,1,opt,name=max_versions,json=maxVersions,proto3" json:"max_versions,omitempty"`
    CasRequired          bool               `protobuf:"varint,2,opt,name=cas_required,json=casRequired,proto3" json:"cas_required,omitempty"`
    DeleteVersionAfter   *duration.Duration `protobuf:"bytes,3,opt,name=delete_version_after,json=deleteVersionAfter,proto3" json:"delete_version_after,omitempty"`
    XXX_NoUnkeyedLiteral struct{}           `json:"-"`
    XXX_unrecognized     []byte             `json:"-"`
    XXX_sizecache        int32              `json:"-"`
}

If values are added to this, be sure to update the config() function

func (*Configuration) Descriptor Uses

func (*Configuration) Descriptor() ([]byte, []int)

func (*Configuration) DisableDeleteVersionAfter Uses

func (c *Configuration) DisableDeleteVersionAfter()

DisableDeleteVersionAfter disables DeleteVersionAfter.

func (*Configuration) GetCasRequired Uses

func (m *Configuration) GetCasRequired() bool

func (*Configuration) GetDeleteVersionAfter Uses

func (m *Configuration) GetDeleteVersionAfter() *duration.Duration

func (*Configuration) GetMaxVersions Uses

func (m *Configuration) GetMaxVersions() uint32

func (*Configuration) IsDeleteVersionAfterDisabled Uses

func (c *Configuration) IsDeleteVersionAfterDisabled() bool

IsDeleteVersionAfterDisabled returns true if DeleteVersionAfter is disabled.

func (*Configuration) ProtoMessage Uses

func (*Configuration) ProtoMessage()

func (*Configuration) Reset Uses

func (m *Configuration) Reset()

func (*Configuration) ResetDeleteVersionAfter Uses

func (c *Configuration) ResetDeleteVersionAfter()

ResetDeleteVersionAfter resets the DeleteVersionAfter to the default value.

func (*Configuration) String Uses

func (m *Configuration) String() string

func (*Configuration) XXX_DiscardUnknown Uses

func (m *Configuration) XXX_DiscardUnknown()

func (*Configuration) XXX_Marshal Uses

func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Configuration) XXX_Merge Uses

func (m *Configuration) XXX_Merge(src proto.Message)

func (*Configuration) XXX_Size Uses

func (m *Configuration) XXX_Size() int

func (*Configuration) XXX_Unmarshal Uses

func (m *Configuration) XXX_Unmarshal(b []byte) error

type KeyMetadata Uses

type KeyMetadata struct {
    // Key is the key for this entry
    Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
    // Versions is the map of versionID -> VersionMetadata.
    // Useful when listing all versions.
    Versions map[uint64]*VersionMetadata `protobuf:"bytes,2,rep,name=versions,proto3" json:"versions,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    // CurrentVersion is the latest version of the value
    CurrentVersion uint64 `protobuf:"varint,3,opt,name=current_version,json=currentVersion,proto3" json:"current_version,omitempty"`
    // OldestVersion is the oldest version of the value.
    OldestVersion uint64 `protobuf:"varint,4,opt,name=oldest_version,json=oldestVersion,proto3" json:"oldest_version,omitempty"`
    // Created time is when the metadata was created.
    CreatedTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"`
    // Updated time was the last time the metadata version
    // was updated.
    UpdatedTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=updated_time,json=updatedTime,proto3" json:"updated_time,omitempty"`
    // MaxVersions specifies how many versions to keep around.
    // If empty value, defaults to the configured Max
    // for the mount.
    MaxVersions uint32 `protobuf:"varint,7,opt,name=max_versions,json=maxVersions,proto3" json:"max_versions,omitempty"`
    // CasRequired specifies if the cas parameter is
    // required for this key
    CasRequired bool `protobuf:"varint,8,opt,name=cas_required,json=casRequired,proto3" json:"cas_required,omitempty"`
    // DeleteVersionAfter specifies how long to keep versions around. If
    // empty value, defaults to the configured delete_version_after for the
    // mount.
    DeleteVersionAfter   *duration.Duration `protobuf:"bytes,9,opt,name=delete_version_after,json=deleteVersionAfter,proto3" json:"delete_version_after,omitempty"`
    XXX_NoUnkeyedLiteral struct{}           `json:"-"`
    XXX_unrecognized     []byte             `json:"-"`
    XXX_sizecache        int32              `json:"-"`
}

func (*KeyMetadata) AddVersion Uses

func (k *KeyMetadata) AddVersion(createdTime, deletionTime *timestamp.Timestamp, configMaxVersions uint32) (*VersionMetadata, uint64)

AddVersion adds a version to the key metadata and moves the sliding window of max versions. It returns the newly added version and the version to delete from storage.

func (*KeyMetadata) Descriptor Uses

func (*KeyMetadata) Descriptor() ([]byte, []int)

func (*KeyMetadata) GetCasRequired Uses

func (m *KeyMetadata) GetCasRequired() bool

func (*KeyMetadata) GetCreatedTime Uses

func (m *KeyMetadata) GetCreatedTime() *timestamp.Timestamp

func (*KeyMetadata) GetCurrentVersion Uses

func (m *KeyMetadata) GetCurrentVersion() uint64

func (*KeyMetadata) GetDeleteVersionAfter Uses

func (m *KeyMetadata) GetDeleteVersionAfter() *duration.Duration

func (*KeyMetadata) GetKey Uses

func (m *KeyMetadata) GetKey() string

func (*KeyMetadata) GetMaxVersions Uses

func (m *KeyMetadata) GetMaxVersions() uint32

func (*KeyMetadata) GetOldestVersion Uses

func (m *KeyMetadata) GetOldestVersion() uint64

func (*KeyMetadata) GetUpdatedTime Uses

func (m *KeyMetadata) GetUpdatedTime() *timestamp.Timestamp

func (*KeyMetadata) GetVersions Uses

func (m *KeyMetadata) GetVersions() map[uint64]*VersionMetadata

func (*KeyMetadata) ProtoMessage Uses

func (*KeyMetadata) ProtoMessage()

func (*KeyMetadata) Reset Uses

func (m *KeyMetadata) Reset()

func (*KeyMetadata) String Uses

func (m *KeyMetadata) String() string

func (*KeyMetadata) XXX_DiscardUnknown Uses

func (m *KeyMetadata) XXX_DiscardUnknown()

func (*KeyMetadata) XXX_Marshal Uses

func (m *KeyMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeyMetadata) XXX_Merge Uses

func (m *KeyMetadata) XXX_Merge(src proto.Message)

func (*KeyMetadata) XXX_Size Uses

func (m *KeyMetadata) XXX_Size() int

func (*KeyMetadata) XXX_Unmarshal Uses

func (m *KeyMetadata) XXX_Unmarshal(b []byte) error

type Passthrough Uses

type Passthrough interface {
    // contains filtered or unexported methods
}

type PassthroughBackend Uses

type PassthroughBackend struct {
    *framework.Backend
    // contains filtered or unexported fields
}

PassthroughBackend is used storing secrets directly into the physical backend. The secrets are encrypted in the durable storage and custom TTL information can be specified, but otherwise this backend doesn't do anything fancy.

func (*PassthroughBackend) GeneratesLeases Uses

func (b *PassthroughBackend) GeneratesLeases() bool

type UpgradeInfo Uses

type UpgradeInfo struct {
    // Started time is when the upgrade was started.
    StartedTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=started_time,json=startedTime,proto3" json:"started_time,omitempty"`
    // done is set to true once the backend has been successfully
    // upgraded.
    Done                 bool     `protobuf:"varint,2,opt,name=done,proto3" json:"done,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*UpgradeInfo) Descriptor Uses

func (*UpgradeInfo) Descriptor() ([]byte, []int)

func (*UpgradeInfo) GetDone Uses

func (m *UpgradeInfo) GetDone() bool

func (*UpgradeInfo) GetStartedTime Uses

func (m *UpgradeInfo) GetStartedTime() *timestamp.Timestamp

func (*UpgradeInfo) ProtoMessage Uses

func (*UpgradeInfo) ProtoMessage()

func (*UpgradeInfo) Reset Uses

func (m *UpgradeInfo) Reset()

func (*UpgradeInfo) String Uses

func (m *UpgradeInfo) String() string

func (*UpgradeInfo) XXX_DiscardUnknown Uses

func (m *UpgradeInfo) XXX_DiscardUnknown()

func (*UpgradeInfo) XXX_Marshal Uses

func (m *UpgradeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpgradeInfo) XXX_Merge Uses

func (m *UpgradeInfo) XXX_Merge(src proto.Message)

func (*UpgradeInfo) XXX_Size Uses

func (m *UpgradeInfo) XXX_Size() int

func (*UpgradeInfo) XXX_Unmarshal Uses

func (m *UpgradeInfo) XXX_Unmarshal(b []byte) error

type Version Uses

type Version struct {
    // Data is a JSON object with string keys that
    // represents the user supplied data.
    Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
    // CreatedTime is when the version was created.
    CreatedTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"`
    // DeletionTime is the time this version becomes invalid.
    // Set to Now() to delete the version before the configured
    // deletion time.
    DeletionTime         *timestamp.Timestamp `protobuf:"bytes,3,opt,name=deletion_time,json=deletionTime,proto3" json:"deletion_time,omitempty"`
    XXX_NoUnkeyedLiteral struct{}             `json:"-"`
    XXX_unrecognized     []byte               `json:"-"`
    XXX_sizecache        int32                `json:"-"`
}

func (*Version) Descriptor Uses

func (*Version) Descriptor() ([]byte, []int)

func (*Version) GetCreatedTime Uses

func (m *Version) GetCreatedTime() *timestamp.Timestamp

func (*Version) GetData Uses

func (m *Version) GetData() []byte

func (*Version) GetDeletionTime Uses

func (m *Version) GetDeletionTime() *timestamp.Timestamp

func (*Version) ProtoMessage Uses

func (*Version) ProtoMessage()

func (*Version) Reset Uses

func (m *Version) Reset()

func (*Version) String Uses

func (m *Version) String() string

func (*Version) XXX_DiscardUnknown Uses

func (m *Version) XXX_DiscardUnknown()

func (*Version) XXX_Marshal Uses

func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Version) XXX_Merge Uses

func (m *Version) XXX_Merge(src proto.Message)

func (*Version) XXX_Size Uses

func (m *Version) XXX_Size() int

func (*Version) XXX_Unmarshal Uses

func (m *Version) XXX_Unmarshal(b []byte) error

type VersionMetadata Uses

type VersionMetadata struct {
    // CreatedTime is when the version was created.
    CreatedTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"`
    // DeletionTime is the time this version becomes invalid.
    // Set to Now() to delete the version before the configured
    // delete time.
    DeletionTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=deletion_time,json=deletionTime,proto3" json:"deletion_time,omitempty"`
    // Destroyed is used to specify this version is
    // a has been removed and the underlying data deleted.
    Destroyed            bool     `protobuf:"varint,3,opt,name=destroyed,proto3" json:"destroyed,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*VersionMetadata) Descriptor Uses

func (*VersionMetadata) Descriptor() ([]byte, []int)

func (*VersionMetadata) GetCreatedTime Uses

func (m *VersionMetadata) GetCreatedTime() *timestamp.Timestamp

func (*VersionMetadata) GetDeletionTime Uses

func (m *VersionMetadata) GetDeletionTime() *timestamp.Timestamp

func (*VersionMetadata) GetDestroyed Uses

func (m *VersionMetadata) GetDestroyed() bool

func (*VersionMetadata) ProtoMessage Uses

func (*VersionMetadata) ProtoMessage()

func (*VersionMetadata) Reset Uses

func (m *VersionMetadata) Reset()

func (*VersionMetadata) String Uses

func (m *VersionMetadata) String() string

func (*VersionMetadata) XXX_DiscardUnknown Uses

func (m *VersionMetadata) XXX_DiscardUnknown()

func (*VersionMetadata) XXX_Marshal Uses

func (m *VersionMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VersionMetadata) XXX_Merge Uses

func (m *VersionMetadata) XXX_Merge(src proto.Message)

func (*VersionMetadata) XXX_Size Uses

func (m *VersionMetadata) XXX_Size() int

func (*VersionMetadata) XXX_Unmarshal Uses

func (m *VersionMetadata) XXX_Unmarshal(b []byte) error

Package kv imports 26 packages (graph). Updated 2019-07-21. Refresh now. Tools for package owners.