mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
Adds Vault version prerelease and metadata to logical.PluginEnvironment (#14851)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.3
|
||||
// protoc v3.19.4
|
||||
// source: helper/forwarding/types.proto
|
||||
|
||||
package forwarding
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.3
|
||||
// protoc v3.19.4
|
||||
// source: helper/identity/mfa/types.proto
|
||||
|
||||
package mfa
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.3
|
||||
// protoc v3.19.4
|
||||
// source: helper/identity/types.proto
|
||||
|
||||
package identity
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.3
|
||||
// protoc v3.19.4
|
||||
// source: helper/storagepacker/types.proto
|
||||
|
||||
package storagepacker
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.3
|
||||
// protoc v3.19.4
|
||||
// source: physical/raft/types.proto
|
||||
|
||||
package raft
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.3
|
||||
// protoc v3.19.4
|
||||
// source: sdk/database/dbplugin/database.proto
|
||||
|
||||
package dbplugin
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.3
|
||||
// protoc v3.19.4
|
||||
// source: sdk/database/dbplugin/v5/proto/database.proto
|
||||
|
||||
package proto
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.3
|
||||
// protoc v3.19.4
|
||||
// source: sdk/helper/pluginutil/multiplexing.proto
|
||||
|
||||
package pluginutil
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.3
|
||||
// protoc v3.19.4
|
||||
// source: sdk/logical/identity.proto
|
||||
|
||||
package logical
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.3
|
||||
// protoc v3.19.4
|
||||
// source: sdk/logical/plugin.proto
|
||||
|
||||
package logical
|
||||
@@ -27,6 +27,10 @@ type PluginEnvironment struct {
|
||||
|
||||
// VaultVersion is the version of the Vault server
|
||||
VaultVersion string `protobuf:"bytes,1,opt,name=vault_version,json=vaultVersion,proto3" json:"vault_version,omitempty"`
|
||||
// VaultVersionPrerelease is the prerelease information of the Vault server
|
||||
VaultVersionPrerelease string `protobuf:"bytes,2,opt,name=vault_version_prerelease,json=vaultVersionPrerelease,proto3" json:"vault_version_prerelease,omitempty"`
|
||||
// VaultVersionMetadata is the version metadata of the Vault server
|
||||
VaultVersionMetadata string `protobuf:"bytes,3,opt,name=vault_version_metadata,json=vaultVersionMetadata,proto3" json:"vault_version_metadata,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PluginEnvironment) Reset() {
|
||||
@@ -68,18 +72,39 @@ func (x *PluginEnvironment) GetVaultVersion() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PluginEnvironment) GetVaultVersionPrerelease() string {
|
||||
if x != nil {
|
||||
return x.VaultVersionPrerelease
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PluginEnvironment) GetVaultVersionMetadata() string {
|
||||
if x != nil {
|
||||
return x.VaultVersionMetadata
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_sdk_logical_plugin_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_sdk_logical_plugin_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x73, 0x64, 0x6b, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2f, 0x70, 0x6c,
|
||||
0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6c, 0x6f, 0x67, 0x69,
|
||||
0x63, 0x61, 0x6c, 0x22, 0x38, 0x0a, 0x11, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76,
|
||||
0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x75, 0x6c,
|
||||
0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0c, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x28, 0x5a,
|
||||
0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68,
|
||||
0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x73, 0x64, 0x6b, 0x2f,
|
||||
0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x63, 0x61, 0x6c, 0x22, 0xa8, 0x01, 0x0a, 0x11, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e,
|
||||
0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x75,
|
||||
0x6c, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0c, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38,
|
||||
0x0a, 0x18, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f,
|
||||
0x70, 0x72, 0x65, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x16, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72,
|
||||
0x65, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x76, 0x61, 0x75, 0x6c,
|
||||
0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
|
||||
0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x56,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x28,
|
||||
0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73,
|
||||
0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x73, 0x64, 0x6b,
|
||||
0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@@ -7,4 +7,10 @@ package logical;
|
||||
message PluginEnvironment {
|
||||
// VaultVersion is the version of the Vault server
|
||||
string vault_version = 1;
|
||||
|
||||
// VaultVersionPrerelease is the prerelease information of the Vault server
|
||||
string vault_version_prerelease = 2;
|
||||
|
||||
// VaultVersionMetadata is the version metadata of the Vault server
|
||||
string vault_version_metadata = 3;
|
||||
}
|
||||
|
@@ -213,7 +213,9 @@ func TestSystem_GRPC_groupsForEntity(t *testing.T) {
|
||||
func TestSystem_GRPC_pluginEnv(t *testing.T) {
|
||||
sys := logical.TestSystemView()
|
||||
sys.PluginEnvironment = &logical.PluginEnvironment{
|
||||
VaultVersion: "0.10.42",
|
||||
VaultVersion: "0.10.42",
|
||||
VaultVersionPrerelease: "dev",
|
||||
VaultVersionMetadata: "prem",
|
||||
}
|
||||
client, _ := plugin.TestGRPCConn(t, func(s *grpc.Server) {
|
||||
pb.RegisterSystemViewServer(s, &gRPCSystemViewServer{
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.3
|
||||
// protoc v3.19.4
|
||||
// source: sdk/plugin/pb/backend.proto
|
||||
|
||||
package pb
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.17.3
|
||||
// protoc v3.19.4
|
||||
// source: vault/activity/activity_log.proto
|
||||
|
||||
package activity
|
||||
@@ -20,10 +20,9 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// EntityRecord is generated the first time an client is active
|
||||
// each month. This can store clients associated with entities
|
||||
// or nonEntity clients, and really is a ClientRecord, not
|
||||
// specifically an EntityRecord
|
||||
// EntityRecord is generated the first time a client is active each month. This
|
||||
// can store clients associated with entities or nonEntity clients, and really
|
||||
// is a ClientRecord, not specifically an EntityRecord.
|
||||
type EntityRecord struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -37,7 +36,8 @@ type EntityRecord struct {
|
||||
// non_entity records whether the given EntityRecord is
|
||||
// for a TWE or an entity-bound token.
|
||||
NonEntity bool `protobuf:"varint,4,opt,name=non_entity,json=nonEntity,proto3" json:"non_entity,omitempty"`
|
||||
// MountAccessor is the path used by client to perform login
|
||||
// MountAccessor is the auth mount accessor of the token used to perform the
|
||||
// activity.
|
||||
MountAccessor string `protobuf:"bytes,5,opt,name=mount_accessor,json=mountAccessor,proto3" json:"mount_accessor,omitempty"`
|
||||
}
|
||||
|
||||
|
@@ -350,8 +350,11 @@ func (d dynamicSystemView) GroupsForEntity(entityID string) ([]*logical.Group, e
|
||||
}
|
||||
|
||||
func (d dynamicSystemView) PluginEnv(_ context.Context) (*logical.PluginEnvironment, error) {
|
||||
v := version.GetVersion()
|
||||
return &logical.PluginEnvironment{
|
||||
VaultVersion: version.GetVersion().Version,
|
||||
VaultVersion: v.Version,
|
||||
VaultVersionPrerelease: v.VersionPrerelease,
|
||||
VaultVersionMetadata: v.VersionMetadata,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.19.3
|
||||
// protoc v3.19.4
|
||||
// source: vault/request_forwarding_service.proto
|
||||
|
||||
package vault
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.17.3
|
||||
// protoc v3.19.4
|
||||
// source: vault/tokens/token.proto
|
||||
|
||||
package tokens
|
||||
|
Reference in New Issue
Block a user