From cbf71df8e904d50a3d36a5576f03922607d23009 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Mon, 30 Mar 2020 13:05:14 -0600 Subject: [PATCH 01/29] Add random string generator with rules engine This adds a random string generation library that validates random strings against a set of rules. This is designed for use as generating passwords, but can be used to generate any random strings. --- sdk/helper/random/parser.go | 246 +++++++ sdk/helper/random/parser_test.go | 709 +++++++++++++++++++++ sdk/helper/random/registry.go | 30 + sdk/helper/random/registry_test.go | 97 +++ sdk/helper/random/rules.go | 65 ++ sdk/helper/random/rules_test.go | 90 +++ sdk/helper/random/string_generator.go | 97 +++ sdk/helper/random/string_generator_test.go | 314 +++++++++ 8 files changed, 1648 insertions(+) create mode 100644 sdk/helper/random/parser.go create mode 100644 sdk/helper/random/parser_test.go create mode 100644 sdk/helper/random/registry.go create mode 100644 sdk/helper/random/registry_test.go create mode 100644 sdk/helper/random/rules.go create mode 100644 sdk/helper/random/rules_test.go create mode 100644 sdk/helper/random/string_generator.go create mode 100644 sdk/helper/random/string_generator_test.go diff --git a/sdk/helper/random/parser.go b/sdk/helper/random/parser.go new file mode 100644 index 000000000000..77c76f9dad60 --- /dev/null +++ b/sdk/helper/random/parser.go @@ -0,0 +1,246 @@ +package random + +import ( + "fmt" + "reflect" + "sort" + "unicode" + "unicode/utf8" + + "github.com/hashicorp/go-multierror" + "github.com/hashicorp/hcl" + "github.com/mitchellh/mapstructure" +) + +func Parse(raw string) (strs StringGenerator, err error) { + parser := Parser{ + RuleRegistry: Registry{ + Rules: defaultRules, + }, + } + return parser.Parse(raw) +} + +type Parser struct { + RuleRegistry Registry +} + +func (p Parser) Parse(raw string) (strs StringGenerator, err error) { + rawData := map[string]interface{}{} + err = hcl.Decode(&rawData, raw) + if err != nil { + return strs, fmt.Errorf("unable to decode: %w", err) + } + + // Decode the top level items + decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ + Result: &strs, + DecodeHook: stringToRunesFunc, + }) + if err != nil { + return strs, fmt.Errorf("unable to decode configuration: %w", err) + } + + err = decoder.Decode(rawData) + if err != nil { + return strs, fmt.Errorf("failed to decode configuration: %w", err) + } + + // Decode & parse rules + rawRules, err := getMapSlice(rawData, "rule") + if err != nil { + return strs, fmt.Errorf("unable to retrieve rules: %w", err) + } + + rules, err := p.parseRules(rawRules) + if err != nil { + return strs, fmt.Errorf("unable to parse rules: %w", err) + } + + // Add any charsets found in rules to the overall charset & deduplicate + cs := append(strs.Charset, getChars(rules)...) + cs = deduplicateRunes(cs) + + strs = StringGenerator{ + Length: strs.Length, + Charset: cs, + Rules: rules, + } + + err = validate(strs) + if err != nil { + return strs, err + } + + return strs, nil +} + +func (p Parser) parseRules(rawRules []map[string]interface{}) (rules []Rule, err error) { + for _, rawRule := range rawRules { + info, err := getRuleInfo(rawRule) + if err != nil { + return nil, fmt.Errorf("unable to get rule info: %w", err) + } + + // Map names like "lower-alpha" to lowercase alphabetical characters + applyShortcuts(info.data) + + rule, err := p.RuleRegistry.parseRule(info.ruleType, info.data) + if err != nil { + return nil, fmt.Errorf("unable to parse rule %s: %w", info.ruleType, err) + } + rules = append(rules, rule) + } + + return rules, nil +} + +func validate(strs StringGenerator) (err error) { + merr := &multierror.Error{} + if strs.Length < 1 { + merr = multierror.Append(merr, fmt.Errorf("length must be >= 1")) + } + if len(strs.Charset) == 0 { + merr = multierror.Append(merr, fmt.Errorf("no charset specified")) + } + + for _, r := range strs.Charset { + if !unicode.IsPrint(r) { + merr = multierror.Append(merr, fmt.Errorf("non-printable character in charset")) + break + } + } + + return merr.ErrorOrNil() +} + +func getChars(rules []Rule) (chars []rune) { + type charsetProvider interface { + Chars() []rune + } + + for _, rule := range rules { + cv, ok := rule.(charsetProvider) + if !ok { + continue + } + chars = append(chars, cv.Chars()...) + } + return chars +} + +// getMapSlice from the provided map. This will retrieve and type-assert a []map[string]interface{} from the map +// This will not error if the key does not exist +// This will return an error if the value at the provided key is not of type []map[string]interface{} +func getMapSlice(m map[string]interface{}, key string) (mapSlice []map[string]interface{}, err error) { + rawSlice, exists := m[key] + if !exists { + return nil, nil + } + + slice, ok := rawSlice.([]map[string]interface{}) + if !ok { + return nil, fmt.Errorf("key %s is not a []map[string]interface{}", key) + } + + return slice, nil +} + +type ruleInfo struct { + ruleType string + data map[string]interface{} +} + +// getRuleInfo splits the provided HCL-decoded rule into its rule type along with the data associated with it +func getRuleInfo(rule map[string]interface{}) (data ruleInfo, err error) { + // There should only be one key, but it's a dynamic key yay! + for key := range rule { + slice, err := getMapSlice(rule, key) + if err != nil { + return data, fmt.Errorf("unable to get rule data: %w", err) + } + data = ruleInfo{ + ruleType: key, + data: slice[0], + } + return data, nil + } + return data, fmt.Errorf("rule is empty") +} + +var ( + charsetShortcuts = map[string]string{ + // Base + "lower-alpha": "abcdefghijklmnopqrstuvwxyz", + "upper-alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "numeric": "0123456789", + + // Combinations + "lower-upper-alpha": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", + "lower-upper-alphanumeric": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", + } +) + +// applyShortcuts to the provided map. This will look for a "charset" key. If it exists and equals one of the keys +// in `charsetShortcuts`, it replaces the value with the value found in the `charsetShortcuts` map. For instance: +// +// Input map: +// map[string]interface{}{ +// "charset": "upper-alpha", +// } +// +// This will convert it to: +// map[string]interface{}{ +// "charset": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", +// } +func applyShortcuts(m map[string]interface{}) { + rawCharset, exists := m["charset"] + if !exists { + return + } + charset, ok := rawCharset.(string) + if !ok { + return + } + newCharset, shortcutExists := charsetShortcuts[charset] + if !shortcutExists { + return + } + m["charset"] = newCharset +} + +func deduplicateRunes(original []rune) (deduped []rune) { + m := map[rune]bool{} + dedupedRunes := []rune(nil) + + for _, r := range original { + if m[r] { + continue + } + m[r] = true + dedupedRunes = append(dedupedRunes, r) + } + + // They don't have to be sorted, but this is being done to make the charset easier to visualize + sort.Sort(runes(dedupedRunes)) + return dedupedRunes +} + +type runes []rune + +func (r runes) Len() int { return len(r) } +func (r runes) Less(i, j int) bool { return r[i] < r[j] } +func (r runes) Swap(i, j int) { r[i], r[j] = r[j], r[i] } + +func stringToRunesFunc(from reflect.Kind, to reflect.Kind, data interface{}) (interface{}, error) { + if from != reflect.String || to != reflect.Slice { + return data, nil + } + + raw := data.(string) + + if !utf8.ValidString(raw) { + return nil, fmt.Errorf("invalid UTF8 string") + } + return []rune(raw), nil +} diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go new file mode 100644 index 000000000000..98f7286c0fb3 --- /dev/null +++ b/sdk/helper/random/parser_test.go @@ -0,0 +1,709 @@ +package random + +import ( + "reflect" + "testing" +) + +func TestParse(t *testing.T) { + type testCase struct { + rawConfig string + expected StringGenerator + expectErr bool + } + + tests := map[string]testCase{ + "unrecognized rule": { + rawConfig: ` + length = 20 + charset = "abcde" + rule "testrule" { + string = "omgwtfbbq" + int = 123 + }`, + expected: StringGenerator{ + Length: 20, + Charset: []rune("abcde"), + Rules: nil, + }, + expectErr: true, + }, + + "charset restrictions": { + rawConfig: ` + length = 20 + charset = "abcde" + rule "CharsetRestriction" { + charset = "abcde" + min-chars = 2 + }`, + expected: StringGenerator{ + Length: 20, + Charset: []rune("abcde"), + Rules: []Rule{ + &CharsetRestriction{ + Charset: []rune("abcde"), + MinChars: 2, + }, + }, + }, + expectErr: false, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + actual, err := Parse(test.rawConfig) + if test.expectErr && err == nil { + t.Fatalf("err expected, got nil") + } + if !test.expectErr && err != nil { + t.Fatalf("no error expected, got: %s", err) + } + + if !reflect.DeepEqual(actual, test.expected) { + t.Fatalf("Actual: %#v\nExpected:%#v", actual, test.expected) + } + }) + } +} + +func TestParser_Parse(t *testing.T) { + type testCase struct { + registry map[string]ruleConstructor + + rawConfig string + expected StringGenerator + expectErr bool + } + + tests := map[string]testCase{ + "empty config": { + registry: defaultRules, + rawConfig: "", + expected: StringGenerator{}, + expectErr: true, + }, + "bogus config": { + registry: defaultRules, + rawConfig: "asdf", + expected: StringGenerator{}, + expectErr: true, + }, + "config with length and charset": { + registry: defaultRules, + rawConfig: ` + length = 20 + charset = "abcde"`, + expected: StringGenerator{ + Length: 20, + Charset: []rune("abcde"), + }, + expectErr: false, + }, + "config with negative length": { + registry: defaultRules, + rawConfig: ` + length = -2 + charset = "abcde"`, + expected: StringGenerator{ + Length: -2, + Charset: []rune("abcde"), + }, + expectErr: true, + }, + "charset restrictions": { + registry: defaultRules, + rawConfig: ` + length = 20 + charset = "abcde" + rule "CharsetRestriction" { + charset = "abcde" + min-chars = 2 + }`, + expected: StringGenerator{ + Length: 20, + Charset: []rune("abcde"), + Rules: []Rule{ + &CharsetRestriction{ + Charset: []rune("abcde"), + MinChars: 2, + }, + }, + }, + expectErr: false, + }, + "test rule": { + registry: map[string]ruleConstructor{ + "testrule": newTestRule, + }, + rawConfig: ` + length = 20 + charset = "abcde" + rule "testrule" { + string = "omgwtfbbq" + int = 123 + }`, + expected: StringGenerator{ + Length: 20, + Charset: []rune("abcde"), + Rules: []Rule{ + &testRule{ + String: "omgwtfbbq", + Integer: 123, + }, + }, + }, + expectErr: false, + }, + "test rule and charset restrictions": { + registry: map[string]ruleConstructor{ + "testrule": newTestRule, + "CharsetRestriction": NewCharsetRestriction, + }, + rawConfig: ` + length = 20 + charset = "abcde" + rule "testrule" { + string = "omgwtfbbq" + int = 123 + } + rule "CharsetRestriction" { + charset = "abcde" + min-chars = 2 + }`, + expected: StringGenerator{ + Length: 20, + Charset: []rune("abcde"), + Rules: []Rule{ + &testRule{ + String: "omgwtfbbq", + Integer: 123, + }, + &CharsetRestriction{ + Charset: []rune("abcde"), + MinChars: 2, + }, + }, + }, + expectErr: false, + }, + "unrecognized rule": { + registry: defaultRules, + rawConfig: ` + length = 20 + charset = "abcde" + rule "testrule" { + string = "omgwtfbbq" + int = 123 + }`, + expected: StringGenerator{ + Length: 20, + Charset: []rune("abcde"), + Rules: nil, + }, + expectErr: true, + }, + + // ///////////////////////////////////////////////// + // JSON data + "JSON test rule and charset restrictions": { + registry: map[string]ruleConstructor{ + "testrule": newTestRule, + "CharsetRestriction": NewCharsetRestriction, + }, + rawConfig: `{ + "charset": "abcde", + "length": 20, + "rule": [ + { + "testrule": [ + { + "string": "omgwtfbbq", + "int": 123 + } + ], + }, + { + "CharsetRestriction": [ + { + "charset": "abcde", + "min-chars": 2 + } + ] + } + ] + }`, + expected: StringGenerator{ + Length: 20, + Charset: []rune("abcde"), + Rules: []Rule{ + &testRule{ + String: "omgwtfbbq", + Integer: 123, + }, + &CharsetRestriction{ + Charset: []rune("abcde"), + MinChars: 2, + }, + }, + }, + expectErr: false, + }, + "JSON unrecognized rule": { + registry: defaultRules, + rawConfig: `{ + "charset": "abcde", + "length": 20, + "rule": [ + { + "testrule": [ + { + "string": "omgwtfbbq", + "int": 123 + } + ], + } + ] + }`, + expected: StringGenerator{ + Length: 20, + Charset: []rune("abcde"), + Rules: nil, + }, + expectErr: true, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + parser := Parser{ + RuleRegistry: Registry{ + Rules: test.registry, + }, + } + + actual, err := parser.Parse(test.rawConfig) + if test.expectErr && err == nil { + t.Fatalf("err expected, got nil") + } + if !test.expectErr && err != nil { + t.Fatalf("no error expected, got: %s", err) + } + + if !reflect.DeepEqual(actual, test.expected) { + t.Fatalf("Actual: %#v\nExpected:%#v", actual, test.expected) + } + }) + } +} + +func TestParseRules(t *testing.T) { + type testCase struct { + registry map[string]ruleConstructor + + rawRules []map[string]interface{} + expectedRules []Rule + expectErr bool + } + + tests := map[string]testCase{ + "nil rule data": { + registry: defaultRules, + rawRules: nil, + expectedRules: nil, + expectErr: false, + }, + "empty rule data": { + registry: defaultRules, + rawRules: []map[string]interface{}{}, + expectedRules: nil, + expectErr: false, + }, + "invalid rule data": { + registry: defaultRules, + rawRules: []map[string]interface{}{ + { + "testrule": map[string]interface{}{ + "string": "omgwtfbbq", + }, + }, + }, + expectedRules: nil, + expectErr: true, + }, + "unrecognized rule data": { + registry: defaultRules, + rawRules: []map[string]interface{}{ + { + "testrule": []map[string]interface{}{ + { + "string": "omgwtfbbq", + "int": 123, + }, + }, + }, + }, + expectedRules: nil, + expectErr: true, + }, + "recognized rule": { + registry: map[string]ruleConstructor{ + "testrule": newTestRule, + }, + rawRules: []map[string]interface{}{ + { + "testrule": []map[string]interface{}{ + { + "string": "omgwtfbbq", + "int": 123, + }, + }, + }, + }, + expectedRules: []Rule{ + &testRule{ + String: "omgwtfbbq", + Integer: 123, + }, + }, + expectErr: false, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + parser := Parser{ + RuleRegistry: Registry{ + Rules: test.registry, + }, + } + + actualRules, err := parser.parseRules(test.rawRules) + if test.expectErr && err == nil { + t.Fatalf("err expected, got nil") + } + if !test.expectErr && err != nil { + t.Fatalf("no error expected, got: %s", err) + } + + if !reflect.DeepEqual(actualRules, test.expectedRules) { + t.Fatalf("Actual: %#v\nExpected:%#v", actualRules, test.expectedRules) + } + }) + } +} + +func TestGetChars(t *testing.T) { + type testCase struct { + rules []Rule + expected []rune + } + + tests := map[string]testCase{ + "nil rules": { + rules: nil, + expected: []rune(nil), + }, + "empty rules": { + rules: []Rule{}, + expected: []rune(nil), + }, + "rule without chars": { + rules: []Rule{ + testRule{ + String: "omgwtfbbq", + Integer: 123, + }, + }, + expected: []rune(nil), + }, + "rule with chars": { + rules: []Rule{ + CharsetRestriction{ + Charset: []rune("abcdefghij"), + MinChars: 1, + }, + }, + expected: []rune("abcdefghij"), + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + actual := getChars(test.rules) + if !reflect.DeepEqual(actual, test.expected) { + t.Fatalf("Actual: %v\nExpected: %v", actual, test.expected) + } + }) + } +} + +func TestGetMapSlice(t *testing.T) { + type testCase struct { + input map[string]interface{} + key string + expectedSlice []map[string]interface{} + expectErr bool + } + + tests := map[string]testCase{ + "nil map": { + input: nil, + key: "testkey", + expectedSlice: nil, + expectErr: false, + }, + "empty map": { + input: map[string]interface{}{}, + key: "testkey", + expectedSlice: nil, + expectErr: false, + }, + "ignored keys": { + input: map[string]interface{}{ + "foo": "bar", + }, + key: "testkey", + expectedSlice: nil, + expectErr: false, + }, + "key has wrong type": { + input: map[string]interface{}{ + "foo": "bar", + }, + key: "foo", + expectedSlice: nil, + expectErr: true, + }, + "good data": { + input: map[string]interface{}{ + "foo": []map[string]interface{}{ + { + "sub-foo": "bar", + }, + }, + }, + key: "foo", + expectedSlice: []map[string]interface{}{ + { + "sub-foo": "bar", + }, + }, + expectErr: false, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + actualSlice, err := getMapSlice(test.input, test.key) + if test.expectErr && err == nil { + t.Fatalf("err expected, got nil") + } + if !test.expectErr && err != nil { + t.Fatalf("no error expected, got: %s", err) + } + + if !reflect.DeepEqual(actualSlice, test.expectedSlice) { + t.Fatalf("Actual: %#v\nExpected:%#v", actualSlice, test.expectedSlice) + } + }) + } +} + +func TestGetRuleInfo(t *testing.T) { + type testCase struct { + rule map[string]interface{} + expectedInfo ruleInfo + expectErr bool + } + + tests := map[string]testCase{ + "nil rule": { + rule: nil, + expectedInfo: ruleInfo{}, + expectErr: true, + }, + "empty rule": { + rule: map[string]interface{}{}, + expectedInfo: ruleInfo{}, + expectErr: true, + }, + "rule with invalid type": { + rule: map[string]interface{}{ + "TestRuleType": "wrong type", + }, + expectedInfo: ruleInfo{}, + expectErr: true, + }, + "rule with good data": { + rule: map[string]interface{}{ + "TestRuleType": []map[string]interface{}{ + { + "foo": "bar", + }, + }, + }, + expectedInfo: ruleInfo{ + ruleType: "TestRuleType", + data: map[string]interface{}{ + "foo": "bar", + }, + }, + expectErr: false, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + actualInfo, err := getRuleInfo(test.rule) + if test.expectErr && err == nil { + t.Fatalf("err expected, got nil") + } + if !test.expectErr && err != nil { + t.Fatalf("no error expected, got: %s", err) + } + + if !reflect.DeepEqual(actualInfo, test.expectedInfo) { + t.Fatalf("Actual: %#v\nExpected:%#v", actualInfo, test.expectedInfo) + } + }) + } +} + +func TestApplyShortcuts(t *testing.T) { + type testCase struct { + input map[string]interface{} + expected map[string]interface{} + } + + tests := map[string]testCase{ + "nil map": { + input: nil, + expected: nil, + }, + "empty map": { + input: map[string]interface{}{}, + expected: map[string]interface{}{}, + }, + "non-matching key": { + input: map[string]interface{}{ + "foo": "omgwtfbbq", + }, + expected: map[string]interface{}{ + "foo": "omgwtfbbq", + }, + }, + "matching key": { + input: map[string]interface{}{ + "charset": "lower-alpha", + }, + expected: map[string]interface{}{ + "charset": "abcdefghijklmnopqrstuvwxyz", + }, + }, + "matching and non-matching keys": { + input: map[string]interface{}{ + "charset": "lower-alpha", + "foo": "omgwtfbbq", + }, + expected: map[string]interface{}{ + "charset": "abcdefghijklmnopqrstuvwxyz", + "foo": "omgwtfbbq", + }, + }, + "invalid value type": { + input: map[string]interface{}{ + "charset": 123, + }, + expected: map[string]interface{}{ + "charset": 123, + }, + }, + "unrecognized shortcut": { + input: map[string]interface{}{ + "charset": "abcdefghijklmnopqrstuvwxyz", + }, + expected: map[string]interface{}{ + "charset": "abcdefghijklmnopqrstuvwxyz", + }, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + applyShortcuts(test.input) + if !reflect.DeepEqual(test.input, test.expected) { + t.Fatalf("Actual: %#v\nExpected:%#v", test.input, test.expected) + } + }) + } +} + +func TestDeduplicateRunes(t *testing.T) { + type testCase struct { + input []rune + expected []rune + } + + tests := map[string]testCase{ + "empty string": { + input: []rune(""), + expected: []rune(nil), + }, + "no duplicates": { + input: []rune("abcde"), + expected: []rune("abcde"), + }, + "in order duplicates": { + input: []rune("aaaabbbbcccccccddddeeeee"), + expected: []rune("abcde"), + }, + "out of order duplicates": { + input: []rune("abcdeabcdeabcdeabcde"), + expected: []rune("abcde"), + }, + "unicode no duplicates": { + input: []rune("日本語"), + expected: []rune("日本語"), + }, + "unicode in order duplicates": { + input: []rune("日日日日本本本語語語語語"), + expected: []rune("日本語"), + }, + "unicode out of order duplicates": { + input: []rune("日本語日本語日本語日本語"), + expected: []rune("日本語"), + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + actual := deduplicateRunes([]rune(test.input)) + if !reflect.DeepEqual(actual, []rune(test.expected)) { + t.Fatalf("Actual: %#v\nExpected:%#v", actual, test.expected) + } + }) + } +} + +func BenchmarkParser_Parse(b *testing.B) { + config := `length = 20 + charset = "abcde" + rule "CharsetRestriction" { + charset = "abcde" + min-chars = 2 + }` + + for i := 0; i < b.N; i++ { + parser := Parser{ + RuleRegistry: Registry{ + Rules: defaultRules, + }, + } + _, err := parser.Parse(config) + if err != nil { + b.Fatalf("Failed to parse: %s", err) + } + } +} diff --git a/sdk/helper/random/registry.go b/sdk/helper/random/registry.go new file mode 100644 index 000000000000..6038e93294f1 --- /dev/null +++ b/sdk/helper/random/registry.go @@ -0,0 +1,30 @@ +package random + +import ( + "fmt" +) + +type ruleConstructor func(map[string]interface{}) (Rule, error) + +var ( + defaultRegistry = Registry{ + Rules: defaultRules, + } + + defaultRules = map[string]ruleConstructor{ + "CharsetRestriction": NewCharsetRestriction, + } +) + +type Registry struct { + Rules map[string]ruleConstructor +} + +func (r Registry) parseRule(ruleType string, ruleData map[string]interface{}) (rule Rule, err error) { + constructor, exists := r.Rules[ruleType] + if !exists { + return nil, fmt.Errorf("unrecognized rule type %s", ruleType) + } + + return constructor(ruleData) +} diff --git a/sdk/helper/random/registry_test.go b/sdk/helper/random/registry_test.go new file mode 100644 index 000000000000..c0cbcd6fd887 --- /dev/null +++ b/sdk/helper/random/registry_test.go @@ -0,0 +1,97 @@ +package random + +import ( + "fmt" + "reflect" + "testing" + + "github.com/mitchellh/mapstructure" +) + +type testRule struct { + String string `mapstructure:"string" json:"string"` + Integer int `mapstructure:"int" json:"int"` + + // Default to passing + fail bool +} + +func newTestRule(data map[string]interface{}) (rule Rule, err error) { + tr := &testRule{} + err = mapstructure.Decode(data, tr) + if err != nil { + return nil, fmt.Errorf("unable to decode test rule") + } + return tr, nil +} + +func (tr testRule) Pass([]rune) bool { return !tr.fail } + +func TestParseRule(t *testing.T) { + type testCase struct { + rules map[string]ruleConstructor + + ruleType string + ruleData map[string]interface{} + + expectedRule Rule + expectErr bool + } + + tests := map[string]testCase{ + "missing rule": { + rules: map[string]ruleConstructor{}, + ruleType: "testrule", + ruleData: map[string]interface{}{ + "string": "omgwtfbbq", + "int": 123, + }, + expectedRule: nil, + expectErr: true, + }, + "nil data": { + rules: map[string]ruleConstructor{ + "testrule": newTestRule, + }, + ruleType: "testrule", + ruleData: nil, + expectedRule: &testRule{}, + expectErr: false, + }, + "good rule": { + rules: map[string]ruleConstructor{ + "testrule": newTestRule, + }, + ruleType: "testrule", + ruleData: map[string]interface{}{ + "string": "omgwtfbbq", + "int": 123, + }, + expectedRule: &testRule{ + String: "omgwtfbbq", + Integer: 123, + }, + expectErr: false, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + reg := Registry{ + Rules: test.rules, + } + + actualRule, err := reg.parseRule(test.ruleType, test.ruleData) + if test.expectErr && err == nil { + t.Fatalf("err expected, got nil") + } + if !test.expectErr && err != nil { + t.Fatalf("no error expected, got: %s", err) + } + + if !reflect.DeepEqual(actualRule, test.expectedRule) { + t.Fatalf("Actual: %#v\nExpected:%#v", actualRule, test.expectedRule) + } + }) + } +} diff --git a/sdk/helper/random/rules.go b/sdk/helper/random/rules.go new file mode 100644 index 000000000000..128da5a2a825 --- /dev/null +++ b/sdk/helper/random/rules.go @@ -0,0 +1,65 @@ +package random + +import ( + "fmt" + + "github.com/mitchellh/mapstructure" +) + +// CharsetRestriction requires a certain number of characters from the specified charset +type CharsetRestriction struct { + Charset []rune `mapstructure:"charset" json:"charset"` + + // MinChars indicates the minimum (inclusive) number of characters from the charset that should appear in the string + MinChars int `mapstructure:"min-chars" json:"min-chars"` +} + +func NewCharsetRestriction(data map[string]interface{}) (rule Rule, err error) { + cr := &CharsetRestriction{} + + decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ + Metadata: nil, + Result: cr, + DecodeHook: stringToRunesFunc, + }) + if err != nil { + return nil, fmt.Errorf("unable to decode charset restriction: %w", err) + } + + err = decoder.Decode(data) + if err != nil { + return nil, fmt.Errorf("failed to parse charset restriction: %w", err) + } + return cr, nil +} + +func (c CharsetRestriction) Chars() []rune { + return c.Charset +} + +func (c CharsetRestriction) Pass(value []rune) bool { + if c.MinChars <= 0 { + return true + } + + count := 0 + for _, r := range value { + if charIn(r, c.Charset) { + count++ + if count >= c.MinChars { + return true + } + } + } + + return false +} + +func charIn(search rune, charset []rune) bool { + for _, r := range charset { + if search == r { + return true + } + } + return false +} diff --git a/sdk/helper/random/rules_test.go b/sdk/helper/random/rules_test.go new file mode 100644 index 000000000000..8b26b9226e2b --- /dev/null +++ b/sdk/helper/random/rules_test.go @@ -0,0 +1,90 @@ +package random + +import ( + "testing" +) + +func TestCharsetRestriction(t *testing.T) { + type testCase struct { + charset string + minChars int + input string + expected bool + } + + tests := map[string]testCase{ + "0 minimum, empty input": { + charset: "abcdefghijklmnopqrstuvwxyz", + minChars: 0, + input: "", + expected: true, + }, + "0 minimum, many matching": { + charset: "abcdefghijklmnopqrstuvwxyz", + minChars: 0, + input: "abcdefghijklmnopqrstuvwxyz", + expected: true, + }, + "0 minimum, no matching": { + charset: "abcdefghijklmnopqrstuvwxyz", + minChars: 0, + input: "0123456789", + expected: true, + }, + "1 minimum, empty input": { + charset: "abcdefghijklmnopqrstuvwxyz", + minChars: 1, + input: "", + expected: false, + }, + "1 minimum, no matching": { + charset: "abcdefghijklmnopqrstuvwxyz", + minChars: 1, + input: "0123456789", + expected: false, + }, + "1 minimum, exactly 1 matching": { + charset: "abcdefghijklmnopqrstuvwxyz", + minChars: 1, + input: "a", + expected: true, + }, + "1 minimum, many matching": { + charset: "abcdefghijklmnopqrstuvwxyz", + minChars: 1, + input: "abcdefhaaaa", + expected: true, + }, + "2 minimum, 1 matching": { + charset: "abcdefghijklmnopqrstuvwxyz", + minChars: 2, + input: "f", + expected: false, + }, + "2 minimum, 2 matching": { + charset: "abcdefghijklmnopqrstuvwxyz", + minChars: 2, + input: "fz", + expected: true, + }, + "2 minimum, many matching": { + charset: "abcdefghijklmnopqrstuvwxyz", + minChars: 2, + input: "joixnbonxd", + expected: true, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + cr := CharsetRestriction{ + Charset: []rune(test.charset), + MinChars: test.minChars, + } + actual := cr.Pass([]rune(test.input)) + if actual != test.expected { + t.FailNow() + } + }) + } +} diff --git a/sdk/helper/random/string_generator.go b/sdk/helper/random/string_generator.go new file mode 100644 index 000000000000..13d06426cdda --- /dev/null +++ b/sdk/helper/random/string_generator.go @@ -0,0 +1,97 @@ +package random + +import ( + "context" + "crypto/rand" + "fmt" + "io" + "math" + "time" +) + +type Rule interface { + Pass(value []rune) bool +} + +type StringGenerator struct { + Length int `mapstructure:"length"` + Charset []rune `mapstructure:"charset"` + Rules []Rule `mapstructure:"-"` + + rng io.Reader +} + +func (g *StringGenerator) Generate(ctx context.Context) (str string, err error) { + ctx, cancel := context.WithTimeout(ctx, 1*time.Second) // Ensure there's a timeout on the context + defer cancel() + +LOOP: + for { + select { + case <-ctx.Done(): + return "", fmt.Errorf("timed out generating string") + default: + str, err = g.generate() + if err != nil { + return "", err + } + if str == "" { + continue LOOP + } + return str, err + } + } +} + +func (g *StringGenerator) generate() (str string, err error) { + // If performance improvements need to be made, this can be changed to read a batch of + // potential strings at once rather than one at a time. This will significantly + // improve performance, but at the cost of added complexity. + runes, err := randomRunes(g.rng, g.Charset, g.Length) + if err != nil { + return "", fmt.Errorf("unable to generate random characters: %w", err) + } + + for _, rule := range g.Rules { + if !rule.Pass(runes) { + return "", nil + } + } + + // Passed all rules + return string(runes), nil +} + +// randomRunes creates a random string based on the provided charset. The charset is limited to 255 characters, but +// could be expanded if needed. Expanding the maximum charset size will decrease performance because it will need to +// combine bytes into a larger integer using binary.BigEndian.Uint16() function. +func randomRunes(rng io.Reader, charset []rune, length int) (randStr []rune, err error) { + if len(charset) == 0 { + return nil, fmt.Errorf("no charset specified") + } + if len(charset) > math.MaxUint8 { + return nil, fmt.Errorf("charset is too long: limited to %d characters", math.MaxUint8) + } + if length <= 0 { + return nil, fmt.Errorf("unable to generate a zero or negative length runeset") + } + + if rng == nil { + rng = rand.Reader + } + + charsetLen := byte(len(charset)) + data := make([]byte, length) + _, err = rng.Read(data) + if err != nil { + return nil, err + } + + runes := make([]rune, 0, length) + for i := 0; i < len(data); i++ { + r := charset[data[i]%charsetLen] + runes = append(runes, r) + } + + return runes, nil +} diff --git a/sdk/helper/random/string_generator_test.go b/sdk/helper/random/string_generator_test.go new file mode 100644 index 000000000000..9c61dbbba3d9 --- /dev/null +++ b/sdk/helper/random/string_generator_test.go @@ -0,0 +1,314 @@ +package random + +import ( + "context" + "crypto/rand" + "fmt" + "io" + MRAND "math/rand" + "reflect" + "sort" + "testing" + "time" +) + +func TestStringGenerator_Generate_successful(t *testing.T) { + type testCase struct { + timeout time.Duration + charset []rune + rules []Rule + } + + tests := map[string]testCase{ + "common rules": { + timeout: 1 * time.Second, + charset: []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-"), + rules: []Rule{ + CharsetRestriction{ + Charset: []rune("abcdefghijklmnopqrstuvwxyz"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("0123456789"), + MinChars: 1, + }, + }, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + sg := StringGenerator{ + Length: 20, + Charset: test.charset, + Rules: test.rules, + } + + // One context to rule them all, one context to find them, one context to bring them all and in the darkness bind them. + ctx, cancel := context.WithTimeout(context.Background(), test.timeout) + defer cancel() + + runeset := map[rune]bool{} + runesFound := []rune{} + + for i := 0; i < 10000; i++ { + actual, err := sg.Generate(ctx) + if err != nil { + t.Fatalf("no error expected, but got: %s", err) + } + for _, r := range actual { + if runeset[r] { + continue + } + runeset[r] = true + runesFound = append(runesFound, r) + } + } + + sort.Sort(runes(runesFound)) + + // Sort the input too just to ensure that they can be compared + sort.Sort(runes(test.charset)) + + if !reflect.DeepEqual(runesFound, test.charset) { + t.Fatalf("Didn't find all characters from the charset\nActual : [%s]\nExpected: [%s]", string(runesFound), string(test.charset)) + } + }) + } +} + +func TestStringGenerator_Generate_errors(t *testing.T) { + type testCase struct { + timeout time.Duration + charset string + rules []Rule + rng io.Reader + } + + tests := map[string]testCase{ + "already timed out": { + timeout: 0, + charset: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-", + rules: []Rule{ + testRule{ + fail: false, + }, + }, + rng: rand.Reader, + }, + "impossible rules": { + timeout: 10 * time.Millisecond, // Keep this short so the test doesn't take too long + charset: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-", + rules: []Rule{ + testRule{ + fail: true, + }, + }, + rng: rand.Reader, + }, + "bad RNG reader": { + timeout: 10 * time.Millisecond, // Keep this short so the test doesn't take too long + charset: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-", + rules: []Rule{}, + rng: badReader{}, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + sg := StringGenerator{ + Length: 20, + Charset: []rune(test.charset), + Rules: test.rules, + rng: test.rng, + } + + // One context to rule them all, one context to find them, one context to bring them all and in the darkness bind them. + ctx, cancel := context.WithTimeout(context.Background(), test.timeout) + defer cancel() + + actual, err := sg.Generate(ctx) + if err == nil { + t.Fatalf("Expected error but none found") + } + if actual != "" { + t.Fatalf("Random string returned: %s", actual) + } + }) + } +} + +func TestRandomRunes_deterministic(t *testing.T) { + // These tests are to ensure that the charset selection doesn't do anything weird like selecting the same character + // over and over again. The number of test cases here should be kept to a minimum since they are sensitive to changes + type testCase struct { + rngSeed int64 + charset string + length int + expected string + } + + tests := map[string]testCase{ + "small charset": { + rngSeed: 1585593298447807000, + charset: "abcde", + length: 20, + expected: "ddddddcdebbeebdbdbcd", + }, + "common charset": { + rngSeed: 1585593298447807001, + charset: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-", + length: 20, + expected: "czyhWGUYm3jf-uMFmGp-", + }, + "max size charset": { + rngSeed: 1585593298447807002, + charset: " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + + "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ" + + "ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠ" + + "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟", + length: 20, + expected: "tųŎ℄ņ℃Œ.@řHš-ℍ}ħGIJLℏ", + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + rng := MRAND.New(MRAND.NewSource(test.rngSeed)) + runes, err := randomRunes(rng, []rune(test.charset), test.length) + if err != nil { + t.Fatalf("Expected no error, but found: %s", err) + } + + str := string(runes) + + if str != test.expected { + t.Fatalf("Actual: %s Expected: %s", str, test.expected) + } + }) + } +} + +func TestRandomRunes_successful(t *testing.T) { + type testCase struct { + charset []rune // Assumes no duplicate runes + length int + } + + tests := map[string]testCase{ + "small charset": { + charset: []rune("abcde"), + length: 20, + }, + "common charset": { + charset: []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-"), + length: 20, + }, + "max size charset": { + charset: []rune( + " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + + "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ" + + "ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠ" + + "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟", + ), + length: 20, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + runeset := map[rune]bool{} + runesFound := []rune{} + + for i := 0; i < 10000; i++ { + actual, err := randomRunes(rand.Reader, test.charset, test.length) + if err != nil { + t.Fatalf("no error expected, but got: %s", err) + } + for _, r := range actual { + if runeset[r] { + continue + } + runeset[r] = true + runesFound = append(runesFound, r) + } + } + + sort.Sort(runes(runesFound)) + + // Sort the input too just to ensure that they can be compared + sort.Sort(runes(test.charset)) + + if !reflect.DeepEqual(runesFound, test.charset) { + t.Fatalf("Didn't find all characters from the charset\nActual : [%s]\nExpected: [%s]", string(runesFound), string(test.charset)) + } + }) + } +} + +type badReader struct{} + +func (badReader) Read([]byte) (int, error) { + return 0, fmt.Errorf("test error") +} + +func TestRandomRunes_errors(t *testing.T) { + type testCase struct { + charset []rune + length int + rng io.Reader + } + + tests := map[string]testCase{ + "nil charset": { + charset: nil, + length: 20, + rng: rand.Reader, + }, + "empty charset": { + charset: []rune{}, + length: 20, + rng: rand.Reader, + }, + "charset is too long": { + charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + + "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ" + + "ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠ" + + "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟" + + "Σ", + ), + rng: rand.Reader, + }, + "length is zero": { + charset: []rune("abcde"), + length: 0, + rng: rand.Reader, + }, + "length is negative": { + charset: []rune("abcde"), + length: -3, + rng: rand.Reader, + }, + "reader failed": { + charset: []rune("abcde"), + length: 20, + rng: badReader{}, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + actual, err := randomRunes(test.rng, test.charset, test.length) + if err == nil { + t.Fatalf("Expected error but none found") + } + if actual != nil { + t.Fatalf("Expected no value, but found [%s]", string(actual)) + } + }) + } +} From a2a3520780eebc05abfa316451fa4047c6e7b91f Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Mon, 30 Mar 2020 13:10:57 -0600 Subject: [PATCH 02/29] Minor formatting fixes --- sdk/helper/random/parser_test.go | 62 ++++++++++++++++---------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index 98f7286c0fb3..ce373e02f3f1 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -212,28 +212,29 @@ func TestParser_Parse(t *testing.T) { "testrule": newTestRule, "CharsetRestriction": NewCharsetRestriction, }, - rawConfig: `{ - "charset": "abcde", - "length": 20, - "rule": [ - { - "testrule": [ + rawConfig: ` + { + "charset": "abcde", + "length": 20, + "rule": [ + { + "testrule": [ { - "string": "omgwtfbbq", - "int": 123 + "string": "omgwtfbbq", + "int": 123 } - ], - }, - { - "CharsetRestriction": [ + ] + }, + { + "CharsetRestriction": [ { - "charset": "abcde", - "min-chars": 2 + "charset": "abcde", + "min-chars": 2 } - ] - } - ] - }`, + ] + } + ] + }`, expected: StringGenerator{ Length: 20, Charset: []rune("abcde"), @@ -252,20 +253,21 @@ func TestParser_Parse(t *testing.T) { }, "JSON unrecognized rule": { registry: defaultRules, - rawConfig: `{ - "charset": "abcde", - "length": 20, - "rule": [ - { - "testrule": [ + rawConfig: ` + { + "charset": "abcde", + "length": 20, + "rule": [ + { + "testrule": [ { - "string": "omgwtfbbq", - "int": 123 + "string": "omgwtfbbq", + "int": 123 } - ], - } - ] - }`, + ], + } + ] + }`, expected: StringGenerator{ Length: 20, Charset: []rune("abcde"), From ea98c6a6f870cb4ac2d4fc991f38c3738737daba Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Mon, 30 Mar 2020 13:49:36 -0600 Subject: [PATCH 03/29] Add string generator benchmarks --- sdk/helper/random/parser.go | 2 +- sdk/helper/random/parser_test.go | 24 ++++----- sdk/helper/random/registry.go | 4 +- sdk/helper/random/rules.go | 6 ++- sdk/helper/random/string_generator.go | 29 ++++++++++- sdk/helper/random/string_generator_test.go | 57 ++++++++++++++++++++++ 6 files changed, 103 insertions(+), 19 deletions(-) diff --git a/sdk/helper/random/parser.go b/sdk/helper/random/parser.go index 77c76f9dad60..e55ec9055e65 100644 --- a/sdk/helper/random/parser.go +++ b/sdk/helper/random/parser.go @@ -15,7 +15,7 @@ import ( func Parse(raw string) (strs StringGenerator, err error) { parser := Parser{ RuleRegistry: Registry{ - Rules: defaultRules, + Rules: defaultRuleNameMapping, }, } return parser.Parse(raw) diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index ce373e02f3f1..1e4586564a57 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -79,19 +79,19 @@ func TestParser_Parse(t *testing.T) { tests := map[string]testCase{ "empty config": { - registry: defaultRules, + registry: defaultRuleNameMapping, rawConfig: "", expected: StringGenerator{}, expectErr: true, }, "bogus config": { - registry: defaultRules, + registry: defaultRuleNameMapping, rawConfig: "asdf", expected: StringGenerator{}, expectErr: true, }, "config with length and charset": { - registry: defaultRules, + registry: defaultRuleNameMapping, rawConfig: ` length = 20 charset = "abcde"`, @@ -102,7 +102,7 @@ func TestParser_Parse(t *testing.T) { expectErr: false, }, "config with negative length": { - registry: defaultRules, + registry: defaultRuleNameMapping, rawConfig: ` length = -2 charset = "abcde"`, @@ -113,7 +113,7 @@ func TestParser_Parse(t *testing.T) { expectErr: true, }, "charset restrictions": { - registry: defaultRules, + registry: defaultRuleNameMapping, rawConfig: ` length = 20 charset = "abcde" @@ -189,7 +189,7 @@ func TestParser_Parse(t *testing.T) { expectErr: false, }, "unrecognized rule": { - registry: defaultRules, + registry: defaultRuleNameMapping, rawConfig: ` length = 20 charset = "abcde" @@ -252,7 +252,7 @@ func TestParser_Parse(t *testing.T) { expectErr: false, }, "JSON unrecognized rule": { - registry: defaultRules, + registry: defaultRuleNameMapping, rawConfig: ` { "charset": "abcde", @@ -311,19 +311,19 @@ func TestParseRules(t *testing.T) { tests := map[string]testCase{ "nil rule data": { - registry: defaultRules, + registry: defaultRuleNameMapping, rawRules: nil, expectedRules: nil, expectErr: false, }, "empty rule data": { - registry: defaultRules, + registry: defaultRuleNameMapping, rawRules: []map[string]interface{}{}, expectedRules: nil, expectErr: false, }, "invalid rule data": { - registry: defaultRules, + registry: defaultRuleNameMapping, rawRules: []map[string]interface{}{ { "testrule": map[string]interface{}{ @@ -335,7 +335,7 @@ func TestParseRules(t *testing.T) { expectErr: true, }, "unrecognized rule data": { - registry: defaultRules, + registry: defaultRuleNameMapping, rawRules: []map[string]interface{}{ { "testrule": []map[string]interface{}{ @@ -700,7 +700,7 @@ func BenchmarkParser_Parse(b *testing.B) { for i := 0; i < b.N; i++ { parser := Parser{ RuleRegistry: Registry{ - Rules: defaultRules, + Rules: defaultRuleNameMapping, }, } _, err := parser.Parse(config) diff --git a/sdk/helper/random/registry.go b/sdk/helper/random/registry.go index 6038e93294f1..294c33fbb890 100644 --- a/sdk/helper/random/registry.go +++ b/sdk/helper/random/registry.go @@ -8,10 +8,10 @@ type ruleConstructor func(map[string]interface{}) (Rule, error) var ( defaultRegistry = Registry{ - Rules: defaultRules, + Rules: defaultRuleNameMapping, } - defaultRules = map[string]ruleConstructor{ + defaultRuleNameMapping = map[string]ruleConstructor{ "CharsetRestriction": NewCharsetRestriction, } ) diff --git a/sdk/helper/random/rules.go b/sdk/helper/random/rules.go index 128da5a2a825..f9f7244719e4 100644 --- a/sdk/helper/random/rules.go +++ b/sdk/helper/random/rules.go @@ -8,10 +8,10 @@ import ( // CharsetRestriction requires a certain number of characters from the specified charset type CharsetRestriction struct { - Charset []rune `mapstructure:"charset" json:"charset"` + Charset []rune `mapstructure:"charset"` // MinChars indicates the minimum (inclusive) number of characters from the charset that should appear in the string - MinChars int `mapstructure:"min-chars" json:"min-chars"` + MinChars int `mapstructure:"min-chars"` } func NewCharsetRestriction(data map[string]interface{}) (rule Rule, err error) { @@ -30,6 +30,7 @@ func NewCharsetRestriction(data map[string]interface{}) (rule Rule, err error) { if err != nil { return nil, fmt.Errorf("failed to parse charset restriction: %w", err) } + return cr, nil } @@ -44,6 +45,7 @@ func (c CharsetRestriction) Pass(value []rune) bool { count := 0 for _, r := range value { + // charIn is faster than a map lookup because the data is so small if charIn(r, c.Charset) { count++ if count >= c.MinChars { diff --git a/sdk/helper/random/string_generator.go b/sdk/helper/random/string_generator.go index 13d06426cdda..8e3931e0b26c 100644 --- a/sdk/helper/random/string_generator.go +++ b/sdk/helper/random/string_generator.go @@ -9,6 +9,31 @@ import ( "time" ) +var ( + DefaultStringGenerator = StringGenerator{ + Length: 20, + Charset: []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-"), + Rules: []Rule{ + CharsetRestriction{ + Charset: []rune("abcdefghijklmnopqrstuvwxyz"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("0123456789"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("-"), + MinChars: 1, + }, + }, + } +) + type Rule interface { Pass(value []rune) bool } @@ -21,7 +46,7 @@ type StringGenerator struct { rng io.Reader } -func (g *StringGenerator) Generate(ctx context.Context) (str string, err error) { +func (g StringGenerator) Generate(ctx context.Context) (str string, err error) { ctx, cancel := context.WithTimeout(ctx, 1*time.Second) // Ensure there's a timeout on the context defer cancel() @@ -43,7 +68,7 @@ LOOP: } } -func (g *StringGenerator) generate() (str string, err error) { +func (g StringGenerator) generate() (str string, err error) { // If performance improvements need to be made, this can be changed to read a batch of // potential strings at once rather than one at a time. This will significantly // improve performance, but at the cost of added complexity. diff --git a/sdk/helper/random/string_generator_test.go b/sdk/helper/random/string_generator_test.go index 9c61dbbba3d9..0097fa7b5c7e 100644 --- a/sdk/helper/random/string_generator_test.go +++ b/sdk/helper/random/string_generator_test.go @@ -312,3 +312,60 @@ func TestRandomRunes_errors(t *testing.T) { }) } } + +func BenchmarkStringGenerator_Generate(b *testing.B) { + lengths := []int{ + 8, 12, 16, 20, 24, 28, + } + + b.Run("default string generator", func(b *testing.B) { + for _, length := range lengths { + b.Run(fmt.Sprintf("length=%d", length), func(b *testing.B) { + for i := 0; i < b.N; i++ { + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) + DefaultStringGenerator.Generate(ctx) + cancel() + } + }) + } + }) + b.Run("large symbol set", func(b *testing.B) { + sg := StringGenerator{ + Length: 20, + Charset: []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"), + Rules: []Rule{ + CharsetRestriction{ + Charset: []rune("abcdefghijklmnopqrstuvwxyz"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("0123456789"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"), + MinChars: 1, + }, + }, + } + for _, length := range lengths { + b.Run(fmt.Sprintf("length=%d", length), func(b *testing.B) { + for i := 0; i < b.N; i++ { + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) + str, err := sg.Generate(ctx) + cancel() + if err != nil { + b.Fatalf("Failed to generate string: %s", err) + } + if str == "" { + b.Fatalf("Didn't error but didn't generate a string") + } + } + }) + } + }) +} From cb7e732d5552b3106937de054d81d5ef0c5d9021 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Mon, 30 Mar 2020 14:34:01 -0600 Subject: [PATCH 04/29] Add missing comments; add additional benchmark --- sdk/helper/random/parser.go | 4 ++ sdk/helper/random/parser_test.go | 4 +- sdk/helper/random/registry.go | 9 ++--- sdk/helper/random/rules.go | 15 +++++-- sdk/helper/random/string_generator.go | 16 +++++++- sdk/helper/random/string_generator_test.go | 47 +++++++++++++++++++++- 6 files changed, 81 insertions(+), 14 deletions(-) diff --git a/sdk/helper/random/parser.go b/sdk/helper/random/parser.go index e55ec9055e65..64754ee184d1 100644 --- a/sdk/helper/random/parser.go +++ b/sdk/helper/random/parser.go @@ -12,6 +12,7 @@ import ( "github.com/mitchellh/mapstructure" ) +// Parse is a convenience function for parsing HCL into a StringGenerator. See Parser.Parse for details. func Parse(raw string) (strs StringGenerator, err error) { parser := Parser{ RuleRegistry: Registry{ @@ -21,10 +22,13 @@ func Parse(raw string) (strs StringGenerator, err error) { return parser.Parse(raw) } +// Parser parses string generator configuration from HCL. type Parser struct { + // RuleRegistry maps rule names in HCL to Rule constructors. RuleRegistry Registry } +// Parse parses the provided HCL into a StringGenerator. func (p Parser) Parse(raw string) (strs StringGenerator, err error) { rawData := map[string]interface{}{} err = hcl.Decode(&rawData, raw) diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index 1e4586564a57..8e8b3c3e9041 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -159,7 +159,7 @@ func TestParser_Parse(t *testing.T) { "test rule and charset restrictions": { registry: map[string]ruleConstructor{ "testrule": newTestRule, - "CharsetRestriction": NewCharsetRestriction, + "CharsetRestriction": ParseCharsetRestriction, }, rawConfig: ` length = 20 @@ -210,7 +210,7 @@ func TestParser_Parse(t *testing.T) { "JSON test rule and charset restrictions": { registry: map[string]ruleConstructor{ "testrule": newTestRule, - "CharsetRestriction": NewCharsetRestriction, + "CharsetRestriction": ParseCharsetRestriction, }, rawConfig: ` { diff --git a/sdk/helper/random/registry.go b/sdk/helper/random/registry.go index 294c33fbb890..0b8168c0ee46 100644 --- a/sdk/helper/random/registry.go +++ b/sdk/helper/random/registry.go @@ -7,15 +7,14 @@ import ( type ruleConstructor func(map[string]interface{}) (Rule, error) var ( - defaultRegistry = Registry{ - Rules: defaultRuleNameMapping, - } - + // defaultRuleNameMapping is the default mapping of HCL rule names to the appropriate rule constructor. + // Add to this map when adding a new Rule type to be recognized in HCL. defaultRuleNameMapping = map[string]ruleConstructor{ - "CharsetRestriction": NewCharsetRestriction, + "CharsetRestriction": ParseCharsetRestriction, } ) +// Registry of HCL rule names to rule constructors. type Registry struct { Rules map[string]ruleConstructor } diff --git a/sdk/helper/random/rules.go b/sdk/helper/random/rules.go index f9f7244719e4..56e1eae20142 100644 --- a/sdk/helper/random/rules.go +++ b/sdk/helper/random/rules.go @@ -6,15 +6,17 @@ import ( "github.com/mitchellh/mapstructure" ) -// CharsetRestriction requires a certain number of characters from the specified charset +// CharsetRestriction requires a certain number of characters from the specified charset. type CharsetRestriction struct { + // Charset is the list of rules that candidate strings must contain a minimum number of. Charset []rune `mapstructure:"charset"` - // MinChars indicates the minimum (inclusive) number of characters from the charset that should appear in the string + // MinChars indicates the minimum (inclusive) number of characters from the charset that should appear in the string. MinChars int `mapstructure:"min-chars"` } -func NewCharsetRestriction(data map[string]interface{}) (rule Rule, err error) { +// ParseCharsetRestriction from the provided data map. The data map is expected to be parsed from HCL. +func ParseCharsetRestriction(data map[string]interface{}) (rule Rule, err error) { cr := &CharsetRestriction{} decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ @@ -34,10 +36,13 @@ func NewCharsetRestriction(data map[string]interface{}) (rule Rule, err error) { return cr, nil } +// Chars returns the charset that this rule is looking for. func (c CharsetRestriction) Chars() []rune { return c.Charset } +// Pass returns true if the provided candidate string has a minimum number of chars in it. +// This adheres to the Rule interface func (c CharsetRestriction) Pass(value []rune) bool { if c.MinChars <= 0 { return true @@ -45,7 +50,9 @@ func (c CharsetRestriction) Pass(value []rune) bool { count := 0 for _, r := range value { - // charIn is faster than a map lookup because the data is so small + // charIn is sometimes faster than a map lookup because the data is so small + // This is being kept rather than converted to a map to keep the code cleaner, + // otherwise there would need to be additional parsing logic. if charIn(r, c.Charset) { count++ if count >= c.MinChars { diff --git a/sdk/helper/random/string_generator.go b/sdk/helper/random/string_generator.go index 8e3931e0b26c..83b37d2e4377 100644 --- a/sdk/helper/random/string_generator.go +++ b/sdk/helper/random/string_generator.go @@ -10,6 +10,7 @@ import ( ) var ( + // DefaultStringGenerator has reasonable default rules for generating strings DefaultStringGenerator = StringGenerator{ Length: 20, Charset: []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-"), @@ -34,18 +35,29 @@ var ( } ) +// Rule to assert on string values. type Rule interface { + // Pass should return true if the provided value passes any assertions this Rule is making. Pass(value []rune) bool } +// StringGenerator generats random strings from the provided charset & adhering to a set of rules. The set of rules +// are things like CharsetRestriction which requires a certain number of characters from a sub-charset. type StringGenerator struct { - Length int `mapstructure:"length"` + // Length of the string to generate. + Length int `mapstructure:"length"` + + // Charset to choose runes from. Charset []rune `mapstructure:"charset"` - Rules []Rule `mapstructure:"-"` + // Rules the generated strings must adhere to. + Rules []Rule `mapstructure:"-"` + + // rng for testing purposes to ensure error handling from the crypto/rand package is working properly. rng io.Reader } +// Generate a random string from the charset and adhering to the provided rules. func (g StringGenerator) Generate(ctx context.Context) (str string, err error) { ctx, cancel := context.WithTimeout(ctx, 1*time.Second) // Ensure there's a timeout on the context defer cancel() diff --git a/sdk/helper/random/string_generator_test.go b/sdk/helper/random/string_generator_test.go index 0097fa7b5c7e..8b4c2cb61fa9 100644 --- a/sdk/helper/random/string_generator_test.go +++ b/sdk/helper/random/string_generator_test.go @@ -323,8 +323,14 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { b.Run(fmt.Sprintf("length=%d", length), func(b *testing.B) { for i := 0; i < b.N; i++ { ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) - DefaultStringGenerator.Generate(ctx) + str, err := DefaultStringGenerator.Generate(ctx) cancel() + if err != nil { + b.Fatalf("Failed to generate string: %s", err) + } + if str == "" { + b.Fatalf("Didn't error but didn't generate a string") + } } }) } @@ -368,4 +374,43 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { }) } }) + b.Run("max symbol set", func(b *testing.B) { + sg := StringGenerator{ + Length: 20, + Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + + "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ" + + "ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠ" + + "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟", + ), + Rules: []Rule{ + CharsetRestriction{ + Charset: []rune("abcdefghijklmnopqrstuvwxyz"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("ĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒ"), + MinChars: 1, + }, + }, + } + for _, length := range lengths { + b.Run(fmt.Sprintf("length=%d", length), func(b *testing.B) { + for i := 0; i < b.N; i++ { + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) + str, err := sg.Generate(ctx) + cancel() + if err != nil { + b.Fatalf("Failed to generate string: %s", err) + } + if str == "" { + b.Fatalf("Didn't error but didn't generate a string") + } + } + }) + } + }) } From 6e88d4de449eeb1dcb865d388c57367a77ed8f00 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Mon, 30 Mar 2020 15:39:42 -0600 Subject: [PATCH 05/29] Updated benchmarks to be more consistent --- sdk/helper/random/string_generator_test.go | 108 ++++++++++----------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/sdk/helper/random/string_generator_test.go b/sdk/helper/random/string_generator_test.go index 8b4c2cb61fa9..88294be48722 100644 --- a/sdk/helper/random/string_generator_test.go +++ b/sdk/helper/random/string_generator_test.go @@ -318,20 +318,24 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { 8, 12, 16, 20, 24, 28, } - b.Run("default string generator", func(b *testing.B) { + b.Run("no rules", func(b *testing.B) { for _, length := range lengths { b.Run(fmt.Sprintf("length=%d", length), func(b *testing.B) { - for i := 0; i < b.N; i++ { - ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) - str, err := DefaultStringGenerator.Generate(ctx) - cancel() - if err != nil { - b.Fatalf("Failed to generate string: %s", err) - } - if str == "" { - b.Fatalf("Didn't error but didn't generate a string") - } + sg := StringGenerator{ + Length: length, + Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz"), + Rules: []Rule{}, } + b.ResetTimer() + benchmarkStringGenerator(b, sg) + }) + } + }) + + b.Run("default string generator", func(b *testing.B) { + for _, length := range lengths { + b.Run(fmt.Sprintf("length=%d", length), func(b *testing.B) { + benchmarkStringGenerator(b, DefaultStringGenerator) }) } }) @@ -360,57 +364,53 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { } for _, length := range lengths { b.Run(fmt.Sprintf("length=%d", length), func(b *testing.B) { - for i := 0; i < b.N; i++ { - ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) - str, err := sg.Generate(ctx) - cancel() - if err != nil { - b.Fatalf("Failed to generate string: %s", err) - } - if str == "" { - b.Fatalf("Didn't error but didn't generate a string") - } - } + benchmarkStringGenerator(b, sg) }) } }) b.Run("max symbol set", func(b *testing.B) { - sg := StringGenerator{ - Length: 20, - Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + - "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ" + - "ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠ" + - "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟", - ), - Rules: []Rule{ - CharsetRestriction{ - Charset: []rune("abcdefghijklmnopqrstuvwxyz"), - MinChars: 1, - }, - CharsetRestriction{ - Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), - MinChars: 1, - }, - CharsetRestriction{ - Charset: []rune("ĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒ"), - MinChars: 1, - }, - }, - } for _, length := range lengths { b.Run(fmt.Sprintf("length=%d", length), func(b *testing.B) { - for i := 0; i < b.N; i++ { - ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) - str, err := sg.Generate(ctx) - cancel() - if err != nil { - b.Fatalf("Failed to generate string: %s", err) - } - if str == "" { - b.Fatalf("Didn't error but didn't generate a string") - } + sg := StringGenerator{ + Length: length, + Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + + "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ" + + "ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠ" + + "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟", + ), + Rules: []Rule{ + CharsetRestriction{ + Charset: []rune("abcdefghijklmnopqrstuvwxyz"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("ĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒ"), + MinChars: 1, + }, + }, } + + b.ResetTimer() + benchmarkStringGenerator(b, sg) }) } }) } + +func benchmarkStringGenerator(b *testing.B, sg StringGenerator) { + for i := 0; i < b.N; i++ { + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) + str, err := sg.Generate(ctx) + cancel() + if err != nil { + b.Fatalf("Failed to generate string: %s", err) + } + if str == "" { + b.Fatalf("Didn't error but didn't generate a string") + } + } +} From adecdacb2ce3124e39e841e89cbaeb89af75f15f Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Tue, 31 Mar 2020 13:38:47 -0600 Subject: [PATCH 06/29] Add additional benchmarks; improve performance --- sdk/helper/random/string_generator.go | 7 +- sdk/helper/random/string_generator_test.go | 207 ++++++++++++--------- 2 files changed, 126 insertions(+), 88 deletions(-) diff --git a/sdk/helper/random/string_generator.go b/sdk/helper/random/string_generator.go index 83b37d2e4377..e6605999ea95 100644 --- a/sdk/helper/random/string_generator.go +++ b/sdk/helper/random/string_generator.go @@ -59,8 +59,11 @@ type StringGenerator struct { // Generate a random string from the charset and adhering to the provided rules. func (g StringGenerator) Generate(ctx context.Context) (str string, err error) { - ctx, cancel := context.WithTimeout(ctx, 1*time.Second) // Ensure there's a timeout on the context - defer cancel() + if _, hasTimeout := ctx.Deadline(); !hasTimeout { + var cancel func() + ctx, cancel = context.WithTimeout(ctx, 1*time.Second) // Ensure there's a timeout on the context + defer cancel() + } LOOP: for { diff --git a/sdk/helper/random/string_generator_test.go b/sdk/helper/random/string_generator_test.go index 88294be48722..5938e71804a7 100644 --- a/sdk/helper/random/string_generator_test.go +++ b/sdk/helper/random/string_generator_test.go @@ -318,99 +318,134 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { 8, 12, 16, 20, 24, 28, } - b.Run("no rules", func(b *testing.B) { - for _, length := range lengths { - b.Run(fmt.Sprintf("length=%d", length), func(b *testing.B) { - sg := StringGenerator{ - Length: length, - Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz"), - Rules: []Rule{}, - } - b.ResetTimer() - benchmarkStringGenerator(b, sg) - }) - } - }) + type testCase struct { + generator StringGenerator + } - b.Run("default string generator", func(b *testing.B) { - for _, length := range lengths { - b.Run(fmt.Sprintf("length=%d", length), func(b *testing.B) { - benchmarkStringGenerator(b, DefaultStringGenerator) - }) - } - }) - b.Run("large symbol set", func(b *testing.B) { - sg := StringGenerator{ - Length: 20, - Charset: []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"), - Rules: []Rule{ - CharsetRestriction{ - Charset: []rune("abcdefghijklmnopqrstuvwxyz"), - MinChars: 1, - }, - CharsetRestriction{ - Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), - MinChars: 1, - }, - CharsetRestriction{ - Charset: []rune("0123456789"), - MinChars: 1, + benches := map[string]testCase{ + "no rules": { + generator: StringGenerator{ + Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz"), + Rules: []Rule{}, + }, + }, + "default generator": { + generator: DefaultStringGenerator, + }, + "large symbol set": { + generator: StringGenerator{ + Charset: []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"), + Rules: []Rule{ + CharsetRestriction{ + Charset: []rune("abcdefghijklmnopqrstuvwxyz"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("0123456789"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"), + MinChars: 1, + }, }, - CharsetRestriction{ - Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"), - MinChars: 1, + }, + }, + "max symbol set": { + generator: StringGenerator{ + Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + + "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ" + + "ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠ" + + "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟", + ), + Rules: []Rule{ + CharsetRestriction{ + Charset: []rune("abcdefghijklmnopqrstuvwxyz"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("ĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒ"), + MinChars: 1, + }, }, }, - } - for _, length := range lengths { - b.Run(fmt.Sprintf("length=%d", length), func(b *testing.B) { - benchmarkStringGenerator(b, sg) - }) - } - }) - b.Run("max symbol set", func(b *testing.B) { - for _, length := range lengths { - b.Run(fmt.Sprintf("length=%d", length), func(b *testing.B) { - sg := StringGenerator{ - Length: length, - Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + - "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ" + - "ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠ" + - "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟", - ), - Rules: []Rule{ - CharsetRestriction{ - Charset: []rune("abcdefghijklmnopqrstuvwxyz"), - MinChars: 1, - }, - CharsetRestriction{ - Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), - MinChars: 1, - }, - CharsetRestriction{ - Charset: []rune("ĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒ"), - MinChars: 1, - }, + }, + "restrictive charset rules": { + generator: StringGenerator{ + Charset: []rune("-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"), + Rules: []Rule{ + CharsetRestriction{ + Charset: []rune("A"), + MinChars: 1, }, - } + CharsetRestriction{ + Charset: []rune("1"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("a"), + MinChars: 1, + }, + CharsetRestriction{ + Charset: []rune("-"), + MinChars: 1, + }, + }, + }, + }, + } - b.ResetTimer() - benchmarkStringGenerator(b, sg) - }) - } - }) -} + for name, bench := range benches { + b.Run(name, func(b *testing.B) { + for _, length := range lengths { + bench.generator.Length = length + b.Run(fmt.Sprintf("length=%d", length), func(b *testing.B) { + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + b.ResetTimer() + for i := 0; i < b.N; i++ { + str, err := bench.generator.Generate(ctx) + if err != nil { + b.Fatalf("Failed to generate string: %s", err) + } + if str == "" { + b.Fatalf("Didn't error but didn't generate a string") + } + } + }) + } + }) + } -func benchmarkStringGenerator(b *testing.B, sg StringGenerator) { - for i := 0; i < b.N; i++ { - ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) - str, err := sg.Generate(ctx) - cancel() - if err != nil { - b.Fatalf("Failed to generate string: %s", err) + b.Run("SQLCredentialsProducer", func(b *testing.B) { + sg := StringGenerator{ + Length: 16, // 16 because the SQLCredentialsProducer prepends 4 characters to a 20 character password + Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"), + Rules: nil, + rng: rand.Reader, } - if str == "" { - b.Fatalf("Didn't error but didn't generate a string") + + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + b.ResetTimer() + for i := 0; i < b.N; i++ { + str, err := sg.Generate(ctx) + if err != nil { + b.Fatalf("Failed to generate string: %s", err) + } + if str == "" { + b.Fatalf("Didn't error but didn't generate a string") + } } - } + }) } From f0e58afe9d0a9fde3ea11bc5f0814c9e6a3f7980 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Tue, 31 Mar 2020 17:20:38 -0600 Subject: [PATCH 07/29] Add min length check to rules --- sdk/helper/random/parser.go | 21 ++++++++- sdk/helper/random/parser_test.go | 80 ++++++++++++++++++++++++++++++++ sdk/helper/random/rules.go | 4 ++ 3 files changed, 103 insertions(+), 2 deletions(-) diff --git a/sdk/helper/random/parser.go b/sdk/helper/random/parser.go index 64754ee184d1..0d4335b09278 100644 --- a/sdk/helper/random/parser.go +++ b/sdk/helper/random/parser.go @@ -100,6 +100,10 @@ func (p Parser) parseRules(rawRules []map[string]interface{}) (rules []Rule, err } func validate(strs StringGenerator) (err error) { + type minLengthProvider interface { + MinLength() int + } + merr := &multierror.Error{} if strs.Length < 1 { merr = multierror.Append(merr, fmt.Errorf("length must be >= 1")) @@ -108,6 +112,19 @@ func validate(strs StringGenerator) (err error) { merr = multierror.Append(merr, fmt.Errorf("no charset specified")) } + minLengthRules := 0 + for _, rule := range strs.Rules { + mlp, ok := rule.(minLengthProvider) + if !ok { + continue + } + minLengthRules += mlp.MinLength() + } + + if minLengthRules > strs.Length { + merr = multierror.Append(merr, fmt.Errorf("specified rules require at least %d characters but %d is specified", minLengthRules, strs.Length)) + } + for _, r := range strs.Charset { if !unicode.IsPrint(r) { merr = multierror.Append(merr, fmt.Errorf("non-printable character in charset")) @@ -124,11 +141,11 @@ func getChars(rules []Rule) (chars []rune) { } for _, rule := range rules { - cv, ok := rule.(charsetProvider) + cp, ok := rule.(charsetProvider) if !ok { continue } - chars = append(chars, cv.Chars()...) + chars = append(chars, cp.Chars()...) } return chars } diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index 8e8b3c3e9041..2a19de4c8281 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -396,6 +396,86 @@ func TestParseRules(t *testing.T) { } } +func TestValidate(t *testing.T) { + type testCase struct { + generator StringGenerator + expectErr bool + } + + tests := map[string]testCase{ + "default generator": { + generator: DefaultStringGenerator, + expectErr: false, + }, + "length is 0": { + generator: StringGenerator{ + Length: 0, + Charset: []rune("abcde"), + }, + expectErr: true, + }, + "length is negative": { + generator: StringGenerator{ + Length: -2, + Charset: []rune("abcde"), + }, + expectErr: true, + }, + "nil charset": { + generator: StringGenerator{ + Length: 5, + Charset: nil, + }, + expectErr: true, + }, + "zero length charset": { + generator: StringGenerator{ + Length: 5, + Charset: []rune{}, + }, + expectErr: true, + }, + "rules require password longer than length": { + generator: StringGenerator{ + Length: 5, + Charset: []rune("abcde"), + Rules: []Rule{ + CharsetRestriction{ + Charset: []rune("abcde"), + MinChars: 6, + }, + }, + }, + expectErr: true, + }, + "charset has non-printable characters": { + generator: StringGenerator{ + Length: 0, + Charset: []rune{ + 'a', + 'b', + 0, // Null character + 'd', + 'e', + }, + }, + expectErr: true, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + err := validate(test.generator) + if test.expectErr && err == nil { + t.Fatalf("err expected, got nil") + } + if !test.expectErr && err != nil { + t.Fatalf("no error expected, got: %s", err) + } + }) + } +} + func TestGetChars(t *testing.T) { type testCase struct { rules []Rule diff --git a/sdk/helper/random/rules.go b/sdk/helper/random/rules.go index 56e1eae20142..01ce0ad1748a 100644 --- a/sdk/helper/random/rules.go +++ b/sdk/helper/random/rules.go @@ -41,6 +41,10 @@ func (c CharsetRestriction) Chars() []rune { return c.Charset } +func (c CharsetRestriction) MinLength() int { + return c.MinChars +} + // Pass returns true if the provided candidate string has a minimum number of chars in it. // This adheres to the Rule interface func (c CharsetRestriction) Pass(value []rune) bool { From abadcb503ec8ed5fccd89fd6955212bf68b7c3af Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Thu, 2 Apr 2020 16:13:58 -0600 Subject: [PATCH 08/29] Add consts for common charsets; misc cleanup --- sdk/helper/random/parser.go | 10 ++--- sdk/helper/random/parser_test.go | 48 ++++++++++---------- sdk/helper/random/registry_test.go | 6 +-- sdk/helper/random/rules_test.go | 22 ++++----- sdk/helper/random/string_generator.go | 42 +++++++++++++---- sdk/helper/random/string_generator_test.go | 52 +++++++++++----------- 6 files changed, 102 insertions(+), 78 deletions(-) diff --git a/sdk/helper/random/parser.go b/sdk/helper/random/parser.go index 0d4335b09278..20cb0db16710 100644 --- a/sdk/helper/random/parser.go +++ b/sdk/helper/random/parser.go @@ -192,13 +192,13 @@ func getRuleInfo(rule map[string]interface{}) (data ruleInfo, err error) { var ( charsetShortcuts = map[string]string{ // Base - "lower-alpha": "abcdefghijklmnopqrstuvwxyz", - "upper-alpha": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", - "numeric": "0123456789", + "lower-alpha": LowercaseCharset, + "upper-alpha": UppercaseCharset, + "numeric": NumericCharset, // Combinations - "lower-upper-alpha": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", - "lower-upper-alphanumeric": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", + "lower-upper-alpha": AlphabeticCharset, + "lower-upper-alphanumeric": AlphaNumericCharset, } ) diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index 2a19de4c8281..eb4ef2d2bed7 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -18,7 +18,7 @@ func TestParse(t *testing.T) { length = 20 charset = "abcde" rule "testrule" { - string = "omgwtfbbq" + string = "teststring" int = 123 }`, expected: StringGenerator{ @@ -141,7 +141,7 @@ func TestParser_Parse(t *testing.T) { length = 20 charset = "abcde" rule "testrule" { - string = "omgwtfbbq" + string = "teststring" int = 123 }`, expected: StringGenerator{ @@ -149,7 +149,7 @@ func TestParser_Parse(t *testing.T) { Charset: []rune("abcde"), Rules: []Rule{ &testRule{ - String: "omgwtfbbq", + String: "teststring", Integer: 123, }, }, @@ -165,7 +165,7 @@ func TestParser_Parse(t *testing.T) { length = 20 charset = "abcde" rule "testrule" { - string = "omgwtfbbq" + string = "teststring" int = 123 } rule "CharsetRestriction" { @@ -177,7 +177,7 @@ func TestParser_Parse(t *testing.T) { Charset: []rune("abcde"), Rules: []Rule{ &testRule{ - String: "omgwtfbbq", + String: "teststring", Integer: 123, }, &CharsetRestriction{ @@ -194,7 +194,7 @@ func TestParser_Parse(t *testing.T) { length = 20 charset = "abcde" rule "testrule" { - string = "omgwtfbbq" + string = "teststring" int = 123 }`, expected: StringGenerator{ @@ -220,7 +220,7 @@ func TestParser_Parse(t *testing.T) { { "testrule": [ { - "string": "omgwtfbbq", + "string": "teststring", "int": 123 } ] @@ -240,7 +240,7 @@ func TestParser_Parse(t *testing.T) { Charset: []rune("abcde"), Rules: []Rule{ &testRule{ - String: "omgwtfbbq", + String: "teststring", Integer: 123, }, &CharsetRestriction{ @@ -261,7 +261,7 @@ func TestParser_Parse(t *testing.T) { { "testrule": [ { - "string": "omgwtfbbq", + "string": "teststring", "int": 123 } ], @@ -327,7 +327,7 @@ func TestParseRules(t *testing.T) { rawRules: []map[string]interface{}{ { "testrule": map[string]interface{}{ - "string": "omgwtfbbq", + "string": "teststring", }, }, }, @@ -340,7 +340,7 @@ func TestParseRules(t *testing.T) { { "testrule": []map[string]interface{}{ { - "string": "omgwtfbbq", + "string": "teststring", "int": 123, }, }, @@ -357,7 +357,7 @@ func TestParseRules(t *testing.T) { { "testrule": []map[string]interface{}{ { - "string": "omgwtfbbq", + "string": "teststring", "int": 123, }, }, @@ -365,7 +365,7 @@ func TestParseRules(t *testing.T) { }, expectedRules: []Rule{ &testRule{ - String: "omgwtfbbq", + String: "teststring", Integer: 123, }, }, @@ -494,7 +494,7 @@ func TestGetChars(t *testing.T) { "rule without chars": { rules: []Rule{ testRule{ - String: "omgwtfbbq", + String: "teststring", Integer: 123, }, }, @@ -670,10 +670,10 @@ func TestApplyShortcuts(t *testing.T) { }, "non-matching key": { input: map[string]interface{}{ - "foo": "omgwtfbbq", + "foo": "teststring", }, expected: map[string]interface{}{ - "foo": "omgwtfbbq", + "foo": "teststring", }, }, "matching key": { @@ -681,17 +681,17 @@ func TestApplyShortcuts(t *testing.T) { "charset": "lower-alpha", }, expected: map[string]interface{}{ - "charset": "abcdefghijklmnopqrstuvwxyz", + "charset": LowercaseCharset, }, }, "matching and non-matching keys": { input: map[string]interface{}{ "charset": "lower-alpha", - "foo": "omgwtfbbq", + "foo": "teststring", }, expected: map[string]interface{}{ - "charset": "abcdefghijklmnopqrstuvwxyz", - "foo": "omgwtfbbq", + "charset": LowercaseCharset, + "foo": "teststring", }, }, "invalid value type": { @@ -704,10 +704,10 @@ func TestApplyShortcuts(t *testing.T) { }, "unrecognized shortcut": { input: map[string]interface{}{ - "charset": "abcdefghijklmnopqrstuvwxyz", + "charset": LowercaseCharset, }, expected: map[string]interface{}{ - "charset": "abcdefghijklmnopqrstuvwxyz", + "charset": LowercaseCharset, }, }, } @@ -761,8 +761,8 @@ func TestDeduplicateRunes(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { - actual := deduplicateRunes([]rune(test.input)) - if !reflect.DeepEqual(actual, []rune(test.expected)) { + actual := deduplicateRunes(test.input) + if !reflect.DeepEqual(actual, test.expected) { t.Fatalf("Actual: %#v\nExpected:%#v", actual, test.expected) } }) diff --git a/sdk/helper/random/registry_test.go b/sdk/helper/random/registry_test.go index c0cbcd6fd887..1eb9c500b0cf 100644 --- a/sdk/helper/random/registry_test.go +++ b/sdk/helper/random/registry_test.go @@ -43,7 +43,7 @@ func TestParseRule(t *testing.T) { rules: map[string]ruleConstructor{}, ruleType: "testrule", ruleData: map[string]interface{}{ - "string": "omgwtfbbq", + "string": "teststring", "int": 123, }, expectedRule: nil, @@ -64,11 +64,11 @@ func TestParseRule(t *testing.T) { }, ruleType: "testrule", ruleData: map[string]interface{}{ - "string": "omgwtfbbq", + "string": "teststring", "int": 123, }, expectedRule: &testRule{ - String: "omgwtfbbq", + String: "teststring", Integer: 123, }, expectErr: false, diff --git a/sdk/helper/random/rules_test.go b/sdk/helper/random/rules_test.go index 8b26b9226e2b..9e40986343b9 100644 --- a/sdk/helper/random/rules_test.go +++ b/sdk/helper/random/rules_test.go @@ -14,61 +14,61 @@ func TestCharsetRestriction(t *testing.T) { tests := map[string]testCase{ "0 minimum, empty input": { - charset: "abcdefghijklmnopqrstuvwxyz", + charset: LowercaseCharset, minChars: 0, input: "", expected: true, }, "0 minimum, many matching": { - charset: "abcdefghijklmnopqrstuvwxyz", + charset: LowercaseCharset, minChars: 0, - input: "abcdefghijklmnopqrstuvwxyz", + input: LowercaseCharset, expected: true, }, "0 minimum, no matching": { - charset: "abcdefghijklmnopqrstuvwxyz", + charset: LowercaseCharset, minChars: 0, input: "0123456789", expected: true, }, "1 minimum, empty input": { - charset: "abcdefghijklmnopqrstuvwxyz", + charset: LowercaseCharset, minChars: 1, input: "", expected: false, }, "1 minimum, no matching": { - charset: "abcdefghijklmnopqrstuvwxyz", + charset: LowercaseCharset, minChars: 1, input: "0123456789", expected: false, }, "1 minimum, exactly 1 matching": { - charset: "abcdefghijklmnopqrstuvwxyz", + charset: LowercaseCharset, minChars: 1, input: "a", expected: true, }, "1 minimum, many matching": { - charset: "abcdefghijklmnopqrstuvwxyz", + charset: LowercaseCharset, minChars: 1, input: "abcdefhaaaa", expected: true, }, "2 minimum, 1 matching": { - charset: "abcdefghijklmnopqrstuvwxyz", + charset: LowercaseCharset, minChars: 2, input: "f", expected: false, }, "2 minimum, 2 matching": { - charset: "abcdefghijklmnopqrstuvwxyz", + charset: LowercaseCharset, minChars: 2, input: "fz", expected: true, }, "2 minimum, many matching": { - charset: "abcdefghijklmnopqrstuvwxyz", + charset: LowercaseCharset, minChars: 2, input: "joixnbonxd", expected: true, diff --git a/sdk/helper/random/string_generator.go b/sdk/helper/random/string_generator.go index e6605999ea95..623b884aef42 100644 --- a/sdk/helper/random/string_generator.go +++ b/sdk/helper/random/string_generator.go @@ -9,26 +9,50 @@ import ( "time" ) +const ( + LowercaseCharset = "abcdefghijklmnopqrstuvwxyz" + UppercaseCharset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + NumericCharset = "0123456789" + FullSymbolCharset = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" + ShortSymbolCharset = "-" + + AlphabeticCharset = UppercaseCharset + LowercaseCharset + AlphaNumericCharset = AlphabeticCharset + NumericCharset + AlphaNumericShortSymbolCharset = AlphaNumericCharset + ShortSymbolCharset + AlphaNumericFullSymbolCharset = AlphaNumericCharset + FullSymbolCharset +) + var ( + LowercaseRuneset = []rune(LowercaseCharset) + UppercaseRuneset = []rune(UppercaseCharset) + NumericRuneset = []rune(NumericCharset) + FullSymbolRuneset = []rune(FullSymbolCharset) + ShortSymbolRuneset = []rune(ShortSymbolCharset) + + AlphabeticRuneset = []rune(AlphabeticCharset) + AlphaNumericRuneset = []rune(AlphaNumericCharset) + AlphaNumericShortSymbolRuneset = []rune(AlphaNumericShortSymbolCharset) + AlphaNumericFullSymbolRuneset = []rune(AlphaNumericFullSymbolCharset) + // DefaultStringGenerator has reasonable default rules for generating strings DefaultStringGenerator = StringGenerator{ Length: 20, - Charset: []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-"), + Charset: []rune(LowercaseCharset + UppercaseCharset + NumericCharset + ShortSymbolCharset), Rules: []Rule{ CharsetRestriction{ - Charset: []rune("abcdefghijklmnopqrstuvwxyz"), + Charset: LowercaseRuneset, MinChars: 1, }, CharsetRestriction{ - Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), + Charset: UppercaseRuneset, MinChars: 1, }, CharsetRestriction{ - Charset: []rune("0123456789"), + Charset: NumericRuneset, MinChars: 1, }, CharsetRestriction{ - Charset: []rune("-"), + Charset: ShortSymbolRuneset, MinChars: 1, }, }, @@ -87,25 +111,25 @@ func (g StringGenerator) generate() (str string, err error) { // If performance improvements need to be made, this can be changed to read a batch of // potential strings at once rather than one at a time. This will significantly // improve performance, but at the cost of added complexity. - runes, err := randomRunes(g.rng, g.Charset, g.Length) + candidate, err := randomRunes(g.rng, g.Charset, g.Length) if err != nil { return "", fmt.Errorf("unable to generate random characters: %w", err) } for _, rule := range g.Rules { - if !rule.Pass(runes) { + if !rule.Pass(candidate) { return "", nil } } // Passed all rules - return string(runes), nil + return string(candidate), nil } // randomRunes creates a random string based on the provided charset. The charset is limited to 255 characters, but // could be expanded if needed. Expanding the maximum charset size will decrease performance because it will need to // combine bytes into a larger integer using binary.BigEndian.Uint16() function. -func randomRunes(rng io.Reader, charset []rune, length int) (randStr []rune, err error) { +func randomRunes(rng io.Reader, charset []rune, length int) (candidate []rune, err error) { if len(charset) == 0 { return nil, fmt.Errorf("no charset specified") } diff --git a/sdk/helper/random/string_generator_test.go b/sdk/helper/random/string_generator_test.go index 5938e71804a7..520e4e9325ff 100644 --- a/sdk/helper/random/string_generator_test.go +++ b/sdk/helper/random/string_generator_test.go @@ -22,18 +22,18 @@ func TestStringGenerator_Generate_successful(t *testing.T) { tests := map[string]testCase{ "common rules": { timeout: 1 * time.Second, - charset: []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-"), + charset: AlphaNumericShortSymbolRuneset, rules: []Rule{ CharsetRestriction{ - Charset: []rune("abcdefghijklmnopqrstuvwxyz"), + Charset: LowercaseRuneset, MinChars: 1, }, CharsetRestriction{ - Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), + Charset: UppercaseRuneset, MinChars: 1, }, CharsetRestriction{ - Charset: []rune("0123456789"), + Charset: NumericRuneset, MinChars: 1, }, }, @@ -92,7 +92,7 @@ func TestStringGenerator_Generate_errors(t *testing.T) { tests := map[string]testCase{ "already timed out": { timeout: 0, - charset: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-", + charset: AlphaNumericShortSymbolCharset, rules: []Rule{ testRule{ fail: false, @@ -102,7 +102,7 @@ func TestStringGenerator_Generate_errors(t *testing.T) { }, "impossible rules": { timeout: 10 * time.Millisecond, // Keep this short so the test doesn't take too long - charset: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-", + charset: AlphaNumericShortSymbolCharset, rules: []Rule{ testRule{ fail: true, @@ -112,7 +112,7 @@ func TestStringGenerator_Generate_errors(t *testing.T) { }, "bad RNG reader": { timeout: 10 * time.Millisecond, // Keep this short so the test doesn't take too long - charset: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-", + charset: AlphaNumericShortSymbolCharset, rules: []Rule{}, rng: badReader{}, }, @@ -161,9 +161,9 @@ func TestRandomRunes_deterministic(t *testing.T) { }, "common charset": { rngSeed: 1585593298447807001, - charset: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-", + charset: AlphaNumericShortSymbolCharset, length: 20, - expected: "czyhWGUYm3jf-uMFmGp-", + expected: "CZYHwguyM3JF-UmfMgP-", }, "max size charset": { rngSeed: 1585593298447807002, @@ -205,7 +205,7 @@ func TestRandomRunes_successful(t *testing.T) { length: 20, }, "common charset": { - charset: []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-"), + charset: AlphaNumericShortSymbolRuneset, length: 20, }, "max size charset": { @@ -250,12 +250,6 @@ func TestRandomRunes_successful(t *testing.T) { } } -type badReader struct{} - -func (badReader) Read([]byte) (int, error) { - return 0, fmt.Errorf("test error") -} - func TestRandomRunes_errors(t *testing.T) { type testCase struct { charset []rune @@ -325,7 +319,7 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { benches := map[string]testCase{ "no rules": { generator: StringGenerator{ - Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz"), + Charset: AlphaNumericFullSymbolRuneset, Rules: []Rule{}, }, }, @@ -334,22 +328,22 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { }, "large symbol set": { generator: StringGenerator{ - Charset: []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"), + Charset: AlphaNumericFullSymbolRuneset, Rules: []Rule{ CharsetRestriction{ - Charset: []rune("abcdefghijklmnopqrstuvwxyz"), + Charset: LowercaseRuneset, MinChars: 1, }, CharsetRestriction{ - Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), + Charset: UppercaseRuneset, MinChars: 1, }, CharsetRestriction{ - Charset: []rune("0123456789"), + Charset: NumericRuneset, MinChars: 1, }, CharsetRestriction{ - Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"), + Charset: FullSymbolRuneset, MinChars: 1, }, }, @@ -364,11 +358,11 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { ), Rules: []Rule{ CharsetRestriction{ - Charset: []rune("abcdefghijklmnopqrstuvwxyz"), + Charset: LowercaseRuneset, MinChars: 1, }, CharsetRestriction{ - Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ"), + Charset: UppercaseRuneset, MinChars: 1, }, CharsetRestriction{ @@ -380,7 +374,7 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { }, "restrictive charset rules": { generator: StringGenerator{ - Charset: []rune("-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"), + Charset: AlphaNumericShortSymbolRuneset, Rules: []Rule{ CharsetRestriction{ Charset: []rune("A"), @@ -429,7 +423,7 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { b.Run("SQLCredentialsProducer", func(b *testing.B) { sg := StringGenerator{ Length: 16, // 16 because the SQLCredentialsProducer prepends 4 characters to a 20 character password - Charset: []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"), + Charset: AlphaNumericRuneset, Rules: nil, rng: rand.Reader, } @@ -449,3 +443,9 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { } }) } + +type badReader struct{} + +func (badReader) Read([]byte) (int, error) { + return 0, fmt.Errorf("test error") +} From d4520d934b6a1d28ab68d038a7b2d702130cdf26 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Thu, 2 Apr 2020 16:25:54 -0600 Subject: [PATCH 09/29] Add password policy paths to the system backend --- vault/logical_system.go | 174 ++++++++++ vault/logical_system_paths.go | 55 ++++ vault/logical_system_test.go | 588 ++++++++++++++++++++++++++++++++++ 3 files changed, 817 insertions(+) diff --git a/vault/logical_system.go b/vault/logical_system.go index fc58ec6d8434..750e4b46f7df 100644 --- a/vault/logical_system.go +++ b/vault/logical_system.go @@ -20,6 +20,7 @@ import ( multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/vault/physical/raft" + "github.com/hashicorp/vault/sdk/helper/random" "github.com/hashicorp/errwrap" log "github.com/hashicorp/go-hclog" @@ -2064,6 +2065,174 @@ func (b *SystemBackend) handlePoliciesDelete(policyType PolicyType) framework.Op } } +type passwordPolicyConfig struct { + HCLPolicy string `json:"policy"` +} + +func getPasswordPolicyKey(policyName string) string { + return fmt.Sprintf("password_policy/%s", policyName) +} + +// handlePoliciesPasswordSet saves/updates password policies +func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) { + policyName := data.Get("name").(string) + if policyName == "" { + return logical.ErrorResponse("missing policy name"), nil + } + + rawPolicy := data.Get("policy").(string) + if rawPolicy == "" { + return logical.ErrorResponse("missing policy"), nil + } + + // Optionally decode base64 string + decodedPolicy, err := base64.StdEncoding.DecodeString(rawPolicy) + if err == nil { + rawPolicy = string(decodedPolicy) + } + + // Parse the policy to ensure that it's valid + rng, err := random.Parse(rawPolicy) + if err != nil { + return logical.ErrorResponse("invalid password policy: %s", err), nil + } + + // Generate some passwords to ensure that we're confident that the policy isn't impossible + timeout := 1 * time.Second + genCtx, cancel := context.WithTimeout(ctx, timeout) + defer cancel() + + attempts := 10 + failed := 0 + for i := 0; i < attempts; i++ { + _, err = rng.Generate(genCtx) + if err != nil { + failed++ + } + } + + if failed == attempts { + return logical.ErrorResponse("unable to generate password from provided policy in %s: are the rules impossible?", timeout), nil + } + + var resp *logical.Response + if failed > 0 { + resp = &logical.Response{ + Warnings: []string{ + fmt.Sprintf("failed to generate passwords %d times out of %d attempts", failed, attempts), + }, + } + } + + cfg := passwordPolicyConfig{ + HCLPolicy: rawPolicy, + } + entry, err := logical.StorageEntryJSON(getPasswordPolicyKey(policyName), cfg) + if err != nil { + return logical.ErrorResponse("unable to save password policy: %s", err), nil + } + + err = req.Storage.Put(ctx, entry) + if err != nil { + return logical.ErrorResponse("failed to save policy to storage backend: %s", err), nil + } + + return logical.RespondWithStatusCode(resp, req, http.StatusOK) +} + +// handlePoliciesPasswordGet retrieves a password policy if it exists +func (*SystemBackend) handlePoliciesPasswordGet(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) { + policyName := data.Get("name").(string) + if policyName == "" { + return logical.ErrorResponse("missing policy name"), nil + } + + cfg, err := retrievePasswordPolicy(ctx, req.Storage, policyName) + if err != nil { + return nil, logical.CodedError(http.StatusInternalServerError, "failed to retrieve password policy") + } + if cfg == nil { + return logical.RespondWithStatusCode(nil, req, http.StatusNotFound) + } + + resp := &logical.Response{ + Data: map[string]interface{}{ + "policy": cfg.HCLPolicy, + }, + } + + return resp, nil +} + +// retrievePasswordPolicy retrieves a password policy from the logical storage +func retrievePasswordPolicy(ctx context.Context, storage logical.Storage, policyName string) (policyCfg *passwordPolicyConfig, err error) { + entry, err := storage.Get(ctx, getPasswordPolicyKey(policyName)) + if err != nil { + return nil, err + } + if entry == nil { + return nil, nil + } + + policyCfg = &passwordPolicyConfig{} + err = json.Unmarshal(entry.Value, &policyCfg) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal stored data: %w", err) + } + + return policyCfg, nil +} + +// handlePoliciesPasswordDelete deletes a password policy if it exists +func (*SystemBackend) handlePoliciesPasswordDelete(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) { + policyName := data.Get("name").(string) + if policyName == "" { + return logical.ErrorResponse("missing policy name"), nil + } + + err := req.Storage.Delete(ctx, getPasswordPolicyKey(policyName)) + if err != nil { + return nil, logical.CodedError(http.StatusInternalServerError, fmt.Sprintf("failed to delete password policy: %s", err)) + } + + return logical.RespondWithStatusCode(nil, req, http.StatusOK) +} + +// handlePoliciesPasswordGenerate generates a password from the specified password policy +func (*SystemBackend) handlePoliciesPasswordGenerate(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) { + policyName := data.Get("name").(string) + if policyName == "" { + return logical.ErrorResponse("missing policy name"), nil + } + + cfg, err := retrievePasswordPolicy(ctx, req.Storage, policyName) + if err != nil { + return nil, logical.CodedError(http.StatusInternalServerError, "failed to retrieve password policy") + } + if cfg == nil { + return logical.RespondWithStatusCode(nil, req, http.StatusNotFound) + } + + rsg, err := random.Parse(cfg.HCLPolicy) + if err != nil { + return nil, logical.CodedError(http.StatusInternalServerError, "stored password policy configuration failed to parse") + } + + password, err := rsg.Generate(ctx) + if err != nil { + return nil, logical.CodedError(http.StatusInternalServerError, fmt.Sprintf("failed to generate password from policy: %s", err)) + } + + resp := &logical.Response{ + Data: map[string]interface{}{ + "password": password, + logical.HTTPContentType: "application/json", + logical.HTTPStatusCode: http.StatusOK, + }, + } + return resp, nil +} + // handleAuditTable handles the "audit" endpoint to provide the audit table func (b *SystemBackend) handleAuditTable(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) { b.Core.auditLock.RLock() @@ -3766,6 +3935,11 @@ or delete a policy. "", }, + "password-policy-name": { + `The name of the password policy.`, + "", + }, + "audit-hash": { "The hash of the given string via the given audit backend", "", diff --git a/vault/logical_system_paths.go b/vault/logical_system_paths.go index 0613c5626235..8b8e52096e75 100644 --- a/vault/logical_system_paths.go +++ b/vault/logical_system_paths.go @@ -1444,6 +1444,61 @@ func (b *SystemBackend) policyPaths() []*framework.Path { HelpSynopsis: strings.TrimSpace(sysHelp["policy"][0]), HelpDescription: strings.TrimSpace(sysHelp["policy"][1]), }, + + { + Pattern: "policies/password/(?P.+)/generate$", + + Fields: map[string]*framework.FieldSchema{ + "name": &framework.FieldSchema{ + Type: framework.TypeString, + Description: "The name of the password policy.", + }, + }, + + Operations: map[logical.Operation]framework.OperationHandler{ + logical.ReadOperation: &framework.PathOperation{ + Callback: b.handlePoliciesPasswordGenerate, + Summary: "Generate a password from an existing password policy.", + }, + }, + + HelpSynopsis: "Generate a password from an existing password policy.", + HelpDescription: "Generate a password from an existing password policy.", + }, + + { + Pattern: "policies/password/(?P.+)$", + + Fields: map[string]*framework.FieldSchema{ + "name": &framework.FieldSchema{ + Type: framework.TypeString, + Description: "The name of the password policy.", + }, + "policy": &framework.FieldSchema{ + Type: framework.TypeString, + Description: "The password policy", + }, + }, + + Operations: map[logical.Operation]framework.OperationHandler{ + logical.UpdateOperation: &framework.PathOperation{ + Callback: b.handlePoliciesPasswordSet, + Summary: "Add a new or update an existing password policy.", + }, + logical.ReadOperation: &framework.PathOperation{ + Callback: b.handlePoliciesPasswordGet, + Summary: "Retrieve an existing password policy.", + }, + logical.DeleteOperation: &framework.PathOperation{ + Callback: b.handlePoliciesPasswordDelete, + Summary: "Delete a password policy.", + }, + }, + + HelpSynopsis: "Read, Modify, or Delete a password policy.", + HelpDescription: "Read the rules of an existing password policy, create or update " + + "the rules of a password policy, or delete a password policy.", + }, } } diff --git a/vault/logical_system_test.go b/vault/logical_system_test.go index 30b1dffebe3c..68b795ea2ea8 100644 --- a/vault/logical_system_test.go +++ b/vault/logical_system_test.go @@ -7,6 +7,7 @@ import ( "encoding/hex" "fmt" "io/ioutil" + "net/http" "os" "path/filepath" "reflect" @@ -24,6 +25,7 @@ import ( "github.com/hashicorp/vault/sdk/framework" "github.com/hashicorp/vault/sdk/helper/consts" "github.com/hashicorp/vault/sdk/helper/jsonutil" + "github.com/hashicorp/vault/sdk/helper/random" "github.com/hashicorp/vault/sdk/helper/salt" "github.com/hashicorp/vault/sdk/logical" "github.com/hashicorp/vault/sdk/version" @@ -2730,3 +2732,589 @@ func TestSystemBackend_PathWildcardPreflight(t *testing.T) { t.Fatalf("err: %v", err) } } + +func TestHandlePoliciesPasswordSet(t *testing.T) { + type testStorage interface { + logical.Storage + getAll() map[string][]byte + } + + type testCase struct { + storage testStorage + data *framework.FieldData + expectedResp *logical.Response + expectErr bool + expectedStore map[string][]byte + } + + tests := map[string]testCase{ + "missing policy name": { + storage: &fakeStorage{}, + data: passwordPoliciesFieldData(map[string]interface{}{ + "policy": "length = 20\ncharset=\"abcdefghij\"", + }), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + "error": "missing policy name", + }, + }, + expectErr: false, + }, + "missing policy": { + storage: &fakeStorage{}, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + }), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + "error": "missing policy", + }, + }, + expectErr: false, + }, + "not base64 encoded": { + storage: &fakeStorage{}, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + "policy": "length = 20\ncharset=\"abcdefghij\"", + }), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + logical.HTTPContentType: "application/json", + logical.HTTPStatusCode: http.StatusOK, + }, + }, + expectErr: false, + expectedStore: map[string][]byte{ + "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + }, + }, + "base64 encoded": { + storage: &fakeStorage{}, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + "policy": base64Encode("length = 20\ncharset=\"abcdefghij\""), + }), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + logical.HTTPContentType: "application/json", + logical.HTTPStatusCode: http.StatusOK, + }, + }, + expectErr: false, + expectedStore: map[string][]byte{ + "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + }, + }, + "garbage policy": { + storage: &fakeStorage{}, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + "policy": "hasdukfhiuashdfoiasjdf", + }), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + "error": "invalid password policy: unable to decode: At 1:24: key 'hasdukfhiuashdfoiasjdf' expected start of object ('{') or assignment ('=')", + }, + }, + expectErr: false, + }, + "storage failure": { + storage: &fakeStorage{ + putError: fmt.Errorf("test error"), + }, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + "policy": "length = 20\ncharset=\"abcdefghij\"", + }), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + "error": "failed to save policy to storage backend: test error", + }, + }, + expectErr: false, + }, + "impossible policy": { + storage: &fakeStorage{}, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + "policy": ` + length = 30 + charset="lower-alpha" + rule "CharsetRestriction" { + charset = "a" + min-chars = 30 + }`, + }), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + "error": "unable to generate password from provided policy in 1s: are the rules impossible?", + }, + }, + expectErr: false, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) + defer cancel() + + req := &logical.Request{ + Storage: test.storage, + } + + b := &SystemBackend{} + + actualResp, err := b.handlePoliciesPasswordSet(ctx, req, test.data) + if test.expectErr && err == nil { + t.Fatalf("err expected, got nil") + } + if !test.expectErr && err != nil { + t.Fatalf("no error expected, got: %s", err) + } + if !reflect.DeepEqual(actualResp, test.expectedResp) { + t.Fatalf("Actual response: %#v\nExpected response: %#v", actualResp, test.expectedResp) + } + + actualStore := test.storage.getAll() + if !reflect.DeepEqual(actualStore, test.expectedStore) { + t.Fatalf("Actual storage: %#v\nExpected storage: %#v", actualStore, test.expectedStore) + } + }) + } +} + +func TestHandlePoliciesPasswordGet(t *testing.T) { + type testCase struct { + storage logical.Storage + data *framework.FieldData + expectedResp *logical.Response + expectErr bool + } + + tests := map[string]testCase{ + "missing policy name": { + storage: &fakeStorage{}, + data: passwordPoliciesFieldData(map[string]interface{}{}), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + "error": "missing policy name", + }, + }, + expectErr: false, + }, + "storage error": { + storage: &fakeStorage{ + getError: fmt.Errorf("test error"), + }, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + }), + expectedResp: nil, + expectErr: true, + }, + "missing value": { + storage: &fakeStorage{}, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + }), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + logical.HTTPContentType: "application/json", + logical.HTTPStatusCode: http.StatusNotFound, + }, + }, + expectErr: false, + }, + "good value": { + storage: &fakeStorage{ + data: map[string][]byte{ + "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + }, + }, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + }), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + "policy": "length = 20\ncharset=\"abcdefghij\"", + }, + }, + expectErr: false, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) + defer cancel() + + req := &logical.Request{ + Storage: test.storage, + } + + b := &SystemBackend{} + + actualResp, err := b.handlePoliciesPasswordGet(ctx, req, test.data) + if test.expectErr && err == nil { + t.Fatalf("err expected, got nil") + } + if !test.expectErr && err != nil { + t.Fatalf("no error expected, got: %s", err) + } + if !reflect.DeepEqual(actualResp, test.expectedResp) { + t.Fatalf("Actual response: %#v\nExpected response: %#v", actualResp, test.expectedResp) + } + }) + } +} + +func TestHandlePoliciesPasswordDelete(t *testing.T) { + type testStorage interface { + logical.Storage + getAll() map[string][]byte + } + + type testCase struct { + storage testStorage + data *framework.FieldData + expectedResp *logical.Response + expectErr bool + expectedStore map[string][]byte + } + + tests := map[string]testCase{ + "missing policy name": { + storage: &fakeStorage{ + data: map[string][]byte{ + "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + }, + }, + data: passwordPoliciesFieldData(map[string]interface{}{}), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + "error": "missing policy name", + }, + }, + expectErr: false, + expectedStore: map[string][]byte{ + "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + }, + }, + "storage failure": { + storage: &fakeStorage{ + data: map[string][]byte{ + "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + }, + deleteError: fmt.Errorf("test error"), + }, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + }), + expectedResp: nil, + expectErr: true, + expectedStore: map[string][]byte{ + "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + }, + }, + "successful delete": { + storage: &fakeStorage{ + data: map[string][]byte{ + "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + }, + }, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + }), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + logical.HTTPContentType: "application/json", + logical.HTTPStatusCode: http.StatusOK, + }, + }, + expectErr: false, + expectedStore: map[string][]byte{}, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) + defer cancel() + + req := &logical.Request{ + Storage: test.storage, + } + + b := &SystemBackend{} + + actualResp, err := b.handlePoliciesPasswordDelete(ctx, req, test.data) + if test.expectErr && err == nil { + t.Fatalf("err expected, got nil") + } + if !test.expectErr && err != nil { + t.Fatalf("no error expected, got: %s", err) + } + if !reflect.DeepEqual(actualResp, test.expectedResp) { + t.Fatalf("Actual response: %#v\nExpected response: %#v", actualResp, test.expectedResp) + } + + actualStore := test.storage.getAll() + if !reflect.DeepEqual(actualStore, test.expectedStore) { + t.Fatalf("Actual storage: %#v\nExpected storage: %#v", actualStore, test.expectedStore) + } + }) + } +} + +func TestHandlePoliciesPasswordGenerate(t *testing.T) { + t.Run("errors", func(t *testing.T) { + type testCase struct { + timeout time.Duration + storage logical.Storage + data *framework.FieldData + expectedResp *logical.Response + expectErr bool + } + + tests := map[string]testCase{ + "missing policy name": { + storage: &fakeStorage{ + data: map[string][]byte{ + "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + }, + }, + data: passwordPoliciesFieldData(map[string]interface{}{}), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + "error": "missing policy name", + }, + }, + expectErr: false, + }, + "storage failure": { + storage: &fakeStorage{ + data: map[string][]byte{ + "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + }, + getError: fmt.Errorf("test error"), + }, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + }), + expectedResp: nil, + expectErr: true, + }, + "policy does not exist": { + storage: &fakeStorage{ + data: map[string][]byte{}, + }, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + }), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + logical.HTTPContentType: "application/json", + logical.HTTPStatusCode: http.StatusNotFound, + }, + }, + expectErr: false, + }, + "policy improperly saved": { + storage: &fakeStorage{ + data: map[string][]byte{ + "password_policy/testpolicy": []byte("{\"policy\":\"ahsdiofalsdjflkajsdf\"}\n"), + }, + }, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + }), + expectedResp: nil, + expectErr: true, + }, + "failed to generate": { + timeout: 0 * time.Second, + storage: &fakeStorage{ + data: map[string][]byte{ + "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + }, + }, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + }), + expectedResp: nil, + expectErr: true, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), test.timeout) + defer cancel() + + req := &logical.Request{ + Storage: test.storage, + } + + b := &SystemBackend{} + + actualResp, err := b.handlePoliciesPasswordGenerate(ctx, req, test.data) + if test.expectErr && err == nil { + t.Fatalf("err expected, got nil") + } + if !test.expectErr && err != nil { + t.Fatalf("no error expected, got: %s", err) + } + if !reflect.DeepEqual(actualResp, test.expectedResp) { + t.Fatalf("Actual response: %#v\nExpected response: %#v", actualResp, test.expectedResp) + } + }) + } + }) + + t.Run("success", func(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) + defer cancel() + + storage := &fakeStorage{ + data: map[string][]byte{ + "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + }, + } + + data := passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + }) + + expectedPassLen := 20 + expectedResp := &logical.Response{ + Data: map[string]interface{}{ + logical.HTTPContentType: "application/json", + logical.HTTPStatusCode: http.StatusOK, + }, + } + + rules := []random.Rule{ + random.CharsetRestriction{ + Charset: []rune("abcdefghij"), + MinChars: expectedPassLen, + }, + } + + // Run the test a bunch of times to help ensure we don't have flaky behavior + for i := 0; i < 1000; i++ { + req := &logical.Request{ + Storage: storage, + } + + b := &SystemBackend{} + + actualResp, err := b.handlePoliciesPasswordGenerate(ctx, req, data) + if err != nil { + t.Fatalf("no error expected, got: %s", err) + } + + // Extract the password and then check the rest of the contents separate from the password + password, exists := actualResp.Data["password"].(string) + if !exists { + t.Fatalf("no password field found") + } + + delete(actualResp.Data, "password") + + if !reflect.DeepEqual(actualResp, expectedResp) { + t.Fatalf("Actual response: %#v\nExpected response: %#v", actualResp, expectedResp) + } + + // Check to make sure the password is correctly formatted + passwordLength := len([]rune(password)) + if passwordLength != expectedPassLen { + t.Fatalf("password is %d characters but should be %d", passwordLength, expectedPassLen) + } + + for _, rule := range rules { + if !rule.Pass([]rune(password)) { + t.Fatalf("password %s does not have the correct characters", password) + } + } + } + }) +} + +func passwordPoliciesFieldData(raw map[string]interface{}) *framework.FieldData { + return &framework.FieldData{ + Raw: raw, + Schema: map[string]*framework.FieldSchema{ + "name": &framework.FieldSchema{ + Type: framework.TypeString, + Description: "The name of the password policy.", + }, + "policy": &framework.FieldSchema{ + Type: framework.TypeString, + Description: "The password policy", + }, + }, + } +} + +type fakeStorage struct { + data map[string][]byte + + getError error + putError error + deleteError error +} + +func (f *fakeStorage) getAll() map[string][]byte { + return f.data +} + +func (f *fakeStorage) List(ctx context.Context, prefix string) (keys []string, err error) { + return nil, fmt.Errorf("not yet implemented") +} + +func (f *fakeStorage) Get(ctx context.Context, key string) (*logical.StorageEntry, error) { + if f.getError != nil { + return nil, f.getError + } + + if f.data == nil { + return nil, nil + } + + val, exists := f.data[key] + if !exists { + return nil, nil + } + entry := &logical.StorageEntry{ + Key: key, + Value: val, + } + return entry, nil +} + +func (f *fakeStorage) Put(ctx context.Context, entry *logical.StorageEntry) error { + if f.putError != nil { + return f.putError + } + + if f.data == nil { + f.data = map[string][]byte{} + } + f.data[entry.Key] = entry.Value + return nil +} + +func (f *fakeStorage) Delete(ctx context.Context, key string) error { + if f.deleteError != nil { + return f.deleteError + } + + delete(f.data, key) + return nil +} + +func base64Encode(data string) string { + return base64.StdEncoding.EncodeToString([]byte(data)) +} From 0d60cac8ed07517837f915c39ab5c39e9b2d18f4 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Thu, 2 Apr 2020 16:39:29 -0600 Subject: [PATCH 10/29] Add zero length config test --- sdk/helper/random/parser_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index eb4ef2d2bed7..c13babdbcac1 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -101,6 +101,17 @@ func TestParser_Parse(t *testing.T) { }, expectErr: false, }, + "config with zero length": { + registry: defaultRuleNameMapping, + rawConfig: ` + length = 0 + charset = "abcde"`, + expected: StringGenerator{ + Length: 0, + Charset: []rune("abcde"), + }, + expectErr: true, + }, "config with negative length": { registry: defaultRuleNameMapping, rawConfig: ` From 71cd1aa854bf3943e441998d61072e0862eecfd7 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Fri, 3 Apr 2020 14:23:35 -0600 Subject: [PATCH 11/29] Make error handling consistent --- vault/logical_system.go | 30 +++-- vault/logical_system_test.go | 233 ++++++++++++++++++----------------- 2 files changed, 135 insertions(+), 128 deletions(-) diff --git a/vault/logical_system.go b/vault/logical_system.go index 750e4b46f7df..f7143f1fa00c 100644 --- a/vault/logical_system.go +++ b/vault/logical_system.go @@ -2077,12 +2077,12 @@ func getPasswordPolicyKey(policyName string) string { func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) { policyName := data.Get("name").(string) if policyName == "" { - return logical.ErrorResponse("missing policy name"), nil + return nil, logical.CodedError(http.StatusBadRequest, "missing policy name") } rawPolicy := data.Get("policy").(string) if rawPolicy == "" { - return logical.ErrorResponse("missing policy"), nil + return nil, logical.CodedError(http.StatusBadRequest, "missing policy") } // Optionally decode base64 string @@ -2094,7 +2094,7 @@ func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logica // Parse the policy to ensure that it's valid rng, err := random.Parse(rawPolicy) if err != nil { - return logical.ErrorResponse("invalid password policy: %s", err), nil + return nil, logical.CodedError(http.StatusBadRequest, fmt.Sprintf("invalid password policy: %s", err)) } // Generate some passwords to ensure that we're confident that the policy isn't impossible @@ -2112,7 +2112,7 @@ func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logica } if failed == attempts { - return logical.ErrorResponse("unable to generate password from provided policy in %s: are the rules impossible?", timeout), nil + return nil, logical.CodedError(http.StatusBadRequest, fmt.Sprintf("unable to generate password from provided policy in %s: are the rules impossible?", timeout)) } var resp *logical.Response @@ -2129,12 +2129,12 @@ func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logica } entry, err := logical.StorageEntryJSON(getPasswordPolicyKey(policyName), cfg) if err != nil { - return logical.ErrorResponse("unable to save password policy: %s", err), nil + return nil, logical.CodedError(http.StatusInternalServerError, fmt.Sprintf("unable to save password policy: %s", err)) } err = req.Storage.Put(ctx, entry) if err != nil { - return logical.ErrorResponse("failed to save policy to storage backend: %s", err), nil + return nil, logical.CodedError(http.StatusInternalServerError, fmt.Sprintf("failed to save policy to storage backend: %s", err)) } return logical.RespondWithStatusCode(resp, req, http.StatusOK) @@ -2144,7 +2144,7 @@ func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logica func (*SystemBackend) handlePoliciesPasswordGet(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) { policyName := data.Get("name").(string) if policyName == "" { - return logical.ErrorResponse("missing policy name"), nil + return nil, logical.CodedError(http.StatusBadRequest, "missing policy name") } cfg, err := retrievePasswordPolicy(ctx, req.Storage, policyName) @@ -2152,7 +2152,7 @@ func (*SystemBackend) handlePoliciesPasswordGet(ctx context.Context, req *logica return nil, logical.CodedError(http.StatusInternalServerError, "failed to retrieve password policy") } if cfg == nil { - return logical.RespondWithStatusCode(nil, req, http.StatusNotFound) + return nil, logical.CodedError(http.StatusNotFound, "policy does not exist") } resp := &logical.Response{ @@ -2161,7 +2161,7 @@ func (*SystemBackend) handlePoliciesPasswordGet(ctx context.Context, req *logica }, } - return resp, nil + return logical.RespondWithStatusCode(resp, req, http.StatusOK) } // retrievePasswordPolicy retrieves a password policy from the logical storage @@ -2187,7 +2187,7 @@ func retrievePasswordPolicy(ctx context.Context, storage logical.Storage, policy func (*SystemBackend) handlePoliciesPasswordDelete(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) { policyName := data.Get("name").(string) if policyName == "" { - return logical.ErrorResponse("missing policy name"), nil + return nil, logical.CodedError(http.StatusBadRequest, "missing policy name") } err := req.Storage.Delete(ctx, getPasswordPolicyKey(policyName)) @@ -2202,7 +2202,7 @@ func (*SystemBackend) handlePoliciesPasswordDelete(ctx context.Context, req *log func (*SystemBackend) handlePoliciesPasswordGenerate(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) { policyName := data.Get("name").(string) if policyName == "" { - return logical.ErrorResponse("missing policy name"), nil + return nil, logical.CodedError(http.StatusBadRequest, "missing policy name") } cfg, err := retrievePasswordPolicy(ctx, req.Storage, policyName) @@ -2210,7 +2210,7 @@ func (*SystemBackend) handlePoliciesPasswordGenerate(ctx context.Context, req *l return nil, logical.CodedError(http.StatusInternalServerError, "failed to retrieve password policy") } if cfg == nil { - return logical.RespondWithStatusCode(nil, req, http.StatusNotFound) + return nil, logical.CodedError(http.StatusNotFound, "policy does not exist") } rsg, err := random.Parse(cfg.HCLPolicy) @@ -2225,12 +2225,10 @@ func (*SystemBackend) handlePoliciesPasswordGenerate(ctx context.Context, req *l resp := &logical.Response{ Data: map[string]interface{}{ - "password": password, - logical.HTTPContentType: "application/json", - logical.HTTPStatusCode: http.StatusOK, + "password": password, }, } - return resp, nil + return logical.RespondWithStatusCode(resp, req, http.StatusOK) } // handleAuditTable handles the "audit" endpoint to provide the audit table diff --git a/vault/logical_system_test.go b/vault/logical_system_test.go index 68b795ea2ea8..a77576b0b976 100644 --- a/vault/logical_system_test.go +++ b/vault/logical_system_test.go @@ -5,6 +5,7 @@ import ( "crypto/sha256" "encoding/base64" "encoding/hex" + "encoding/json" "fmt" "io/ioutil" "net/http" @@ -2753,24 +2754,51 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { data: passwordPoliciesFieldData(map[string]interface{}{ "policy": "length = 20\ncharset=\"abcdefghij\"", }), - expectedResp: &logical.Response{ - Data: map[string]interface{}{ - "error": "missing policy name", - }, - }, - expectErr: false, + expectedResp: nil, + expectErr: true, }, "missing policy": { storage: &fakeStorage{}, data: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), - expectedResp: &logical.Response{ - Data: map[string]interface{}{ - "error": "missing policy", - }, + expectedResp: nil, + expectErr: true, + }, + "garbage policy": { + storage: &fakeStorage{}, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + "policy": "hasdukfhiuashdfoiasjdf", + }), + expectedResp: nil, + expectErr: true, + }, + "storage failure": { + storage: &fakeStorage{ + putError: fmt.Errorf("test error"), }, - expectErr: false, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + "policy": "length = 20\ncharset=\"abcdefghij\"", + }), + expectedResp: nil, + expectErr: true, + }, + "impossible policy": { + storage: &fakeStorage{}, + data: passwordPoliciesFieldData(map[string]interface{}{ + "name": "testpolicy", + "policy": ` + length = 30 + charset="lower-alpha" + rule "CharsetRestriction" { + charset = "a" + min-chars = 30 + }`, + }), + expectedResp: nil, + expectErr: true, }, "not base64 encoded": { storage: &fakeStorage{}, @@ -2806,53 +2834,6 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), }, }, - "garbage policy": { - storage: &fakeStorage{}, - data: passwordPoliciesFieldData(map[string]interface{}{ - "name": "testpolicy", - "policy": "hasdukfhiuashdfoiasjdf", - }), - expectedResp: &logical.Response{ - Data: map[string]interface{}{ - "error": "invalid password policy: unable to decode: At 1:24: key 'hasdukfhiuashdfoiasjdf' expected start of object ('{') or assignment ('=')", - }, - }, - expectErr: false, - }, - "storage failure": { - storage: &fakeStorage{ - putError: fmt.Errorf("test error"), - }, - data: passwordPoliciesFieldData(map[string]interface{}{ - "name": "testpolicy", - "policy": "length = 20\ncharset=\"abcdefghij\"", - }), - expectedResp: &logical.Response{ - Data: map[string]interface{}{ - "error": "failed to save policy to storage backend: test error", - }, - }, - expectErr: false, - }, - "impossible policy": { - storage: &fakeStorage{}, - data: passwordPoliciesFieldData(map[string]interface{}{ - "name": "testpolicy", - "policy": ` - length = 30 - charset="lower-alpha" - rule "CharsetRestriction" { - charset = "a" - min-chars = 30 - }`, - }), - expectedResp: &logical.Response{ - Data: map[string]interface{}{ - "error": "unable to generate password from provided policy in 1s: are the rules impossible?", - }, - }, - expectErr: false, - }, } for name, test := range tests { @@ -2895,14 +2876,10 @@ func TestHandlePoliciesPasswordGet(t *testing.T) { tests := map[string]testCase{ "missing policy name": { - storage: &fakeStorage{}, - data: passwordPoliciesFieldData(map[string]interface{}{}), - expectedResp: &logical.Response{ - Data: map[string]interface{}{ - "error": "missing policy name", - }, - }, - expectErr: false, + storage: &fakeStorage{}, + data: passwordPoliciesFieldData(map[string]interface{}{}), + expectedResp: nil, + expectErr: true, }, "storage error": { storage: &fakeStorage{ @@ -2919,13 +2896,8 @@ func TestHandlePoliciesPasswordGet(t *testing.T) { data: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), - expectedResp: &logical.Response{ - Data: map[string]interface{}{ - logical.HTTPContentType: "application/json", - logical.HTTPStatusCode: http.StatusNotFound, - }, - }, - expectErr: false, + expectedResp: nil, + expectErr: true, }, "good value": { storage: &fakeStorage{ @@ -2936,11 +2908,11 @@ func TestHandlePoliciesPasswordGet(t *testing.T) { data: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), - expectedResp: &logical.Response{ - Data: map[string]interface{}{ - "policy": "length = 20\ncharset=\"abcdefghij\"", - }, - }, + expectedResp: toHTTPResponse(t, http.StatusOK, + &logical.Response{ + Data: map[string]interface{}{ + "policy": "length = 20\ncharset=\"abcdefghij\"", + }}), expectErr: false, }, } @@ -2991,13 +2963,9 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), }, }, - data: passwordPoliciesFieldData(map[string]interface{}{}), - expectedResp: &logical.Response{ - Data: map[string]interface{}{ - "error": "missing policy name", - }, - }, - expectErr: false, + data: passwordPoliciesFieldData(map[string]interface{}{}), + expectedResp: nil, + expectErr: true, expectedStore: map[string][]byte{ "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), }, @@ -3085,13 +3053,9 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), }, }, - data: passwordPoliciesFieldData(map[string]interface{}{}), - expectedResp: &logical.Response{ - Data: map[string]interface{}{ - "error": "missing policy name", - }, - }, - expectErr: false, + data: passwordPoliciesFieldData(map[string]interface{}{}), + expectedResp: nil, + expectErr: true, }, "storage failure": { storage: &fakeStorage{ @@ -3113,13 +3077,8 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { data: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), - expectedResp: &logical.Response{ - Data: map[string]interface{}{ - logical.HTTPContentType: "application/json", - logical.HTTPStatusCode: http.StatusNotFound, - }, - }, - expectErr: false, + expectedResp: nil, + expectErr: true, }, "policy improperly saved": { storage: &fakeStorage{ @@ -3176,25 +3135,31 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { t.Run("success", func(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) defer cancel() - storage := &fakeStorage{ data: map[string][]byte{ "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), }, } - data := passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }) - expectedPassLen := 20 expectedResp := &logical.Response{ Data: map[string]interface{}{ logical.HTTPContentType: "application/json", logical.HTTPStatusCode: http.StatusOK, + // Not the body as that needs to be pulled out and compared as a non-string + }, + } + + expectedBody := &logical.HTTPResponse{ + Data: map[string]interface{}{ + // Doesn't include the password as that's pulled out and compared separately }, } + // Password assertions + expectedPassLen := 20 rules := []random.Rule{ random.CharsetRestriction{ Charset: []rune("abcdefghij"), @@ -3203,7 +3168,7 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { } // Run the test a bunch of times to help ensure we don't have flaky behavior - for i := 0; i < 1000; i++ { + for i := 0; i < 100; i++ { req := &logical.Request{ Storage: storage, } @@ -3215,17 +3180,28 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { t.Fatalf("no error expected, got: %s", err) } - // Extract the password and then check the rest of the contents separate from the password - password, exists := actualResp.Data["password"].(string) - if !exists { - t.Fatalf("no password field found") - } + assert(t, actualResp != nil, "response is nil") + assert(t, actualResp.Data != nil, "expected data, got nil") + assertHasKey(t, actualResp.Data, logical.HTTPRawBody, "key %s not found in data", logical.HTTPRawBody) + assertIsString(t, actualResp.Data[logical.HTTPRawBody], "key %s should have a string value", logical.HTTPRawBody) + rawBody := actualResp.Data[logical.HTTPRawBody].(string) - delete(actualResp.Data, "password") + // Delete the body so the rest of the response can be compared + delete(actualResp.Data, logical.HTTPRawBody) + assert(t, reflect.DeepEqual(actualResp, expectedResp), "Actual response: %#v\nExpected response: %#v", actualResp, expectedResp) - if !reflect.DeepEqual(actualResp, expectedResp) { - t.Fatalf("Actual response: %#v\nExpected response: %#v", actualResp, expectedResp) - } + actualBody := &logical.HTTPResponse{} + err = json.Unmarshal([]byte(rawBody), actualBody) + assert(t, err == nil, "unable to unmarshal response body: %s", err) + + assert(t, actualBody.Data != nil, "expected data field in body, got nil") + assertHasKey(t, actualBody.Data, "password", "expected data in body to have 'password' field") + assertIsString(t, actualBody.Data["password"], "password field should be a string") + password := actualBody.Data["password"].(string) + + // delete the password field so the rest of the body can be compared + delete(actualBody.Data, "password") + assert(t, reflect.DeepEqual(actualBody, expectedBody), "Actual body: %#v\nExpected body: %#v", actualBody, expectedBody) // Check to make sure the password is correctly formatted passwordLength := len([]rune(password)) @@ -3242,6 +3218,39 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { }) } +func toHTTPResponse(t *testing.T, code int, resp *logical.Response) *logical.Response { + t.Helper() + + httpResp, err := logical.RespondWithStatusCode(resp, nil, code) + if err != nil { + t.Fatalf("failed to convert logical response to HTTP response: %s", err) + } + return httpResp +} + +func assert(t *testing.T, pass bool, f string, vals ...interface{}) { + t.Helper() + if !pass { + t.Fatalf(f, vals...) + } +} + +func assertHasKey(t *testing.T, m map[string]interface{}, key string, f string, vals ...interface{}) { + t.Helper() + _, exists := m[key] + if !exists { + t.Fatalf(f, vals...) + } +} + +func assertIsString(t *testing.T, val interface{}, f string, vals ...interface{}) { + t.Helper() + _, ok := val.(string) + if !ok { + t.Fatalf(f, vals...) + } +} + func passwordPoliciesFieldData(raw map[string]interface{}) *framework.FieldData { return &framework.FieldData{ Raw: raw, From 5be8947232551e3fe4752225d06e622eceb177c6 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Wed, 8 Apr 2020 16:38:00 -0600 Subject: [PATCH 12/29] Integrated password policies to plugins --- sdk/helper/random/parser.go | 12 +- sdk/helper/random/parser_test.go | 47 ++- sdk/helper/random/registry_test.go | 14 + sdk/helper/random/rules.go | 8 +- sdk/helper/random/serializing.go | 74 ++++ sdk/helper/random/string_generator.go | 40 +- sdk/helper/random/string_generator_test.go | 43 +- sdk/logical/system_view.go | 27 ++ sdk/plugin/grpc_system.go | 37 ++ sdk/plugin/grpc_system_test.go | 61 ++- sdk/plugin/pb/backend.pb.go | 446 +++++++++++++-------- sdk/plugin/pb/backend.proto | 11 + vault/dynamic_system_view.go | 30 ++ vault/dynamic_system_view_test.go | 163 ++++++++ vault/logical_system.go | 28 +- 15 files changed, 841 insertions(+), 200 deletions(-) create mode 100644 sdk/helper/random/serializing.go diff --git a/sdk/helper/random/parser.go b/sdk/helper/random/parser.go index 20cb0db16710..3ce384e15446 100644 --- a/sdk/helper/random/parser.go +++ b/sdk/helper/random/parser.go @@ -13,7 +13,7 @@ import ( ) // Parse is a convenience function for parsing HCL into a StringGenerator. See Parser.Parse for details. -func Parse(raw string) (strs StringGenerator, err error) { +func Parse(raw string) (gen StringGenerator, err error) { parser := Parser{ RuleRegistry: Registry{ Rules: defaultRuleNameMapping, @@ -22,6 +22,10 @@ func Parse(raw string) (strs StringGenerator, err error) { return parser.Parse(raw) } +func ParseBytes(raw []byte) (gen StringGenerator, err error) { + return Parse(string(raw)) +} + // Parser parses string generator configuration from HCL. type Parser struct { // RuleRegistry maps rule names in HCL to Rule constructors. @@ -247,12 +251,6 @@ func deduplicateRunes(original []rune) (deduped []rune) { return dedupedRunes } -type runes []rune - -func (r runes) Len() int { return len(r) } -func (r runes) Less(i, j int) bool { return r[i] < r[j] } -func (r runes) Swap(i, j int) { r[i], r[j] = r[j], r[i] } - func stringToRunesFunc(from reflect.Kind, to reflect.Kind, data interface{}) (interface{}, error) { if from != reflect.String || to != reflect.Slice { return data, nil diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index c13babdbcac1..f05b1b72c91c 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -1,6 +1,7 @@ package random import ( + "encoding/json" "reflect" "testing" ) @@ -218,7 +219,7 @@ func TestParser_Parse(t *testing.T) { // ///////////////////////////////////////////////// // JSON data - "JSON test rule and charset restrictions": { + "manually JSONified HCL": { registry: map[string]ruleConstructor{ "testrule": newTestRule, "CharsetRestriction": ParseCharsetRestriction, @@ -262,6 +263,41 @@ func TestParser_Parse(t *testing.T) { }, expectErr: false, }, + "JSONified HCL": { + registry: map[string]ruleConstructor{ + "testrule": newTestRule, + "CharsetRestriction": ParseCharsetRestriction, + }, + rawConfig: toJSON(t, StringGenerator{ + Length: 20, + Charset: []rune("abcde"), + Rules: []Rule{ + &testRule{ + String: "teststring", + Integer: 123, + }, + &CharsetRestriction{ + Charset: []rune("abcde"), + MinChars: 2, + }, + }, + }), + expected: StringGenerator{ + Length: 20, + Charset: []rune("abcde"), + Rules: []Rule{ + &testRule{ + String: "teststring", + Integer: 123, + }, + &CharsetRestriction{ + Charset: []rune("abcde"), + MinChars: 2, + }, + }, + }, + expectErr: false, + }, "JSON unrecognized rule": { registry: defaultRuleNameMapping, rawConfig: ` @@ -800,3 +836,12 @@ func BenchmarkParser_Parse(b *testing.B) { } } } + +func toJSON(t *testing.T, val interface{}) string { + t.Helper() + b, err := json.Marshal(val) + if err != nil { + t.Fatalf("unable to marshal to JSON: %s", err) + } + return string(b) +} diff --git a/sdk/helper/random/registry_test.go b/sdk/helper/random/registry_test.go index 1eb9c500b0cf..a5d5c9b2d5df 100644 --- a/sdk/helper/random/registry_test.go +++ b/sdk/helper/random/registry_test.go @@ -26,6 +26,7 @@ func newTestRule(data map[string]interface{}) (rule Rule, err error) { } func (tr testRule) Pass([]rune) bool { return !tr.fail } +func (tr testRule) Type() string { return "testrule" } func TestParseRule(t *testing.T) { type testCase struct { @@ -95,3 +96,16 @@ func TestParseRule(t *testing.T) { }) } } + +// Ensure the mappings in the defaultRuleNameMapping are consistent between the keys +// in the map and the Type() calls on the Rule values +func TestDefaultRuleNameMapping(t *testing.T) { + for expectedType, constructor := range defaultRuleNameMapping { + // In this case, we don't care about the error since we're checking the types, not the contents + instance, _ := constructor(map[string]interface{}{}) + actualType := instance.Type() + if actualType != expectedType { + t.Fatalf("Default registry mismatched types: Actual: %s Expected: %s", actualType, expectedType) + } + } +} diff --git a/sdk/helper/random/rules.go b/sdk/helper/random/rules.go index 01ce0ad1748a..717ade10eeae 100644 --- a/sdk/helper/random/rules.go +++ b/sdk/helper/random/rules.go @@ -9,10 +9,10 @@ import ( // CharsetRestriction requires a certain number of characters from the specified charset. type CharsetRestriction struct { // Charset is the list of rules that candidate strings must contain a minimum number of. - Charset []rune `mapstructure:"charset"` + Charset runes `mapstructure:"charset" json:"charset"` // MinChars indicates the minimum (inclusive) number of characters from the charset that should appear in the string. - MinChars int `mapstructure:"min-chars"` + MinChars int `mapstructure:"min-chars" json:"min-chars"` } // ParseCharsetRestriction from the provided data map. The data map is expected to be parsed from HCL. @@ -36,6 +36,10 @@ func ParseCharsetRestriction(data map[string]interface{}) (rule Rule, err error) return cr, nil } +func (c CharsetRestriction) Type() string { + return "CharsetRestriction" +} + // Chars returns the charset that this rule is looking for. func (c CharsetRestriction) Chars() []rune { return c.Charset diff --git a/sdk/helper/random/serializing.go b/sdk/helper/random/serializing.go new file mode 100644 index 000000000000..ea56e1ffeb86 --- /dev/null +++ b/sdk/helper/random/serializing.go @@ -0,0 +1,74 @@ +package random + +import ( + "encoding/json" + "fmt" + + "github.com/mitchellh/mapstructure" +) + +// serializableRules is a slice of rules that can be marshalled to JSON in an HCL format +type serializableRules []Rule + +// MarshalJSON in an HCL-friendly way +func (r serializableRules) MarshalJSON() (b []byte, err error) { + // Example: + // [ + // { + // "testrule": [ + // { + // "string": "teststring", + // "int": 123 + // } + // ] + // }, + // { + // "CharsetRestriction": [ + // { + // "charset": "abcde", + // "min-chars": 2 + // } + // ] + // } + // ] + data := []map[string][]map[string]interface{}{} // Totally not confusing at all + for _, rule := range r { + ruleData := map[string]interface{}{} + err = mapstructure.Decode(rule, &ruleData) + if err != nil { + return nil, fmt.Errorf("unable to decode rule: %w", err) + } + + ruleMap := map[string][]map[string]interface{}{ + rule.Type(): []map[string]interface{}{ + ruleData, + }, + } + data = append(data, ruleMap) + } + + b, err = json.Marshal(data) + return b, err +} + +type runes []rune + +func (r runes) Len() int { return len(r) } +func (r runes) Less(i, j int) bool { return r[i] < r[j] } +func (r runes) Swap(i, j int) { r[i], r[j] = r[j], r[i] } + +// MarshalJSON converts the runes to a string for smaller JSON and easier readability +func (r runes) MarshalJSON() (b []byte, err error) { + return json.Marshal(string(r)) +} + +// UnmarshalJSON converts a string to []rune +func (r *runes) UnmarshalJSON(data []byte) (err error) { + var str string + err = json.Unmarshal(data, &str) + if err != nil { + return err + } + *r = []rune(str) + return nil +} diff --git a/sdk/helper/random/string_generator.go b/sdk/helper/random/string_generator.go index 623b884aef42..1774dabeee93 100644 --- a/sdk/helper/random/string_generator.go +++ b/sdk/helper/random/string_generator.go @@ -6,23 +6,22 @@ import ( "fmt" "io" "math" + "sort" "time" ) -const ( - LowercaseCharset = "abcdefghijklmnopqrstuvwxyz" - UppercaseCharset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - NumericCharset = "0123456789" - FullSymbolCharset = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" - ShortSymbolCharset = "-" - - AlphabeticCharset = UppercaseCharset + LowercaseCharset - AlphaNumericCharset = AlphabeticCharset + NumericCharset - AlphaNumericShortSymbolCharset = AlphaNumericCharset + ShortSymbolCharset - AlphaNumericFullSymbolCharset = AlphaNumericCharset + FullSymbolCharset -) - var ( + LowercaseCharset = sortCharset("abcdefghijklmnopqrstuvwxyz") + UppercaseCharset = sortCharset("ABCDEFGHIJKLMNOPQRSTUVWXYZ") + NumericCharset = sortCharset("0123456789") + FullSymbolCharset = sortCharset("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~") + ShortSymbolCharset = sortCharset("-") + + AlphabeticCharset = sortCharset(UppercaseCharset + LowercaseCharset) + AlphaNumericCharset = sortCharset(AlphabeticCharset + NumericCharset) + AlphaNumericShortSymbolCharset = sortCharset(AlphaNumericCharset + ShortSymbolCharset) + AlphaNumericFullSymbolCharset = sortCharset(AlphaNumericCharset + FullSymbolCharset) + LowercaseRuneset = []rune(LowercaseCharset) UppercaseRuneset = []rune(UppercaseCharset) NumericRuneset = []rune(NumericCharset) @@ -59,23 +58,32 @@ var ( } ) +func sortCharset(chars string) string { + r := runes(chars) + sort.Sort(r) + return string(r) +} + // Rule to assert on string values. type Rule interface { // Pass should return true if the provided value passes any assertions this Rule is making. Pass(value []rune) bool + + // Type returns the name of the rule as associated in the registry + Type() string } // StringGenerator generats random strings from the provided charset & adhering to a set of rules. The set of rules // are things like CharsetRestriction which requires a certain number of characters from a sub-charset. type StringGenerator struct { // Length of the string to generate. - Length int `mapstructure:"length"` + Length int `mapstructure:"length" json:"length"` // Charset to choose runes from. - Charset []rune `mapstructure:"charset"` + Charset runes `mapstructure:"charset" json:"charset"` // Rules the generated strings must adhere to. - Rules []Rule `mapstructure:"-"` + Rules serializableRules `mapstructure:"-" json:"rule"` // This is "rule" in JSON so it matches the HCL property type // rng for testing purposes to ensure error handling from the crypto/rand package is working properly. rng io.Reader diff --git a/sdk/helper/random/string_generator_test.go b/sdk/helper/random/string_generator_test.go index 520e4e9325ff..cb17837851d9 100644 --- a/sdk/helper/random/string_generator_test.go +++ b/sdk/helper/random/string_generator_test.go @@ -3,6 +3,7 @@ package random import ( "context" "crypto/rand" + "encoding/json" "fmt" "io" MRAND "math/rand" @@ -163,7 +164,7 @@ func TestRandomRunes_deterministic(t *testing.T) { rngSeed: 1585593298447807001, charset: AlphaNumericShortSymbolCharset, length: 20, - expected: "CZYHwguyM3JF-UmfMgP-", + expected: "1ON6lVjnBs84zJbUBVEz", }, "max size charset": { rngSeed: 1585593298447807002, @@ -444,6 +445,46 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { }) } +// Ensure the StringGenerator can be properly JSON-ified +func TestStringGenerator_JSON(t *testing.T) { + expected := StringGenerator{ + Length: 20, + Charset: AlphaNumericShortSymbolRuneset, + Rules: []Rule{ + &testRule{ + String: "teststring", + Integer: 123, + }, + &CharsetRestriction{ + Charset: ShortSymbolRuneset, + MinChars: 1, + }, + }, + } + + b, err := json.Marshal(expected) + if err != nil { + t.Fatalf("Failed to marshal to JSON: %s", err) + } + + parser := Parser{ + RuleRegistry: Registry{ + Rules: map[string]ruleConstructor{ + "testrule": newTestRule, + "CharsetRestriction": ParseCharsetRestriction, + }, + }, + } + actual, err := parser.Parse(string(b)) + if err != nil { + t.Fatalf("Failed to parse JSON: %s", err) + } + + if !reflect.DeepEqual(actual, expected) { + t.Fatalf("Actual: %#v\nExpected: %#v", actual, expected) + } +} + type badReader struct{} func (badReader) Read([]byte) (int, error) { diff --git a/sdk/logical/system_view.go b/sdk/logical/system_view.go index 2c5d9c3bed07..08ced677a654 100644 --- a/sdk/logical/system_view.go +++ b/sdk/logical/system_view.go @@ -3,6 +3,7 @@ package logical import ( "context" "errors" + "fmt" "time" "github.com/hashicorp/vault/sdk/helper/consts" @@ -68,6 +69,14 @@ type SystemView interface { // PluginEnv returns Vault environment information used by plugins PluginEnv(context.Context) (*PluginEnvironment, error) + + // PasswordPolicy retrieves the password policy associated with the policy name + PasswordPolicy(ctx context.Context, policyName string) (PasswordPolicy, error) +} + +type PasswordPolicy interface { + // Generate a random password + Generate(context.Context) (string, error) } type ExtendedSystemView interface { @@ -90,6 +99,7 @@ type StaticSystemView struct { Features license.Features VaultVersion string PluginEnvironment *PluginEnvironment + PasswordPolicies map[string]PasswordPolicy } type noopAuditor struct{} @@ -165,3 +175,20 @@ func (d StaticSystemView) HasFeature(feature license.Features) bool { func (d StaticSystemView) PluginEnv(_ context.Context) (*PluginEnvironment, error) { return d.PluginEnvironment, nil } + +func (d StaticSystemView) PasswordPolicy(ctx context.Context, policyName string) (policy PasswordPolicy, err error) { + select { + case <-ctx.Done(): + return nil, fmt.Errorf("context timed out") + default: + } + + if d.PasswordPolicies == nil { + return nil, fmt.Errorf("password policy not found") + } + policy, exists := d.PasswordPolicies[policyName] + if !exists { + return nil, fmt.Errorf("password policy not found") + } + return policy, nil +} diff --git a/sdk/plugin/grpc_system.go b/sdk/plugin/grpc_system.go index 6e27c9b96360..c36231b445b7 100644 --- a/sdk/plugin/grpc_system.go +++ b/sdk/plugin/grpc_system.go @@ -10,10 +10,13 @@ import ( "github.com/hashicorp/vault/sdk/helper/consts" "github.com/hashicorp/vault/sdk/helper/license" "github.com/hashicorp/vault/sdk/helper/pluginutil" + "github.com/hashicorp/vault/sdk/helper/random" "github.com/hashicorp/vault/sdk/helper/wrapping" "github.com/hashicorp/vault/sdk/logical" "github.com/hashicorp/vault/sdk/plugin/pb" "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) func newGRPCSystemView(conn *grpc.ClientConn) *gRPCSystemViewClient { @@ -161,6 +164,21 @@ func (s *gRPCSystemViewClient) PluginEnv(ctx context.Context) (*logical.PluginEn return reply.PluginEnvironment, nil } +func (s *gRPCSystemViewClient) PasswordPolicy(ctx context.Context, policyName string) (policy logical.PasswordPolicy, err error) { + req := &pb.PasswordPolicyRequest{ + PolicyName: policyName, + } + resp, err := s.client.PasswordPolicy(ctx, req) + if err != nil { + return nil, err + } + passPolicy, err := random.ParseBytes(resp.RawPolicy) + if err != nil { + return nil, fmt.Errorf("failed to parse password policy: %w", err) + } + return passPolicy, nil +} + type gRPCSystemViewServer struct { impl logical.SystemView } @@ -274,3 +292,22 @@ func (s *gRPCSystemViewServer) PluginEnv(ctx context.Context, _ *pb.Empty) (*pb. PluginEnvironment: pluginEnv, }, nil } + +func (s *gRPCSystemViewServer) PasswordPolicy(ctx context.Context, req *pb.PasswordPolicyRequest) (*pb.PasswordPolicyResponse, error) { + policy, err := s.impl.PasswordPolicy(ctx, req.PolicyName) + if err != nil { + return &pb.PasswordPolicyResponse{}, status.Errorf(codes.Internal, "unable to retrieve password policy: %s", err) + } + if policy == nil { + return &pb.PasswordPolicyResponse{}, status.Errorf(codes.NotFound, "policy not found") + } + + b, err := json.Marshal(policy) + if err != nil { + return &pb.PasswordPolicyResponse{}, status.Errorf(codes.Internal, "unable to serialize password policy: %s", err) + } + resp := &pb.PasswordPolicyResponse{ + RawPolicy: b, + } + return resp, nil +} diff --git a/sdk/plugin/grpc_system_test.go b/sdk/plugin/grpc_system_test.go index 748cec1d137c..4755312d96dd 100644 --- a/sdk/plugin/grpc_system_test.go +++ b/sdk/plugin/grpc_system_test.go @@ -2,17 +2,17 @@ package plugin import ( "context" - "testing" - - "google.golang.org/grpc" - "reflect" + "testing" + "time" "github.com/golang/protobuf/proto" plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/vault/sdk/helper/consts" + "github.com/hashicorp/vault/sdk/helper/random" "github.com/hashicorp/vault/sdk/logical" "github.com/hashicorp/vault/sdk/plugin/pb" + "google.golang.org/grpc" ) func TestSystem_GRPC_GRPC_impl(t *testing.T) { @@ -239,3 +239,56 @@ func TestSystem_GRPC_pluginEnv(t *testing.T) { t.Fatalf("expected: %v, got: %v", expected, actual) } } + +func TestSystem_GRPC_passwordPolicy(t *testing.T) { + policyName := "testpolicy" + expectedPolicy := random.StringGenerator{ + Length: 8, + Charset: random.AlphaNumericShortSymbolRuneset, + Rules: []random.Rule{ + &random.CharsetRestriction{ + Charset: random.LowercaseRuneset, + MinChars: 1, + }, + &random.CharsetRestriction{ + Charset: random.UppercaseRuneset, + MinChars: 1, + }, + &random.CharsetRestriction{ + Charset: random.NumericRuneset, + MinChars: 1, + }, + &random.CharsetRestriction{ + Charset: random.ShortSymbolRuneset, + MinChars: 1, + }, + }, + } + sys := &logical.StaticSystemView{ + PasswordPolicies: map[string]logical.PasswordPolicy{ + policyName: expectedPolicy, + }, + } + + client, server := plugin.TestGRPCConn(t, func(s *grpc.Server) { + pb.RegisterSystemViewServer(s, &gRPCSystemViewServer{ + impl: sys, + }) + }) + defer server.Stop() + defer client.Close() + + testSystemView := newGRPCSystemView(client) + + ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) + defer cancel() + + actualPolicy, err := testSystemView.PasswordPolicy(ctx, policyName) + if err != nil { + t.Fatalf("no error expected, got: %s", err) + } + + if !reflect.DeepEqual(actualPolicy, expectedPolicy) { + t.Fatalf("Actual: %#v\nExpected: %#v", actualPolicy, expectedPolicy) + } +} diff --git a/sdk/plugin/pb/backend.pb.go b/sdk/plugin/pb/backend.pb.go index efd386b8eb00..59415ca23480 100644 --- a/sdk/plugin/pb/backend.pb.go +++ b/sdk/plugin/pb/backend.pb.go @@ -2662,6 +2662,84 @@ func (m *PluginEnvReply) GetErr() string { return "" } +type PasswordPolicyRequest struct { + PolicyName string `sentinel:"" protobuf:"bytes,1,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PasswordPolicyRequest) Reset() { *m = PasswordPolicyRequest{} } +func (m *PasswordPolicyRequest) String() string { return proto.CompactTextString(m) } +func (*PasswordPolicyRequest) ProtoMessage() {} +func (*PasswordPolicyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4dbf1dfe0c11846b, []int{44} +} + +func (m *PasswordPolicyRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PasswordPolicyRequest.Unmarshal(m, b) +} +func (m *PasswordPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PasswordPolicyRequest.Marshal(b, m, deterministic) +} +func (m *PasswordPolicyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PasswordPolicyRequest.Merge(m, src) +} +func (m *PasswordPolicyRequest) XXX_Size() int { + return xxx_messageInfo_PasswordPolicyRequest.Size(m) +} +func (m *PasswordPolicyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PasswordPolicyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PasswordPolicyRequest proto.InternalMessageInfo + +func (m *PasswordPolicyRequest) GetPolicyName() string { + if m != nil { + return m.PolicyName + } + return "" +} + +type PasswordPolicyResponse struct { + RawPolicy []byte `sentinel:"" protobuf:"bytes,1,opt,name=raw_policy,json=rawPolicy,proto3" json:"raw_policy,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PasswordPolicyResponse) Reset() { *m = PasswordPolicyResponse{} } +func (m *PasswordPolicyResponse) String() string { return proto.CompactTextString(m) } +func (*PasswordPolicyResponse) ProtoMessage() {} +func (*PasswordPolicyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dbf1dfe0c11846b, []int{45} +} + +func (m *PasswordPolicyResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PasswordPolicyResponse.Unmarshal(m, b) +} +func (m *PasswordPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PasswordPolicyResponse.Marshal(b, m, deterministic) +} +func (m *PasswordPolicyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PasswordPolicyResponse.Merge(m, src) +} +func (m *PasswordPolicyResponse) XXX_Size() int { + return xxx_messageInfo_PasswordPolicyResponse.Size(m) +} +func (m *PasswordPolicyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PasswordPolicyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PasswordPolicyResponse proto.InternalMessageInfo + +func (m *PasswordPolicyResponse) GetRawPolicy() []byte { + if m != nil { + return m.RawPolicy + } + return nil +} + type Connection struct { // RemoteAddr is the network address that sent the request. RemoteAddr string `sentinel:"" protobuf:"bytes,1,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` @@ -2674,7 +2752,7 @@ func (m *Connection) Reset() { *m = Connection{} } func (m *Connection) String() string { return proto.CompactTextString(m) } func (*Connection) ProtoMessage() {} func (*Connection) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{44} + return fileDescriptor_4dbf1dfe0c11846b, []int{46} } func (m *Connection) XXX_Unmarshal(b []byte) error { @@ -2752,173 +2830,179 @@ func init() { proto.RegisterType((*EntityInfoReply)(nil), "pb.EntityInfoReply") proto.RegisterType((*GroupsForEntityReply)(nil), "pb.GroupsForEntityReply") proto.RegisterType((*PluginEnvReply)(nil), "pb.PluginEnvReply") + proto.RegisterType((*PasswordPolicyRequest)(nil), "pb.PasswordPolicyRequest") + proto.RegisterType((*PasswordPolicyResponse)(nil), "pb.PasswordPolicyResponse") proto.RegisterType((*Connection)(nil), "pb.Connection") } func init() { proto.RegisterFile("sdk/plugin/pb/backend.proto", fileDescriptor_4dbf1dfe0c11846b) } var fileDescriptor_4dbf1dfe0c11846b = []byte{ - // 2545 bytes of a gzipped FileDescri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8, 0xe9, - 0x9f, 0x5e, 0xf0, 0x45, 0x28, 0x69, 0x2d, 0x17, 0x13, 0xec, 0x2b, 0x53, 0x32, 0x7f, 0x04, 0xad, - 0x53, 0x7a, 0xf3, 0x3a, 0x76, 0x75, 0x4d, 0xf1, 0x79, 0x1b, 0xac, 0x51, 0x05, 0xea, 0xff, 0x29, - 0xf4, 0x96, 0x08, 0x3e, 0x6f, 0x8f, 0xbf, 0x9a, 0xac, 0x2d, 0x00, 0x4f, 0xe5, 0xa3, 0xa8, 0x48, - 0xf2, 0xf9, 0x89, 0xfa, 0x81, 0xb6, 0xae, 0x0a, 0xbc, 0x28, 0x3e, 0xa7, 0xf0, 0x25, 0x6b, 0x2c, - 0xf3, 0x70, 0x52, 0x05, 0x86, 0x77, 0xd7, 0x69, 0xd2, 0xcc, 0xcb, 0x53, 0xf1, 0x4a, 0xe6, 0xad, - 0xf2, 0xf4, 0x7b, 0x00, 0x19, 0x1b, 0xe7, 0xed, 0xf1, 0x7a, 0x97, 0x89, 0xfa, 0x43, 0x80, 0x8c, - 0x63, 0x15, 0x2a, 0x8a, 0x14, 0xad, 0xa6, 0x2d, 0xf3, 0xf0, 0x2e, 0x34, 0x53, 0x16, 0xcb, 0xaf, - 0x81, 0x0e, 0x96, 0x48, 0xf1, 0x13, 0xe8, 0x2d, 0x11, 0xef, 0xda, 0x75, 0x30, 0x3c, 0xeb, 0x18, - 0xfa, 0xd3, 0xdd, 0xdf, 0xed, 0xcc, 0x5c, 0x71, 0x19, 0x4f, 0x47, 0x76, 0x30, 0xdf, 0xbb, 0xa4, - 0xd1, 0xa5, 0x6b, 0x07, 0x3c, 0xdc, 0xbb, 0x96, 0x68, 0xda, 0x2b, 0xfc, 0x91, 0x36, 0xad, 0xe1, - 0x83, 0xf2, 0xc9, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x9a, 0xc2, 0x92, 0x60, 0x1b, 0x00, - 0x00, + // 2615 bytes of a gzipped FileDescriptorProto + 0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, + 0x0f, 0xbc, 0x38, 0x12, 0x8c, 0xeb, 0x3d, 0x97, 0x70, 0xc8, 0x5d, 0x68, 0x07, 0x21, 0xe3, 0x48, + 0x43, 0x07, 0xb4, 0xad, 0x8c, 0x20, 0x37, 0x1e, 0x52, 0x71, 0x6e, 0x6c, 0x21, 0x03, 0xbf, 0x25, + 0xcd, 0xa1, 0x82, 0x1a, 0x75, 0x45, 0x93, 0xdf, 0xc4, 0x84, 0x46, 0xc4, 0x6c, 0xce, 0x84, 0xd1, + 0xd8, 0xa9, 0xec, 0x76, 0xf6, 0x61, 0x12, 0xce, 0x27, 0xa7, 0x48, 0xb1, 0x34, 0x87, 0xdc, 0x85, + 0x2d, 0xe9, 0x17, 0xa3, 0x89, 0x12, 0x2d, 0x29, 0xf1, 0x2c, 0x16, 0xe7, 0x16, 0x52, 0xc9, 0x3e, + 0x34, 0xd5, 0x99, 0x46, 0x46, 0x6b, 0xa7, 0xb6, 0xdb, 0xd9, 0x37, 0xa4, 0x80, 0xde, 0xe5, 0x44, + 0x85, 0x41, 0x74, 0xe8, 0x0b, 0xbe, 0xb2, 0x12, 0x41, 0xf2, 0x26, 0x74, 0x6d, 0xcf, 0x65, 0xbe, + 0x98, 0x89, 0xe0, 0x82, 0xf9, 0x46, 0x1b, 0x57, 0xd4, 0x51, 0xb4, 0xa9, 0x24, 0x91, 0x7d, 0xb8, + 0x99, 0x17, 0x99, 0x51, 0xdb, 0x66, 0x51, 0x14, 0x70, 0x03, 0x50, 0xf6, 0x46, 0x4e, 0xf6, 0x99, + 0x66, 0x49, 0xb5, 0x8e, 0x1b, 0x85, 0x1e, 0x5d, 0xcd, 0x7c, 0xba, 0x64, 0x46, 0x47, 0xa9, 0xd5, + 0xb4, 0xcf, 0xe9, 0x92, 0x91, 0x7b, 0xd0, 0x59, 0x06, 0xb1, 0x2f, 0x66, 0x61, 0xe0, 0xfa, 0xc2, + 0xe8, 0xa2, 0x04, 0x20, 0xe9, 0x44, 0x52, 0xc8, 0x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 0x53, 0x87, 0x2d, + 0x19, 0x7c, 0xe4, 0x7d, 0xe8, 0x79, 0x8c, 0x46, 0x6c, 0x16, 0x84, 0xd2, 0x40, 0x84, 0xaa, 0x3a, + 0xfb, 0x43, 0x39, 0xed, 0x58, 0x32, 0xbe, 0x50, 0x74, 0xab, 0xeb, 0xe5, 0x46, 0x32, 0xa5, 0x5d, + 0x5f, 0x30, 0xee, 0x53, 0x6f, 0x86, 0xc9, 0xa0, 0x12, 0xac, 0x9b, 0x10, 0x9f, 0xcb, 0xa4, 0x58, + 0x8f, 0xa3, 0xda, 0x66, 0x1c, 0x8d, 0xa1, 0x85, 0xbe, 0x73, 0x59, 0xa4, 0x93, 0x3d, 0x1d, 0x93, + 0x7d, 0x68, 0x2d, 0x99, 0xa0, 0x3a, 0xd7, 0x64, 0x4a, 0xdc, 0x4a, 0x72, 0x66, 0xf2, 0x52, 0x33, + 0x54, 0x42, 0xa4, 0x72, 0x1b, 0x19, 0xd1, 0xd8, 0xcc, 0x88, 0x31, 0xb4, 0xd2, 0xa0, 0x6b, 0xaa, + 0x13, 0x4e, 0xc6, 0xb2, 0xcc, 0x86, 0x8c, 0xbb, 0x81, 0x63, 0xb4, 0x30, 0x50, 0xf4, 0x48, 0x16, + 0x49, 0x3f, 0x5e, 0xaa, 0x10, 0x6a, 0xab, 0x22, 0xe9, 0xc7, 0xcb, 0xcd, 0x88, 0x81, 0xb5, 0x88, + 0xf9, 0x11, 0xd4, 0xa9, 0xe7, 0xd2, 0x08, 0x53, 0x48, 0x9e, 0xac, 0xae, 0xf7, 0x93, 0x67, 0x92, + 0x6a, 0x29, 0x26, 0x79, 0x02, 0xbd, 0x05, 0x0f, 0xe2, 0x70, 0x86, 0x43, 0x16, 0x19, 0x5d, 0xdc, + 0xed, 0xba, 0x74, 0x17, 0x85, 0x9e, 0x29, 0x19, 0x99, 0x81, 0xf3, 0x20, 0xf6, 0x9d, 0x99, 0xed, + 0x3a, 0x3c, 0x32, 0x7a, 0xe8, 0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52, 0x51, 0x52, + 0x7f, 0xc7, 0xe3, 0x32, 0x96, 0xf2, 0xec, 0xc7, 0x0f, 0x7f, 0xb7, 0xbb, 0x70, 0xc5, 0x79, 0x3c, + 0x9f, 0xd8, 0xc1, 0x72, 0xef, 0x9c, 0x46, 0xe7, 0xae, 0x1d, 0xf0, 0x70, 0xef, 0x52, 0x86, 0xe5, + 0x5e, 0xe1, 0x27, 0xe0, 0xbc, 0x81, 0x97, 0xe1, 0x27, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x88, + 0xcc, 0xb6, 0x05, 0x1c, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3527,6 +3611,8 @@ type SystemViewClient interface { // GroupsForEntity returns the group membership information for the given // entity id GroupsForEntity(ctx context.Context, in *EntityInfoArgs, opts ...grpc.CallOption) (*GroupsForEntityReply, error) + // PasswordPolicy returns a password policy if one exists + PasswordPolicy(ctx context.Context, in *PasswordPolicyRequest, opts ...grpc.CallOption) (*PasswordPolicyResponse, error) } type systemViewClient struct { @@ -3636,6 +3722,15 @@ func (c *systemViewClient) GroupsForEntity(ctx context.Context, in *EntityInfoAr return out, nil } +func (c *systemViewClient) PasswordPolicy(ctx context.Context, in *PasswordPolicyRequest, opts ...grpc.CallOption) (*PasswordPolicyResponse, error) { + out := new(PasswordPolicyResponse) + err := c.cc.Invoke(ctx, "/pb.SystemView/PasswordPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SystemViewServer is the server API for SystemView service. type SystemViewServer interface { // DefaultLeaseTTL returns the default lease TTL set in Vault configuration @@ -3674,6 +3769,8 @@ type SystemViewServer interface { // GroupsForEntity returns the group membership information for the given // entity id GroupsForEntity(context.Context, *EntityInfoArgs) (*GroupsForEntityReply, error) + // PasswordPolicy returns a password policy if one exists + PasswordPolicy(context.Context, *PasswordPolicyRequest) (*PasswordPolicyResponse, error) } // UnimplementedSystemViewServer can be embedded to have forward compatible implementations. @@ -3713,6 +3810,9 @@ func (*UnimplementedSystemViewServer) PluginEnv(ctx context.Context, req *Empty) func (*UnimplementedSystemViewServer) GroupsForEntity(ctx context.Context, req *EntityInfoArgs) (*GroupsForEntityReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GroupsForEntity not implemented") } +func (*UnimplementedSystemViewServer) PasswordPolicy(ctx context.Context, req *PasswordPolicyRequest) (*PasswordPolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PasswordPolicy not implemented") +} func RegisterSystemViewServer(s *grpc.Server, srv SystemViewServer) { s.RegisterService(&_SystemView_serviceDesc, srv) @@ -3916,6 +4016,24 @@ func _SystemView_GroupsForEntity_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _SystemView_PasswordPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PasswordPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SystemViewServer).PasswordPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.SystemView/PasswordPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SystemViewServer).PasswordPolicy(ctx, req.(*PasswordPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _SystemView_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.SystemView", HandlerType: (*SystemViewServer)(nil), @@ -3964,6 +4082,10 @@ var _SystemView_serviceDesc = grpc.ServiceDesc{ MethodName: "GroupsForEntity", Handler: _SystemView_GroupsForEntity_Handler, }, + { + MethodName: "PasswordPolicy", + Handler: _SystemView_PasswordPolicy_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "sdk/plugin/pb/backend.proto", diff --git a/sdk/plugin/pb/backend.proto b/sdk/plugin/pb/backend.proto index 7b910ea0f0dc..0d907b695596 100644 --- a/sdk/plugin/pb/backend.proto +++ b/sdk/plugin/pb/backend.proto @@ -554,6 +554,14 @@ message PluginEnvReply { string err = 2; } +message PasswordPolicyRequest { + string policy_name = 1; +} + +message PasswordPolicyResponse { + bytes raw_policy = 1; +} + // SystemView exposes system configuration information in a safe way for plugins // to consume. Plugins should implement the client for this service. service SystemView { @@ -603,6 +611,9 @@ service SystemView { // GroupsForEntity returns the group membership information for the given // entity id rpc GroupsForEntity(EntityInfoArgs) returns (GroupsForEntityReply); + + // PasswordPolicy returns a password policy if one exists + rpc PasswordPolicy(PasswordPolicyRequest) returns (PasswordPolicyResponse); } message Connection { diff --git a/vault/dynamic_system_view.go b/vault/dynamic_system_view.go index 652ed6e1c03e..a6799590b703 100644 --- a/vault/dynamic_system_view.go +++ b/vault/dynamic_system_view.go @@ -6,6 +6,7 @@ import ( "time" "github.com/hashicorp/errwrap" + "github.com/hashicorp/vault/sdk/helper/random" "github.com/hashicorp/vault/helper/identity" "github.com/hashicorp/vault/helper/namespace" @@ -327,3 +328,32 @@ func (d dynamicSystemView) PluginEnv(_ context.Context) (*logical.PluginEnvironm VaultVersion: version.GetVersion().Version, }, nil } + +func (d dynamicSystemView) PasswordPolicy(ctx context.Context, policyName string) (policy logical.PasswordPolicy, err error) { + if policyName == "" { + return nil, fmt.Errorf("missing password policy name") + } + + // Ensure there's a timeout on the context of some sort + if _, hasTimeout := ctx.Deadline(); !hasTimeout { + var cancel func() + ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second) + defer cancel() + } + + policyCfg, err := retrievePasswordPolicy(ctx, d.core.systemBarrierView, policyName) + if err != nil { + return nil, fmt.Errorf("failed to retrieve password policy: %w", err) + } + + if policyCfg == nil { + return nil, nil + } + + passPolicy, err := random.Parse(policyCfg.HCLPolicy) + if err != nil { + return nil, fmt.Errorf("stored password policy is invalid: %w", err) + } + + return passPolicy, nil +} diff --git a/vault/dynamic_system_view_test.go b/vault/dynamic_system_view_test.go index 6820282ee1c0..bbf7df2e7978 100644 --- a/vault/dynamic_system_view_test.go +++ b/vault/dynamic_system_view_test.go @@ -1,7 +1,12 @@ package vault import ( + "context" + "fmt" + "io" + "reflect" "testing" + "time" log "github.com/hashicorp/go-hclog" ldapcred "github.com/hashicorp/vault/builtin/credential/ldap" @@ -149,3 +154,161 @@ func TestIdentity_BackendTemplating(t *testing.T) { } } } + +func TestDynamicSystemView_PasswordPolicy(t *testing.T) { + type testCase struct { + policyName string + getEntry *logical.StorageEntry + getErr error + expectedPolicy string + expectErr bool + } + + tests := map[string]testCase{ + "no policy name": { + policyName: "", + expectedPolicy: "", + expectErr: true, + }, + "no policy found": { + policyName: "testpolicy", + getEntry: nil, + getErr: nil, + expectedPolicy: "", + expectErr: true, + }, + "error retrieving policy": { + policyName: "testpolicy", + getEntry: nil, + getErr: fmt.Errorf("a test error"), + expectedPolicy: "", + expectErr: true, + }, + "saved policy is malformed": { + policyName: "testpolicy", + getEntry: &logical.StorageEntry{ + Key: getPasswordPolicyKey("testpolicy"), + Value: []byte(`{"policy":"asdfahsdfasdf"}`), + }, + getErr: nil, + expectedPolicy: "", + expectErr: true, + }, + "good saved policy": { + policyName: "testpolicy", + getEntry: &logical.StorageEntry{ + Key: getPasswordPolicyKey("testpolicy"), + Value: []byte(`{"policy":"length=8\ncharset=\"ABCDE\""}`), + }, + getErr: nil, + expectedPolicy: "length=8\ncharset=\"ABCDE\"", + expectErr: false, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + testStorage := fakeBarrier{ + getEntry: test.getEntry, + getErr: test.getErr, + } + + dsv := dynamicSystemView{ + core: &Core{ + barrier: testStorage, + }, + } + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) + defer cancel() + actualPolicy, err := dsv.PasswordPolicy(ctx, test.policyName) + if test.expectErr && err == nil { + t.Fatalf("err expected, got nil") + } + if !test.expectErr && err != nil { + t.Fatalf("no error expected, got: %s", err) + } + + if !reflect.DeepEqual(actualPolicy, test.expectedPolicy) { + t.Fatalf("Actual Policy: %#v\nExpected Policy: %#v", actualPolicy, test.expectedPolicy) + } + }) + } +} + +type fakeBarrier struct { + getEntry *logical.StorageEntry + getErr error +} + +func (b fakeBarrier) Get(context.Context, string) (*logical.StorageEntry, error) { + return b.getEntry, b.getErr +} +func (b fakeBarrier) List(context.Context, string) ([]string, error) { + return nil, fmt.Errorf("not implemented") +} +func (b fakeBarrier) Put(context.Context, *logical.StorageEntry) error { + return fmt.Errorf("not implemented") +} +func (b fakeBarrier) Delete(context.Context, string) error { + return fmt.Errorf("not implemented") +} +func (b fakeBarrier) Initialized(ctx context.Context) (bool, error) { + return false, fmt.Errorf("not implemented") +} +func (b fakeBarrier) Initialize(ctx context.Context, masterKey []byte, sealKey []byte, random io.Reader) error { + return fmt.Errorf("not implemented") +} +func (b fakeBarrier) GenerateKey(io.Reader) ([]byte, error) { + return nil, fmt.Errorf("not implemented") +} +func (b fakeBarrier) KeyLength() (int, int) { + return 0, 0 +} +func (b fakeBarrier) Sealed() (bool, error) { + return false, fmt.Errorf("not implemented") +} +func (b fakeBarrier) Unseal(ctx context.Context, key []byte) error { + return fmt.Errorf("not implemented") +} +func (b fakeBarrier) VerifyMaster(key []byte) error { + return fmt.Errorf("not implemented") +} +func (b fakeBarrier) SetMasterKey(key []byte) error { + return fmt.Errorf("not implemented") +} +func (b fakeBarrier) ReloadKeyring(ctx context.Context) error { + return fmt.Errorf("not implemented") +} +func (b fakeBarrier) ReloadMasterKey(ctx context.Context) error { + return fmt.Errorf("not implemented") +} +func (b fakeBarrier) Seal() error { + return fmt.Errorf("not implemented") +} +func (b fakeBarrier) Rotate(ctx context.Context, reader io.Reader) (uint32, error) { + return 0, fmt.Errorf("not implemented") +} +func (b fakeBarrier) CreateUpgrade(ctx context.Context, term uint32) error { + return fmt.Errorf("not implemented") +} +func (b fakeBarrier) DestroyUpgrade(ctx context.Context, term uint32) error { + return fmt.Errorf("not implemented") +} +func (b fakeBarrier) CheckUpgrade(ctx context.Context) (bool, uint32, error) { + return false, 0, fmt.Errorf("not implemented") +} +func (b fakeBarrier) ActiveKeyInfo() (*KeyInfo, error) { + return nil, fmt.Errorf("not implemented") +} +func (b fakeBarrier) Rekey(context.Context, []byte) error { + return fmt.Errorf("not implemented") +} +func (b fakeBarrier) Keyring() (*Keyring, error) { + return nil, fmt.Errorf("not implemented") +} +func (b fakeBarrier) Encrypt(ctx context.Context, key string, plaintext []byte) ([]byte, error) { + return nil, fmt.Errorf("not implemented") +} +func (b fakeBarrier) Decrypt(ctx context.Context, key string, ciphertext []byte) ([]byte, error) { + return nil, fmt.Errorf("not implemented") +} diff --git a/vault/logical_system.go b/vault/logical_system.go index f7143f1fa00c..f11faaba5cc5 100644 --- a/vault/logical_system.go +++ b/vault/logical_system.go @@ -2073,8 +2073,13 @@ func getPasswordPolicyKey(policyName string) string { return fmt.Sprintf("password_policy/%s", policyName) } +const ( + minPasswordLength = 4 + maxPasswordLength = 100 +) + // handlePoliciesPasswordSet saves/updates password policies -func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) { +func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logical.Request, data *framework.FieldData) (resp *logical.Response, err error) { policyName := data.Get("name").(string) if policyName == "" { return nil, logical.CodedError(http.StatusBadRequest, "missing policy name") @@ -2097,6 +2102,11 @@ func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logica return nil, logical.CodedError(http.StatusBadRequest, fmt.Sprintf("invalid password policy: %s", err)) } + if rng.Length > maxPasswordLength || rng.Length < minPasswordLength { + return nil, logical.CodedError(http.StatusBadRequest, + fmt.Sprintf("passwords must be between %d and %d characters", minPasswordLength, maxPasswordLength)) + } + // Generate some passwords to ensure that we're confident that the policy isn't impossible timeout := 1 * time.Second genCtx, cancel := context.WithTimeout(ctx, timeout) @@ -2112,10 +2122,10 @@ func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logica } if failed == attempts { - return nil, logical.CodedError(http.StatusBadRequest, fmt.Sprintf("unable to generate password from provided policy in %s: are the rules impossible?", timeout)) + return nil, logical.CodedError(http.StatusBadRequest, + fmt.Sprintf("unable to generate password from provided policy in %s: are the rules impossible?", timeout)) } - var resp *logical.Response if failed > 0 { resp = &logical.Response{ Warnings: []string{ @@ -2134,7 +2144,8 @@ func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logica err = req.Storage.Put(ctx, entry) if err != nil { - return nil, logical.CodedError(http.StatusInternalServerError, fmt.Sprintf("failed to save policy to storage backend: %s", err)) + return nil, logical.CodedError(http.StatusInternalServerError, + fmt.Sprintf("failed to save policy to storage backend: %s", err)) } return logical.RespondWithStatusCode(resp, req, http.StatusOK) @@ -2192,7 +2203,8 @@ func (*SystemBackend) handlePoliciesPasswordDelete(ctx context.Context, req *log err := req.Storage.Delete(ctx, getPasswordPolicyKey(policyName)) if err != nil { - return nil, logical.CodedError(http.StatusInternalServerError, fmt.Sprintf("failed to delete password policy: %s", err)) + return nil, logical.CodedError(http.StatusInternalServerError, + fmt.Sprintf("failed to delete password policy: %s", err)) } return logical.RespondWithStatusCode(nil, req, http.StatusOK) @@ -2215,12 +2227,14 @@ func (*SystemBackend) handlePoliciesPasswordGenerate(ctx context.Context, req *l rsg, err := random.Parse(cfg.HCLPolicy) if err != nil { - return nil, logical.CodedError(http.StatusInternalServerError, "stored password policy configuration failed to parse") + return nil, logical.CodedError(http.StatusInternalServerError, + "stored password policy configuration failed to parse") } password, err := rsg.Generate(ctx) if err != nil { - return nil, logical.CodedError(http.StatusInternalServerError, fmt.Sprintf("failed to generate password from policy: %s", err)) + return nil, logical.CodedError(http.StatusInternalServerError, + fmt.Sprintf("failed to generate password from policy: %s", err)) } resp := &logical.Response{ From 9807e0b8d0621a31d7292ea56460217c63104c3e Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Thu, 9 Apr 2020 12:19:41 -0600 Subject: [PATCH 13/29] Updated vendoring --- go.mod | 4 +- go.sum | 43 +- sdk/go.mod | 3 +- sdk/go.sum | 5 +- sdk/helper/random/parser.go | 16 +- sdk/helper/random/parser_test.go | 8 +- sdk/helper/random/registry.go | 4 + sdk/helper/random/serializing.go | 14 + sdk/helper/random/serializing_test.go | 43 ++ .../coreos/go-systemd/journal/journal.go | 25 +- .../github.com/hashicorp/vault/api/client.go | 38 +- .../github.com/hashicorp/vault/api/request.go | 3 +- .../vault/sdk/helper/ldaputil/client.go | 2 +- .../vault/sdk/helper/random/parser.go | 265 +++++++++++ .../vault/sdk/helper/random/registry.go | 29 ++ .../vault/sdk/helper/random/rules.go | 82 ++++ .../vault/sdk/helper/random/serializing.go | 74 +++ .../sdk/helper/random/string_generator.go | 169 +++++++ .../vault/sdk/logical/system_view.go | 27 ++ .../hashicorp/vault/sdk/plugin/grpc_system.go | 37 ++ .../vault/sdk/plugin/pb/backend.pb.go | 446 +++++++++++------- .../vault/sdk/plugin/pb/backend.proto | 11 + vendor/modules.txt | 3 +- 23 files changed, 1096 insertions(+), 255 deletions(-) create mode 100644 sdk/helper/random/serializing_test.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go create mode 100644 vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go diff --git a/go.mod b/go.mod index 569559b76b86..be07a60f2ee1 100644 --- a/go.mod +++ b/go.mod @@ -98,7 +98,7 @@ require ( github.com/jefferai/jsonx v1.0.0 github.com/joyent/triton-go v0.0.0-20190112182421-51ffac552869 github.com/keybase/go-crypto v0.0.0-20190403132359-d65b6b94177f - github.com/kr/pretty v0.1.0 + github.com/kr/pretty v0.2.0 github.com/kr/text v0.1.0 github.com/lib/pq v1.2.0 github.com/mattn/go-colorable v0.1.4 @@ -108,7 +108,7 @@ require ( github.com/mitchellh/copystructure v1.0.0 github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/go-testing-interface v1.0.0 - github.com/mitchellh/mapstructure v1.1.2 + github.com/mitchellh/mapstructure v1.2.2 github.com/mitchellh/reflectwalk v1.0.1 github.com/ncw/swift v1.0.47 github.com/nwaples/rardecode v1.0.0 // indirect diff --git a/go.sum b/go.sum index 3d45fd58ab2e..de25f7d8eeae 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,11 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.2/go.mod h1:H8IAquKe2L30IxoupDgqTaQvKSwF/c8prYHynGIWQbA= cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.39.0 h1:UgQP9na6OTfp4dsAiz/eFpFA1C6tPdH5wiRdi19tuMw= cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f h1:UrKzEwTgeiff9vxdrfdqxibzpWjxLnuXDI5m6z3GJAk= code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f/go.mod h1:sk5LnIjB/nIEU7yP5sDQExVm62wu0pBh3yrElngUisI= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/Azure/azure-sdk-for-go v36.2.0+incompatible h1:09cv2WoH0g6jl6m2iT+R9qcIPZKhXEL0sbmLhxP895s= github.com/Azure/azure-sdk-for-go v36.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= @@ -76,7 +73,6 @@ github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190620160927-9418d7b0cd0f h1:oRD github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190620160927-9418d7b0cd0f/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ= github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5 h1:nWDRPCyCltiTsANwC/n3QZH7Vww33Npq9MKqlwRzI/c= github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apple/foundationdb/bindings/go v0.0.0-20190411004307-cd5c9d91fad2 h1:VoHKYIXEQU5LWoambPBOvYxyLqZYHuj+rj5DVnMUc3k= github.com/apple/foundationdb/bindings/go v0.0.0-20190411004307-cd5c9d91fad2/go.mod h1:OMVSB21p9+xQUIqlGizHPZfjK+SHws1ht+ZytVDoz9U= @@ -85,8 +81,6 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878/go.mod h1:3AMJUQhVx52RsWOnlkpikZr01T/yAVN2gn0861vByNg= github.com/armon/go-metrics v0.3.0 h1:B7AQgHi8QSEi4uHu7Sbsga+IJDU+CENgjxoo81vDUqU= github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= -github.com/armon/go-metrics v0.3.1 h1:oNd9vmHdQuYICjy5hE2Ysz2rsIOBl4z7xA6IErlfd48= -github.com/armon/go-metrics v0.3.1/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.3.3 h1:a9F4rlj7EWWrbj7BYw8J8+x+ZZkJeqzNyRk8hdPF+ro= github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-proxyproto v0.0.0-20190211145416-68259f75880e h1:h0gP0hBU6DsA5IQduhLWGOEfIUKzJS5hhXQBSgHuF/g= @@ -116,7 +110,6 @@ github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dR github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/briankassouf/jose v0.9.2-0.20180619214549-d2569464773f h1:ZMEzE7R0WNqgbHplzSBaYJhJi5AZWTCK9baU0ebzG6g= github.com/briankassouf/jose v0.9.2-0.20180619214549-d2569464773f/go.mod h1:HQhVmdUf7dBNwIIdBTivnCDxcf6IZY3/zrb+uKSJz6Y= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= @@ -150,9 +143,8 @@ github.com/coreos/go-oidc v2.1.0+incompatible h1:sdJrfw8akMnCuUlaZU3tE/uYXFgfqom github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7 h1:u9SHYsPQNyt5tgDm3YN7+9dYrpK96E5wFilTFWIDZOM= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d h1:t5Wuyh53qYyg9eqn4BbnlIT+vmhyww0TatL+zT3uWgI= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf h1:CAKfRE2YtTUIjjh1bkBtyYFaUT/WmOqsJjgtihT0vMI= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -191,7 +183,6 @@ github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/frankban/quicktest v1.4.0/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ= github.com/frankban/quicktest v1.4.1 h1:Wv2VwvNn73pAdFIVUQRXYDFp31lXKbqblIXo/Q5GPSg= github.com/frankban/quicktest v1.4.1/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ= @@ -206,7 +197,6 @@ github.com/gammazero/workerpool v0.0.0-20190406235159-88d534f22b56/go.mod h1:w9R github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 h1:Mn26/9ZMNWSw9C9ERFA1PUxfmGpolnw2v0bKOREu5ew= github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32/go.mod h1:GIjDIg/heH5DOkXY3YJ/wNhfHsQHoXGjl8G8amsYQ1I= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-asn1-ber/asn1-ber v1.3.1 h1:gvPdv/Hr++TRFCl0UbPFHC54P9N9jgsRPnmnr419Uck= github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= @@ -264,8 +254,6 @@ github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-metrics-stackdriver v0.0.0-20190816035513-b52628e82e2a h1:qoxSc7PsKuc/RjXf5CB6rRFr5FQSpHM4iIqQfEazLhI= -github.com/google/go-metrics-stackdriver v0.0.0-20190816035513-b52628e82e2a/go.mod h1:o93WzqysX0jP/10Y13hfL6aq9RoUvGaVdkrH5awMksE= github.com/google/go-metrics-stackdriver v0.2.0 h1:rbs2sxHAPn2OtUj9JdR/Gij1YKGl0BTVD0augB+HEjE= github.com/google/go-metrics-stackdriver v0.2.0/go.mod h1:KLcPyp3dWJAFD+yHisGlJSZktIsTjb50eB72U2YZ9K0= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= @@ -279,8 +267,6 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go v2.0.0+incompatible h1:j0GKcs05QVmm7yesiZq2+9cxHkNK9YM6zKx4D2qucQU= -github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -302,12 +288,10 @@ github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvK github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gotestyourself/gotestyourself v2.2.0+incompatible h1:AQwinXlbQR2HvPjQZOmDhRqsv5mZf+Jb1RnSLxcqZcI= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -477,7 +461,6 @@ github.com/jefferai/isbadcipher v0.0.0-20190226160619-51d2077c035f h1:E87tDTVS5W github.com/jefferai/isbadcipher v0.0.0-20190226160619-51d2077c035f/go.mod h1:3J2qVK16Lq8V+wfiL2lPeDZ7UWMxk5LemerHa1p6N00= github.com/jefferai/jsonx v1.0.0 h1:Xoz0ZbmkpBvED5W9W1B5B/zc3Oiq7oXqiW7iRV3B6EI= github.com/jefferai/jsonx v1.0.0/go.mod h1:OGmqmi2tTeI/PS+qQfBDToLHHJIy/RMp24fPo8vFvoQ= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= @@ -510,8 +493,9 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= @@ -556,6 +540,8 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.2.2 h1:dxe5oCinTXiTIcfgmZecdCzPmAJKd46KsCWc35r0TV4= +github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v0.0.0-20190430161007-f252a8fd71c8 h1:1CO5wil3HuiVLrUQ2ovSTO+6AfNOA5EMkHHVyHE9IwA= github.com/mitchellh/pointerstructure v0.0.0-20190430161007-f252a8fd71c8/go.mod h1:k4XwG94++jLVsSiTxo7qdIfXA9pj9EAeo0QsNNJOLZ8= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= @@ -596,7 +582,6 @@ github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVo github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJGY8Y= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= @@ -631,7 +616,6 @@ github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 h1:J9b7z+QKAm github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/otp v1.2.1-0.20191009055518-468c2dd2b58d h1:PinQItctnaL2LtkaSM678+ZLLy5TajwOeXzWvYC7tII= github.com/pquerna/otp v1.2.1-0.20191009055518-468c2dd2b58d/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 h1:D+CiwcpGTW6pL6bv6KI3KbyEyCKyS+1JWS2h8PNDnGA= @@ -647,7 +631,6 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0 h1:kUZDBDTdBVBYBj5Tmh2NZLlF60mfjA27rM34b+cVwNU= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -655,7 +638,6 @@ github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1 h1:/K3IL0Z1quvmJ7X0A1AwNEK7CRkVK3YwfOU/QAL4WGg= @@ -711,7 +693,6 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE= @@ -735,7 +716,6 @@ go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738 h1:lWF4f9Nypl1ZqSb4 go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.mongodb.org/mongo-driver v1.2.1 h1:ANAlYXXM5XmOdW/Nc38jOr+wS5nlk7YihT24U1imiWM= go.mongodb.org/mongo-driver v1.2.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A= go.opencensus.io v0.19.2/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -748,11 +728,8 @@ go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= @@ -772,7 +749,6 @@ golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -793,7 +769,6 @@ golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa h1:F+8P+gmewFQYRk6JoLQLwjBCTu3mcIURZfNkVweuRKA= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -801,7 +776,6 @@ golang.org/x/oauth2 v0.0.0-20190319182350-c85d3e98c914/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -815,7 +789,6 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -860,8 +833,6 @@ golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190718200317-82a3ea8a504c/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.2.0/go.mod h1:IfRCZScioGtypHNTlz3gFk67J8uePVW7uDTBzXuIkhU= google.golang.org/api v0.3.0/go.mod h1:IuvZyQh8jgscv8qWfQ4ABd8m7hEudgBFM/EdhA3BnXw= @@ -872,15 +843,12 @@ google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEt google.golang.org/api v0.14.0 h1:uMf5uLi4eQMRrMKhCplNik4U4H8Z6C1br3zOtAa/aDE= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.0 h1:Tfd7cKwKbFRsI8RMAD3oqqw7JPFRrvFlOsfbgVkjOOw= google.golang.org/appengine v1.6.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181219182458-5a97ab628bfb/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -940,7 +908,6 @@ gopkg.in/yaml.v2 v2.2.5 h1:ymVxjfMaHvXD8RqPRmzHHsB3VvucivSkIAvJFDI5O3c= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/sdk/go.mod b/sdk/go.mod index 2106fdc74a18..5143b72c86c7 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -24,8 +24,9 @@ require ( github.com/hashicorp/hcl v1.0.0 github.com/mitchellh/copystructure v1.0.0 github.com/mitchellh/go-testing-interface v1.0.0 - github.com/mitchellh/mapstructure v1.1.2 + github.com/mitchellh/mapstructure v1.2.2 github.com/pierrec/lz4 v2.0.5+incompatible + github.com/pkg/errors v0.8.1 github.com/ryanuber/go-glob v1.0.0 golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480 golang.org/x/sys v0.0.0-20191008105621-543471e840be diff --git a/sdk/go.sum b/sdk/go.sum index 25730996b15b..189c3823f099 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -82,8 +82,8 @@ github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go. github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.2.2 h1:dxe5oCinTXiTIcfgmZecdCzPmAJKd46KsCWc35r0TV4= +github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= @@ -92,6 +92,7 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= diff --git a/sdk/helper/random/parser.go b/sdk/helper/random/parser.go index 3ce384e15446..9abbe93ab278 100644 --- a/sdk/helper/random/parser.go +++ b/sdk/helper/random/parser.go @@ -60,7 +60,7 @@ func (p Parser) Parse(raw string) (strs StringGenerator, err error) { return strs, fmt.Errorf("unable to retrieve rules: %w", err) } - rules, err := p.parseRules(rawRules) + rules, err := parseRules(p.RuleRegistry, rawRules) if err != nil { return strs, fmt.Errorf("unable to parse rules: %w", err) } @@ -83,7 +83,7 @@ func (p Parser) Parse(raw string) (strs StringGenerator, err error) { return strs, nil } -func (p Parser) parseRules(rawRules []map[string]interface{}) (rules []Rule, err error) { +func parseRules(registry Registry, rawRules []map[string]interface{}) (rules []Rule, err error) { for _, rawRule := range rawRules { info, err := getRuleInfo(rawRule) if err != nil { @@ -93,7 +93,7 @@ func (p Parser) parseRules(rawRules []map[string]interface{}) (rules []Rule, err // Map names like "lower-alpha" to lowercase alphabetical characters applyShortcuts(info.data) - rule, err := p.RuleRegistry.parseRule(info.ruleType, info.data) + rule, err := registry.parseRule(info.ruleType, info.data) if err != nil { return nil, fmt.Errorf("unable to parse rule %s: %w", info.ruleType, err) } @@ -163,12 +163,12 @@ func getMapSlice(m map[string]interface{}, key string) (mapSlice []map[string]in return nil, nil } - slice, ok := rawSlice.([]map[string]interface{}) - if !ok { - return nil, fmt.Errorf("key %s is not a []map[string]interface{}", key) + mapSlice = []map[string]interface{}{} + err = mapstructure.Decode(rawSlice, &mapSlice) + if err != nil { + return nil, err } - - return slice, nil + return mapSlice, nil } type ruleInfo struct { diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index f05b1b72c91c..b3f1d8346acf 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -422,13 +422,11 @@ func TestParseRules(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { - parser := Parser{ - RuleRegistry: Registry{ - Rules: test.registry, - }, + registry := Registry{ + Rules: test.registry, } - actualRules, err := parser.parseRules(test.rawRules) + actualRules, err := parseRules(registry, test.rawRules) if test.expectErr && err == nil { t.Fatalf("err expected, got nil") } diff --git a/sdk/helper/random/registry.go b/sdk/helper/random/registry.go index 0b8168c0ee46..3b3ac1c53492 100644 --- a/sdk/helper/random/registry.go +++ b/sdk/helper/random/registry.go @@ -12,6 +12,10 @@ var ( defaultRuleNameMapping = map[string]ruleConstructor{ "CharsetRestriction": ParseCharsetRestriction, } + + defaultRegistry = Registry{ + Rules: defaultRuleNameMapping, + } ) // Registry of HCL rule names to rule constructors. diff --git a/sdk/helper/random/serializing.go b/sdk/helper/random/serializing.go index ea56e1ffeb86..a5f362442e33 100644 --- a/sdk/helper/random/serializing.go +++ b/sdk/helper/random/serializing.go @@ -51,6 +51,20 @@ func (r serializableRules) MarshalJSON() (b []byte, err error) { return b, err } +func (r *serializableRules) UnmarshalJSON(data []byte) (err error) { + mapData := []map[string]interface{}{} + err = json.Unmarshal(data, &mapData) + if err != nil { + return err + } + rules, err := parseRules(defaultRegistry, mapData) + if err != nil { + return err + } + *r = rules + return nil +} + type runes []rune func (r runes) Len() int { return len(r) } diff --git a/sdk/helper/random/serializing_test.go b/sdk/helper/random/serializing_test.go new file mode 100644 index 000000000000..60fdc8fab101 --- /dev/null +++ b/sdk/helper/random/serializing_test.go @@ -0,0 +1,43 @@ +package random + +import ( + "encoding/json" + "reflect" + "testing" +) + +func TestJSONMarshalling(t *testing.T) { + expected := serializableRules{ + &CharsetRestriction{ + Charset: LowercaseRuneset, + MinChars: 1, + }, + &CharsetRestriction{ + Charset: UppercaseRuneset, + MinChars: 1, + }, + &CharsetRestriction{ + Charset: NumericRuneset, + MinChars: 1, + }, + &CharsetRestriction{ + Charset: ShortSymbolRuneset, + MinChars: 1, + }, + } + + marshalled, err := json.Marshal(expected) + if err != nil { + t.Fatalf("no error expected, got: %s", err) + } + + actual := serializableRules{} + err = json.Unmarshal(marshalled, &actual) + if err != nil { + t.Fatalf("no error expected, got: %s", err) + } + + if !reflect.DeepEqual(actual, expected) { + t.Fatalf("Actual: %#v\nExpected: %#v", actual, expected) + } +} diff --git a/vendor/github.com/coreos/go-systemd/journal/journal.go b/vendor/github.com/coreos/go-systemd/journal/journal.go index 603ad4c3b538..ef85a3ba2455 100644 --- a/vendor/github.com/coreos/go-systemd/journal/journal.go +++ b/vendor/github.com/coreos/go-systemd/journal/journal.go @@ -119,8 +119,8 @@ func Print(priority Priority, format string, a ...interface{}) error { } func appendVariable(w io.Writer, name, value string) { - if err := validVarName(name); err != nil { - journalError(err.Error()) + if !validVarName(name) { + journalError("variable name contains invalid character, ignoring") } if strings.ContainsRune(value, '\n') { /* When the value contains a newline, we write: @@ -137,23 +137,16 @@ func appendVariable(w io.Writer, name, value string) { } } -// validVarName validates a variable name to make sure it journald will accept it. -// The variable name must be in uppercase and consist only of characters, -// numbers and underscores, and may not begin with an underscore. (from the docs) -// https://www.freedesktop.org/software/systemd/man/sd_journal_print.html -func validVarName(name string) error { - if name == "" { - return errors.New("Empty variable name") - } else if name[0] == '_' { - return errors.New("Variable name begins with an underscore") - } +func validVarName(name string) bool { + /* The variable name must be in uppercase and consist only of characters, + * numbers and underscores, and may not begin with an underscore. (from the docs) + */ + valid := name[0] != '_' for _, c := range name { - if !(('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_') { - return errors.New("Variable name contains invalid characters") - } + valid = valid && ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' } - return nil + return valid } func isSocketSpaceError(err error) bool { diff --git a/vendor/github.com/hashicorp/vault/api/client.go b/vendor/github.com/hashicorp/vault/api/client.go index 2f4f90ee353e..ee08f0dd57f6 100644 --- a/vendor/github.com/hashicorp/vault/api/client.go +++ b/vendor/github.com/hashicorp/vault/api/client.go @@ -32,6 +32,7 @@ const EnvVaultCAPath = "VAULT_CAPATH" const EnvVaultClientCert = "VAULT_CLIENT_CERT" const EnvVaultClientKey = "VAULT_CLIENT_KEY" const EnvVaultClientTimeout = "VAULT_CLIENT_TIMEOUT" +const EnvVaultSRVLookup = "VAULT_SRV_LOOKUP" const EnvVaultSkipVerify = "VAULT_SKIP_VERIFY" const EnvVaultNamespace = "VAULT_NAMESPACE" const EnvVaultTLSServerName = "VAULT_TLS_SERVER_NAME" @@ -105,6 +106,9 @@ type Config struct { // Note: It is not thread-safe to set this and make concurrent requests // with the same client. Cloning a client will not clone this value. OutputCurlString bool + + // SRVLookup enables the client to lookup the host through DNS SRV lookup + SRVLookup bool } // TLSConfig contains the parameters needed to configure TLS on the HTTP client @@ -245,6 +249,7 @@ func (c *Config) ReadEnvironment() error { var envInsecure bool var envTLSServerName string var envMaxRetries *uint64 + var envSRVLookup bool var limit *rate.Limiter // Parse the environment variables @@ -302,6 +307,13 @@ func (c *Config) ReadEnvironment() error { return fmt.Errorf("could not parse VAULT_INSECURE") } } + if v := os.Getenv(EnvVaultSRVLookup); v != "" { + var err error + envSRVLookup, err = strconv.ParseBool(v) + if err != nil { + return fmt.Errorf("could not parse %s", EnvVaultSRVLookup) + } + } if v := os.Getenv(EnvVaultTLSServerName); v != "" { envTLSServerName = v @@ -320,6 +332,7 @@ func (c *Config) ReadEnvironment() error { c.modifyLock.Lock() defer c.modifyLock.Unlock() + c.SRVLookup = envSRVLookup c.Limiter = limit if err := c.ConfigureTLS(t); err != nil { @@ -686,12 +699,6 @@ func (c *Client) SetPolicyOverride(override bool) { c.policyOverride = override } -// portMap defines the standard port map -var portMap = map[string]string{ - "http": "80", - "https": "443", -} - // NewRequest creates a new raw request object to query the Vault server // configured for this client. This is an advanced method and generally // doesn't need to be called externally. @@ -704,20 +711,14 @@ func (c *Client) NewRequest(method, requestPath string) *Request { policyOverride := c.policyOverride c.modifyLock.RUnlock() + var host = addr.Host // if SRV records exist (see https://tools.ietf.org/html/draft-andrews-http-srv-02), lookup the SRV // record and take the highest match; this is not designed for high-availability, just discovery - var host string = addr.Host - if addr.Port() == "" { - // Avoid lookup of SRV record if scheme is known - port, ok := portMap[addr.Scheme] - if ok { - host = net.JoinHostPort(host, port) - } else { - // Internet Draft specifies that the SRV record is ignored if a port is given - _, addrs, err := net.LookupSRV("http", "tcp", addr.Hostname()) - if err == nil && len(addrs) > 0 { - host = fmt.Sprintf("%s:%d", addrs[0].Target, addrs[0].Port) - } + // Internet Draft specifies that the SRV record is ignored if a port is given + if addr.Port() == "" && c.config.SRVLookup { + _, addrs, err := net.LookupSRV("http", "tcp", addr.Hostname()) + if err == nil && len(addrs) > 0 { + host = fmt.Sprintf("%s:%d", addrs[0].Target, addrs[0].Port) } } @@ -729,6 +730,7 @@ func (c *Client) NewRequest(method, requestPath string) *Request { Host: host, Path: path.Join(addr.Path, requestPath), }, + Host: addr.Host, ClientToken: token, Params: make(map[string][]string), } diff --git a/vendor/github.com/hashicorp/vault/api/request.go b/vendor/github.com/hashicorp/vault/api/request.go index 0ed04220e37a..1cbbc62f908b 100644 --- a/vendor/github.com/hashicorp/vault/api/request.go +++ b/vendor/github.com/hashicorp/vault/api/request.go @@ -18,6 +18,7 @@ import ( type Request struct { Method string URL *url.URL + Host string Params url.Values Headers http.Header ClientToken string @@ -115,7 +116,7 @@ func (r *Request) toRetryableHTTP() (*retryablehttp.Request, error) { req.URL.User = r.URL.User req.URL.Scheme = r.URL.Scheme req.URL.Host = r.URL.Host - req.Host = r.URL.Host + req.Host = r.Host if r.Headers != nil { for header, vals := range r.Headers { diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/ldaputil/client.go b/vendor/github.com/hashicorp/vault/sdk/helper/ldaputil/client.go index 2b453d471727..445953edf4f0 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/ldaputil/client.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/ldaputil/client.go @@ -217,7 +217,7 @@ func (c *Client) performLdapFilterGroupsSearch(cfg *ConfigEntry, conn Connection var renderedQuery bytes.Buffer if err := t.Execute(&renderedQuery, context); err != nil { - return nil, errwrap.Wrapf("LDAP search failed due to template parsing error: {{error}}", err) + return nil, errwrap.Wrapf("LDAP search failed due to template parsing error: {{err}}", err) } if c.Logger.IsDebug() { diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go new file mode 100644 index 000000000000..3ce384e15446 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go @@ -0,0 +1,265 @@ +package random + +import ( + "fmt" + "reflect" + "sort" + "unicode" + "unicode/utf8" + + "github.com/hashicorp/go-multierror" + "github.com/hashicorp/hcl" + "github.com/mitchellh/mapstructure" +) + +// Parse is a convenience function for parsing HCL into a StringGenerator. See Parser.Parse for details. +func Parse(raw string) (gen StringGenerator, err error) { + parser := Parser{ + RuleRegistry: Registry{ + Rules: defaultRuleNameMapping, + }, + } + return parser.Parse(raw) +} + +func ParseBytes(raw []byte) (gen StringGenerator, err error) { + return Parse(string(raw)) +} + +// Parser parses string generator configuration from HCL. +type Parser struct { + // RuleRegistry maps rule names in HCL to Rule constructors. + RuleRegistry Registry +} + +// Parse parses the provided HCL into a StringGenerator. +func (p Parser) Parse(raw string) (strs StringGenerator, err error) { + rawData := map[string]interface{}{} + err = hcl.Decode(&rawData, raw) + if err != nil { + return strs, fmt.Errorf("unable to decode: %w", err) + } + + // Decode the top level items + decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ + Result: &strs, + DecodeHook: stringToRunesFunc, + }) + if err != nil { + return strs, fmt.Errorf("unable to decode configuration: %w", err) + } + + err = decoder.Decode(rawData) + if err != nil { + return strs, fmt.Errorf("failed to decode configuration: %w", err) + } + + // Decode & parse rules + rawRules, err := getMapSlice(rawData, "rule") + if err != nil { + return strs, fmt.Errorf("unable to retrieve rules: %w", err) + } + + rules, err := p.parseRules(rawRules) + if err != nil { + return strs, fmt.Errorf("unable to parse rules: %w", err) + } + + // Add any charsets found in rules to the overall charset & deduplicate + cs := append(strs.Charset, getChars(rules)...) + cs = deduplicateRunes(cs) + + strs = StringGenerator{ + Length: strs.Length, + Charset: cs, + Rules: rules, + } + + err = validate(strs) + if err != nil { + return strs, err + } + + return strs, nil +} + +func (p Parser) parseRules(rawRules []map[string]interface{}) (rules []Rule, err error) { + for _, rawRule := range rawRules { + info, err := getRuleInfo(rawRule) + if err != nil { + return nil, fmt.Errorf("unable to get rule info: %w", err) + } + + // Map names like "lower-alpha" to lowercase alphabetical characters + applyShortcuts(info.data) + + rule, err := p.RuleRegistry.parseRule(info.ruleType, info.data) + if err != nil { + return nil, fmt.Errorf("unable to parse rule %s: %w", info.ruleType, err) + } + rules = append(rules, rule) + } + + return rules, nil +} + +func validate(strs StringGenerator) (err error) { + type minLengthProvider interface { + MinLength() int + } + + merr := &multierror.Error{} + if strs.Length < 1 { + merr = multierror.Append(merr, fmt.Errorf("length must be >= 1")) + } + if len(strs.Charset) == 0 { + merr = multierror.Append(merr, fmt.Errorf("no charset specified")) + } + + minLengthRules := 0 + for _, rule := range strs.Rules { + mlp, ok := rule.(minLengthProvider) + if !ok { + continue + } + minLengthRules += mlp.MinLength() + } + + if minLengthRules > strs.Length { + merr = multierror.Append(merr, fmt.Errorf("specified rules require at least %d characters but %d is specified", minLengthRules, strs.Length)) + } + + for _, r := range strs.Charset { + if !unicode.IsPrint(r) { + merr = multierror.Append(merr, fmt.Errorf("non-printable character in charset")) + break + } + } + + return merr.ErrorOrNil() +} + +func getChars(rules []Rule) (chars []rune) { + type charsetProvider interface { + Chars() []rune + } + + for _, rule := range rules { + cp, ok := rule.(charsetProvider) + if !ok { + continue + } + chars = append(chars, cp.Chars()...) + } + return chars +} + +// getMapSlice from the provided map. This will retrieve and type-assert a []map[string]interface{} from the map +// This will not error if the key does not exist +// This will return an error if the value at the provided key is not of type []map[string]interface{} +func getMapSlice(m map[string]interface{}, key string) (mapSlice []map[string]interface{}, err error) { + rawSlice, exists := m[key] + if !exists { + return nil, nil + } + + slice, ok := rawSlice.([]map[string]interface{}) + if !ok { + return nil, fmt.Errorf("key %s is not a []map[string]interface{}", key) + } + + return slice, nil +} + +type ruleInfo struct { + ruleType string + data map[string]interface{} +} + +// getRuleInfo splits the provided HCL-decoded rule into its rule type along with the data associated with it +func getRuleInfo(rule map[string]interface{}) (data ruleInfo, err error) { + // There should only be one key, but it's a dynamic key yay! + for key := range rule { + slice, err := getMapSlice(rule, key) + if err != nil { + return data, fmt.Errorf("unable to get rule data: %w", err) + } + data = ruleInfo{ + ruleType: key, + data: slice[0], + } + return data, nil + } + return data, fmt.Errorf("rule is empty") +} + +var ( + charsetShortcuts = map[string]string{ + // Base + "lower-alpha": LowercaseCharset, + "upper-alpha": UppercaseCharset, + "numeric": NumericCharset, + + // Combinations + "lower-upper-alpha": AlphabeticCharset, + "lower-upper-alphanumeric": AlphaNumericCharset, + } +) + +// applyShortcuts to the provided map. This will look for a "charset" key. If it exists and equals one of the keys +// in `charsetShortcuts`, it replaces the value with the value found in the `charsetShortcuts` map. For instance: +// +// Input map: +// map[string]interface{}{ +// "charset": "upper-alpha", +// } +// +// This will convert it to: +// map[string]interface{}{ +// "charset": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", +// } +func applyShortcuts(m map[string]interface{}) { + rawCharset, exists := m["charset"] + if !exists { + return + } + charset, ok := rawCharset.(string) + if !ok { + return + } + newCharset, shortcutExists := charsetShortcuts[charset] + if !shortcutExists { + return + } + m["charset"] = newCharset +} + +func deduplicateRunes(original []rune) (deduped []rune) { + m := map[rune]bool{} + dedupedRunes := []rune(nil) + + for _, r := range original { + if m[r] { + continue + } + m[r] = true + dedupedRunes = append(dedupedRunes, r) + } + + // They don't have to be sorted, but this is being done to make the charset easier to visualize + sort.Sort(runes(dedupedRunes)) + return dedupedRunes +} + +func stringToRunesFunc(from reflect.Kind, to reflect.Kind, data interface{}) (interface{}, error) { + if from != reflect.String || to != reflect.Slice { + return data, nil + } + + raw := data.(string) + + if !utf8.ValidString(raw) { + return nil, fmt.Errorf("invalid UTF8 string") + } + return []rune(raw), nil +} diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go new file mode 100644 index 000000000000..0b8168c0ee46 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go @@ -0,0 +1,29 @@ +package random + +import ( + "fmt" +) + +type ruleConstructor func(map[string]interface{}) (Rule, error) + +var ( + // defaultRuleNameMapping is the default mapping of HCL rule names to the appropriate rule constructor. + // Add to this map when adding a new Rule type to be recognized in HCL. + defaultRuleNameMapping = map[string]ruleConstructor{ + "CharsetRestriction": ParseCharsetRestriction, + } +) + +// Registry of HCL rule names to rule constructors. +type Registry struct { + Rules map[string]ruleConstructor +} + +func (r Registry) parseRule(ruleType string, ruleData map[string]interface{}) (rule Rule, err error) { + constructor, exists := r.Rules[ruleType] + if !exists { + return nil, fmt.Errorf("unrecognized rule type %s", ruleType) + } + + return constructor(ruleData) +} diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go new file mode 100644 index 000000000000..717ade10eeae --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go @@ -0,0 +1,82 @@ +package random + +import ( + "fmt" + + "github.com/mitchellh/mapstructure" +) + +// CharsetRestriction requires a certain number of characters from the specified charset. +type CharsetRestriction struct { + // Charset is the list of rules that candidate strings must contain a minimum number of. + Charset runes `mapstructure:"charset" json:"charset"` + + // MinChars indicates the minimum (inclusive) number of characters from the charset that should appear in the string. + MinChars int `mapstructure:"min-chars" json:"min-chars"` +} + +// ParseCharsetRestriction from the provided data map. The data map is expected to be parsed from HCL. +func ParseCharsetRestriction(data map[string]interface{}) (rule Rule, err error) { + cr := &CharsetRestriction{} + + decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ + Metadata: nil, + Result: cr, + DecodeHook: stringToRunesFunc, + }) + if err != nil { + return nil, fmt.Errorf("unable to decode charset restriction: %w", err) + } + + err = decoder.Decode(data) + if err != nil { + return nil, fmt.Errorf("failed to parse charset restriction: %w", err) + } + + return cr, nil +} + +func (c CharsetRestriction) Type() string { + return "CharsetRestriction" +} + +// Chars returns the charset that this rule is looking for. +func (c CharsetRestriction) Chars() []rune { + return c.Charset +} + +func (c CharsetRestriction) MinLength() int { + return c.MinChars +} + +// Pass returns true if the provided candidate string has a minimum number of chars in it. +// This adheres to the Rule interface +func (c CharsetRestriction) Pass(value []rune) bool { + if c.MinChars <= 0 { + return true + } + + count := 0 + for _, r := range value { + // charIn is sometimes faster than a map lookup because the data is so small + // This is being kept rather than converted to a map to keep the code cleaner, + // otherwise there would need to be additional parsing logic. + if charIn(r, c.Charset) { + count++ + if count >= c.MinChars { + return true + } + } + } + + return false +} + +func charIn(search rune, charset []rune) bool { + for _, r := range charset { + if search == r { + return true + } + } + return false +} diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go new file mode 100644 index 000000000000..ea56e1ffeb86 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go @@ -0,0 +1,74 @@ +package random + +import ( + "encoding/json" + "fmt" + + "github.com/mitchellh/mapstructure" +) + +// serializableRules is a slice of rules that can be marshalled to JSON in an HCL format +type serializableRules []Rule + +// MarshalJSON in an HCL-friendly way +func (r serializableRules) MarshalJSON() (b []byte, err error) { + // Example: + // [ + // { + // "testrule": [ + // { + // "string": "teststring", + // "int": 123 + // } + // ] + // }, + // { + // "CharsetRestriction": [ + // { + // "charset": "abcde", + // "min-chars": 2 + // } + // ] + // } + // ] + data := []map[string][]map[string]interface{}{} // Totally not confusing at all + for _, rule := range r { + ruleData := map[string]interface{}{} + err = mapstructure.Decode(rule, &ruleData) + if err != nil { + return nil, fmt.Errorf("unable to decode rule: %w", err) + } + + ruleMap := map[string][]map[string]interface{}{ + rule.Type(): []map[string]interface{}{ + ruleData, + }, + } + data = append(data, ruleMap) + } + + b, err = json.Marshal(data) + return b, err +} + +type runes []rune + +func (r runes) Len() int { return len(r) } +func (r runes) Less(i, j int) bool { return r[i] < r[j] } +func (r runes) Swap(i, j int) { r[i], r[j] = r[j], r[i] } + +// MarshalJSON converts the runes to a string for smaller JSON and easier readability +func (r runes) MarshalJSON() (b []byte, err error) { + return json.Marshal(string(r)) +} + +// UnmarshalJSON converts a string to []rune +func (r *runes) UnmarshalJSON(data []byte) (err error) { + var str string + err = json.Unmarshal(data, &str) + if err != nil { + return err + } + *r = []rune(str) + return nil +} diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go new file mode 100644 index 000000000000..1774dabeee93 --- /dev/null +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go @@ -0,0 +1,169 @@ +package random + +import ( + "context" + "crypto/rand" + "fmt" + "io" + "math" + "sort" + "time" +) + +var ( + LowercaseCharset = sortCharset("abcdefghijklmnopqrstuvwxyz") + UppercaseCharset = sortCharset("ABCDEFGHIJKLMNOPQRSTUVWXYZ") + NumericCharset = sortCharset("0123456789") + FullSymbolCharset = sortCharset("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~") + ShortSymbolCharset = sortCharset("-") + + AlphabeticCharset = sortCharset(UppercaseCharset + LowercaseCharset) + AlphaNumericCharset = sortCharset(AlphabeticCharset + NumericCharset) + AlphaNumericShortSymbolCharset = sortCharset(AlphaNumericCharset + ShortSymbolCharset) + AlphaNumericFullSymbolCharset = sortCharset(AlphaNumericCharset + FullSymbolCharset) + + LowercaseRuneset = []rune(LowercaseCharset) + UppercaseRuneset = []rune(UppercaseCharset) + NumericRuneset = []rune(NumericCharset) + FullSymbolRuneset = []rune(FullSymbolCharset) + ShortSymbolRuneset = []rune(ShortSymbolCharset) + + AlphabeticRuneset = []rune(AlphabeticCharset) + AlphaNumericRuneset = []rune(AlphaNumericCharset) + AlphaNumericShortSymbolRuneset = []rune(AlphaNumericShortSymbolCharset) + AlphaNumericFullSymbolRuneset = []rune(AlphaNumericFullSymbolCharset) + + // DefaultStringGenerator has reasonable default rules for generating strings + DefaultStringGenerator = StringGenerator{ + Length: 20, + Charset: []rune(LowercaseCharset + UppercaseCharset + NumericCharset + ShortSymbolCharset), + Rules: []Rule{ + CharsetRestriction{ + Charset: LowercaseRuneset, + MinChars: 1, + }, + CharsetRestriction{ + Charset: UppercaseRuneset, + MinChars: 1, + }, + CharsetRestriction{ + Charset: NumericRuneset, + MinChars: 1, + }, + CharsetRestriction{ + Charset: ShortSymbolRuneset, + MinChars: 1, + }, + }, + } +) + +func sortCharset(chars string) string { + r := runes(chars) + sort.Sort(r) + return string(r) +} + +// Rule to assert on string values. +type Rule interface { + // Pass should return true if the provided value passes any assertions this Rule is making. + Pass(value []rune) bool + + // Type returns the name of the rule as associated in the registry + Type() string +} + +// StringGenerator generats random strings from the provided charset & adhering to a set of rules. The set of rules +// are things like CharsetRestriction which requires a certain number of characters from a sub-charset. +type StringGenerator struct { + // Length of the string to generate. + Length int `mapstructure:"length" json:"length"` + + // Charset to choose runes from. + Charset runes `mapstructure:"charset" json:"charset"` + + // Rules the generated strings must adhere to. + Rules serializableRules `mapstructure:"-" json:"rule"` // This is "rule" in JSON so it matches the HCL property type + + // rng for testing purposes to ensure error handling from the crypto/rand package is working properly. + rng io.Reader +} + +// Generate a random string from the charset and adhering to the provided rules. +func (g StringGenerator) Generate(ctx context.Context) (str string, err error) { + if _, hasTimeout := ctx.Deadline(); !hasTimeout { + var cancel func() + ctx, cancel = context.WithTimeout(ctx, 1*time.Second) // Ensure there's a timeout on the context + defer cancel() + } + +LOOP: + for { + select { + case <-ctx.Done(): + return "", fmt.Errorf("timed out generating string") + default: + str, err = g.generate() + if err != nil { + return "", err + } + if str == "" { + continue LOOP + } + return str, err + } + } +} + +func (g StringGenerator) generate() (str string, err error) { + // If performance improvements need to be made, this can be changed to read a batch of + // potential strings at once rather than one at a time. This will significantly + // improve performance, but at the cost of added complexity. + candidate, err := randomRunes(g.rng, g.Charset, g.Length) + if err != nil { + return "", fmt.Errorf("unable to generate random characters: %w", err) + } + + for _, rule := range g.Rules { + if !rule.Pass(candidate) { + return "", nil + } + } + + // Passed all rules + return string(candidate), nil +} + +// randomRunes creates a random string based on the provided charset. The charset is limited to 255 characters, but +// could be expanded if needed. Expanding the maximum charset size will decrease performance because it will need to +// combine bytes into a larger integer using binary.BigEndian.Uint16() function. +func randomRunes(rng io.Reader, charset []rune, length int) (candidate []rune, err error) { + if len(charset) == 0 { + return nil, fmt.Errorf("no charset specified") + } + if len(charset) > math.MaxUint8 { + return nil, fmt.Errorf("charset is too long: limited to %d characters", math.MaxUint8) + } + if length <= 0 { + return nil, fmt.Errorf("unable to generate a zero or negative length runeset") + } + + if rng == nil { + rng = rand.Reader + } + + charsetLen := byte(len(charset)) + data := make([]byte, length) + _, err = rng.Read(data) + if err != nil { + return nil, err + } + + runes := make([]rune, 0, length) + for i := 0; i < len(data); i++ { + r := charset[data[i]%charsetLen] + runes = append(runes, r) + } + + return runes, nil +} diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go b/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go index 2c5d9c3bed07..08ced677a654 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go @@ -3,6 +3,7 @@ package logical import ( "context" "errors" + "fmt" "time" "github.com/hashicorp/vault/sdk/helper/consts" @@ -68,6 +69,14 @@ type SystemView interface { // PluginEnv returns Vault environment information used by plugins PluginEnv(context.Context) (*PluginEnvironment, error) + + // PasswordPolicy retrieves the password policy associated with the policy name + PasswordPolicy(ctx context.Context, policyName string) (PasswordPolicy, error) +} + +type PasswordPolicy interface { + // Generate a random password + Generate(context.Context) (string, error) } type ExtendedSystemView interface { @@ -90,6 +99,7 @@ type StaticSystemView struct { Features license.Features VaultVersion string PluginEnvironment *PluginEnvironment + PasswordPolicies map[string]PasswordPolicy } type noopAuditor struct{} @@ -165,3 +175,20 @@ func (d StaticSystemView) HasFeature(feature license.Features) bool { func (d StaticSystemView) PluginEnv(_ context.Context) (*PluginEnvironment, error) { return d.PluginEnvironment, nil } + +func (d StaticSystemView) PasswordPolicy(ctx context.Context, policyName string) (policy PasswordPolicy, err error) { + select { + case <-ctx.Done(): + return nil, fmt.Errorf("context timed out") + default: + } + + if d.PasswordPolicies == nil { + return nil, fmt.Errorf("password policy not found") + } + policy, exists := d.PasswordPolicies[policyName] + if !exists { + return nil, fmt.Errorf("password policy not found") + } + return policy, nil +} diff --git a/vendor/github.com/hashicorp/vault/sdk/plugin/grpc_system.go b/vendor/github.com/hashicorp/vault/sdk/plugin/grpc_system.go index 6e27c9b96360..c36231b445b7 100644 --- a/vendor/github.com/hashicorp/vault/sdk/plugin/grpc_system.go +++ b/vendor/github.com/hashicorp/vault/sdk/plugin/grpc_system.go @@ -10,10 +10,13 @@ import ( "github.com/hashicorp/vault/sdk/helper/consts" "github.com/hashicorp/vault/sdk/helper/license" "github.com/hashicorp/vault/sdk/helper/pluginutil" + "github.com/hashicorp/vault/sdk/helper/random" "github.com/hashicorp/vault/sdk/helper/wrapping" "github.com/hashicorp/vault/sdk/logical" "github.com/hashicorp/vault/sdk/plugin/pb" "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) func newGRPCSystemView(conn *grpc.ClientConn) *gRPCSystemViewClient { @@ -161,6 +164,21 @@ func (s *gRPCSystemViewClient) PluginEnv(ctx context.Context) (*logical.PluginEn return reply.PluginEnvironment, nil } +func (s *gRPCSystemViewClient) PasswordPolicy(ctx context.Context, policyName string) (policy logical.PasswordPolicy, err error) { + req := &pb.PasswordPolicyRequest{ + PolicyName: policyName, + } + resp, err := s.client.PasswordPolicy(ctx, req) + if err != nil { + return nil, err + } + passPolicy, err := random.ParseBytes(resp.RawPolicy) + if err != nil { + return nil, fmt.Errorf("failed to parse password policy: %w", err) + } + return passPolicy, nil +} + type gRPCSystemViewServer struct { impl logical.SystemView } @@ -274,3 +292,22 @@ func (s *gRPCSystemViewServer) PluginEnv(ctx context.Context, _ *pb.Empty) (*pb. PluginEnvironment: pluginEnv, }, nil } + +func (s *gRPCSystemViewServer) PasswordPolicy(ctx context.Context, req *pb.PasswordPolicyRequest) (*pb.PasswordPolicyResponse, error) { + policy, err := s.impl.PasswordPolicy(ctx, req.PolicyName) + if err != nil { + return &pb.PasswordPolicyResponse{}, status.Errorf(codes.Internal, "unable to retrieve password policy: %s", err) + } + if policy == nil { + return &pb.PasswordPolicyResponse{}, status.Errorf(codes.NotFound, "policy not found") + } + + b, err := json.Marshal(policy) + if err != nil { + return &pb.PasswordPolicyResponse{}, status.Errorf(codes.Internal, "unable to serialize password policy: %s", err) + } + resp := &pb.PasswordPolicyResponse{ + RawPolicy: b, + } + return resp, nil +} diff --git a/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.pb.go b/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.pb.go index efd386b8eb00..59415ca23480 100644 --- a/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.pb.go +++ b/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.pb.go @@ -2662,6 +2662,84 @@ func (m *PluginEnvReply) GetErr() string { return "" } +type PasswordPolicyRequest struct { + PolicyName string `sentinel:"" protobuf:"bytes,1,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PasswordPolicyRequest) Reset() { *m = PasswordPolicyRequest{} } +func (m *PasswordPolicyRequest) String() string { return proto.CompactTextString(m) } +func (*PasswordPolicyRequest) ProtoMessage() {} +func (*PasswordPolicyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4dbf1dfe0c11846b, []int{44} +} + +func (m *PasswordPolicyRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PasswordPolicyRequest.Unmarshal(m, b) +} +func (m *PasswordPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PasswordPolicyRequest.Marshal(b, m, deterministic) +} +func (m *PasswordPolicyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PasswordPolicyRequest.Merge(m, src) +} +func (m *PasswordPolicyRequest) XXX_Size() int { + return xxx_messageInfo_PasswordPolicyRequest.Size(m) +} +func (m *PasswordPolicyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PasswordPolicyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PasswordPolicyRequest proto.InternalMessageInfo + +func (m *PasswordPolicyRequest) GetPolicyName() string { + if m != nil { + return m.PolicyName + } + return "" +} + +type PasswordPolicyResponse struct { + RawPolicy []byte `sentinel:"" protobuf:"bytes,1,opt,name=raw_policy,json=rawPolicy,proto3" json:"raw_policy,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PasswordPolicyResponse) Reset() { *m = PasswordPolicyResponse{} } +func (m *PasswordPolicyResponse) String() string { return proto.CompactTextString(m) } +func (*PasswordPolicyResponse) ProtoMessage() {} +func (*PasswordPolicyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dbf1dfe0c11846b, []int{45} +} + +func (m *PasswordPolicyResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PasswordPolicyResponse.Unmarshal(m, b) +} +func (m *PasswordPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PasswordPolicyResponse.Marshal(b, m, deterministic) +} +func (m *PasswordPolicyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PasswordPolicyResponse.Merge(m, src) +} +func (m *PasswordPolicyResponse) XXX_Size() int { + return xxx_messageInfo_PasswordPolicyResponse.Size(m) +} +func (m *PasswordPolicyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PasswordPolicyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PasswordPolicyResponse proto.InternalMessageInfo + +func (m *PasswordPolicyResponse) GetRawPolicy() []byte { + if m != nil { + return m.RawPolicy + } + return nil +} + type Connection struct { // RemoteAddr is the network address that sent the request. RemoteAddr string `sentinel:"" protobuf:"bytes,1,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` @@ -2674,7 +2752,7 @@ func (m *Connection) Reset() { *m = Connection{} } func (m *Connection) String() string { return proto.CompactTextString(m) } func (*Connection) ProtoMessage() {} func (*Connection) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{44} + return fileDescriptor_4dbf1dfe0c11846b, []int{46} } func (m *Connection) XXX_Unmarshal(b []byte) error { @@ -2752,173 +2830,179 @@ func init() { proto.RegisterType((*EntityInfoReply)(nil), "pb.EntityInfoReply") proto.RegisterType((*GroupsForEntityReply)(nil), "pb.GroupsForEntityReply") proto.RegisterType((*PluginEnvReply)(nil), "pb.PluginEnvReply") + proto.RegisterType((*PasswordPolicyRequest)(nil), "pb.PasswordPolicyRequest") + proto.RegisterType((*PasswordPolicyResponse)(nil), "pb.PasswordPolicyResponse") proto.RegisterType((*Connection)(nil), "pb.Connection") } func init() { proto.RegisterFile("sdk/plugin/pb/backend.proto", fileDescriptor_4dbf1dfe0c11846b) } var fileDescriptor_4dbf1dfe0c11846b = []byte{ - // 2545 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xdb, 0x72, 0x1b, 0xc7, - 0xd1, 0x2e, 0x00, 0xc4, 0xa9, 0x71, 0x1e, 0xd2, 0xfa, 0x57, 0x90, 0xfc, 0x8b, 0x5e, 0x47, 0x32, - 0xcd, 0xd8, 0xa0, 0x45, 0xc5, 0xb1, 0x9c, 0x54, 0xe2, 0xa2, 0x29, 0x4a, 0x66, 0x4c, 0xda, 0xac, - 0x25, 0x14, 0xe7, 0x54, 0x05, 0x0f, 0x76, 0x87, 0xe0, 0x16, 0x17, 0xbb, 0x9b, 0xd9, 0x59, 0x8a, -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x2c, - 0xf3, 0x70, 0x52, 0x05, 0x86, 0x77, 0xd7, 0x69, 0xd2, 0xcc, 0xcb, 0x53, 0xf1, 0x4a, 0xe6, 0xad, - 0xf2, 0xf4, 0x7b, 0x00, 0x19, 0x1b, 0xe7, 0xed, 0xf1, 0x7a, 0x97, 0x89, 0xfa, 0x43, 0x80, 0x8c, - 0x63, 0x15, 0x2a, 0x8a, 0x14, 0xad, 0xa6, 0x2d, 0xf3, 0xf0, 0x2e, 0x34, 0x53, 0x16, 0xcb, 0xaf, - 0x81, 0x0e, 0x96, 0x48, 0xf1, 0x13, 0xe8, 0x2d, 0x11, 0xef, 0xda, 0x75, 0x30, 0x3c, 0xeb, 0x18, - 0xfa, 0xd3, 0xdd, 0xdf, 0xed, 0xcc, 0x5c, 0x71, 0x19, 0x4f, 0x47, 0x76, 0x30, 0xdf, 0xbb, 0xa4, - 0xd1, 0xa5, 0x6b, 0x07, 0x3c, 0xdc, 0xbb, 0x96, 0x68, 0xda, 0x2b, 0xfc, 0x91, 0x36, 0xad, 0xe1, - 0x83, 0xf2, 0xc9, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x9a, 0xc2, 0x92, 0x60, 0x1b, 0x00, - 0x00, + // 2615 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x72, 0xdc, 0xc6, + 0xf1, 0xaf, 0xdd, 0xe5, 0x7e, 0xf5, 0x7e, 0x8f, 0x28, 0xfd, 0xa1, 0x95, 0xfc, 0x17, 0x0d, 0x47, + 0x32, 0xad, 0x58, 0x4b, 0x8b, 0x8a, 0x63, 0x39, 0xa9, 0xc4, 0x25, 0x53, 0xb4, 0xcc, 0x98, 0xb2, + 0x59, 0xe0, 0x3a, 0xce, 0x57, 0xd5, 0x7a, 0x16, 0x18, 0x2e, 0x51, 0xc4, 0x02, 0xc8, 0x60, 0x40, + 0x6a, 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xc9, 0x1c, 0x3b, 0x70, 0x98, 0x51, 0xdb, 0xa9, + 0xec, 0xd6, 0x70, 0xce, 0x41, 0xe0, 0x30, 0xf3, 0xaf, 0x15, 0xa8, 0x9f, 0x50, 0x71, 0x1e, 0x11, + 0x02, 0x5b, 0x3c, 0x08, 0x84, 0x36, 0x8e, 0xdf, 0x64, 0x17, 0x06, 0xb1, 0x4f, 0x63, 0x71, 0x2e, + 0x77, 0x65, 0x53, 0xc1, 0x1c, 0xa3, 0x8a, 0xec, 0x75, 0x32, 0x79, 0x0b, 0x7a, 0x5e, 0x60, 0x53, + 0x6f, 0x16, 0x89, 0x80, 0xd3, 0x85, 0xb4, 0x23, 0xe5, 0xba, 0x48, 0x3c, 0x55, 0x34, 0xf2, 0x10, + 0x46, 0x11, 0xa3, 0xde, 0xec, 0x8a, 0xd3, 0x30, 0x15, 0xdc, 0x52, 0x0a, 0x25, 0xe3, 0x2b, 0x4e, + 0x43, 0x2d, 0x6b, 0xfe, 0xb3, 0x01, 0x4d, 0x8b, 0xfd, 0x31, 0x66, 0x91, 0x20, 0x7d, 0xa8, 0xba, + 0x0e, 0xee, 0xb6, 0x6d, 0x55, 0x5d, 0x87, 0x4c, 0x80, 0x58, 0x2c, 0xf4, 0xa4, 0x69, 0x37, 0xf0, + 0x0f, 0xbc, 0x38, 0x12, 0x8c, 0xeb, 0x3d, 0x97, 0x70, 0xc8, 0x5d, 0x68, 0x07, 0x21, 0xe3, 0x48, + 0x43, 0x07, 0xb4, 0xad, 0x8c, 0x20, 0x37, 0x1e, 0x52, 0x71, 0x6e, 0x6c, 0x21, 0x03, 0xbf, 0x25, + 0xcd, 0xa1, 0x82, 0x1a, 0x75, 0x45, 0x93, 0xdf, 0xc4, 0x84, 0x46, 0xc4, 0x6c, 0xce, 0x84, 0xd1, + 0xd8, 0xa9, 0xec, 0x76, 0xf6, 0x61, 0x12, 0xce, 0x27, 0xa7, 0x48, 0xb1, 0x34, 0x87, 0xdc, 0x85, + 0x2d, 0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75, 0xe4, 0x9a, 0x1a, 0x55, 0xf2, 0x32, 0x08, + 0x8b, 0x05, 0xb4, 0xf9, 0x29, 0x0c, 0xd6, 0x30, 0x25, 0x2f, 0x8f, 0x0f, 0x35, 0xa5, 0x98, 0xf3, + 0x54, 0xde, 0xc3, 0x8a, 0xb8, 0x92, 0x9f, 0xa8, 0xef, 0x84, 0x65, 0xc0, 0xf3, 0xa2, 0x78, 0x83, + 0xc3, 0xcb, 0xb3, 0xb1, 0x5e, 0xfa, 0x13, 0xe0, 0x19, 0xdf, 0x2e, 0xe3, 0xa4, 0x99, 0x97, 0xaf, + 0xfe, 0x1b, 0x99, 0xb7, 0x09, 0x0d, 0xef, 0x02, 0x64, 0x00, 0x90, 0x97, 0xc7, 0xe3, 0x5d, 0xc7, + 0x86, 0xf7, 0x01, 0xb2, 0xb2, 0xae, 0xa2, 0xa2, 0x88, 0x0a, 0x6a, 0xda, 0x7a, 0xe9, 0x7f, 0x08, + 0xed, 0xb4, 0x70, 0xe6, 0x6d, 0xa0, 0x82, 0xb5, 0x3a, 0xfc, 0x11, 0x0c, 0xd6, 0x6a, 0x7d, 0xa9, + 0x1d, 0x74, 0x4f, 0x29, 0x28, 0xbc, 0x80, 0x7e, 0xb1, 0x62, 0x92, 0xdb, 0xea, 0x52, 0x51, 0x52, + 0x7f, 0xc7, 0xe3, 0x32, 0x96, 0xf2, 0xec, 0xc7, 0x0f, 0x7f, 0xb7, 0xbb, 0x70, 0xc5, 0x79, 0x3c, + 0x9f, 0xd8, 0xc1, 0x72, 0xef, 0x9c, 0x46, 0xe7, 0xae, 0x1d, 0xf0, 0x70, 0xef, 0x52, 0x86, 0xe5, + 0x5e, 0xe1, 0x27, 0xe0, 0xbc, 0x81, 0x97, 0xe1, 0x27, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x88, + 0xcc, 0xb6, 0x05, 0x1c, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3527,6 +3611,8 @@ type SystemViewClient interface { // GroupsForEntity returns the group membership information for the given // entity id GroupsForEntity(ctx context.Context, in *EntityInfoArgs, opts ...grpc.CallOption) (*GroupsForEntityReply, error) + // PasswordPolicy returns a password policy if one exists + PasswordPolicy(ctx context.Context, in *PasswordPolicyRequest, opts ...grpc.CallOption) (*PasswordPolicyResponse, error) } type systemViewClient struct { @@ -3636,6 +3722,15 @@ func (c *systemViewClient) GroupsForEntity(ctx context.Context, in *EntityInfoAr return out, nil } +func (c *systemViewClient) PasswordPolicy(ctx context.Context, in *PasswordPolicyRequest, opts ...grpc.CallOption) (*PasswordPolicyResponse, error) { + out := new(PasswordPolicyResponse) + err := c.cc.Invoke(ctx, "/pb.SystemView/PasswordPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SystemViewServer is the server API for SystemView service. type SystemViewServer interface { // DefaultLeaseTTL returns the default lease TTL set in Vault configuration @@ -3674,6 +3769,8 @@ type SystemViewServer interface { // GroupsForEntity returns the group membership information for the given // entity id GroupsForEntity(context.Context, *EntityInfoArgs) (*GroupsForEntityReply, error) + // PasswordPolicy returns a password policy if one exists + PasswordPolicy(context.Context, *PasswordPolicyRequest) (*PasswordPolicyResponse, error) } // UnimplementedSystemViewServer can be embedded to have forward compatible implementations. @@ -3713,6 +3810,9 @@ func (*UnimplementedSystemViewServer) PluginEnv(ctx context.Context, req *Empty) func (*UnimplementedSystemViewServer) GroupsForEntity(ctx context.Context, req *EntityInfoArgs) (*GroupsForEntityReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GroupsForEntity not implemented") } +func (*UnimplementedSystemViewServer) PasswordPolicy(ctx context.Context, req *PasswordPolicyRequest) (*PasswordPolicyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PasswordPolicy not implemented") +} func RegisterSystemViewServer(s *grpc.Server, srv SystemViewServer) { s.RegisterService(&_SystemView_serviceDesc, srv) @@ -3916,6 +4016,24 @@ func _SystemView_GroupsForEntity_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _SystemView_PasswordPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PasswordPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SystemViewServer).PasswordPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.SystemView/PasswordPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SystemViewServer).PasswordPolicy(ctx, req.(*PasswordPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _SystemView_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.SystemView", HandlerType: (*SystemViewServer)(nil), @@ -3964,6 +4082,10 @@ var _SystemView_serviceDesc = grpc.ServiceDesc{ MethodName: "GroupsForEntity", Handler: _SystemView_GroupsForEntity_Handler, }, + { + MethodName: "PasswordPolicy", + Handler: _SystemView_PasswordPolicy_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "sdk/plugin/pb/backend.proto", diff --git a/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.proto b/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.proto index 7b910ea0f0dc..0d907b695596 100644 --- a/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.proto +++ b/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.proto @@ -554,6 +554,14 @@ message PluginEnvReply { string err = 2; } +message PasswordPolicyRequest { + string policy_name = 1; +} + +message PasswordPolicyResponse { + bytes raw_policy = 1; +} + // SystemView exposes system configuration information in a safe way for plugins // to consume. Plugins should implement the client for this service. service SystemView { @@ -603,6 +611,9 @@ service SystemView { // GroupsForEntity returns the group membership information for the given // entity id rpc GroupsForEntity(EntityInfoArgs) returns (GroupsForEntityReply); + + // PasswordPolicy returns a password policy if one exists + rpc PasswordPolicy(PasswordPolicyRequest) returns (PasswordPolicyResponse); } message Connection { diff --git a/vendor/modules.txt b/vendor/modules.txt index ef5dd7bc1dfb..ce1c07d98ea2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -193,7 +193,7 @@ github.com/containerd/continuity/pathdriver github.com/coreos/go-oidc # github.com/coreos/go-semver v0.2.0 github.com/coreos/go-semver/semver -# github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d +# github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7 github.com/coreos/go-systemd/journal # github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf github.com/coreos/pkg/capnslog @@ -462,6 +462,7 @@ github.com/hashicorp/vault/sdk/helper/pathmanager github.com/hashicorp/vault/sdk/helper/pluginutil github.com/hashicorp/vault/sdk/helper/pointerutil github.com/hashicorp/vault/sdk/helper/policyutil +github.com/hashicorp/vault/sdk/helper/random github.com/hashicorp/vault/sdk/helper/salt github.com/hashicorp/vault/sdk/helper/strutil github.com/hashicorp/vault/sdk/helper/tlsutil From 4a72f2dd1cc25c929a811ed73d75b4e0195dbc46 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Thu, 9 Apr 2020 15:05:39 -0600 Subject: [PATCH 14/29] Fix test with appropriate expected values --- vault/dynamic_system_view_test.go | 85 +++++-------------------------- 1 file changed, 14 insertions(+), 71 deletions(-) diff --git a/vault/dynamic_system_view_test.go b/vault/dynamic_system_view_test.go index bbf7df2e7978..8b4d326a7b6e 100644 --- a/vault/dynamic_system_view_test.go +++ b/vault/dynamic_system_view_test.go @@ -3,7 +3,6 @@ package vault import ( "context" "fmt" - "io" "reflect" "testing" "time" @@ -12,6 +11,7 @@ import ( ldapcred "github.com/hashicorp/vault/builtin/credential/ldap" "github.com/hashicorp/vault/helper/namespace" "github.com/hashicorp/vault/sdk/framework" + "github.com/hashicorp/vault/sdk/helper/random" "github.com/hashicorp/vault/sdk/logical" ) @@ -160,28 +160,28 @@ func TestDynamicSystemView_PasswordPolicy(t *testing.T) { policyName string getEntry *logical.StorageEntry getErr error - expectedPolicy string + expectedPolicy logical.PasswordPolicy expectErr bool } tests := map[string]testCase{ "no policy name": { policyName: "", - expectedPolicy: "", + expectedPolicy: nil, expectErr: true, }, "no policy found": { policyName: "testpolicy", getEntry: nil, getErr: nil, - expectedPolicy: "", - expectErr: true, + expectedPolicy: nil, + expectErr: false, }, "error retrieving policy": { policyName: "testpolicy", getEntry: nil, getErr: fmt.Errorf("a test error"), - expectedPolicy: "", + expectedPolicy: nil, expectErr: true, }, "saved policy is malformed": { @@ -191,7 +191,7 @@ func TestDynamicSystemView_PasswordPolicy(t *testing.T) { Value: []byte(`{"policy":"asdfahsdfasdf"}`), }, getErr: nil, - expectedPolicy: "", + expectedPolicy: nil, expectErr: true, }, "good saved policy": { @@ -200,9 +200,12 @@ func TestDynamicSystemView_PasswordPolicy(t *testing.T) { Key: getPasswordPolicyKey("testpolicy"), Value: []byte(`{"policy":"length=8\ncharset=\"ABCDE\""}`), }, - getErr: nil, - expectedPolicy: "length=8\ncharset=\"ABCDE\"", - expectErr: false, + getErr: nil, + expectedPolicy: random.StringGenerator{ + Length: 8, + Charset: []rune("ABCDE"), + }, + expectErr: false, }, } @@ -215,7 +218,7 @@ func TestDynamicSystemView_PasswordPolicy(t *testing.T) { dsv := dynamicSystemView{ core: &Core{ - barrier: testStorage, + systemBarrierView: NewBarrierView(testStorage, "sys/"), }, } ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) @@ -252,63 +255,3 @@ func (b fakeBarrier) Put(context.Context, *logical.StorageEntry) error { func (b fakeBarrier) Delete(context.Context, string) error { return fmt.Errorf("not implemented") } -func (b fakeBarrier) Initialized(ctx context.Context) (bool, error) { - return false, fmt.Errorf("not implemented") -} -func (b fakeBarrier) Initialize(ctx context.Context, masterKey []byte, sealKey []byte, random io.Reader) error { - return fmt.Errorf("not implemented") -} -func (b fakeBarrier) GenerateKey(io.Reader) ([]byte, error) { - return nil, fmt.Errorf("not implemented") -} -func (b fakeBarrier) KeyLength() (int, int) { - return 0, 0 -} -func (b fakeBarrier) Sealed() (bool, error) { - return false, fmt.Errorf("not implemented") -} -func (b fakeBarrier) Unseal(ctx context.Context, key []byte) error { - return fmt.Errorf("not implemented") -} -func (b fakeBarrier) VerifyMaster(key []byte) error { - return fmt.Errorf("not implemented") -} -func (b fakeBarrier) SetMasterKey(key []byte) error { - return fmt.Errorf("not implemented") -} -func (b fakeBarrier) ReloadKeyring(ctx context.Context) error { - return fmt.Errorf("not implemented") -} -func (b fakeBarrier) ReloadMasterKey(ctx context.Context) error { - return fmt.Errorf("not implemented") -} -func (b fakeBarrier) Seal() error { - return fmt.Errorf("not implemented") -} -func (b fakeBarrier) Rotate(ctx context.Context, reader io.Reader) (uint32, error) { - return 0, fmt.Errorf("not implemented") -} -func (b fakeBarrier) CreateUpgrade(ctx context.Context, term uint32) error { - return fmt.Errorf("not implemented") -} -func (b fakeBarrier) DestroyUpgrade(ctx context.Context, term uint32) error { - return fmt.Errorf("not implemented") -} -func (b fakeBarrier) CheckUpgrade(ctx context.Context) (bool, uint32, error) { - return false, 0, fmt.Errorf("not implemented") -} -func (b fakeBarrier) ActiveKeyInfo() (*KeyInfo, error) { - return nil, fmt.Errorf("not implemented") -} -func (b fakeBarrier) Rekey(context.Context, []byte) error { - return fmt.Errorf("not implemented") -} -func (b fakeBarrier) Keyring() (*Keyring, error) { - return nil, fmt.Errorf("not implemented") -} -func (b fakeBarrier) Encrypt(ctx context.Context, key string, plaintext []byte) ([]byte, error) { - return nil, fmt.Errorf("not implemented") -} -func (b fakeBarrier) Decrypt(ctx context.Context, key string, ciphertext []byte) ([]byte, error) { - return nil, fmt.Errorf("not implemented") -} From 9058647c2beac815b8c1d10eaf7fda0116a19c66 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Thu, 9 Apr 2020 15:38:12 -0600 Subject: [PATCH 15/29] Update mapstructure library to 1.2.2 --- api/go.mod | 2 +- api/go.sum | 2 + vendor/github.com/hashicorp/vault/api/go.mod | 2 +- vendor/github.com/hashicorp/vault/api/go.sum | 2 + .../vault/sdk/helper/random/parser.go | 16 +- .../vault/sdk/helper/random/registry.go | 4 + .../vault/sdk/helper/random/serializing.go | 14 ++ vendor/github.com/kr/pretty/License | 2 - vendor/github.com/kr/pretty/formatter.go | 3 +- vendor/github.com/kr/pretty/go.mod | 6 +- vendor/github.com/kr/pretty/go.sum | 3 + vendor/github.com/kr/pretty/pretty.go | 2 +- .../mitchellh/mapstructure/.travis.yml | 1 + .../mitchellh/mapstructure/CHANGELOG.md | 19 ++ .../github.com/mitchellh/mapstructure/go.mod | 2 + .../mitchellh/mapstructure/mapstructure.go | 216 +++++++++++++++--- vendor/modules.txt | 4 +- 17 files changed, 253 insertions(+), 47 deletions(-) create mode 100644 vendor/github.com/kr/pretty/go.sum diff --git a/api/go.mod b/api/go.mod index 29810c6ca955..c52c227a021b 100644 --- a/api/go.mod +++ b/api/go.mod @@ -13,7 +13,7 @@ require ( github.com/hashicorp/go-rootcerts v1.0.1 github.com/hashicorp/hcl v1.0.0 github.com/hashicorp/vault/sdk v0.1.14-0.20200215195600-2ca765f0a500 - github.com/mitchellh/mapstructure v1.1.2 + github.com/mitchellh/mapstructure v1.2.2 golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 gopkg.in/square/go-jose.v2 v2.3.1 diff --git a/api/go.sum b/api/go.sum index 56fb28110555..018adbf1495b 100644 --- a/api/go.sum +++ b/api/go.sum @@ -74,6 +74,8 @@ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eI github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.2.2 h1:dxe5oCinTXiTIcfgmZecdCzPmAJKd46KsCWc35r0TV4= +github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= diff --git a/vendor/github.com/hashicorp/vault/api/go.mod b/vendor/github.com/hashicorp/vault/api/go.mod index 29810c6ca955..c52c227a021b 100644 --- a/vendor/github.com/hashicorp/vault/api/go.mod +++ b/vendor/github.com/hashicorp/vault/api/go.mod @@ -13,7 +13,7 @@ require ( github.com/hashicorp/go-rootcerts v1.0.1 github.com/hashicorp/hcl v1.0.0 github.com/hashicorp/vault/sdk v0.1.14-0.20200215195600-2ca765f0a500 - github.com/mitchellh/mapstructure v1.1.2 + github.com/mitchellh/mapstructure v1.2.2 golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 gopkg.in/square/go-jose.v2 v2.3.1 diff --git a/vendor/github.com/hashicorp/vault/api/go.sum b/vendor/github.com/hashicorp/vault/api/go.sum index 56fb28110555..018adbf1495b 100644 --- a/vendor/github.com/hashicorp/vault/api/go.sum +++ b/vendor/github.com/hashicorp/vault/api/go.sum @@ -74,6 +74,8 @@ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eI github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.2.2 h1:dxe5oCinTXiTIcfgmZecdCzPmAJKd46KsCWc35r0TV4= +github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go index 3ce384e15446..9abbe93ab278 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go @@ -60,7 +60,7 @@ func (p Parser) Parse(raw string) (strs StringGenerator, err error) { return strs, fmt.Errorf("unable to retrieve rules: %w", err) } - rules, err := p.parseRules(rawRules) + rules, err := parseRules(p.RuleRegistry, rawRules) if err != nil { return strs, fmt.Errorf("unable to parse rules: %w", err) } @@ -83,7 +83,7 @@ func (p Parser) Parse(raw string) (strs StringGenerator, err error) { return strs, nil } -func (p Parser) parseRules(rawRules []map[string]interface{}) (rules []Rule, err error) { +func parseRules(registry Registry, rawRules []map[string]interface{}) (rules []Rule, err error) { for _, rawRule := range rawRules { info, err := getRuleInfo(rawRule) if err != nil { @@ -93,7 +93,7 @@ func (p Parser) parseRules(rawRules []map[string]interface{}) (rules []Rule, err // Map names like "lower-alpha" to lowercase alphabetical characters applyShortcuts(info.data) - rule, err := p.RuleRegistry.parseRule(info.ruleType, info.data) + rule, err := registry.parseRule(info.ruleType, info.data) if err != nil { return nil, fmt.Errorf("unable to parse rule %s: %w", info.ruleType, err) } @@ -163,12 +163,12 @@ func getMapSlice(m map[string]interface{}, key string) (mapSlice []map[string]in return nil, nil } - slice, ok := rawSlice.([]map[string]interface{}) - if !ok { - return nil, fmt.Errorf("key %s is not a []map[string]interface{}", key) + mapSlice = []map[string]interface{}{} + err = mapstructure.Decode(rawSlice, &mapSlice) + if err != nil { + return nil, err } - - return slice, nil + return mapSlice, nil } type ruleInfo struct { diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go index 0b8168c0ee46..3b3ac1c53492 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go @@ -12,6 +12,10 @@ var ( defaultRuleNameMapping = map[string]ruleConstructor{ "CharsetRestriction": ParseCharsetRestriction, } + + defaultRegistry = Registry{ + Rules: defaultRuleNameMapping, + } ) // Registry of HCL rule names to rule constructors. diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go index ea56e1ffeb86..a5f362442e33 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go @@ -51,6 +51,20 @@ func (r serializableRules) MarshalJSON() (b []byte, err error) { return b, err } +func (r *serializableRules) UnmarshalJSON(data []byte) (err error) { + mapData := []map[string]interface{}{} + err = json.Unmarshal(data, &mapData) + if err != nil { + return err + } + rules, err := parseRules(defaultRegistry, mapData) + if err != nil { + return err + } + *r = rules + return nil +} + type runes []rune func (r runes) Len() int { return len(r) } diff --git a/vendor/github.com/kr/pretty/License b/vendor/github.com/kr/pretty/License index 05c783ccf68a..480a32805999 100644 --- a/vendor/github.com/kr/pretty/License +++ b/vendor/github.com/kr/pretty/License @@ -1,5 +1,3 @@ -The MIT License (MIT) - Copyright 2012 Keith Rarick Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/vendor/github.com/kr/pretty/formatter.go b/vendor/github.com/kr/pretty/formatter.go index a317d7b8ee88..df61d8d19e6c 100644 --- a/vendor/github.com/kr/pretty/formatter.go +++ b/vendor/github.com/kr/pretty/formatter.go @@ -125,7 +125,6 @@ func (p *printer) printValue(v reflect.Value, showType, quote bool) { } keys := v.MapKeys() for i := 0; i < v.Len(); i++ { - showTypeInStruct := true k := keys[i] mv := v.MapIndex(k) pp.printValue(k, false, true) @@ -133,7 +132,7 @@ func (p *printer) printValue(v reflect.Value, showType, quote bool) { if expand { writeByte(pp, '\t') } - showTypeInStruct = t.Elem().Kind() == reflect.Interface + showTypeInStruct := t.Elem().Kind() == reflect.Interface pp.printValue(mv, showTypeInStruct, true) if expand { io.WriteString(pp, ",\n") diff --git a/vendor/github.com/kr/pretty/go.mod b/vendor/github.com/kr/pretty/go.mod index 1e29533143ee..9a27b6e9648d 100644 --- a/vendor/github.com/kr/pretty/go.mod +++ b/vendor/github.com/kr/pretty/go.mod @@ -1,3 +1,5 @@ -module "github.com/kr/pretty" +module github.com/kr/pretty -require "github.com/kr/text" v0.1.0 +go 1.12 + +require github.com/kr/text v0.1.0 diff --git a/vendor/github.com/kr/pretty/go.sum b/vendor/github.com/kr/pretty/go.sum new file mode 100644 index 000000000000..714f82a2016e --- /dev/null +++ b/vendor/github.com/kr/pretty/go.sum @@ -0,0 +1,3 @@ +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= diff --git a/vendor/github.com/kr/pretty/pretty.go b/vendor/github.com/kr/pretty/pretty.go index 49423ec7f540..b4ca583c021f 100644 --- a/vendor/github.com/kr/pretty/pretty.go +++ b/vendor/github.com/kr/pretty/pretty.go @@ -75,7 +75,7 @@ func Printf(format string, a ...interface{}) (n int, errno error) { // Println pretty-prints its operands and writes to standard output. // -// Calling Print(x, y) is equivalent to +// Calling Println(x, y) is equivalent to // fmt.Println(Formatter(x), Formatter(y)), but each operand is // formatted with "%# v". func Println(a ...interface{}) (n int, errno error) { diff --git a/vendor/github.com/mitchellh/mapstructure/.travis.yml b/vendor/github.com/mitchellh/mapstructure/.travis.yml index 1689c7d73554..b122a8e3d9f8 100644 --- a/vendor/github.com/mitchellh/mapstructure/.travis.yml +++ b/vendor/github.com/mitchellh/mapstructure/.travis.yml @@ -6,3 +6,4 @@ go: script: - go test + - go test -bench . -benchmem diff --git a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md index 3b3cb723f817..0a21e2cd1b09 100644 --- a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md +++ b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md @@ -1,3 +1,22 @@ +## 1.2.2 + +* Do not add unsettable (unexported) values to the unused metadata key + or "remain" value. [GH-150] + +## 1.2.1 + +* Go modules checksum mismatch fix + +## 1.2.0 + +* Added support to capture unused values in a field using the `",remain"` value + in the mapstructure tag. There is an example to showcase usage. +* Added `DecoderConfig` option to always squash embedded structs +* `json.Number` can decode into `uint` types +* Empty slices are preserved and not replaced with nil slices +* Fix panic that can occur in when decoding a map into a nil slice of structs +* Improved package documentation for godoc + ## 1.1.2 * Fix error when decode hook decodes interface implementation into interface diff --git a/vendor/github.com/mitchellh/mapstructure/go.mod b/vendor/github.com/mitchellh/mapstructure/go.mod index d2a712562082..a03ae973088a 100644 --- a/vendor/github.com/mitchellh/mapstructure/go.mod +++ b/vendor/github.com/mitchellh/mapstructure/go.mod @@ -1 +1,3 @@ module github.com/mitchellh/mapstructure + +go 1.14 diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go index 256ee63fbf3e..daea3318e03c 100644 --- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go +++ b/vendor/github.com/mitchellh/mapstructure/mapstructure.go @@ -1,10 +1,109 @@ -// Package mapstructure exposes functionality to convert an arbitrary -// map[string]interface{} into a native Go structure. +// Package mapstructure exposes functionality to convert one arbitrary +// Go type into another, typically to convert a map[string]interface{} +// into a native Go structure. // // The Go structure can be arbitrarily complex, containing slices, // other structs, etc. and the decoder will properly decode nested // maps and so on into the proper structures in the native Go struct. // See the examples to see what the decoder is capable of. +// +// The simplest function to start with is Decode. +// +// Field Tags +// +// When decoding to a struct, mapstructure will use the field name by +// default to perform the mapping. For example, if a struct has a field +// "Username" then mapstructure will look for a key in the source value +// of "username" (case insensitive). +// +// type User struct { +// Username string +// } +// +// You can change the behavior of mapstructure by using struct tags. +// The default struct tag that mapstructure looks for is "mapstructure" +// but you can customize it using DecoderConfig. +// +// Renaming Fields +// +// To rename the key that mapstructure looks for, use the "mapstructure" +// tag and set a value directly. For example, to change the "username" example +// above to "user": +// +// type User struct { +// Username string `mapstructure:"user"` +// } +// +// Embedded Structs and Squashing +// +// Embedded structs are treated as if they're another field with that name. +// By default, the two structs below are equivalent when decoding with +// mapstructure: +// +// type Person struct { +// Name string +// } +// +// type Friend struct { +// Person +// } +// +// type Friend struct { +// Person Person +// } +// +// This would require an input that looks like below: +// +// map[string]interface{}{ +// "person": map[string]interface{}{"name": "alice"}, +// } +// +// If your "person" value is NOT nested, then you can append ",squash" to +// your tag value and mapstructure will treat it as if the embedded struct +// were part of the struct directly. Example: +// +// type Friend struct { +// Person `mapstructure:",squash"` +// } +// +// Now the following input would be accepted: +// +// map[string]interface{}{ +// "name": "alice", +// } +// +// DecoderConfig has a field that changes the behavior of mapstructure +// to always squash embedded structs. +// +// Remainder Values +// +// If there are any unmapped keys in the source value, mapstructure by +// default will silently ignore them. You can error by setting ErrorUnused +// in DecoderConfig. If you're using Metadata you can also maintain a slice +// of the unused keys. +// +// You can also use the ",remain" suffix on your tag to collect all unused +// values in a map. The field with this tag MUST be a map type and should +// probably be a "map[string]interface{}" or "map[interface{}]interface{}". +// See example below: +// +// type Friend struct { +// Name string +// Other map[string]interface{} `mapstructure:",remain"` +// } +// +// Given the input below, Other would be populated with the other +// values that weren't used (everything but "name"): +// +// map[string]interface{}{ +// "name": "bob", +// "address": "123 Maple St.", +// } +// +// Other Configuration +// +// mapstructure is highly configurable. See the DecoderConfig struct +// for other features and options that are supported. package mapstructure import ( @@ -80,6 +179,14 @@ type DecoderConfig struct { // WeaklyTypedInput bool + // Squash will squash embedded structs. A squash tag may also be + // added to an individual struct field using a tag. For example: + // + // type Parent struct { + // Child `mapstructure:",squash"` + // } + Squash bool + // Metadata is the struct that will contain extra metadata about // the decoding. If this is nil, then no metadata will be tracked. Metadata *Metadata @@ -438,6 +545,7 @@ func (d *Decoder) decodeInt(name string, data interface{}, val reflect.Value) er func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) error { dataVal := reflect.Indirect(reflect.ValueOf(data)) dataKind := getKind(dataVal) + dataType := dataVal.Type() switch { case dataKind == reflect.Int: @@ -469,6 +577,18 @@ func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) e } else { return fmt.Errorf("cannot parse '%s' as uint: %s", name, err) } + case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": + jn := data.(json.Number) + i, err := jn.Int64() + if err != nil { + return fmt.Errorf( + "error decoding json.Number into %s: %s", name, err) + } + if i < 0 && !d.config.WeaklyTypedInput { + return fmt.Errorf("cannot parse '%s', %d overflows uint", + name, i) + } + val.SetUint(uint64(i)) default: return fmt.Errorf( "'%s' expected type '%s', got unconvertible type '%s'", @@ -689,16 +809,19 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re keyName = tagParts[0] } + // If Squash is set in the config, we squash the field down. + squash := d.config.Squash && v.Kind() == reflect.Struct // If "squash" is specified in the tag, we squash the field down. - squash := false - for _, tag := range tagParts[1:] { - if tag == "squash" { - squash = true - break + if !squash { + for _, tag := range tagParts[1:] { + if tag == "squash" { + squash = true + break + } + } + if squash && v.Kind() != reflect.Struct { + return fmt.Errorf("cannot squash non-struct type '%s'", v.Type()) } - } - if squash && v.Kind() != reflect.Struct { - return fmt.Errorf("cannot squash non-struct type '%s'", v.Type()) } switch v.Kind() { @@ -805,8 +928,8 @@ func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) valElemType := valType.Elem() sliceType := reflect.SliceOf(valElemType) - valSlice := val - if valSlice.IsNil() || d.config.ZeroFields { + // If we have a non array/slice type then we first attempt to convert. + if dataValKind != reflect.Array && dataValKind != reflect.Slice { if d.config.WeaklyTypedInput { switch { // Slice and array we use the normal logic @@ -833,18 +956,17 @@ func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) } } - // Check input type - if dataValKind != reflect.Array && dataValKind != reflect.Slice { - return fmt.Errorf( - "'%s': source data must be an array or slice, got %s", name, dataValKind) - - } + return fmt.Errorf( + "'%s': source data must be an array or slice, got %s", name, dataValKind) + } - // If the input value is empty, then don't allocate since non-nil != nil - if dataVal.Len() == 0 { - return nil - } + // If the input value is nil, then don't allocate since empty != nil + if dataVal.IsNil() { + return nil + } + valSlice := val + if valSlice.IsNil() || d.config.ZeroFields { // Make a new slice to hold our result, same size as the original data. valSlice = reflect.MakeSlice(sliceType, dataVal.Len(), dataVal.Len()) } @@ -1005,6 +1127,11 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e field reflect.StructField val reflect.Value } + + // remainField is set to a valid field set with the "remain" tag if + // we are keeping track of remaining values. + var remainField *field + fields := []field{} for len(structs) > 0 { structVal := structs[0] @@ -1017,13 +1144,21 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e fieldKind := fieldType.Type.Kind() // If "squash" is specified in the tag, we squash the field down. - squash := false + squash := d.config.Squash && fieldKind == reflect.Struct + remain := false + + // We always parse the tags cause we're looking for other tags too tagParts := strings.Split(fieldType.Tag.Get(d.config.TagName), ",") for _, tag := range tagParts[1:] { if tag == "squash" { squash = true break } + + if tag == "remain" { + remain = true + break + } } if squash { @@ -1036,8 +1171,14 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e continue } - // Normal struct field, store it away - fields = append(fields, field{fieldType, structVal.Field(i)}) + // Build our field + fieldCurrent := field{fieldType, structVal.Field(i)} + if remain { + remainField = &fieldCurrent + } else { + // Normal struct field, store it away + fields = append(fields, field{fieldType, structVal.Field(i)}) + } } } @@ -1078,9 +1219,6 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e } } - // Delete the key we're using from the unused map so we stop tracking - delete(dataValKeysUnused, rawMapKey.Interface()) - if !fieldValue.IsValid() { // This should never happen panic("field is not valid") @@ -1092,6 +1230,9 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e continue } + // Delete the key we're using from the unused map so we stop tracking + delete(dataValKeysUnused, rawMapKey.Interface()) + // If the name is empty string, then we're at the root, and we // don't dot-join the fields. if name != "" { @@ -1103,6 +1244,25 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e } } + // If we have a "remain"-tagged field and we have unused keys then + // we put the unused keys directly into the remain field. + if remainField != nil && len(dataValKeysUnused) > 0 { + // Build a map of only the unused values + remain := map[interface{}]interface{}{} + for key := range dataValKeysUnused { + remain[key] = dataVal.MapIndex(reflect.ValueOf(key)).Interface() + } + + // Decode it as-if we were just decoding this map onto our map. + if err := d.decodeMap(name, remain, remainField.val); err != nil { + errors = appendErrors(errors, err) + } + + // Set the map to nil so we have none so that the next check will + // not error (ErrorUnused) + dataValKeysUnused = nil + } + if d.config.ErrorUnused && len(dataValKeysUnused) > 0 { keys := make([]string, 0, len(dataValKeysUnused)) for rawKey := range dataValKeysUnused { diff --git a/vendor/modules.txt b/vendor/modules.txt index ce1c07d98ea2..31c842ee74c2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -570,7 +570,7 @@ github.com/keybase/go-crypto/openpgp/s2k github.com/keybase/go-crypto/rsa # github.com/konsorten/go-windows-terminal-sequences v1.0.1 github.com/konsorten/go-windows-terminal-sequences -# github.com/kr/pretty v0.1.0 +# github.com/kr/pretty v0.2.0 github.com/kr/pretty # github.com/kr/text v0.1.0 github.com/kr/text @@ -600,7 +600,7 @@ github.com/mitchellh/go-homedir github.com/mitchellh/go-testing-interface # github.com/mitchellh/hashstructure v1.0.0 github.com/mitchellh/hashstructure -# github.com/mitchellh/mapstructure v1.1.2 +# github.com/mitchellh/mapstructure v1.2.2 github.com/mitchellh/mapstructure # github.com/mitchellh/pointerstructure v0.0.0-20190430161007-f252a8fd71c8 github.com/mitchellh/pointerstructure From c3fca8aa92ea9e7a78abc7386da8493bfe42b6f7 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Fri, 17 Apr 2020 15:41:36 -0600 Subject: [PATCH 16/29] A number of changes based on conversations with @jefferai * Removed the charset variable on the StringGenerator. Charsets will be determined from the rules and nowhere else. * Changed min-chars to min_chars * Removed the "shortcut" variables because they presented a future compatibility problem * Some refactoring around the StringGenerator to make it more conducive to non-HCL use. --- api/go.sum | 2 - sdk/database/dbplugin/database.pb.go | 4 - sdk/helper/random/parser.go | 146 +----- sdk/helper/random/parser_test.go | 367 ++------------- sdk/helper/random/registry.go | 5 +- sdk/helper/random/registry_test.go | 15 +- sdk/helper/random/rules.go | 22 +- sdk/helper/random/rules_test.go | 4 +- sdk/helper/random/serializing.go | 4 +- sdk/helper/random/serializing_test.go | 23 +- sdk/helper/random/string_generator.go | 118 ++++- sdk/helper/random/string_generator_test.go | 383 ++++++++++++--- sdk/logical/system_view.go | 15 +- sdk/plugin/grpc_system.go | 35 +- sdk/plugin/grpc_system_test.go | 31 +- sdk/plugin/pb/backend.pb.go | 440 +++++++++--------- sdk/plugin/pb/backend.proto | 12 +- vault/dynamic_system_view.go | 12 +- vault/dynamic_system_view_test.go | 130 ++++-- vault/logical_system_test.go | 123 +++-- vendor/github.com/hashicorp/vault/api/go.sum | 2 - .../sdk/database/dbplugin/database.pb.go | 4 - .../vault/sdk/helper/random/parser.go | 146 +----- .../vault/sdk/helper/random/registry.go | 5 +- .../vault/sdk/helper/random/rules.go | 22 +- .../vault/sdk/helper/random/serializing.go | 4 +- .../sdk/helper/random/string_generator.go | 118 ++++- .../vault/sdk/logical/system_view.go | 15 +- .../hashicorp/vault/sdk/plugin/grpc_system.go | 35 +- .../vault/sdk/plugin/pb/backend.pb.go | 440 +++++++++--------- .../vault/sdk/plugin/pb/backend.proto | 12 +- 31 files changed, 1364 insertions(+), 1330 deletions(-) diff --git a/api/go.sum b/api/go.sum index 018adbf1495b..035be8361a26 100644 --- a/api/go.sum +++ b/api/go.sum @@ -72,8 +72,6 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.2.2 h1:dxe5oCinTXiTIcfgmZecdCzPmAJKd46KsCWc35r0TV4= github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= diff --git a/sdk/database/dbplugin/database.pb.go b/sdk/database/dbplugin/database.pb.go index 943443f3c6d5..c820015136cc 100644 --- a/sdk/database/dbplugin/database.pb.go +++ b/sdk/database/dbplugin/database.pb.go @@ -959,8 +959,6 @@ type DatabaseClient interface { Close(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) SetCredentials(ctx context.Context, in *SetCredentialsRequest, opts ...grpc.CallOption) (*SetCredentialsResponse, error) GenerateCredentials(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GenerateCredentialsResponse, error) - // - // Deprecated: Do not use. Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*Empty, error) } @@ -1074,8 +1072,6 @@ type DatabaseServer interface { Close(context.Context, *Empty) (*Empty, error) SetCredentials(context.Context, *SetCredentialsRequest) (*SetCredentialsResponse, error) GenerateCredentials(context.Context, *Empty) (*GenerateCredentialsResponse, error) - // - // Deprecated: Do not use. Initialize(context.Context, *InitializeRequest) (*Empty, error) } diff --git a/sdk/helper/random/parser.go b/sdk/helper/random/parser.go index 9abbe93ab278..5510ad4e5cbb 100644 --- a/sdk/helper/random/parser.go +++ b/sdk/helper/random/parser.go @@ -3,11 +3,8 @@ package random import ( "fmt" "reflect" - "sort" - "unicode" "unicode/utf8" - "github.com/hashicorp/go-multierror" "github.com/hashicorp/hcl" "github.com/mitchellh/mapstructure" ) @@ -33,54 +30,50 @@ type Parser struct { } // Parse parses the provided HCL into a StringGenerator. -func (p Parser) Parse(raw string) (strs StringGenerator, err error) { +func (p Parser) Parse(raw string) (sg StringGenerator, err error) { rawData := map[string]interface{}{} err = hcl.Decode(&rawData, raw) if err != nil { - return strs, fmt.Errorf("unable to decode: %w", err) + return sg, fmt.Errorf("unable to decode: %w", err) } // Decode the top level items + gen := StringGenerator{} decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ - Result: &strs, + Result: &gen, DecodeHook: stringToRunesFunc, }) if err != nil { - return strs, fmt.Errorf("unable to decode configuration: %w", err) + return sg, fmt.Errorf("unable to decode configuration: %w", err) } err = decoder.Decode(rawData) if err != nil { - return strs, fmt.Errorf("failed to decode configuration: %w", err) + return sg, fmt.Errorf("failed to decode configuration: %w", err) } // Decode & parse rules rawRules, err := getMapSlice(rawData, "rule") if err != nil { - return strs, fmt.Errorf("unable to retrieve rules: %w", err) + return sg, fmt.Errorf("unable to retrieve rules: %w", err) } rules, err := parseRules(p.RuleRegistry, rawRules) if err != nil { - return strs, fmt.Errorf("unable to parse rules: %w", err) + return sg, fmt.Errorf("unable to parse rules: %w", err) } - // Add any charsets found in rules to the overall charset & deduplicate - cs := append(strs.Charset, getChars(rules)...) - cs = deduplicateRunes(cs) - - strs = StringGenerator{ - Length: strs.Length, - Charset: cs, - Rules: rules, + gen = StringGenerator{ + Length: gen.Length, + Rules: rules, } - err = validate(strs) + err = gen.validateConfig() if err != nil { - return strs, err + return sg, err } - return strs, nil + return gen, nil } func parseRules(registry Registry, rawRules []map[string]interface{}) (rules []Rule, err error) { @@ -91,7 +84,7 @@ func parseRules(registry Registry, rawRules []map[string]interface{}) (rules []R } // Map names like "lower-alpha" to lowercase alphabetical characters - applyShortcuts(info.data) + // applyShortcuts(info.data) rule, err := registry.parseRule(info.ruleType, info.data) if err != nil { @@ -103,57 +96,6 @@ func parseRules(registry Registry, rawRules []map[string]interface{}) (rules []R return rules, nil } -func validate(strs StringGenerator) (err error) { - type minLengthProvider interface { - MinLength() int - } - - merr := &multierror.Error{} - if strs.Length < 1 { - merr = multierror.Append(merr, fmt.Errorf("length must be >= 1")) - } - if len(strs.Charset) == 0 { - merr = multierror.Append(merr, fmt.Errorf("no charset specified")) - } - - minLengthRules := 0 - for _, rule := range strs.Rules { - mlp, ok := rule.(minLengthProvider) - if !ok { - continue - } - minLengthRules += mlp.MinLength() - } - - if minLengthRules > strs.Length { - merr = multierror.Append(merr, fmt.Errorf("specified rules require at least %d characters but %d is specified", minLengthRules, strs.Length)) - } - - for _, r := range strs.Charset { - if !unicode.IsPrint(r) { - merr = multierror.Append(merr, fmt.Errorf("non-printable character in charset")) - break - } - } - - return merr.ErrorOrNil() -} - -func getChars(rules []Rule) (chars []rune) { - type charsetProvider interface { - Chars() []rune - } - - for _, rule := range rules { - cp, ok := rule.(charsetProvider) - if !ok { - continue - } - chars = append(chars, cp.Chars()...) - } - return chars -} - // getMapSlice from the provided map. This will retrieve and type-assert a []map[string]interface{} from the map // This will not error if the key does not exist // This will return an error if the value at the provided key is not of type []map[string]interface{} @@ -193,64 +135,6 @@ func getRuleInfo(rule map[string]interface{}) (data ruleInfo, err error) { return data, fmt.Errorf("rule is empty") } -var ( - charsetShortcuts = map[string]string{ - // Base - "lower-alpha": LowercaseCharset, - "upper-alpha": UppercaseCharset, - "numeric": NumericCharset, - - // Combinations - "lower-upper-alpha": AlphabeticCharset, - "lower-upper-alphanumeric": AlphaNumericCharset, - } -) - -// applyShortcuts to the provided map. This will look for a "charset" key. If it exists and equals one of the keys -// in `charsetShortcuts`, it replaces the value with the value found in the `charsetShortcuts` map. For instance: -// -// Input map: -// map[string]interface{}{ -// "charset": "upper-alpha", -// } -// -// This will convert it to: -// map[string]interface{}{ -// "charset": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", -// } -func applyShortcuts(m map[string]interface{}) { - rawCharset, exists := m["charset"] - if !exists { - return - } - charset, ok := rawCharset.(string) - if !ok { - return - } - newCharset, shortcutExists := charsetShortcuts[charset] - if !shortcutExists { - return - } - m["charset"] = newCharset -} - -func deduplicateRunes(original []rune) (deduped []rune) { - m := map[rune]bool{} - dedupedRunes := []rune(nil) - - for _, r := range original { - if m[r] { - continue - } - m[r] = true - dedupedRunes = append(dedupedRunes, r) - } - - // They don't have to be sorted, but this is being done to make the charset easier to visualize - sort.Sort(runes(dedupedRunes)) - return dedupedRunes -} - func stringToRunesFunc(from reflect.Kind, to reflect.Kind, data interface{}) (interface{}, error) { if from != reflect.String || to != reflect.Slice { return data, nil diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index b3f1d8346acf..865f9088f702 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -17,32 +17,26 @@ func TestParse(t *testing.T) { "unrecognized rule": { rawConfig: ` length = 20 - charset = "abcde" rule "testrule" { string = "teststring" int = 123 }`, - expected: StringGenerator{ - Length: 20, - Charset: []rune("abcde"), - Rules: nil, - }, + expected: StringGenerator{}, expectErr: true, }, "charset restrictions": { rawConfig: ` length = 20 - charset = "abcde" - rule "CharsetRestriction" { + rule "Charset" { charset = "abcde" - min-chars = 2 + min_chars = 2 }`, expected: StringGenerator{ Length: 20, - Charset: []rune("abcde"), + charset: []rune("abcde"), Rules: []Rule{ - &CharsetRestriction{ + Charset{ Charset: []rune("abcde"), MinChars: 2, }, @@ -91,53 +85,46 @@ func TestParser_Parse(t *testing.T) { expected: StringGenerator{}, expectErr: true, }, - "config with length and charset": { + "config with only length": { registry: defaultRuleNameMapping, rawConfig: ` - length = 20 - charset = "abcde"`, - expected: StringGenerator{ - Length: 20, - Charset: []rune("abcde"), - }, - expectErr: false, + length = 20`, + expected: StringGenerator{}, + expectErr: true, }, "config with zero length": { registry: defaultRuleNameMapping, rawConfig: ` length = 0 - charset = "abcde"`, - expected: StringGenerator{ - Length: 0, - Charset: []rune("abcde"), - }, + rule "Charset" { + charset = "abcde" + }`, + expected: StringGenerator{}, expectErr: true, }, "config with negative length": { registry: defaultRuleNameMapping, rawConfig: ` length = -2 - charset = "abcde"`, - expected: StringGenerator{ - Length: -2, - Charset: []rune("abcde"), - }, + rule "Charset" { + charset = "abcde" + }`, + expected: StringGenerator{}, expectErr: true, }, "charset restrictions": { registry: defaultRuleNameMapping, rawConfig: ` length = 20 - charset = "abcde" - rule "CharsetRestriction" { + rule "Charset" { charset = "abcde" - min-chars = 2 + min_chars = 2 }`, expected: StringGenerator{ Length: 20, - Charset: []rune("abcde"), + charset: []rune("abcde"), Rules: []Rule{ - &CharsetRestriction{ + Charset{ Charset: []rune("abcde"), MinChars: 2, }, @@ -151,16 +138,15 @@ func TestParser_Parse(t *testing.T) { }, rawConfig: ` length = 20 - charset = "abcde" rule "testrule" { string = "teststring" int = 123 }`, expected: StringGenerator{ Length: 20, - Charset: []rune("abcde"), + charset: deduplicateRunes([]rune("teststring")), Rules: []Rule{ - &testRule{ + testCharsetRule{ String: "teststring", Integer: 123, }, @@ -170,29 +156,28 @@ func TestParser_Parse(t *testing.T) { }, "test rule and charset restrictions": { registry: map[string]ruleConstructor{ - "testrule": newTestRule, - "CharsetRestriction": ParseCharsetRestriction, + "testrule": newTestRule, + "Charset": ParseCharset, }, rawConfig: ` length = 20 - charset = "abcde" rule "testrule" { string = "teststring" int = 123 } - rule "CharsetRestriction" { + rule "Charset" { charset = "abcde" - min-chars = 2 + min_chars = 2 }`, expected: StringGenerator{ Length: 20, - Charset: []rune("abcde"), + charset: deduplicateRunes([]rune("abcdeteststring")), Rules: []Rule{ - &testRule{ + testCharsetRule{ String: "teststring", Integer: 123, }, - &CharsetRestriction{ + Charset{ Charset: []rune("abcde"), MinChars: 2, }, @@ -204,16 +189,11 @@ func TestParser_Parse(t *testing.T) { registry: defaultRuleNameMapping, rawConfig: ` length = 20 - charset = "abcde" rule "testrule" { string = "teststring" int = 123 }`, - expected: StringGenerator{ - Length: 20, - Charset: []rune("abcde"), - Rules: nil, - }, + expected: StringGenerator{}, expectErr: true, }, @@ -221,8 +201,8 @@ func TestParser_Parse(t *testing.T) { // JSON data "manually JSONified HCL": { registry: map[string]ruleConstructor{ - "testrule": newTestRule, - "CharsetRestriction": ParseCharsetRestriction, + "testrule": newTestRule, + "Charset": ParseCharset, }, rawConfig: ` { @@ -238,10 +218,10 @@ func TestParser_Parse(t *testing.T) { ] }, { - "CharsetRestriction": [ + "Charset": [ { "charset": "abcde", - "min-chars": 2 + "min_chars": 2 } ] } @@ -249,13 +229,13 @@ func TestParser_Parse(t *testing.T) { }`, expected: StringGenerator{ Length: 20, - Charset: []rune("abcde"), + charset: deduplicateRunes([]rune("abcdeteststring")), Rules: []Rule{ - &testRule{ + testCharsetRule{ String: "teststring", Integer: 123, }, - &CharsetRestriction{ + Charset{ Charset: []rune("abcde"), MinChars: 2, }, @@ -265,18 +245,17 @@ func TestParser_Parse(t *testing.T) { }, "JSONified HCL": { registry: map[string]ruleConstructor{ - "testrule": newTestRule, - "CharsetRestriction": ParseCharsetRestriction, + "testrule": newTestRule, + "Charset": ParseCharset, }, rawConfig: toJSON(t, StringGenerator{ - Length: 20, - Charset: []rune("abcde"), + Length: 20, Rules: []Rule{ - &testRule{ + testCharsetRule{ String: "teststring", Integer: 123, }, - &CharsetRestriction{ + Charset{ Charset: []rune("abcde"), MinChars: 2, }, @@ -284,13 +263,13 @@ func TestParser_Parse(t *testing.T) { }), expected: StringGenerator{ Length: 20, - Charset: []rune("abcde"), + charset: deduplicateRunes([]rune("abcdeteststring")), Rules: []Rule{ - &testRule{ + testCharsetRule{ String: "teststring", Integer: 123, }, - &CharsetRestriction{ + Charset{ Charset: []rune("abcde"), MinChars: 2, }, @@ -315,11 +294,7 @@ func TestParser_Parse(t *testing.T) { } ] }`, - expected: StringGenerator{ - Length: 20, - Charset: []rune("abcde"), - Rules: nil, - }, + expected: StringGenerator{}, expectErr: true, }, } @@ -411,7 +386,7 @@ func TestParseRules(t *testing.T) { }, }, expectedRules: []Rule{ - &testRule{ + testCharsetRule{ String: "teststring", Integer: 123, }, @@ -441,131 +416,6 @@ func TestParseRules(t *testing.T) { } } -func TestValidate(t *testing.T) { - type testCase struct { - generator StringGenerator - expectErr bool - } - - tests := map[string]testCase{ - "default generator": { - generator: DefaultStringGenerator, - expectErr: false, - }, - "length is 0": { - generator: StringGenerator{ - Length: 0, - Charset: []rune("abcde"), - }, - expectErr: true, - }, - "length is negative": { - generator: StringGenerator{ - Length: -2, - Charset: []rune("abcde"), - }, - expectErr: true, - }, - "nil charset": { - generator: StringGenerator{ - Length: 5, - Charset: nil, - }, - expectErr: true, - }, - "zero length charset": { - generator: StringGenerator{ - Length: 5, - Charset: []rune{}, - }, - expectErr: true, - }, - "rules require password longer than length": { - generator: StringGenerator{ - Length: 5, - Charset: []rune("abcde"), - Rules: []Rule{ - CharsetRestriction{ - Charset: []rune("abcde"), - MinChars: 6, - }, - }, - }, - expectErr: true, - }, - "charset has non-printable characters": { - generator: StringGenerator{ - Length: 0, - Charset: []rune{ - 'a', - 'b', - 0, // Null character - 'd', - 'e', - }, - }, - expectErr: true, - }, - } - - for name, test := range tests { - t.Run(name, func(t *testing.T) { - err := validate(test.generator) - if test.expectErr && err == nil { - t.Fatalf("err expected, got nil") - } - if !test.expectErr && err != nil { - t.Fatalf("no error expected, got: %s", err) - } - }) - } -} - -func TestGetChars(t *testing.T) { - type testCase struct { - rules []Rule - expected []rune - } - - tests := map[string]testCase{ - "nil rules": { - rules: nil, - expected: []rune(nil), - }, - "empty rules": { - rules: []Rule{}, - expected: []rune(nil), - }, - "rule without chars": { - rules: []Rule{ - testRule{ - String: "teststring", - Integer: 123, - }, - }, - expected: []rune(nil), - }, - "rule with chars": { - rules: []Rule{ - CharsetRestriction{ - Charset: []rune("abcdefghij"), - MinChars: 1, - }, - }, - expected: []rune("abcdefghij"), - }, - } - - for name, test := range tests { - t.Run(name, func(t *testing.T) { - actual := getChars(test.rules) - if !reflect.DeepEqual(actual, test.expected) { - t.Fatalf("Actual: %v\nExpected: %v", actual, test.expected) - } - }) - } -} - func TestGetMapSlice(t *testing.T) { type testCase struct { input map[string]interface{} @@ -698,128 +548,11 @@ func TestGetRuleInfo(t *testing.T) { } } -func TestApplyShortcuts(t *testing.T) { - type testCase struct { - input map[string]interface{} - expected map[string]interface{} - } - - tests := map[string]testCase{ - "nil map": { - input: nil, - expected: nil, - }, - "empty map": { - input: map[string]interface{}{}, - expected: map[string]interface{}{}, - }, - "non-matching key": { - input: map[string]interface{}{ - "foo": "teststring", - }, - expected: map[string]interface{}{ - "foo": "teststring", - }, - }, - "matching key": { - input: map[string]interface{}{ - "charset": "lower-alpha", - }, - expected: map[string]interface{}{ - "charset": LowercaseCharset, - }, - }, - "matching and non-matching keys": { - input: map[string]interface{}{ - "charset": "lower-alpha", - "foo": "teststring", - }, - expected: map[string]interface{}{ - "charset": LowercaseCharset, - "foo": "teststring", - }, - }, - "invalid value type": { - input: map[string]interface{}{ - "charset": 123, - }, - expected: map[string]interface{}{ - "charset": 123, - }, - }, - "unrecognized shortcut": { - input: map[string]interface{}{ - "charset": LowercaseCharset, - }, - expected: map[string]interface{}{ - "charset": LowercaseCharset, - }, - }, - } - - for name, test := range tests { - t.Run(name, func(t *testing.T) { - applyShortcuts(test.input) - if !reflect.DeepEqual(test.input, test.expected) { - t.Fatalf("Actual: %#v\nExpected:%#v", test.input, test.expected) - } - }) - } -} - -func TestDeduplicateRunes(t *testing.T) { - type testCase struct { - input []rune - expected []rune - } - - tests := map[string]testCase{ - "empty string": { - input: []rune(""), - expected: []rune(nil), - }, - "no duplicates": { - input: []rune("abcde"), - expected: []rune("abcde"), - }, - "in order duplicates": { - input: []rune("aaaabbbbcccccccddddeeeee"), - expected: []rune("abcde"), - }, - "out of order duplicates": { - input: []rune("abcdeabcdeabcdeabcde"), - expected: []rune("abcde"), - }, - "unicode no duplicates": { - input: []rune("日本語"), - expected: []rune("日本語"), - }, - "unicode in order duplicates": { - input: []rune("日日日日本本本語語語語語"), - expected: []rune("日本語"), - }, - "unicode out of order duplicates": { - input: []rune("日本語日本語日本語日本語"), - expected: []rune("日本語"), - }, - } - - for name, test := range tests { - t.Run(name, func(t *testing.T) { - actual := deduplicateRunes(test.input) - if !reflect.DeepEqual(actual, test.expected) { - t.Fatalf("Actual: %#v\nExpected:%#v", actual, test.expected) - } - }) - } -} - func BenchmarkParser_Parse(b *testing.B) { config := `length = 20 - charset = "abcde" - rule "CharsetRestriction" { + rule "Charset" { charset = "abcde" - min-chars = 2 + min_chars = 2 }` for i := 0; i < b.N; i++ { diff --git a/sdk/helper/random/registry.go b/sdk/helper/random/registry.go index 3b3ac1c53492..812142e3f9c1 100644 --- a/sdk/helper/random/registry.go +++ b/sdk/helper/random/registry.go @@ -10,7 +10,7 @@ var ( // defaultRuleNameMapping is the default mapping of HCL rule names to the appropriate rule constructor. // Add to this map when adding a new Rule type to be recognized in HCL. defaultRuleNameMapping = map[string]ruleConstructor{ - "CharsetRestriction": ParseCharsetRestriction, + "Charset": ParseCharset, } defaultRegistry = Registry{ @@ -29,5 +29,6 @@ func (r Registry) parseRule(ruleType string, ruleData map[string]interface{}) (r return nil, fmt.Errorf("unrecognized rule type %s", ruleType) } - return constructor(ruleData) + rule, err = constructor(ruleData) + return rule, err } diff --git a/sdk/helper/random/registry_test.go b/sdk/helper/random/registry_test.go index a5d5c9b2d5df..3d7060650b4f 100644 --- a/sdk/helper/random/registry_test.go +++ b/sdk/helper/random/registry_test.go @@ -8,7 +8,7 @@ import ( "github.com/mitchellh/mapstructure" ) -type testRule struct { +type testCharsetRule struct { String string `mapstructure:"string" json:"string"` Integer int `mapstructure:"int" json:"int"` @@ -17,16 +17,17 @@ type testRule struct { } func newTestRule(data map[string]interface{}) (rule Rule, err error) { - tr := &testRule{} + tr := &testCharsetRule{} err = mapstructure.Decode(data, tr) if err != nil { return nil, fmt.Errorf("unable to decode test rule") } - return tr, nil + return *tr, nil } -func (tr testRule) Pass([]rune) bool { return !tr.fail } -func (tr testRule) Type() string { return "testrule" } +func (tr testCharsetRule) Pass([]rune) bool { return !tr.fail } +func (tr testCharsetRule) Type() string { return "testrule" } +func (tr testCharsetRule) Chars() []rune { return []rune(tr.String) } func TestParseRule(t *testing.T) { type testCase struct { @@ -56,7 +57,7 @@ func TestParseRule(t *testing.T) { }, ruleType: "testrule", ruleData: nil, - expectedRule: &testRule{}, + expectedRule: testCharsetRule{}, expectErr: false, }, "good rule": { @@ -68,7 +69,7 @@ func TestParseRule(t *testing.T) { "string": "teststring", "int": 123, }, - expectedRule: &testRule{ + expectedRule: testCharsetRule{ String: "teststring", Integer: 123, }, diff --git a/sdk/helper/random/rules.go b/sdk/helper/random/rules.go index 717ade10eeae..8c2e1e5cc694 100644 --- a/sdk/helper/random/rules.go +++ b/sdk/helper/random/rules.go @@ -6,8 +6,8 @@ import ( "github.com/mitchellh/mapstructure" ) -// CharsetRestriction requires a certain number of characters from the specified charset. -type CharsetRestriction struct { +// Charset requires a certain number of characters from the specified charset. +type Charset struct { // Charset is the list of rules that candidate strings must contain a minimum number of. Charset runes `mapstructure:"charset" json:"charset"` @@ -15,9 +15,9 @@ type CharsetRestriction struct { MinChars int `mapstructure:"min-chars" json:"min-chars"` } -// ParseCharsetRestriction from the provided data map. The data map is expected to be parsed from HCL. -func ParseCharsetRestriction(data map[string]interface{}) (rule Rule, err error) { - cr := &CharsetRestriction{} +// ParseCharset from the provided data map. The data map is expected to be parsed from HCL. +func ParseCharset(data map[string]interface{}) (rule Rule, err error) { + cr := &Charset{} decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ Metadata: nil, @@ -33,25 +33,25 @@ func ParseCharsetRestriction(data map[string]interface{}) (rule Rule, err error) return nil, fmt.Errorf("failed to parse charset restriction: %w", err) } - return cr, nil + return *cr, nil } -func (c CharsetRestriction) Type() string { - return "CharsetRestriction" +func (c Charset) Type() string { + return "Charset" } // Chars returns the charset that this rule is looking for. -func (c CharsetRestriction) Chars() []rune { +func (c Charset) Chars() []rune { return c.Charset } -func (c CharsetRestriction) MinLength() int { +func (c Charset) MinLength() int { return c.MinChars } // Pass returns true if the provided candidate string has a minimum number of chars in it. // This adheres to the Rule interface -func (c CharsetRestriction) Pass(value []rune) bool { +func (c Charset) Pass(value []rune) bool { if c.MinChars <= 0 { return true } diff --git a/sdk/helper/random/rules_test.go b/sdk/helper/random/rules_test.go index 9e40986343b9..10e96ee324fb 100644 --- a/sdk/helper/random/rules_test.go +++ b/sdk/helper/random/rules_test.go @@ -4,7 +4,7 @@ import ( "testing" ) -func TestCharsetRestriction(t *testing.T) { +func TestCharset(t *testing.T) { type testCase struct { charset string minChars int @@ -77,7 +77,7 @@ func TestCharsetRestriction(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { - cr := CharsetRestriction{ + cr := Charset{ Charset: []rune(test.charset), MinChars: test.minChars, } diff --git a/sdk/helper/random/serializing.go b/sdk/helper/random/serializing.go index a5f362442e33..dd8418fe938c 100644 --- a/sdk/helper/random/serializing.go +++ b/sdk/helper/random/serializing.go @@ -23,10 +23,10 @@ func (r serializableRules) MarshalJSON() (b []byte, err error) { // ] // }, // { - // "CharsetRestriction": [ + // "Charset": [ // { // "charset": "abcde", - // "min-chars": 2 + // "min_chars": 2 // } // ] // } diff --git a/sdk/helper/random/serializing_test.go b/sdk/helper/random/serializing_test.go index 60fdc8fab101..65ec1fbe8fba 100644 --- a/sdk/helper/random/serializing_test.go +++ b/sdk/helper/random/serializing_test.go @@ -8,19 +8,19 @@ import ( func TestJSONMarshalling(t *testing.T) { expected := serializableRules{ - &CharsetRestriction{ + Charset{ Charset: LowercaseRuneset, MinChars: 1, }, - &CharsetRestriction{ + Charset{ Charset: UppercaseRuneset, MinChars: 1, }, - &CharsetRestriction{ + Charset{ Charset: NumericRuneset, MinChars: 1, }, - &CharsetRestriction{ + Charset{ Charset: ShortSymbolRuneset, MinChars: 1, }, @@ -41,3 +41,18 @@ func TestJSONMarshalling(t *testing.T) { t.Fatalf("Actual: %#v\nExpected: %#v", actual, expected) } } + +func TestRunes_UnmarshalJSON(t *testing.T) { + data := []byte(`"noaw8hgfsdjlkfsj3"`) + + expected := runes([]rune("noaw8hgfsdjlkfsj3")) + actual := runes{} + err := (&actual).UnmarshalJSON(data) + if err != nil { + t.Fatalf("no error expected, got: %s", err) + } + + if !reflect.DeepEqual(actual, expected) { + t.Fatalf("Actual: %#v\nExpected: %#v", actual, expected) + } +} diff --git a/sdk/helper/random/string_generator.go b/sdk/helper/random/string_generator.go index 1774dabeee93..ec9bb7d14259 100644 --- a/sdk/helper/random/string_generator.go +++ b/sdk/helper/random/string_generator.go @@ -8,6 +8,9 @@ import ( "math" "sort" "time" + "unicode" + + "github.com/hashicorp/go-multierror" ) var ( @@ -35,22 +38,21 @@ var ( // DefaultStringGenerator has reasonable default rules for generating strings DefaultStringGenerator = StringGenerator{ - Length: 20, - Charset: []rune(LowercaseCharset + UppercaseCharset + NumericCharset + ShortSymbolCharset), + Length: 20, Rules: []Rule{ - CharsetRestriction{ + Charset{ Charset: LowercaseRuneset, MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: UppercaseRuneset, MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: NumericRuneset, MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: ShortSymbolRuneset, MinChars: 1, }, @@ -74,29 +76,35 @@ type Rule interface { } // StringGenerator generats random strings from the provided charset & adhering to a set of rules. The set of rules -// are things like CharsetRestriction which requires a certain number of characters from a sub-charset. +// are things like Charset which requires a certain number of characters from a sub-charset. type StringGenerator struct { // Length of the string to generate. Length int `mapstructure:"length" json:"length"` - // Charset to choose runes from. - Charset runes `mapstructure:"charset" json:"charset"` - // Rules the generated strings must adhere to. Rules serializableRules `mapstructure:"-" json:"rule"` // This is "rule" in JSON so it matches the HCL property type + // Charset to choose runes from. This is computed from the rules, not directly configurable + charset runes + // rng for testing purposes to ensure error handling from the crypto/rand package is working properly. rng io.Reader } // Generate a random string from the charset and adhering to the provided rules. -func (g StringGenerator) Generate(ctx context.Context) (str string, err error) { +func (g *StringGenerator) Generate(ctx context.Context) (str string, err error) { if _, hasTimeout := ctx.Deadline(); !hasTimeout { var cancel func() ctx, cancel = context.WithTimeout(ctx, 1*time.Second) // Ensure there's a timeout on the context defer cancel() } + // Ensure the generator is configured well since it may be manually created rather than parsed from HCL + err = g.validateConfig() + if err != nil { + return "", err + } + LOOP: for { select { @@ -115,11 +123,11 @@ LOOP: } } -func (g StringGenerator) generate() (str string, err error) { +func (g *StringGenerator) generate() (str string, err error) { // If performance improvements need to be made, this can be changed to read a batch of // potential strings at once rather than one at a time. This will significantly // improve performance, but at the cost of added complexity. - candidate, err := randomRunes(g.rng, g.Charset, g.Length) + candidate, err := randomRunes(g.rng, g.charset, g.Length) if err != nil { return "", fmt.Errorf("unable to generate random characters: %w", err) } @@ -167,3 +175,87 @@ func randomRunes(rng io.Reader, charset []rune, length int) (candidate []rune, e return runes, nil } + +// validateConfig of the generator to ensure that we can successfully generate a string. +func (g *StringGenerator) validateConfig() (err error) { + merr := &multierror.Error{} + + // Ensure the sum of minimum lengths in the rules doesn't exceed the length specified + minLen := getMinLength(g.Rules) + if g.Length <= 0 { + merr = multierror.Append(merr, fmt.Errorf("length must be > 0")) + } else if g.Length < minLen { + merr = multierror.Append(merr, fmt.Errorf("specified rules require at least %d characters but %d is specified", minLen, g.Length)) + } + + // Ensure we have a charset & all characters are printable + if len(g.charset) == 0 { + // Yes this is mutating the generator but this is done so we don't have to compute this on every generation + g.charset = getChars(g.Rules) + } + if len(g.charset) == 0 { + merr = multierror.Append(merr, fmt.Errorf("no charset specified")) + } else { + for _, r := range g.charset { + if !unicode.IsPrint(r) { + merr = multierror.Append(merr, fmt.Errorf("non-printable character in charset")) + break + } + } + } + return merr.ErrorOrNil() +} + +// getMinLength from the rules using the optional interface: `MinLength() int` +func getMinLength(rules []Rule) (minLen int) { + type minLengthProvider interface { + MinLength() int + } + + for _, rule := range rules { + mlp, ok := rule.(minLengthProvider) + if !ok { + continue + } + minLen += mlp.MinLength() + } + return minLen +} + +// getChars from the rules using the optional interface: `Chars() []rune` +func getChars(rules []Rule) (chars []rune) { + type charsetProvider interface { + Chars() []rune + } + + for _, rule := range rules { + cp, ok := rule.(charsetProvider) + if !ok { + continue + } + chars = append(chars, cp.Chars()...) + } + return deduplicateRunes(chars) +} + +// deduplicateRunes returns a new slice of sorted & de-duplicated runes +func deduplicateRunes(original []rune) (deduped []rune) { + if len(original) == 0 { + return nil + } + + m := map[rune]bool{} + dedupedRunes := []rune(nil) + + for _, r := range original { + if m[r] { + continue + } + m[r] = true + dedupedRunes = append(dedupedRunes, r) + } + + // They don't have to be sorted, but this is being done to make the charset easier to visualize + sort.Sort(runes(dedupedRunes)) + return dedupedRunes +} diff --git a/sdk/helper/random/string_generator_test.go b/sdk/helper/random/string_generator_test.go index cb17837851d9..6e8b89b99014 100644 --- a/sdk/helper/random/string_generator_test.go +++ b/sdk/helper/random/string_generator_test.go @@ -15,27 +15,53 @@ import ( func TestStringGenerator_Generate_successful(t *testing.T) { type testCase struct { - timeout time.Duration - charset []rune - rules []Rule + timeout time.Duration + generator *StringGenerator } tests := map[string]testCase{ "common rules": { timeout: 1 * time.Second, - charset: AlphaNumericShortSymbolRuneset, - rules: []Rule{ - CharsetRestriction{ - Charset: LowercaseRuneset, - MinChars: 1, - }, - CharsetRestriction{ - Charset: UppercaseRuneset, - MinChars: 1, + generator: &StringGenerator{ + Length: 20, + Rules: []Rule{ + Charset{ + Charset: LowercaseRuneset, + MinChars: 1, + }, + Charset{ + Charset: UppercaseRuneset, + MinChars: 1, + }, + Charset{ + Charset: NumericRuneset, + MinChars: 1, + }, + Charset{ + Charset: ShortSymbolRuneset, + MinChars: 1, + }, }, - CharsetRestriction{ - Charset: NumericRuneset, - MinChars: 1, + charset: AlphaNumericShortSymbolRuneset, + }, + }, + "charset not explicitly specified": { + timeout: 1 * time.Second, + generator: &StringGenerator{ + Length: 20, + Rules: []Rule{ + Charset{ + Charset: LowercaseRuneset, + MinChars: 1, + }, + Charset{ + Charset: UppercaseRuneset, + MinChars: 1, + }, + Charset{ + Charset: NumericRuneset, + MinChars: 1, + }, }, }, }, @@ -43,12 +69,6 @@ func TestStringGenerator_Generate_successful(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { - sg := StringGenerator{ - Length: 20, - Charset: test.charset, - Rules: test.rules, - } - // One context to rule them all, one context to find them, one context to bring them all and in the darkness bind them. ctx, cancel := context.WithTimeout(context.Background(), test.timeout) defer cancel() @@ -56,8 +76,8 @@ func TestStringGenerator_Generate_successful(t *testing.T) { runeset := map[rune]bool{} runesFound := []rune{} - for i := 0; i < 10000; i++ { - actual, err := sg.Generate(ctx) + for i := 0; i < 100; i++ { + actual, err := test.generator.Generate(ctx) if err != nil { t.Fatalf("no error expected, but got: %s", err) } @@ -72,11 +92,10 @@ func TestStringGenerator_Generate_successful(t *testing.T) { sort.Sort(runes(runesFound)) - // Sort the input too just to ensure that they can be compared - sort.Sort(runes(test.charset)) + expectedCharset := getChars(test.generator.Rules) - if !reflect.DeepEqual(runesFound, test.charset) { - t.Fatalf("Didn't find all characters from the charset\nActual : [%s]\nExpected: [%s]", string(runesFound), string(test.charset)) + if !reflect.DeepEqual(runesFound, expectedCharset) { + t.Fatalf("Didn't find all characters from the charset\nActual : [%s]\nExpected: [%s]", string(runesFound), string(expectedCharset)) } }) } @@ -84,55 +103,98 @@ func TestStringGenerator_Generate_successful(t *testing.T) { func TestStringGenerator_Generate_errors(t *testing.T) { type testCase struct { - timeout time.Duration - charset string - rules []Rule - rng io.Reader + timeout time.Duration + generator *StringGenerator } tests := map[string]testCase{ "already timed out": { timeout: 0, - charset: AlphaNumericShortSymbolCharset, - rules: []Rule{ - testRule{ - fail: false, + generator: &StringGenerator{ + Length: 20, + Rules: []Rule{ + testCharsetRule{ + fail: false, + }, }, + charset: AlphaNumericShortSymbolRuneset, + rng: rand.Reader, }, - rng: rand.Reader, }, "impossible rules": { timeout: 10 * time.Millisecond, // Keep this short so the test doesn't take too long - charset: AlphaNumericShortSymbolCharset, - rules: []Rule{ - testRule{ - fail: true, + generator: &StringGenerator{ + Length: 20, + Rules: []Rule{ + testCharsetRule{ + fail: true, + }, }, + charset: AlphaNumericShortSymbolRuneset, + rng: rand.Reader, }, - rng: rand.Reader, }, "bad RNG reader": { timeout: 10 * time.Millisecond, // Keep this short so the test doesn't take too long - charset: AlphaNumericShortSymbolCharset, - rules: []Rule{}, - rng: badReader{}, + generator: &StringGenerator{ + Length: 20, + Rules: []Rule{}, + charset: AlphaNumericShortSymbolRuneset, + rng: badReader{}, + }, + }, + "0 length": { + timeout: 10 * time.Millisecond, + generator: &StringGenerator{ + Length: 0, + Rules: []Rule{ + Charset{ + Charset: []rune("abcde"), + MinChars: 0, + }, + }, + charset: []rune("abcde"), + rng: rand.Reader, + }, + }, + "-1 length": { + timeout: 10 * time.Millisecond, + generator: &StringGenerator{ + Length: -1, + Rules: []Rule{ + Charset{ + Charset: []rune("abcde"), + MinChars: 0, + }, + }, + charset: []rune("abcde"), + rng: rand.Reader, + }, + }, + "no charset": { + timeout: 10 * time.Millisecond, + generator: &StringGenerator{ + Length: 20, + Rules: []Rule{}, + rng: rand.Reader, + }, }, } for name, test := range tests { t.Run(name, func(t *testing.T) { - sg := StringGenerator{ - Length: 20, - Charset: []rune(test.charset), - Rules: test.rules, - rng: test.rng, - } + // sg := StringGenerator{ + // Length: 20, + // charset: []rune(test.charset), + // Rules: test.rules, + // rng: test.rng, + // } // One context to rule them all, one context to find them, one context to bring them all and in the darkness bind them. ctx, cancel := context.WithTimeout(context.Background(), test.timeout) defer cancel() - actual, err := sg.Generate(ctx) + actual, err := test.generator.Generate(ctx) if err == nil { t.Fatalf("Expected error but none found") } @@ -320,7 +382,7 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { benches := map[string]testCase{ "no rules": { generator: StringGenerator{ - Charset: AlphaNumericFullSymbolRuneset, + charset: AlphaNumericFullSymbolRuneset, Rules: []Rule{}, }, }, @@ -329,21 +391,21 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { }, "large symbol set": { generator: StringGenerator{ - Charset: AlphaNumericFullSymbolRuneset, + charset: AlphaNumericFullSymbolRuneset, Rules: []Rule{ - CharsetRestriction{ + Charset{ Charset: LowercaseRuneset, MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: UppercaseRuneset, MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: NumericRuneset, MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: FullSymbolRuneset, MinChars: 1, }, @@ -352,21 +414,21 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { }, "max symbol set": { generator: StringGenerator{ - Charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + + charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ" + "ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠ" + "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟", ), Rules: []Rule{ - CharsetRestriction{ + Charset{ Charset: LowercaseRuneset, MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: UppercaseRuneset, MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: []rune("ĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒ"), MinChars: 1, }, @@ -375,21 +437,21 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { }, "restrictive charset rules": { generator: StringGenerator{ - Charset: AlphaNumericShortSymbolRuneset, + charset: AlphaNumericShortSymbolRuneset, Rules: []Rule{ - CharsetRestriction{ + Charset{ Charset: []rune("A"), MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: []rune("1"), MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: []rune("a"), MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: []rune("-"), MinChars: 1, }, @@ -421,10 +483,11 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { }) } + // Mimic what the SQLCredentialsProducer is doing b.Run("SQLCredentialsProducer", func(b *testing.B) { sg := StringGenerator{ Length: 16, // 16 because the SQLCredentialsProducer prepends 4 characters to a 20 character password - Charset: AlphaNumericRuneset, + charset: AlphaNumericRuneset, Rules: nil, rng: rand.Reader, } @@ -449,13 +512,13 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { func TestStringGenerator_JSON(t *testing.T) { expected := StringGenerator{ Length: 20, - Charset: AlphaNumericShortSymbolRuneset, + charset: deduplicateRunes([]rune("teststring" + ShortSymbolCharset)), Rules: []Rule{ - &testRule{ + testCharsetRule{ String: "teststring", Integer: 123, }, - &CharsetRestriction{ + Charset{ Charset: ShortSymbolRuneset, MinChars: 1, }, @@ -470,8 +533,8 @@ func TestStringGenerator_JSON(t *testing.T) { parser := Parser{ RuleRegistry: Registry{ Rules: map[string]ruleConstructor{ - "testrule": newTestRule, - "CharsetRestriction": ParseCharsetRestriction, + "testrule": newTestRule, + "Charset": ParseCharset, }, }, } @@ -490,3 +553,179 @@ type badReader struct{} func (badReader) Read([]byte) (int, error) { return 0, fmt.Errorf("test error") } + +func TestValidate(t *testing.T) { + type testCase struct { + generator StringGenerator + expectErr bool + } + + tests := map[string]testCase{ + "default generator": { + generator: DefaultStringGenerator, + expectErr: false, + }, + "length is 0": { + generator: StringGenerator{ + Length: 0, + }, + expectErr: true, + }, + "length is negative": { + generator: StringGenerator{ + Length: -2, + }, + expectErr: true, + }, + "nil charset, no rules": { + generator: StringGenerator{ + Length: 5, + charset: nil, + }, + expectErr: true, + }, + "zero length charset, no rules": { + generator: StringGenerator{ + Length: 5, + charset: []rune{}, + }, + expectErr: true, + }, + "rules require password longer than length": { + generator: StringGenerator{ + Length: 5, + charset: []rune("abcde"), + Rules: []Rule{ + Charset{ + Charset: []rune("abcde"), + MinChars: 6, + }, + }, + }, + expectErr: true, + }, + "charset has non-printable characters": { + generator: StringGenerator{ + Length: 0, + charset: []rune{ + 'a', + 'b', + 0, // Null character + 'd', + 'e', + }, + }, + expectErr: true, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + err := test.generator.validateConfig() + if test.expectErr && err == nil { + t.Fatalf("err expected, got nil") + } + if !test.expectErr && err != nil { + t.Fatalf("no error expected, got: %s", err) + } + }) + } +} + +type testNonCharsetRule struct { + String string `mapstructure:"string" json:"string"` +} + +func (tr testNonCharsetRule) Pass([]rune) bool { return true } +func (tr testNonCharsetRule) Type() string { return "testNonCharsetRule" } + +func TestGetChars(t *testing.T) { + type testCase struct { + rules []Rule + expected []rune + } + + tests := map[string]testCase{ + "nil rules": { + rules: nil, + expected: []rune(nil), + }, + "empty rules": { + rules: []Rule{}, + expected: []rune(nil), + }, + "rule without chars": { + rules: []Rule{ + testNonCharsetRule{ + String: "teststring", + }, + }, + expected: []rune(nil), + }, + "rule with chars": { + rules: []Rule{ + Charset{ + Charset: []rune("abcdefghij"), + MinChars: 1, + }, + }, + expected: []rune("abcdefghij"), + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + actual := getChars(test.rules) + if !reflect.DeepEqual(actual, test.expected) { + t.Fatalf("Actual: %v\nExpected: %v", actual, test.expected) + } + }) + } +} + +func TestDeduplicateRunes(t *testing.T) { + type testCase struct { + input []rune + expected []rune + } + + tests := map[string]testCase{ + "empty string": { + input: []rune(""), + expected: []rune(nil), + }, + "no duplicates": { + input: []rune("abcde"), + expected: []rune("abcde"), + }, + "in order duplicates": { + input: []rune("aaaabbbbcccccccddddeeeee"), + expected: []rune("abcde"), + }, + "out of order duplicates": { + input: []rune("abcdeabcdeabcdeabcde"), + expected: []rune("abcde"), + }, + "unicode no duplicates": { + input: []rune("日本語"), + expected: []rune("日本語"), + }, + "unicode in order duplicates": { + input: []rune("日日日日本本本語語語語語"), + expected: []rune("日本語"), + }, + "unicode out of order duplicates": { + input: []rune("日本語日本語日本語日本語"), + expected: []rune("日本語"), + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + actual := deduplicateRunes(test.input) + if !reflect.DeepEqual(actual, test.expected) { + t.Fatalf("Actual: %#v\nExpected:%#v", actual, test.expected) + } + }) + } +} diff --git a/sdk/logical/system_view.go b/sdk/logical/system_view.go index 08ced677a654..394a30103c48 100644 --- a/sdk/logical/system_view.go +++ b/sdk/logical/system_view.go @@ -70,8 +70,9 @@ type SystemView interface { // PluginEnv returns Vault environment information used by plugins PluginEnv(context.Context) (*PluginEnvironment, error) - // PasswordPolicy retrieves the password policy associated with the policy name - PasswordPolicy(ctx context.Context, policyName string) (PasswordPolicy, error) + // GeneratePasswordFromPolicy generates a password from the policy referenced. + // If the policy does not exist, this will return an error. + GeneratePasswordFromPolicy(ctx context.Context, policyName string) (password string, err error) } type PasswordPolicy interface { @@ -176,19 +177,19 @@ func (d StaticSystemView) PluginEnv(_ context.Context) (*PluginEnvironment, erro return d.PluginEnvironment, nil } -func (d StaticSystemView) PasswordPolicy(ctx context.Context, policyName string) (policy PasswordPolicy, err error) { +func (d StaticSystemView) GeneratePasswordFromPolicy(ctx context.Context, policyName string) (password string, err error) { select { case <-ctx.Done(): - return nil, fmt.Errorf("context timed out") + return "", fmt.Errorf("context timed out") default: } if d.PasswordPolicies == nil { - return nil, fmt.Errorf("password policy not found") + return "", fmt.Errorf("password policy not found") } policy, exists := d.PasswordPolicies[policyName] if !exists { - return nil, fmt.Errorf("password policy not found") + return "", fmt.Errorf("password policy not found") } - return policy, nil + return policy.Generate(ctx) } diff --git a/sdk/plugin/grpc_system.go b/sdk/plugin/grpc_system.go index c36231b445b7..ead85aefebcf 100644 --- a/sdk/plugin/grpc_system.go +++ b/sdk/plugin/grpc_system.go @@ -10,7 +10,6 @@ import ( "github.com/hashicorp/vault/sdk/helper/consts" "github.com/hashicorp/vault/sdk/helper/license" "github.com/hashicorp/vault/sdk/helper/pluginutil" - "github.com/hashicorp/vault/sdk/helper/random" "github.com/hashicorp/vault/sdk/helper/wrapping" "github.com/hashicorp/vault/sdk/logical" "github.com/hashicorp/vault/sdk/plugin/pb" @@ -164,19 +163,15 @@ func (s *gRPCSystemViewClient) PluginEnv(ctx context.Context) (*logical.PluginEn return reply.PluginEnvironment, nil } -func (s *gRPCSystemViewClient) PasswordPolicy(ctx context.Context, policyName string) (policy logical.PasswordPolicy, err error) { - req := &pb.PasswordPolicyRequest{ +func (s *gRPCSystemViewClient) GeneratePasswordFromPolicy(ctx context.Context, policyName string) (password string, err error) { + req := &pb.GeneratePasswordFromPolicyRequest{ PolicyName: policyName, } - resp, err := s.client.PasswordPolicy(ctx, req) + resp, err := s.client.GeneratePasswordFromPolicy(ctx, req) if err != nil { - return nil, err - } - passPolicy, err := random.ParseBytes(resp.RawPolicy) - if err != nil { - return nil, fmt.Errorf("failed to parse password policy: %w", err) + return "", err } - return passPolicy, nil + return resp.Password, nil } type gRPCSystemViewServer struct { @@ -293,21 +288,19 @@ func (s *gRPCSystemViewServer) PluginEnv(ctx context.Context, _ *pb.Empty) (*pb. }, nil } -func (s *gRPCSystemViewServer) PasswordPolicy(ctx context.Context, req *pb.PasswordPolicyRequest) (*pb.PasswordPolicyResponse, error) { - policy, err := s.impl.PasswordPolicy(ctx, req.PolicyName) - if err != nil { - return &pb.PasswordPolicyResponse{}, status.Errorf(codes.Internal, "unable to retrieve password policy: %s", err) - } - if policy == nil { - return &pb.PasswordPolicyResponse{}, status.Errorf(codes.NotFound, "policy not found") +func (s *gRPCSystemViewServer) GeneratePasswordFromPolicy(ctx context.Context, req *pb.GeneratePasswordFromPolicyRequest) (*pb.GeneratePasswordFromPolicyReply, error) { + policyName := req.PolicyName + if policyName == "" { + return &pb.GeneratePasswordFromPolicyReply{}, status.Errorf(codes.InvalidArgument, "no password policy specified") } - b, err := json.Marshal(policy) + password, err := s.impl.GeneratePasswordFromPolicy(ctx, policyName) if err != nil { - return &pb.PasswordPolicyResponse{}, status.Errorf(codes.Internal, "unable to serialize password policy: %s", err) + return &pb.GeneratePasswordFromPolicyReply{}, status.Errorf(codes.Internal, "failed to generate password") } - resp := &pb.PasswordPolicyResponse{ - RawPolicy: b, + + resp := &pb.GeneratePasswordFromPolicyReply{ + Password: password, } return resp, nil } diff --git a/sdk/plugin/grpc_system_test.go b/sdk/plugin/grpc_system_test.go index 4755312d96dd..2156256941ed 100644 --- a/sdk/plugin/grpc_system_test.go +++ b/sdk/plugin/grpc_system_test.go @@ -240,25 +240,24 @@ func TestSystem_GRPC_pluginEnv(t *testing.T) { } } -func TestSystem_GRPC_passwordPolicy(t *testing.T) { +func TestSystem_GRPC_GeneratePasswordFromPolicy(t *testing.T) { policyName := "testpolicy" - expectedPolicy := random.StringGenerator{ - Length: 8, - Charset: random.AlphaNumericShortSymbolRuneset, + expectedPolicy := &random.StringGenerator{ + Length: 8, Rules: []random.Rule{ - &random.CharsetRestriction{ + &random.Charset{ Charset: random.LowercaseRuneset, MinChars: 1, }, - &random.CharsetRestriction{ + &random.Charset{ Charset: random.UppercaseRuneset, MinChars: 1, }, - &random.CharsetRestriction{ + &random.Charset{ Charset: random.NumericRuneset, MinChars: 1, }, - &random.CharsetRestriction{ + &random.Charset{ Charset: random.ShortSymbolRuneset, MinChars: 1, }, @@ -266,7 +265,7 @@ func TestSystem_GRPC_passwordPolicy(t *testing.T) { } sys := &logical.StaticSystemView{ PasswordPolicies: map[string]logical.PasswordPolicy{ - policyName: expectedPolicy, + policyName: logical.PasswordPolicy(expectedPolicy), }, } @@ -283,12 +282,20 @@ func TestSystem_GRPC_passwordPolicy(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) defer cancel() - actualPolicy, err := testSystemView.PasswordPolicy(ctx, policyName) + password, err := testSystemView.GeneratePasswordFromPolicy(ctx, policyName) if err != nil { t.Fatalf("no error expected, got: %s", err) } - if !reflect.DeepEqual(actualPolicy, expectedPolicy) { - t.Fatalf("Actual: %#v\nExpected: %#v", actualPolicy, expectedPolicy) + passRunes := []rune(password) + + if len(passRunes) != expectedPolicy.Length { + t.Fatalf("Generated password should have length %d but was %d", expectedPolicy.Length, len(passRunes)) + } + + for _, rule := range expectedPolicy.Rules { + if !rule.Pass(passRunes) { + t.Fatalf("Password [%s] did not pass rule: %#v", password, rule) + } } } diff --git a/sdk/plugin/pb/backend.pb.go b/sdk/plugin/pb/backend.pb.go index 59415ca23480..bd1b2c765b7d 100644 --- a/sdk/plugin/pb/backend.pb.go +++ b/sdk/plugin/pb/backend.pb.go @@ -2662,82 +2662,82 @@ func (m *PluginEnvReply) GetErr() string { return "" } -type PasswordPolicyRequest struct { +type GeneratePasswordFromPolicyRequest struct { PolicyName string `sentinel:"" protobuf:"bytes,1,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *PasswordPolicyRequest) Reset() { *m = PasswordPolicyRequest{} } -func (m *PasswordPolicyRequest) String() string { return proto.CompactTextString(m) } -func (*PasswordPolicyRequest) ProtoMessage() {} -func (*PasswordPolicyRequest) Descriptor() ([]byte, []int) { +func (m *GeneratePasswordFromPolicyRequest) Reset() { *m = GeneratePasswordFromPolicyRequest{} } +func (m *GeneratePasswordFromPolicyRequest) String() string { return proto.CompactTextString(m) } +func (*GeneratePasswordFromPolicyRequest) ProtoMessage() {} +func (*GeneratePasswordFromPolicyRequest) Descriptor() ([]byte, []int) { return fileDescriptor_4dbf1dfe0c11846b, []int{44} } -func (m *PasswordPolicyRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PasswordPolicyRequest.Unmarshal(m, b) +func (m *GeneratePasswordFromPolicyRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GeneratePasswordFromPolicyRequest.Unmarshal(m, b) } -func (m *PasswordPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PasswordPolicyRequest.Marshal(b, m, deterministic) +func (m *GeneratePasswordFromPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GeneratePasswordFromPolicyRequest.Marshal(b, m, deterministic) } -func (m *PasswordPolicyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PasswordPolicyRequest.Merge(m, src) +func (m *GeneratePasswordFromPolicyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GeneratePasswordFromPolicyRequest.Merge(m, src) } -func (m *PasswordPolicyRequest) XXX_Size() int { - return xxx_messageInfo_PasswordPolicyRequest.Size(m) +func (m *GeneratePasswordFromPolicyRequest) XXX_Size() int { + return xxx_messageInfo_GeneratePasswordFromPolicyRequest.Size(m) } -func (m *PasswordPolicyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PasswordPolicyRequest.DiscardUnknown(m) +func (m *GeneratePasswordFromPolicyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GeneratePasswordFromPolicyRequest.DiscardUnknown(m) } -var xxx_messageInfo_PasswordPolicyRequest proto.InternalMessageInfo +var xxx_messageInfo_GeneratePasswordFromPolicyRequest proto.InternalMessageInfo -func (m *PasswordPolicyRequest) GetPolicyName() string { +func (m *GeneratePasswordFromPolicyRequest) GetPolicyName() string { if m != nil { return m.PolicyName } return "" } -type PasswordPolicyResponse struct { - RawPolicy []byte `sentinel:"" protobuf:"bytes,1,opt,name=raw_policy,json=rawPolicy,proto3" json:"raw_policy,omitempty"` +type GeneratePasswordFromPolicyReply struct { + Password string `sentinel:"" protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *PasswordPolicyResponse) Reset() { *m = PasswordPolicyResponse{} } -func (m *PasswordPolicyResponse) String() string { return proto.CompactTextString(m) } -func (*PasswordPolicyResponse) ProtoMessage() {} -func (*PasswordPolicyResponse) Descriptor() ([]byte, []int) { +func (m *GeneratePasswordFromPolicyReply) Reset() { *m = GeneratePasswordFromPolicyReply{} } +func (m *GeneratePasswordFromPolicyReply) String() string { return proto.CompactTextString(m) } +func (*GeneratePasswordFromPolicyReply) ProtoMessage() {} +func (*GeneratePasswordFromPolicyReply) Descriptor() ([]byte, []int) { return fileDescriptor_4dbf1dfe0c11846b, []int{45} } -func (m *PasswordPolicyResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PasswordPolicyResponse.Unmarshal(m, b) +func (m *GeneratePasswordFromPolicyReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GeneratePasswordFromPolicyReply.Unmarshal(m, b) } -func (m *PasswordPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PasswordPolicyResponse.Marshal(b, m, deterministic) +func (m *GeneratePasswordFromPolicyReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GeneratePasswordFromPolicyReply.Marshal(b, m, deterministic) } -func (m *PasswordPolicyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PasswordPolicyResponse.Merge(m, src) +func (m *GeneratePasswordFromPolicyReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_GeneratePasswordFromPolicyReply.Merge(m, src) } -func (m *PasswordPolicyResponse) XXX_Size() int { - return xxx_messageInfo_PasswordPolicyResponse.Size(m) +func (m *GeneratePasswordFromPolicyReply) XXX_Size() int { + return xxx_messageInfo_GeneratePasswordFromPolicyReply.Size(m) } -func (m *PasswordPolicyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PasswordPolicyResponse.DiscardUnknown(m) +func (m *GeneratePasswordFromPolicyReply) XXX_DiscardUnknown() { + xxx_messageInfo_GeneratePasswordFromPolicyReply.DiscardUnknown(m) } -var xxx_messageInfo_PasswordPolicyResponse proto.InternalMessageInfo +var xxx_messageInfo_GeneratePasswordFromPolicyReply proto.InternalMessageInfo -func (m *PasswordPolicyResponse) GetRawPolicy() []byte { +func (m *GeneratePasswordFromPolicyReply) GetPassword() string { if m != nil { - return m.RawPolicy + return m.Password } - return nil + return "" } type Connection struct { @@ -2830,179 +2830,179 @@ func init() { proto.RegisterType((*EntityInfoReply)(nil), "pb.EntityInfoReply") proto.RegisterType((*GroupsForEntityReply)(nil), "pb.GroupsForEntityReply") proto.RegisterType((*PluginEnvReply)(nil), "pb.PluginEnvReply") - proto.RegisterType((*PasswordPolicyRequest)(nil), "pb.PasswordPolicyRequest") - proto.RegisterType((*PasswordPolicyResponse)(nil), "pb.PasswordPolicyResponse") + proto.RegisterType((*GeneratePasswordFromPolicyRequest)(nil), "pb.GeneratePasswordFromPolicyRequest") + proto.RegisterType((*GeneratePasswordFromPolicyReply)(nil), "pb.GeneratePasswordFromPolicyReply") proto.RegisterType((*Connection)(nil), "pb.Connection") } func init() { proto.RegisterFile("sdk/plugin/pb/backend.proto", fileDescriptor_4dbf1dfe0c11846b) } var fileDescriptor_4dbf1dfe0c11846b = []byte{ - // 2615 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x72, 0xdc, 0xc6, - 0xf1, 0xaf, 0xdd, 0xe5, 0x7e, 0xf5, 0x7e, 0x8f, 0x28, 0xfd, 0xa1, 0x95, 0xfc, 0x17, 0x0d, 0x47, - 0x32, 0xad, 0x58, 0x4b, 0x8b, 0x8a, 0x63, 0x39, 0xa9, 0xc4, 0x25, 0x53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0x9f, 0xae, 0x42, 0x46, 0xfe, 0x0f, 0xe4, 0xe7, 0x6c, 0x19, 0x2d, 0x8c, 0xea, - 0x4e, 0x45, 0x6a, 0x60, 0x9c, 0xbf, 0x8c, 0x16, 0xc9, 0x1c, 0x3b, 0x70, 0x98, 0x51, 0xdb, 0xa9, - 0xec, 0xd6, 0x70, 0xce, 0x41, 0xe0, 0x30, 0xf3, 0xaf, 0x15, 0xa8, 0x9f, 0x50, 0x71, 0x1e, 0x11, - 0x02, 0x5b, 0x3c, 0x08, 0x84, 0x36, 0x8e, 0xdf, 0x64, 0x17, 0x06, 0xb1, 0x4f, 0x63, 0x71, 0x2e, - 0x77, 0x65, 0x53, 0xc1, 0x1c, 0xa3, 0x8a, 0xec, 0x75, 0x32, 0x79, 0x0b, 0x7a, 0x5e, 0x60, 0x53, - 0x6f, 0x16, 0x89, 0x80, 0xd3, 0x85, 0xb4, 0x23, 0xe5, 0xba, 0x48, 0x3c, 0x55, 0x34, 0xf2, 0x10, - 0x46, 0x11, 0xa3, 0xde, 0xec, 0x8a, 0xd3, 0x30, 0x15, 0xdc, 0x52, 0x0a, 0x25, 0xe3, 0x2b, 0x4e, - 0x43, 0x2d, 0x6b, 0xfe, 0xb3, 0x01, 0x4d, 0x8b, 0xfd, 0x31, 0x66, 0x91, 0x20, 0x7d, 0xa8, 0xba, - 0x0e, 0xee, 0xb6, 0x6d, 0x55, 0x5d, 0x87, 0x4c, 0x80, 0x58, 0x2c, 0xf4, 0xa4, 0x69, 0x37, 0xf0, - 0x0f, 0xbc, 0x38, 0x12, 0x8c, 0xeb, 0x3d, 0x97, 0x70, 0xc8, 0x5d, 0x68, 0x07, 0x21, 0xe3, 0x48, - 0x43, 0x07, 0xb4, 0xad, 0x8c, 0x20, 0x37, 0x1e, 0x52, 0x71, 0x6e, 0x6c, 0x21, 0x03, 0xbf, 0x25, - 0xcd, 0xa1, 0x82, 0x1a, 0x75, 0x45, 0x93, 0xdf, 0xc4, 0x84, 0x46, 0xc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27, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x88, - 0xcc, 0xb6, 0x05, 0x1c, 0x1c, 0x00, 0x00, + // 2616 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x72, 0x1b, 0xc7, + 0x11, 0x2e, 0x00, 0xc4, 0x5f, 0xe3, 0x7f, 0x44, 0x2b, 0x2b, 0x48, 0x8e, 0xe8, 0x55, 0x24, 0xd3, + 0x8a, 0x05, 0x5a, 0x54, 0x1c, 0xcb, 0x49, 0x39, 0x2e, 0x99, 0xa2, 0x64, 0xc6, 0x94, 0xcd, 0x5a, + 0xc2, 0x71, 0xfe, 0xaa, 0xe0, 0xc1, 0xee, 0x10, 0xd8, 0xe2, 0x62, 0x77, 0x33, 0x3b, 0x4b, 0x11, + 0xb9, 0xe4, 0x2d, 0xf2, 0x06, 0x39, 0xa7, 0x72, 0xcb, 0x2d, 0x57, 0x57, 0xee, 0x79, 0x85, 0x3c, + 0x47, 0x6a, 0x7a, 0x66, 0xff, 0x00, 0x50, 0x92, 0xab, 0x9c, 0xdb, 0x4e, 0x77, 0x4f, 0xf7, 0x4c, + 0x4f, 0x77, 0x7f, 0x3d, 0xb3, 0x70, 0x33, 0x72, 0xce, 0xf7, 0x42, 0x2f, 0x9e, 0xb9, 0xfe, 0x5e, + 0x38, 0xdd, 0x9b, 0x52, 0xfb, 0x9c, 0xf9, 0xce, 0x28, 0xe4, 0x81, 0x08, 0x48, 0x39, 0x9c, 0x0e, + 0x6f, 0xcf, 0x82, 0x60, 0xe6, 0xb1, 0x3d, 0xa4, 0x4c, 0xe3, 0xb3, 0x3d, 0xe1, 0x2e, 0x58, 0x24, + 0xe8, 0x22, 0x54, 0x42, 0xc3, 0xa1, 0xd4, 0xe0, 0x05, 0x33, 0xd7, 0xa6, 0xde, 0x9e, 0xeb, 0x30, + 0x5f, 0xb8, 0x62, 0xa9, 0x79, 0x46, 0x9e, 0xa7, 0xac, 0x28, 0x8e, 0x59, 0x87, 0xea, 0xe1, 0x22, + 0x14, 0x4b, 0x73, 0x07, 0x6a, 0x9f, 0x33, 0xea, 0x30, 0x4e, 0xae, 0x43, 0x6d, 0x8e, 0x5f, 0x46, + 0x69, 0xa7, 0xb2, 0xdb, 0xb4, 0xf4, 0xc8, 0xfc, 0x03, 0xc0, 0x89, 0x9c, 0x73, 0xc8, 0x79, 0xc0, + 0xc9, 0x0d, 0x68, 0x30, 0xce, 0x27, 0x62, 0x19, 0x32, 0xa3, 0xb4, 0x53, 0xda, 0xed, 0x58, 0x75, + 0xc6, 0xf9, 0x78, 0x19, 0x32, 0xf2, 0x23, 0x90, 0x9f, 0x93, 0x45, 0x34, 0x33, 0xca, 0x3b, 0x25, + 0xa9, 0x81, 0x71, 0xfe, 0x22, 0x9a, 0x25, 0x73, 0xec, 0xc0, 0x61, 0x46, 0x65, 0xa7, 0xb4, 0x5b, + 0xc1, 0x39, 0x07, 0x81, 0xc3, 0xcc, 0xbf, 0x96, 0xa0, 0x7a, 0x42, 0xc5, 0x3c, 0x22, 0x04, 0xb6, + 0x78, 0x10, 0x08, 0x6d, 0x1c, 0xbf, 0xc9, 0x2e, 0xf4, 0x62, 0x9f, 0xc6, 0x62, 0x2e, 0x77, 0x65, + 0x53, 0xc1, 0x1c, 0xa3, 0x8c, 0xec, 0x55, 0x32, 0xb9, 0x03, 0x1d, 0x2f, 0xb0, 0xa9, 0x37, 0x89, + 0x44, 0xc0, 0xe9, 0x4c, 0xda, 0x91, 0x72, 0x6d, 0x24, 0x9e, 0x2a, 0x1a, 0xb9, 0x0f, 0x83, 0x88, + 0x51, 0x6f, 0xf2, 0x92, 0xd3, 0x30, 0x15, 0xdc, 0x52, 0x0a, 0x25, 0xe3, 0x1b, 0x4e, 0x43, 0x2d, + 0x6b, 0xfe, 0xab, 0x06, 0x75, 0x8b, 0xfd, 0x29, 0x66, 0x91, 0x20, 0x5d, 0x28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xa8, 0x5e, 0x50, 0x2f, 0x66, 0x18, 0xf2, 0x3a, + 0x10, 0xd5, 0x14, 0x4b, 0x31, 0x7e, 0x51, 0x7e, 0x5c, 0x32, 0xff, 0x5b, 0x85, 0x2d, 0x19, 0x7c, + 0xe4, 0x43, 0xe8, 0x78, 0x8c, 0x46, 0x6c, 0x12, 0x84, 0xd2, 0x40, 0x84, 0xaa, 0x5a, 0xfb, 0x7d, + 0x39, 0xed, 0x58, 0x32, 0xbe, 0x52, 0x74, 0xab, 0xed, 0xe5, 0x46, 0x32, 0xa5, 0x5d, 0x5f, 0x30, + 0xee, 0x53, 0x6f, 0x82, 0xc9, 0xa0, 0x12, 0xac, 0x9d, 0x10, 0x9f, 0xca, 0xa4, 0x58, 0x8d, 0xa3, + 0xca, 0x7a, 0x1c, 0x0d, 0xa1, 0x81, 0xbe, 0x73, 0x59, 0xa4, 0x93, 0x3d, 0x1d, 0x93, 0x7d, 0x68, + 0x2c, 0x98, 0xa0, 0x3a, 0xd7, 0x64, 0x4a, 0x5c, 0x4f, 0x72, 0x66, 0xf4, 0x42, 0x33, 0x54, 0x42, + 0xa4, 0x72, 0x6b, 0x19, 0x51, 0x5b, 0xcf, 0x88, 0x21, 0x34, 0xd2, 0xa0, 0xab, 0xab, 0x13, 0x4e, + 0xc6, 0xb2, 0xcc, 0x86, 0x8c, 0xbb, 0x81, 0x63, 0x34, 0x30, 0x50, 0xf4, 0x48, 0x16, 0x49, 0x3f, + 0x5e, 0xa8, 0x10, 0x6a, 0xaa, 0x22, 0xe9, 0xc7, 0x8b, 0xf5, 0x88, 0x81, 0x95, 0x88, 0xf9, 0x09, + 0x54, 0xa9, 0xe7, 0xd2, 0x08, 0x53, 0x48, 0x9e, 0xac, 0xae, 0xf7, 0xa3, 0x27, 0x92, 0x6a, 0x29, + 0x26, 0x79, 0x04, 0x9d, 0x19, 0x0f, 0xe2, 0x70, 0x82, 0x43, 0x16, 0x19, 0x6d, 0xdc, 0xed, 0xaa, + 0x74, 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 0x06, 0x2a, 0x58, 0xa9, 0xcc, 0x9f, 0x42, 0x6f, 0xa5, 0xfa, 0x6f, + 0xb4, 0x83, 0xee, 0xd9, 0x08, 0x13, 0x73, 0x18, 0x5e, 0x5d, 0x37, 0xc9, 0x5d, 0x9c, 0xf7, 0xba, + 0xea, 0x3c, 0xbc, 0xf3, 0x3a, 0xb1, 0xd0, 0x5b, 0x7e, 0x76, 0xff, 0xf7, 0xbb, 0x33, 0x57, 0xcc, + 0xe3, 0xe9, 0xc8, 0x0e, 0x16, 0x7b, 0x73, 0x1a, 0xcd, 0x5d, 0x3b, 0xe0, 0xe1, 0xde, 0x85, 0x8c, + 0xdb, 0xbd, 0xc2, 0x7f, 0xc3, 0x69, 0x0d, 0xef, 0xcf, 0x8f, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, + 0x2e, 0xfe, 0x10, 0x49, 0x4f, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3611,8 +3611,8 @@ type SystemViewClient interface { // GroupsForEntity returns the group membership information for the given // entity id GroupsForEntity(ctx context.Context, in *EntityInfoArgs, opts ...grpc.CallOption) (*GroupsForEntityReply, error) - // PasswordPolicy returns a password policy if one exists - PasswordPolicy(ctx context.Context, in *PasswordPolicyRequest, opts ...grpc.CallOption) (*PasswordPolicyResponse, error) + // GeneratePasswordFromPolicy generates a password from an existing password policy + GeneratePasswordFromPolicy(ctx context.Context, in *GeneratePasswordFromPolicyRequest, opts ...grpc.CallOption) (*GeneratePasswordFromPolicyReply, error) } type systemViewClient struct { @@ -3722,9 +3722,9 @@ func (c *systemViewClient) GroupsForEntity(ctx context.Context, in *EntityInfoAr return out, nil } -func (c *systemViewClient) PasswordPolicy(ctx context.Context, in *PasswordPolicyRequest, opts ...grpc.CallOption) (*PasswordPolicyResponse, error) { - out := new(PasswordPolicyResponse) - err := c.cc.Invoke(ctx, "/pb.SystemView/PasswordPolicy", in, out, opts...) +func (c *systemViewClient) GeneratePasswordFromPolicy(ctx context.Context, in *GeneratePasswordFromPolicyRequest, opts ...grpc.CallOption) (*GeneratePasswordFromPolicyReply, error) { + out := new(GeneratePasswordFromPolicyReply) + err := c.cc.Invoke(ctx, "/pb.SystemView/GeneratePasswordFromPolicy", in, out, opts...) if err != nil { return nil, err } @@ -3769,8 +3769,8 @@ type SystemViewServer interface { // GroupsForEntity returns the group membership information for the given // entity id GroupsForEntity(context.Context, *EntityInfoArgs) (*GroupsForEntityReply, error) - // PasswordPolicy returns a password policy if one exists - PasswordPolicy(context.Context, *PasswordPolicyRequest) (*PasswordPolicyResponse, error) + // GeneratePasswordFromPolicy generates a password from an existing password policy + GeneratePasswordFromPolicy(context.Context, *GeneratePasswordFromPolicyRequest) (*GeneratePasswordFromPolicyReply, error) } // UnimplementedSystemViewServer can be embedded to have forward compatible implementations. @@ -3810,8 +3810,8 @@ func (*UnimplementedSystemViewServer) PluginEnv(ctx context.Context, req *Empty) func (*UnimplementedSystemViewServer) GroupsForEntity(ctx context.Context, req *EntityInfoArgs) (*GroupsForEntityReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GroupsForEntity not implemented") } -func (*UnimplementedSystemViewServer) PasswordPolicy(ctx context.Context, req *PasswordPolicyRequest) (*PasswordPolicyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PasswordPolicy not implemented") +func (*UnimplementedSystemViewServer) GeneratePasswordFromPolicy(ctx context.Context, req *GeneratePasswordFromPolicyRequest) (*GeneratePasswordFromPolicyReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GeneratePasswordFromPolicy not implemented") } func RegisterSystemViewServer(s *grpc.Server, srv SystemViewServer) { @@ -4016,20 +4016,20 @@ func _SystemView_GroupsForEntity_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } -func _SystemView_PasswordPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PasswordPolicyRequest) +func _SystemView_GeneratePasswordFromPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GeneratePasswordFromPolicyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SystemViewServer).PasswordPolicy(ctx, in) + return srv.(SystemViewServer).GeneratePasswordFromPolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.SystemView/PasswordPolicy", + FullMethod: "/pb.SystemView/GeneratePasswordFromPolicy", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SystemViewServer).PasswordPolicy(ctx, req.(*PasswordPolicyRequest)) + return srv.(SystemViewServer).GeneratePasswordFromPolicy(ctx, req.(*GeneratePasswordFromPolicyRequest)) } return interceptor(ctx, in, info, handler) } @@ -4083,8 +4083,8 @@ var _SystemView_serviceDesc = grpc.ServiceDesc{ Handler: _SystemView_GroupsForEntity_Handler, }, { - MethodName: "PasswordPolicy", - Handler: _SystemView_PasswordPolicy_Handler, + MethodName: "GeneratePasswordFromPolicy", + Handler: _SystemView_GeneratePasswordFromPolicy_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/sdk/plugin/pb/backend.proto b/sdk/plugin/pb/backend.proto index 0d907b695596..e7244df50b8e 100644 --- a/sdk/plugin/pb/backend.proto +++ b/sdk/plugin/pb/backend.proto @@ -554,12 +554,12 @@ message PluginEnvReply { string err = 2; } -message PasswordPolicyRequest { +message GeneratePasswordFromPolicyRequest { string policy_name = 1; } -message PasswordPolicyResponse { - bytes raw_policy = 1; +message GeneratePasswordFromPolicyReply { + string password = 1; } // SystemView exposes system configuration information in a safe way for plugins @@ -567,7 +567,7 @@ message PasswordPolicyResponse { service SystemView { // DefaultLeaseTTL returns the default lease TTL set in Vault configuration rpc DefaultLeaseTTL(Empty) returns (TTLReply); - + // MaxLeaseTTL returns the max lease TTL set in Vault configuration; backend // authors should take care not to issue credentials that last longer than // this value, as Vault will revoke them @@ -612,8 +612,8 @@ service SystemView { // entity id rpc GroupsForEntity(EntityInfoArgs) returns (GroupsForEntityReply); - // PasswordPolicy returns a password policy if one exists - rpc PasswordPolicy(PasswordPolicyRequest) returns (PasswordPolicyResponse); + // GeneratePasswordFromPolicy generates a password from an existing password policy + rpc GeneratePasswordFromPolicy(GeneratePasswordFromPolicyRequest) returns (GeneratePasswordFromPolicyReply); } message Connection { diff --git a/vault/dynamic_system_view.go b/vault/dynamic_system_view.go index a6799590b703..fe65e54e7da5 100644 --- a/vault/dynamic_system_view.go +++ b/vault/dynamic_system_view.go @@ -329,9 +329,9 @@ func (d dynamicSystemView) PluginEnv(_ context.Context) (*logical.PluginEnvironm }, nil } -func (d dynamicSystemView) PasswordPolicy(ctx context.Context, policyName string) (policy logical.PasswordPolicy, err error) { +func (d dynamicSystemView) GeneratePasswordFromPolicy(ctx context.Context, policyName string) (password string, err error) { if policyName == "" { - return nil, fmt.Errorf("missing password policy name") + return "", fmt.Errorf("missing password policy name") } // Ensure there's a timeout on the context of some sort @@ -343,17 +343,17 @@ func (d dynamicSystemView) PasswordPolicy(ctx context.Context, policyName string policyCfg, err := retrievePasswordPolicy(ctx, d.core.systemBarrierView, policyName) if err != nil { - return nil, fmt.Errorf("failed to retrieve password policy: %w", err) + return "", fmt.Errorf("failed to retrieve password policy: %w", err) } if policyCfg == nil { - return nil, nil + return "", fmt.Errorf("no password policy found") } passPolicy, err := random.Parse(policyCfg.HCLPolicy) if err != nil { - return nil, fmt.Errorf("stored password policy is invalid: %w", err) + return "", fmt.Errorf("stored password policy is invalid: %w", err) } - return passPolicy, nil + return passPolicy.Generate(ctx) } diff --git a/vault/dynamic_system_view_test.go b/vault/dynamic_system_view_test.go index 8b4d326a7b6e..673351f57170 100644 --- a/vault/dynamic_system_view_test.go +++ b/vault/dynamic_system_view_test.go @@ -2,8 +2,10 @@ package vault import ( "context" + "encoding/json" "fmt" "reflect" + "sort" "testing" "time" @@ -11,7 +13,6 @@ import ( ldapcred "github.com/hashicorp/vault/builtin/credential/ldap" "github.com/hashicorp/vault/helper/namespace" "github.com/hashicorp/vault/sdk/framework" - "github.com/hashicorp/vault/sdk/helper/random" "github.com/hashicorp/vault/sdk/logical" ) @@ -155,34 +156,96 @@ func TestIdentity_BackendTemplating(t *testing.T) { } } -func TestDynamicSystemView_PasswordPolicy(t *testing.T) { +func TestDynamicSystemView_GeneratePasswordFromPolicy_successful(t *testing.T) { + policyName := "testpolicy" + rawPolicy := map[string]interface{}{ + "policy": `length = 20 +rule "Charset" { + charset = "abcdefghijklmnopqrstuvwxyz" + min_chars = 1 +} +rule "Charset" { + charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + min_chars = 1 +} +rule "Charset" { + charset = "0123456789" + min_chars = 1 +}`, + } + marshalledPolicy, err := json.Marshal(rawPolicy) + if err != nil { + t.Fatalf("Unable to set up test: unable to marshal raw policy to JSON: %s", err) + } + + testStorage := fakeBarrier{ + getEntry: &logical.StorageEntry{ + Key: getPasswordPolicyKey(policyName), + Value: marshalledPolicy, + }, + } + + dsv := dynamicSystemView{ + core: &Core{ + systemBarrierView: NewBarrierView(testStorage, "sys/"), + }, + } + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) + defer cancel() + + runeset := map[rune]bool{} + runesFound := []rune{} + + for i := 0; i < 100; i++ { + actual, err := dsv.GeneratePasswordFromPolicy(ctx, policyName) + if err != nil { + t.Fatalf("no error expected, but got: %s", err) + } + for _, r := range actual { + if runeset[r] { + continue + } + runeset[r] = true + runesFound = append(runesFound, r) + } + } + + sort.Sort(runes(runesFound)) + + expectedRunes := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") + sort.Sort(runes(expectedRunes)) // Sort it so they can be compared + + if !reflect.DeepEqual(runesFound, expectedRunes) { + t.Fatalf("Didn't find all characters from the charset\nActual : [%s]\nExpected: [%s]", string(runesFound), string(expectedRunes)) + } +} + +type runes []rune + +func (r runes) Len() int { return len(r) } +func (r runes) Less(i, j int) bool { return r[i] < r[j] } +func (r runes) Swap(i, j int) { r[i], r[j] = r[j], r[i] } + +func TestDynamicSystemView_GeneratePasswordFromPolicy_failed(t *testing.T) { type testCase struct { - policyName string - getEntry *logical.StorageEntry - getErr error - expectedPolicy logical.PasswordPolicy - expectErr bool + policyName string + getEntry *logical.StorageEntry + getErr error } tests := map[string]testCase{ "no policy name": { - policyName: "", - expectedPolicy: nil, - expectErr: true, + policyName: "", }, "no policy found": { - policyName: "testpolicy", - getEntry: nil, - getErr: nil, - expectedPolicy: nil, - expectErr: false, + policyName: "testpolicy", + getEntry: nil, + getErr: nil, }, "error retrieving policy": { - policyName: "testpolicy", - getEntry: nil, - getErr: fmt.Errorf("a test error"), - expectedPolicy: nil, - expectErr: true, + policyName: "testpolicy", + getEntry: nil, + getErr: fmt.Errorf("a test error"), }, "saved policy is malformed": { policyName: "testpolicy", @@ -190,22 +253,7 @@ func TestDynamicSystemView_PasswordPolicy(t *testing.T) { Key: getPasswordPolicyKey("testpolicy"), Value: []byte(`{"policy":"asdfahsdfasdf"}`), }, - getErr: nil, - expectedPolicy: nil, - expectErr: true, - }, - "good saved policy": { - policyName: "testpolicy", - getEntry: &logical.StorageEntry{ - Key: getPasswordPolicyKey("testpolicy"), - Value: []byte(`{"policy":"length=8\ncharset=\"ABCDE\""}`), - }, getErr: nil, - expectedPolicy: random.StringGenerator{ - Length: 8, - Charset: []rune("ABCDE"), - }, - expectErr: false, }, } @@ -223,16 +271,12 @@ func TestDynamicSystemView_PasswordPolicy(t *testing.T) { } ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) defer cancel() - actualPolicy, err := dsv.PasswordPolicy(ctx, test.policyName) - if test.expectErr && err == nil { + actualPassword, err := dsv.GeneratePasswordFromPolicy(ctx, test.policyName) + if err == nil { t.Fatalf("err expected, got nil") } - if !test.expectErr && err != nil { - t.Fatalf("no error expected, got: %s", err) - } - - if !reflect.DeepEqual(actualPolicy, test.expectedPolicy) { - t.Fatalf("Actual Policy: %#v\nExpected Policy: %#v", actualPolicy, test.expectedPolicy) + if actualPassword != "" { + t.Fatalf("no password expected, got %s", actualPassword) } }) } diff --git a/vault/logical_system_test.go b/vault/logical_system_test.go index a77576b0b976..f4f6a4b697fb 100644 --- a/vault/logical_system_test.go +++ b/vault/logical_system_test.go @@ -2752,7 +2752,10 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { "missing policy name": { storage: &fakeStorage{}, data: passwordPoliciesFieldData(map[string]interface{}{ - "policy": "length = 20\ncharset=\"abcdefghij\"", + "policy": `length = 20 + rule "Charset" { + charset="abcdefghij" + }`, }), expectedResp: nil, expectErr: true, @@ -2779,8 +2782,11 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { putError: fmt.Errorf("test error"), }, data: passwordPoliciesFieldData(map[string]interface{}{ - "name": "testpolicy", - "policy": "length = 20\ncharset=\"abcdefghij\"", + "name": "testpolicy", + "policy": "length = 20\n" + + "rule \"Charset\" {\n" + + " charset=\"abcdefghij\"\n" + + "}", }), expectedResp: nil, expectErr: true, @@ -2789,13 +2795,11 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { storage: &fakeStorage{}, data: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", - "policy": ` - length = 30 - charset="lower-alpha" - rule "CharsetRestriction" { - charset = "a" - min-chars = 30 - }`, + "policy": "length = 20\n" + + "rule \"Charset\" {\n" + + " charset=\"a\"\n" + + " min-chars = 30\n" + + "}", }), expectedResp: nil, expectErr: true, @@ -2803,8 +2807,11 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { "not base64 encoded": { storage: &fakeStorage{}, data: passwordPoliciesFieldData(map[string]interface{}{ - "name": "testpolicy", - "policy": "length = 20\ncharset=\"abcdefghij\"", + "name": "testpolicy", + "policy": "length = 20\n" + + "rule \"Charset\" {\n" + + " charset=\"abcdefghij\"\n" + + "}", }), expectedResp: &logical.Response{ Data: map[string]interface{}{ @@ -2814,14 +2821,21 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { }, expectErr: false, expectedStore: map[string][]byte{ - "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + "password_policy/testpolicy": toJson(t, map[string]interface{}{ + "policy": "length = 20\n" + + "rule \"Charset\" {\n" + + " charset=\"abcdefghij\"\n" + + "}"}), }, }, "base64 encoded": { storage: &fakeStorage{}, data: passwordPoliciesFieldData(map[string]interface{}{ - "name": "testpolicy", - "policy": base64Encode("length = 20\ncharset=\"abcdefghij\""), + "name": "testpolicy", + "policy": base64Encode("length = 20\n" + + "rule \"Charset\" {\n" + + " charset=\"abcdefghij\"\n" + + "}"), }), expectedResp: &logical.Response{ Data: map[string]interface{}{ @@ -2831,14 +2845,18 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { }, expectErr: false, expectedStore: map[string][]byte{ - "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + "password_policy/testpolicy": toJson(t, map[string]interface{}{ + "policy": "length = 20\n" + + "rule \"Charset\" {\n" + + " charset=\"abcdefghij\"\n" + + "}"}), }, }, } for name, test := range tests { t.Run(name, func(t *testing.T) { - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) + ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) defer cancel() req := &logical.Request{ @@ -2859,6 +2877,7 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { } actualStore := test.storage.getAll() + if !reflect.DeepEqual(actualStore, test.expectedStore) { t.Fatalf("Actual storage: %#v\nExpected storage: %#v", actualStore, test.expectedStore) } @@ -2866,6 +2885,16 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { } } +func toJson(t *testing.T, val interface{}) []byte { + t.Helper() + + b, err := jsonutil.EncodeJSON(val) + if err != nil { + t.Fatalf("Unable to marshal to JSON: %s", err) + } + return b +} + func TestHandlePoliciesPasswordGet(t *testing.T) { type testCase struct { storage logical.Storage @@ -2960,20 +2989,32 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { "missing policy name": { storage: &fakeStorage{ data: map[string][]byte{ - "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + "password_policy/testpolicy": toJson(t, map[string]interface{}{ + "policy": `length = 20 + rule "Charset" { + charset="abcdefghij" + }`}), }, }, data: passwordPoliciesFieldData(map[string]interface{}{}), expectedResp: nil, expectErr: true, expectedStore: map[string][]byte{ - "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + "password_policy/testpolicy": toJson(t, map[string]interface{}{ + "policy": `length = 20 + rule "Charset" { + charset="abcdefghij" + }`}), }, }, "storage failure": { storage: &fakeStorage{ data: map[string][]byte{ - "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + "password_policy/testpolicy": toJson(t, map[string]interface{}{ + "policy": `length = 20 + rule "Charset" { + charset="abcdefghij" + }`}), }, deleteError: fmt.Errorf("test error"), }, @@ -2983,13 +3024,21 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { expectedResp: nil, expectErr: true, expectedStore: map[string][]byte{ - "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + "password_policy/testpolicy": toJson(t, map[string]interface{}{ + "policy": `length = 20 + rule "Charset" { + charset="abcdefghij" + }`}), }, }, "successful delete": { storage: &fakeStorage{ data: map[string][]byte{ - "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + "password_policy/testpolicy": toJson(t, map[string]interface{}{ + "policy": `length = 20 + rule "Charset" { + charset="abcdefghij" + }`}), }, }, data: passwordPoliciesFieldData(map[string]interface{}{ @@ -3050,7 +3099,11 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { "missing policy name": { storage: &fakeStorage{ data: map[string][]byte{ - "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + "password_policy/testpolicy": toJson(t, map[string]interface{}{ + "policy": `length = 20 + rule "Charset" { + charset="abcdefghij" + }`}), }, }, data: passwordPoliciesFieldData(map[string]interface{}{}), @@ -3060,7 +3113,11 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { "storage failure": { storage: &fakeStorage{ data: map[string][]byte{ - "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + "password_policy/testpolicy": toJson(t, map[string]interface{}{ + "policy": `length = 20 + rule "Charset" { + charset="abcdefghij" + }`}), }, getError: fmt.Errorf("test error"), }, @@ -3083,7 +3140,7 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { "policy improperly saved": { storage: &fakeStorage{ data: map[string][]byte{ - "password_policy/testpolicy": []byte("{\"policy\":\"ahsdiofalsdjflkajsdf\"}\n"), + "password_policy/testpolicy": toJson(t, map[string]interface{}{"policy": "asdfasdf"}), }, }, data: passwordPoliciesFieldData(map[string]interface{}{ @@ -3093,10 +3150,14 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { expectErr: true, }, "failed to generate": { - timeout: 0 * time.Second, + timeout: 0 * time.Second, // Timeout immediately storage: &fakeStorage{ data: map[string][]byte{ - "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + "password_policy/testpolicy": toJson(t, map[string]interface{}{ + "policy": `length = 20 + rule "Charset" { + charset="abcdefghij" + }`}), }, }, data: passwordPoliciesFieldData(map[string]interface{}{ @@ -3137,7 +3198,11 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { defer cancel() storage := &fakeStorage{ data: map[string][]byte{ - "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), + "password_policy/testpolicy": toJson(t, map[string]interface{}{ + "policy": `length = 20 + rule "Charset" { + charset="abcdefghij" + }`}), }, } data := passwordPoliciesFieldData(map[string]interface{}{ @@ -3161,7 +3226,7 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { // Password assertions expectedPassLen := 20 rules := []random.Rule{ - random.CharsetRestriction{ + random.Charset{ Charset: []rune("abcdefghij"), MinChars: expectedPassLen, }, diff --git a/vendor/github.com/hashicorp/vault/api/go.sum b/vendor/github.com/hashicorp/vault/api/go.sum index 018adbf1495b..035be8361a26 100644 --- a/vendor/github.com/hashicorp/vault/api/go.sum +++ b/vendor/github.com/hashicorp/vault/api/go.sum @@ -72,8 +72,6 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.2.2 h1:dxe5oCinTXiTIcfgmZecdCzPmAJKd46KsCWc35r0TV4= github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= diff --git a/vendor/github.com/hashicorp/vault/sdk/database/dbplugin/database.pb.go b/vendor/github.com/hashicorp/vault/sdk/database/dbplugin/database.pb.go index 943443f3c6d5..c820015136cc 100644 --- a/vendor/github.com/hashicorp/vault/sdk/database/dbplugin/database.pb.go +++ b/vendor/github.com/hashicorp/vault/sdk/database/dbplugin/database.pb.go @@ -959,8 +959,6 @@ type DatabaseClient interface { Close(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) SetCredentials(ctx context.Context, in *SetCredentialsRequest, opts ...grpc.CallOption) (*SetCredentialsResponse, error) GenerateCredentials(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GenerateCredentialsResponse, error) - // - // Deprecated: Do not use. Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*Empty, error) } @@ -1074,8 +1072,6 @@ type DatabaseServer interface { Close(context.Context, *Empty) (*Empty, error) SetCredentials(context.Context, *SetCredentialsRequest) (*SetCredentialsResponse, error) GenerateCredentials(context.Context, *Empty) (*GenerateCredentialsResponse, error) - // - // Deprecated: Do not use. Initialize(context.Context, *InitializeRequest) (*Empty, error) } diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go index 9abbe93ab278..5510ad4e5cbb 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go @@ -3,11 +3,8 @@ package random import ( "fmt" "reflect" - "sort" - "unicode" "unicode/utf8" - "github.com/hashicorp/go-multierror" "github.com/hashicorp/hcl" "github.com/mitchellh/mapstructure" ) @@ -33,54 +30,50 @@ type Parser struct { } // Parse parses the provided HCL into a StringGenerator. -func (p Parser) Parse(raw string) (strs StringGenerator, err error) { +func (p Parser) Parse(raw string) (sg StringGenerator, err error) { rawData := map[string]interface{}{} err = hcl.Decode(&rawData, raw) if err != nil { - return strs, fmt.Errorf("unable to decode: %w", err) + return sg, fmt.Errorf("unable to decode: %w", err) } // Decode the top level items + gen := StringGenerator{} decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ - Result: &strs, + Result: &gen, DecodeHook: stringToRunesFunc, }) if err != nil { - return strs, fmt.Errorf("unable to decode configuration: %w", err) + return sg, fmt.Errorf("unable to decode configuration: %w", err) } err = decoder.Decode(rawData) if err != nil { - return strs, fmt.Errorf("failed to decode configuration: %w", err) + return sg, fmt.Errorf("failed to decode configuration: %w", err) } // Decode & parse rules rawRules, err := getMapSlice(rawData, "rule") if err != nil { - return strs, fmt.Errorf("unable to retrieve rules: %w", err) + return sg, fmt.Errorf("unable to retrieve rules: %w", err) } rules, err := parseRules(p.RuleRegistry, rawRules) if err != nil { - return strs, fmt.Errorf("unable to parse rules: %w", err) + return sg, fmt.Errorf("unable to parse rules: %w", err) } - // Add any charsets found in rules to the overall charset & deduplicate - cs := append(strs.Charset, getChars(rules)...) - cs = deduplicateRunes(cs) - - strs = StringGenerator{ - Length: strs.Length, - Charset: cs, - Rules: rules, + gen = StringGenerator{ + Length: gen.Length, + Rules: rules, } - err = validate(strs) + err = gen.validateConfig() if err != nil { - return strs, err + return sg, err } - return strs, nil + return gen, nil } func parseRules(registry Registry, rawRules []map[string]interface{}) (rules []Rule, err error) { @@ -91,7 +84,7 @@ func parseRules(registry Registry, rawRules []map[string]interface{}) (rules []R } // Map names like "lower-alpha" to lowercase alphabetical characters - applyShortcuts(info.data) + // applyShortcuts(info.data) rule, err := registry.parseRule(info.ruleType, info.data) if err != nil { @@ -103,57 +96,6 @@ func parseRules(registry Registry, rawRules []map[string]interface{}) (rules []R return rules, nil } -func validate(strs StringGenerator) (err error) { - type minLengthProvider interface { - MinLength() int - } - - merr := &multierror.Error{} - if strs.Length < 1 { - merr = multierror.Append(merr, fmt.Errorf("length must be >= 1")) - } - if len(strs.Charset) == 0 { - merr = multierror.Append(merr, fmt.Errorf("no charset specified")) - } - - minLengthRules := 0 - for _, rule := range strs.Rules { - mlp, ok := rule.(minLengthProvider) - if !ok { - continue - } - minLengthRules += mlp.MinLength() - } - - if minLengthRules > strs.Length { - merr = multierror.Append(merr, fmt.Errorf("specified rules require at least %d characters but %d is specified", minLengthRules, strs.Length)) - } - - for _, r := range strs.Charset { - if !unicode.IsPrint(r) { - merr = multierror.Append(merr, fmt.Errorf("non-printable character in charset")) - break - } - } - - return merr.ErrorOrNil() -} - -func getChars(rules []Rule) (chars []rune) { - type charsetProvider interface { - Chars() []rune - } - - for _, rule := range rules { - cp, ok := rule.(charsetProvider) - if !ok { - continue - } - chars = append(chars, cp.Chars()...) - } - return chars -} - // getMapSlice from the provided map. This will retrieve and type-assert a []map[string]interface{} from the map // This will not error if the key does not exist // This will return an error if the value at the provided key is not of type []map[string]interface{} @@ -193,64 +135,6 @@ func getRuleInfo(rule map[string]interface{}) (data ruleInfo, err error) { return data, fmt.Errorf("rule is empty") } -var ( - charsetShortcuts = map[string]string{ - // Base - "lower-alpha": LowercaseCharset, - "upper-alpha": UppercaseCharset, - "numeric": NumericCharset, - - // Combinations - "lower-upper-alpha": AlphabeticCharset, - "lower-upper-alphanumeric": AlphaNumericCharset, - } -) - -// applyShortcuts to the provided map. This will look for a "charset" key. If it exists and equals one of the keys -// in `charsetShortcuts`, it replaces the value with the value found in the `charsetShortcuts` map. For instance: -// -// Input map: -// map[string]interface{}{ -// "charset": "upper-alpha", -// } -// -// This will convert it to: -// map[string]interface{}{ -// "charset": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", -// } -func applyShortcuts(m map[string]interface{}) { - rawCharset, exists := m["charset"] - if !exists { - return - } - charset, ok := rawCharset.(string) - if !ok { - return - } - newCharset, shortcutExists := charsetShortcuts[charset] - if !shortcutExists { - return - } - m["charset"] = newCharset -} - -func deduplicateRunes(original []rune) (deduped []rune) { - m := map[rune]bool{} - dedupedRunes := []rune(nil) - - for _, r := range original { - if m[r] { - continue - } - m[r] = true - dedupedRunes = append(dedupedRunes, r) - } - - // They don't have to be sorted, but this is being done to make the charset easier to visualize - sort.Sort(runes(dedupedRunes)) - return dedupedRunes -} - func stringToRunesFunc(from reflect.Kind, to reflect.Kind, data interface{}) (interface{}, error) { if from != reflect.String || to != reflect.Slice { return data, nil diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go index 3b3ac1c53492..812142e3f9c1 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go @@ -10,7 +10,7 @@ var ( // defaultRuleNameMapping is the default mapping of HCL rule names to the appropriate rule constructor. // Add to this map when adding a new Rule type to be recognized in HCL. defaultRuleNameMapping = map[string]ruleConstructor{ - "CharsetRestriction": ParseCharsetRestriction, + "Charset": ParseCharset, } defaultRegistry = Registry{ @@ -29,5 +29,6 @@ func (r Registry) parseRule(ruleType string, ruleData map[string]interface{}) (r return nil, fmt.Errorf("unrecognized rule type %s", ruleType) } - return constructor(ruleData) + rule, err = constructor(ruleData) + return rule, err } diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go index 717ade10eeae..8c2e1e5cc694 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go @@ -6,8 +6,8 @@ import ( "github.com/mitchellh/mapstructure" ) -// CharsetRestriction requires a certain number of characters from the specified charset. -type CharsetRestriction struct { +// Charset requires a certain number of characters from the specified charset. +type Charset struct { // Charset is the list of rules that candidate strings must contain a minimum number of. Charset runes `mapstructure:"charset" json:"charset"` @@ -15,9 +15,9 @@ type CharsetRestriction struct { MinChars int `mapstructure:"min-chars" json:"min-chars"` } -// ParseCharsetRestriction from the provided data map. The data map is expected to be parsed from HCL. -func ParseCharsetRestriction(data map[string]interface{}) (rule Rule, err error) { - cr := &CharsetRestriction{} +// ParseCharset from the provided data map. The data map is expected to be parsed from HCL. +func ParseCharset(data map[string]interface{}) (rule Rule, err error) { + cr := &Charset{} decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ Metadata: nil, @@ -33,25 +33,25 @@ func ParseCharsetRestriction(data map[string]interface{}) (rule Rule, err error) return nil, fmt.Errorf("failed to parse charset restriction: %w", err) } - return cr, nil + return *cr, nil } -func (c CharsetRestriction) Type() string { - return "CharsetRestriction" +func (c Charset) Type() string { + return "Charset" } // Chars returns the charset that this rule is looking for. -func (c CharsetRestriction) Chars() []rune { +func (c Charset) Chars() []rune { return c.Charset } -func (c CharsetRestriction) MinLength() int { +func (c Charset) MinLength() int { return c.MinChars } // Pass returns true if the provided candidate string has a minimum number of chars in it. // This adheres to the Rule interface -func (c CharsetRestriction) Pass(value []rune) bool { +func (c Charset) Pass(value []rune) bool { if c.MinChars <= 0 { return true } diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go index a5f362442e33..dd8418fe938c 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go @@ -23,10 +23,10 @@ func (r serializableRules) MarshalJSON() (b []byte, err error) { // ] // }, // { - // "CharsetRestriction": [ + // "Charset": [ // { // "charset": "abcde", - // "min-chars": 2 + // "min_chars": 2 // } // ] // } diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go index 1774dabeee93..ec9bb7d14259 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go @@ -8,6 +8,9 @@ import ( "math" "sort" "time" + "unicode" + + "github.com/hashicorp/go-multierror" ) var ( @@ -35,22 +38,21 @@ var ( // DefaultStringGenerator has reasonable default rules for generating strings DefaultStringGenerator = StringGenerator{ - Length: 20, - Charset: []rune(LowercaseCharset + UppercaseCharset + NumericCharset + ShortSymbolCharset), + Length: 20, Rules: []Rule{ - CharsetRestriction{ + Charset{ Charset: LowercaseRuneset, MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: UppercaseRuneset, MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: NumericRuneset, MinChars: 1, }, - CharsetRestriction{ + Charset{ Charset: ShortSymbolRuneset, MinChars: 1, }, @@ -74,29 +76,35 @@ type Rule interface { } // StringGenerator generats random strings from the provided charset & adhering to a set of rules. The set of rules -// are things like CharsetRestriction which requires a certain number of characters from a sub-charset. +// are things like Charset which requires a certain number of characters from a sub-charset. type StringGenerator struct { // Length of the string to generate. Length int `mapstructure:"length" json:"length"` - // Charset to choose runes from. - Charset runes `mapstructure:"charset" json:"charset"` - // Rules the generated strings must adhere to. Rules serializableRules `mapstructure:"-" json:"rule"` // This is "rule" in JSON so it matches the HCL property type + // Charset to choose runes from. This is computed from the rules, not directly configurable + charset runes + // rng for testing purposes to ensure error handling from the crypto/rand package is working properly. rng io.Reader } // Generate a random string from the charset and adhering to the provided rules. -func (g StringGenerator) Generate(ctx context.Context) (str string, err error) { +func (g *StringGenerator) Generate(ctx context.Context) (str string, err error) { if _, hasTimeout := ctx.Deadline(); !hasTimeout { var cancel func() ctx, cancel = context.WithTimeout(ctx, 1*time.Second) // Ensure there's a timeout on the context defer cancel() } + // Ensure the generator is configured well since it may be manually created rather than parsed from HCL + err = g.validateConfig() + if err != nil { + return "", err + } + LOOP: for { select { @@ -115,11 +123,11 @@ LOOP: } } -func (g StringGenerator) generate() (str string, err error) { +func (g *StringGenerator) generate() (str string, err error) { // If performance improvements need to be made, this can be changed to read a batch of // potential strings at once rather than one at a time. This will significantly // improve performance, but at the cost of added complexity. - candidate, err := randomRunes(g.rng, g.Charset, g.Length) + candidate, err := randomRunes(g.rng, g.charset, g.Length) if err != nil { return "", fmt.Errorf("unable to generate random characters: %w", err) } @@ -167,3 +175,87 @@ func randomRunes(rng io.Reader, charset []rune, length int) (candidate []rune, e return runes, nil } + +// validateConfig of the generator to ensure that we can successfully generate a string. +func (g *StringGenerator) validateConfig() (err error) { + merr := &multierror.Error{} + + // Ensure the sum of minimum lengths in the rules doesn't exceed the length specified + minLen := getMinLength(g.Rules) + if g.Length <= 0 { + merr = multierror.Append(merr, fmt.Errorf("length must be > 0")) + } else if g.Length < minLen { + merr = multierror.Append(merr, fmt.Errorf("specified rules require at least %d characters but %d is specified", minLen, g.Length)) + } + + // Ensure we have a charset & all characters are printable + if len(g.charset) == 0 { + // Yes this is mutating the generator but this is done so we don't have to compute this on every generation + g.charset = getChars(g.Rules) + } + if len(g.charset) == 0 { + merr = multierror.Append(merr, fmt.Errorf("no charset specified")) + } else { + for _, r := range g.charset { + if !unicode.IsPrint(r) { + merr = multierror.Append(merr, fmt.Errorf("non-printable character in charset")) + break + } + } + } + return merr.ErrorOrNil() +} + +// getMinLength from the rules using the optional interface: `MinLength() int` +func getMinLength(rules []Rule) (minLen int) { + type minLengthProvider interface { + MinLength() int + } + + for _, rule := range rules { + mlp, ok := rule.(minLengthProvider) + if !ok { + continue + } + minLen += mlp.MinLength() + } + return minLen +} + +// getChars from the rules using the optional interface: `Chars() []rune` +func getChars(rules []Rule) (chars []rune) { + type charsetProvider interface { + Chars() []rune + } + + for _, rule := range rules { + cp, ok := rule.(charsetProvider) + if !ok { + continue + } + chars = append(chars, cp.Chars()...) + } + return deduplicateRunes(chars) +} + +// deduplicateRunes returns a new slice of sorted & de-duplicated runes +func deduplicateRunes(original []rune) (deduped []rune) { + if len(original) == 0 { + return nil + } + + m := map[rune]bool{} + dedupedRunes := []rune(nil) + + for _, r := range original { + if m[r] { + continue + } + m[r] = true + dedupedRunes = append(dedupedRunes, r) + } + + // They don't have to be sorted, but this is being done to make the charset easier to visualize + sort.Sort(runes(dedupedRunes)) + return dedupedRunes +} diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go b/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go index 08ced677a654..394a30103c48 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go @@ -70,8 +70,9 @@ type SystemView interface { // PluginEnv returns Vault environment information used by plugins PluginEnv(context.Context) (*PluginEnvironment, error) - // PasswordPolicy retrieves the password policy associated with the policy name - PasswordPolicy(ctx context.Context, policyName string) (PasswordPolicy, error) + // GeneratePasswordFromPolicy generates a password from the policy referenced. + // If the policy does not exist, this will return an error. + GeneratePasswordFromPolicy(ctx context.Context, policyName string) (password string, err error) } type PasswordPolicy interface { @@ -176,19 +177,19 @@ func (d StaticSystemView) PluginEnv(_ context.Context) (*PluginEnvironment, erro return d.PluginEnvironment, nil } -func (d StaticSystemView) PasswordPolicy(ctx context.Context, policyName string) (policy PasswordPolicy, err error) { +func (d StaticSystemView) GeneratePasswordFromPolicy(ctx context.Context, policyName string) (password string, err error) { select { case <-ctx.Done(): - return nil, fmt.Errorf("context timed out") + return "", fmt.Errorf("context timed out") default: } if d.PasswordPolicies == nil { - return nil, fmt.Errorf("password policy not found") + return "", fmt.Errorf("password policy not found") } policy, exists := d.PasswordPolicies[policyName] if !exists { - return nil, fmt.Errorf("password policy not found") + return "", fmt.Errorf("password policy not found") } - return policy, nil + return policy.Generate(ctx) } diff --git a/vendor/github.com/hashicorp/vault/sdk/plugin/grpc_system.go b/vendor/github.com/hashicorp/vault/sdk/plugin/grpc_system.go index c36231b445b7..ead85aefebcf 100644 --- a/vendor/github.com/hashicorp/vault/sdk/plugin/grpc_system.go +++ b/vendor/github.com/hashicorp/vault/sdk/plugin/grpc_system.go @@ -10,7 +10,6 @@ import ( "github.com/hashicorp/vault/sdk/helper/consts" "github.com/hashicorp/vault/sdk/helper/license" "github.com/hashicorp/vault/sdk/helper/pluginutil" - "github.com/hashicorp/vault/sdk/helper/random" "github.com/hashicorp/vault/sdk/helper/wrapping" "github.com/hashicorp/vault/sdk/logical" "github.com/hashicorp/vault/sdk/plugin/pb" @@ -164,19 +163,15 @@ func (s *gRPCSystemViewClient) PluginEnv(ctx context.Context) (*logical.PluginEn return reply.PluginEnvironment, nil } -func (s *gRPCSystemViewClient) PasswordPolicy(ctx context.Context, policyName string) (policy logical.PasswordPolicy, err error) { - req := &pb.PasswordPolicyRequest{ +func (s *gRPCSystemViewClient) GeneratePasswordFromPolicy(ctx context.Context, policyName string) (password string, err error) { + req := &pb.GeneratePasswordFromPolicyRequest{ PolicyName: policyName, } - resp, err := s.client.PasswordPolicy(ctx, req) + resp, err := s.client.GeneratePasswordFromPolicy(ctx, req) if err != nil { - return nil, err - } - passPolicy, err := random.ParseBytes(resp.RawPolicy) - if err != nil { - return nil, fmt.Errorf("failed to parse password policy: %w", err) + return "", err } - return passPolicy, nil + return resp.Password, nil } type gRPCSystemViewServer struct { @@ -293,21 +288,19 @@ func (s *gRPCSystemViewServer) PluginEnv(ctx context.Context, _ *pb.Empty) (*pb. }, nil } -func (s *gRPCSystemViewServer) PasswordPolicy(ctx context.Context, req *pb.PasswordPolicyRequest) (*pb.PasswordPolicyResponse, error) { - policy, err := s.impl.PasswordPolicy(ctx, req.PolicyName) - if err != nil { - return &pb.PasswordPolicyResponse{}, status.Errorf(codes.Internal, "unable to retrieve password policy: %s", err) - } - if policy == nil { - return &pb.PasswordPolicyResponse{}, status.Errorf(codes.NotFound, "policy not found") +func (s *gRPCSystemViewServer) GeneratePasswordFromPolicy(ctx context.Context, req *pb.GeneratePasswordFromPolicyRequest) (*pb.GeneratePasswordFromPolicyReply, error) { + policyName := req.PolicyName + if policyName == "" { + return &pb.GeneratePasswordFromPolicyReply{}, status.Errorf(codes.InvalidArgument, "no password policy specified") } - b, err := json.Marshal(policy) + password, err := s.impl.GeneratePasswordFromPolicy(ctx, policyName) if err != nil { - return &pb.PasswordPolicyResponse{}, status.Errorf(codes.Internal, "unable to serialize password policy: %s", err) + return &pb.GeneratePasswordFromPolicyReply{}, status.Errorf(codes.Internal, "failed to generate password") } - resp := &pb.PasswordPolicyResponse{ - RawPolicy: b, + + resp := &pb.GeneratePasswordFromPolicyReply{ + Password: password, } return resp, nil } diff --git a/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.pb.go b/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.pb.go index 59415ca23480..bd1b2c765b7d 100644 --- a/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.pb.go +++ b/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.pb.go @@ -2662,82 +2662,82 @@ func (m *PluginEnvReply) GetErr() string { return "" } -type PasswordPolicyRequest struct { +type GeneratePasswordFromPolicyRequest struct { PolicyName string `sentinel:"" protobuf:"bytes,1,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *PasswordPolicyRequest) Reset() { *m = PasswordPolicyRequest{} } -func (m *PasswordPolicyRequest) String() string { return proto.CompactTextString(m) } -func (*PasswordPolicyRequest) ProtoMessage() {} -func (*PasswordPolicyRequest) Descriptor() ([]byte, []int) { +func (m *GeneratePasswordFromPolicyRequest) Reset() { *m = GeneratePasswordFromPolicyRequest{} } +func (m *GeneratePasswordFromPolicyRequest) String() string { return proto.CompactTextString(m) } +func (*GeneratePasswordFromPolicyRequest) ProtoMessage() {} +func (*GeneratePasswordFromPolicyRequest) Descriptor() ([]byte, []int) { return fileDescriptor_4dbf1dfe0c11846b, []int{44} } -func (m *PasswordPolicyRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PasswordPolicyRequest.Unmarshal(m, b) +func (m *GeneratePasswordFromPolicyRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GeneratePasswordFromPolicyRequest.Unmarshal(m, b) } -func (m *PasswordPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PasswordPolicyRequest.Marshal(b, m, deterministic) +func (m *GeneratePasswordFromPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GeneratePasswordFromPolicyRequest.Marshal(b, m, deterministic) } -func (m *PasswordPolicyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PasswordPolicyRequest.Merge(m, src) +func (m *GeneratePasswordFromPolicyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GeneratePasswordFromPolicyRequest.Merge(m, src) } -func (m *PasswordPolicyRequest) XXX_Size() int { - return xxx_messageInfo_PasswordPolicyRequest.Size(m) +func (m *GeneratePasswordFromPolicyRequest) XXX_Size() int { + return xxx_messageInfo_GeneratePasswordFromPolicyRequest.Size(m) } -func (m *PasswordPolicyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PasswordPolicyRequest.DiscardUnknown(m) +func (m *GeneratePasswordFromPolicyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GeneratePasswordFromPolicyRequest.DiscardUnknown(m) } -var xxx_messageInfo_PasswordPolicyRequest proto.InternalMessageInfo +var xxx_messageInfo_GeneratePasswordFromPolicyRequest proto.InternalMessageInfo -func (m *PasswordPolicyRequest) GetPolicyName() string { +func (m *GeneratePasswordFromPolicyRequest) GetPolicyName() string { if m != nil { return m.PolicyName } return "" } -type PasswordPolicyResponse struct { - RawPolicy []byte `sentinel:"" protobuf:"bytes,1,opt,name=raw_policy,json=rawPolicy,proto3" json:"raw_policy,omitempty"` +type GeneratePasswordFromPolicyReply struct { + Password string `sentinel:"" protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *PasswordPolicyResponse) Reset() { *m = PasswordPolicyResponse{} } -func (m *PasswordPolicyResponse) String() string { return proto.CompactTextString(m) } -func (*PasswordPolicyResponse) ProtoMessage() {} -func (*PasswordPolicyResponse) Descriptor() ([]byte, []int) { +func (m *GeneratePasswordFromPolicyReply) Reset() { *m = GeneratePasswordFromPolicyReply{} } +func (m *GeneratePasswordFromPolicyReply) String() string { return proto.CompactTextString(m) } +func (*GeneratePasswordFromPolicyReply) ProtoMessage() {} +func (*GeneratePasswordFromPolicyReply) Descriptor() ([]byte, []int) { return fileDescriptor_4dbf1dfe0c11846b, []int{45} } -func (m *PasswordPolicyResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PasswordPolicyResponse.Unmarshal(m, b) +func (m *GeneratePasswordFromPolicyReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GeneratePasswordFromPolicyReply.Unmarshal(m, b) } -func (m *PasswordPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PasswordPolicyResponse.Marshal(b, m, deterministic) +func (m *GeneratePasswordFromPolicyReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GeneratePasswordFromPolicyReply.Marshal(b, m, deterministic) } -func (m *PasswordPolicyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PasswordPolicyResponse.Merge(m, src) +func (m *GeneratePasswordFromPolicyReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_GeneratePasswordFromPolicyReply.Merge(m, src) } -func (m *PasswordPolicyResponse) XXX_Size() int { - return xxx_messageInfo_PasswordPolicyResponse.Size(m) +func (m *GeneratePasswordFromPolicyReply) XXX_Size() int { + return xxx_messageInfo_GeneratePasswordFromPolicyReply.Size(m) } -func (m *PasswordPolicyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PasswordPolicyResponse.DiscardUnknown(m) +func (m *GeneratePasswordFromPolicyReply) XXX_DiscardUnknown() { + xxx_messageInfo_GeneratePasswordFromPolicyReply.DiscardUnknown(m) } -var xxx_messageInfo_PasswordPolicyResponse proto.InternalMessageInfo +var xxx_messageInfo_GeneratePasswordFromPolicyReply proto.InternalMessageInfo -func (m *PasswordPolicyResponse) GetRawPolicy() []byte { +func (m *GeneratePasswordFromPolicyReply) GetPassword() string { if m != nil { - return m.RawPolicy + return m.Password } - return nil + return "" } type Connection struct { @@ -2830,179 +2830,179 @@ func init() { proto.RegisterType((*EntityInfoReply)(nil), "pb.EntityInfoReply") proto.RegisterType((*GroupsForEntityReply)(nil), "pb.GroupsForEntityReply") proto.RegisterType((*PluginEnvReply)(nil), "pb.PluginEnvReply") - proto.RegisterType((*PasswordPolicyRequest)(nil), "pb.PasswordPolicyRequest") - proto.RegisterType((*PasswordPolicyResponse)(nil), "pb.PasswordPolicyResponse") + proto.RegisterType((*GeneratePasswordFromPolicyRequest)(nil), "pb.GeneratePasswordFromPolicyRequest") + proto.RegisterType((*GeneratePasswordFromPolicyReply)(nil), "pb.GeneratePasswordFromPolicyReply") proto.RegisterType((*Connection)(nil), "pb.Connection") } func init() { proto.RegisterFile("sdk/plugin/pb/backend.proto", fileDescriptor_4dbf1dfe0c11846b) } var fileDescriptor_4dbf1dfe0c11846b = []byte{ - // 2615 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x72, 0xdc, 0xc6, - 0xf1, 0xaf, 0xdd, 0xe5, 0x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 0x91, 0x73, 0x0e, 0x39, - 0x0f, 0x38, 0xb9, 0x0d, 0x2d, 0xc6, 0xf9, 0x4c, 0xac, 0x42, 0x66, 0x54, 0x76, 0x2a, 0xbb, 0x3d, - 0xab, 0xc9, 0x38, 0x9f, 0xae, 0x42, 0x46, 0xfe, 0x0f, 0xe4, 0xe7, 0x6c, 0x19, 0x2d, 0x8c, 0xea, - 0x4e, 0x45, 0x6a, 0x60, 0x9c, 0xbf, 0x8c, 0x16, 0xc9, 0x1c, 0x3b, 0x70, 0x98, 0x51, 0xdb, 0xa9, - 0xec, 0xd6, 0x70, 0xce, 0x41, 0xe0, 0x30, 0xf3, 0xaf, 0x15, 0xa8, 0x9f, 0x50, 0x71, 0x1e, 0x11, - 0x02, 0x5b, 0x3c, 0x08, 0x84, 0x36, 0x8e, 0xdf, 0x64, 0x17, 0x06, 0xb1, 0x4f, 0x63, 0x71, 0x2e, - 0x77, 0x65, 0x53, 0xc1, 0x1c, 0xa3, 0x8a, 0xec, 0x75, 0x32, 0x79, 0x0b, 0x7a, 0x5e, 0x60, 0x53, - 0x6f, 0x16, 0x89, 0x80, 0xd3, 0x85, 0xb4, 0x23, 0xe5, 0xba, 0x48, 0x3c, 0x55, 0x34, 0xf2, 0x10, - 0x46, 0x11, 0xa3, 0xde, 0xec, 0x8a, 0xd3, 0x30, 0x15, 0xdc, 0x52, 0x0a, 0x25, 0xe3, 0x2b, 0x4e, - 0x43, 0x2d, 0x6b, 0xfe, 0xb3, 0x01, 0x4d, 0x8b, 0xfd, 0x31, 0x66, 0x91, 0x20, 0x7d, 0xa8, 0xba, - 0x0e, 0xee, 0xb6, 0x6d, 0x55, 0x5d, 0x87, 0x4c, 0x80, 0x58, 0x2c, 0xf4, 0xa4, 0x69, 0x37, 0xf0, - 0x0f, 0xbc, 0x38, 0x12, 0x8c, 0xeb, 0x3d, 0x97, 0x70, 0xc8, 0x5d, 0x68, 0x07, 0x21, 0xe3, 0x48, - 0x43, 0x07, 0xb4, 0xad, 0x8c, 0x20, 0x37, 0x1e, 0x52, 0x71, 0x6e, 0x6c, 0x21, 0x03, 0xbf, 0x25, - 0xcd, 0xa1, 0x82, 0x1a, 0x75, 0x45, 0x93, 0xdf, 0xc4, 0x84, 0x46, 0xc4, 0x6c, 0xce, 0x84, 0xd1, - 0xd8, 0xa9, 0xec, 0x76, 0xf6, 0x61, 0x12, 0xce, 0x27, 0xa7, 0x48, 0xb1, 0x34, 0x87, 0xdc, 0x85, - 0x2d, 0xe9, 0x17, 0xa3, 0x89, 0x12, 0x2d, 0x29, 0xf1, 0x2c, 0x16, 0xe7, 0x16, 0x52, 0xc9, 0x3e, - 0x34, 0xd5, 0x99, 0x46, 0x46, 0x6b, 0xa7, 0xb6, 0xdb, 0xd9, 0x37, 0xa4, 0x80, 0xde, 0xe5, 0x44, - 0x85, 0x41, 0x74, 0xe8, 0x0b, 0xbe, 0xb2, 0x12, 0x41, 0xf2, 0x26, 0x74, 0x6d, 0xcf, 0x65, 0xbe, - 0x98, 0x89, 0xe0, 0x82, 0xf9, 0x46, 0x1b, 0x57, 0xd4, 0x51, 0xb4, 0xa9, 0x24, 0x91, 0x7d, 0xb8, - 0x99, 0x17, 0x99, 0x51, 0xdb, 0x66, 0x51, 0x14, 0x70, 0x03, 0x50, 0xf6, 0x46, 0x4e, 0xf6, 0x99, - 0x66, 0x49, 0xb5, 0x8e, 0x1b, 0x85, 0x1e, 0x5d, 0xcd, 0x7c, 0xba, 0x64, 0x46, 0x47, 0xa9, 0xd5, - 0xb4, 0xcf, 0xe9, 0x92, 0x91, 0x7b, 0xd0, 0x59, 0x06, 0xb1, 0x2f, 0x66, 0x61, 0xe0, 0xfa, 0xc2, - 0xe8, 0xa2, 0x04, 0x20, 0xe9, 0x44, 0x52, 0xc8, 0x1b, 0xa0, 0x46, 0x2a, 0x18, 0x7b, 0xca, 0xaf, - 0x48, 0xc1, 0x70, 0xbc, 0x0f, 0x7d, 0xc5, 0x4e, 0xd7, 0xd3, 0x47, 0x91, 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, 0x43, 0x39, 0xed, 0x58, 0x32, 0xbe, 0x50, 0x74, 0xab, 0xeb, 0xe5, 0x46, 0x32, 0xa5, 0x5d, - 0x5f, 0x30, 0xee, 0x53, 0x6f, 0x86, 0xc9, 0xa0, 0x12, 0xac, 0x9b, 0x10, 0x9f, 0xcb, 0xa4, 0x58, - 0x8f, 0xa3, 0xda, 0x66, 0x1c, 0x8d, 0xa1, 0x85, 0xbe, 0x73, 0x59, 0xa4, 0x93, 0x3d, 0x1d, 0x93, - 0x7d, 0x68, 0x2d, 0x99, 0xa0, 0x3a, 0xd7, 0x64, 0x4a, 0xdc, 0x4a, 0x72, 0x66, 0xf2, 0x52, 0x33, - 0x54, 0x42, 0xa4, 0x72, 0x1b, 0x19, 0xd1, 0xd8, 0xcc, 0x88, 0x31, 0xb4, 0xd2, 0xa0, 0x6b, 0xaa, - 0x13, 0x4e, 0xc6, 0xb2, 0xcc, 0x86, 0x8c, 0xbb, 0x81, 0x63, 0xb4, 0x30, 0x50, 0xf4, 0x48, 0x16, - 0x49, 0x3f, 0x5e, 0xaa, 0x10, 0x6a, 0xab, 0x22, 0xe9, 0xc7, 0xcb, 0xcd, 0x88, 0x81, 0xb5, 0x88, - 0xf9, 0x11, 0xd4, 0xa9, 0xe7, 0xd2, 0x08, 0x53, 0x48, 0x9e, 0xac, 0xae, 0xf7, 0x93, 0x67, 0x92, - 0x6a, 0x29, 0x26, 0x79, 0x02, 0xbd, 0x05, 0x0f, 0xe2, 0x70, 0x86, 0x43, 0x16, 0x19, 0x5d, 0xdc, - 0xed, 0xba, 0x74, 0x17, 0x85, 0x9e, 0x29, 0x19, 0x99, 0x81, 0xf3, 0x20, 0xf6, 0x9d, 0x99, 0xed, - 0x3a, 0x3c, 0x32, 0x7a, 0xe8, 0x3c, 0x40, 0xd2, 0x81, 0xa4, 0xc8, 0x14, 0x53, 0x29, 0x90, 0x3a, - 0xb8, 0x8f, 0x32, 0x3d, 0xa4, 0x9e, 0x24, 0x5e, 0xfe, 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0xd8, 0xc1, 0x72, 0xef, 0x9c, 0x46, 0xe7, 0xae, 0x1d, 0xf0, 0x70, 0xef, 0x52, 0x86, 0xe5, - 0x5e, 0xe1, 0x27, 0xe0, 0xbc, 0x81, 0x97, 0xe1, 0x27, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x88, - 0xcc, 0xb6, 0x05, 0x1c, 0x1c, 0x00, 0x00, + // 2616 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x72, 0x1b, 0xc7, + 0x11, 0x2e, 0x00, 0xc4, 0x5f, 0xe3, 0x7f, 0x44, 0x2b, 0x2b, 0x48, 0x8e, 0xe8, 0x55, 0x24, 0xd3, + 0x8a, 0x05, 0x5a, 0x54, 0x1c, 0xcb, 0x49, 0x39, 0x2e, 0x99, 0xa2, 0x64, 0xc6, 0x94, 0xcd, 0x5a, + 0xc2, 0x71, 0xfe, 0xaa, 0xe0, 0xc1, 0xee, 0x10, 0xd8, 0xe2, 0x62, 0x77, 0x33, 0x3b, 0x4b, 0x11, + 0xb9, 0xe4, 0x2d, 0xf2, 0x06, 0x39, 0xa7, 0x72, 0xcb, 0x2d, 0x57, 0x57, 0xee, 0x79, 0x85, 0x3c, + 0x47, 0x6a, 0x7a, 0x66, 0xff, 0x00, 0x50, 0x92, 0xab, 0x9c, 0xdb, 0x4e, 0x77, 0x4f, 0xf7, 0x4c, + 0x4f, 0x77, 0x7f, 0x3d, 0xb3, 0x70, 0x33, 0x72, 0xce, 0xf7, 0x42, 0x2f, 0x9e, 0xb9, 0xfe, 0x5e, + 0x38, 0xdd, 0x9b, 0x52, 0xfb, 0x9c, 0xf9, 0xce, 0x28, 0xe4, 0x81, 0x08, 0x48, 0x39, 0x9c, 0x0e, + 0x6f, 0xcf, 0x82, 0x60, 0xe6, 0xb1, 0x3d, 0xa4, 0x4c, 0xe3, 0xb3, 0x3d, 0xe1, 0x2e, 0x58, 0x24, + 0xe8, 0x22, 0x54, 0x42, 0xc3, 0xa1, 0xd4, 0xe0, 0x05, 0x33, 0xd7, 0xa6, 0xde, 0x9e, 0xeb, 0x30, + 0x5f, 0xb8, 0x62, 0xa9, 0x79, 0x46, 0x9e, 0xa7, 0xac, 0x28, 0x8e, 0x59, 0x87, 0xea, 0xe1, 0x22, + 0x14, 0x4b, 0x73, 0x07, 0x6a, 0x9f, 0x33, 0xea, 0x30, 0x4e, 0xae, 0x43, 0x6d, 0x8e, 0x5f, 0x46, + 0x69, 0xa7, 0xb2, 0xdb, 0xb4, 0xf4, 0xc8, 0xfc, 0x03, 0xc0, 0x89, 0x9c, 0x73, 0xc8, 0x79, 0xc0, + 0xc9, 0x0d, 0x68, 0x30, 0xce, 0x27, 0x62, 0x19, 0x32, 0xa3, 0xb4, 0x53, 0xda, 0xed, 0x58, 0x75, + 0xc6, 0xf9, 0x78, 0x19, 0x32, 0xf2, 0x23, 0x90, 0x9f, 0x93, 0x45, 0x34, 0x33, 0xca, 0x3b, 0x25, + 0xa9, 0x81, 0x71, 0xfe, 0x22, 0x9a, 0x25, 0x73, 0xec, 0xc0, 0x61, 0x46, 0x65, 0xa7, 0xb4, 0x5b, + 0xc1, 0x39, 0x07, 0x81, 0xc3, 0xcc, 0xbf, 0x96, 0xa0, 0x7a, 0x42, 0xc5, 0x3c, 0x22, 0x04, 0xb6, + 0x78, 0x10, 0x08, 0x6d, 0x1c, 0xbf, 0xc9, 0x2e, 0xf4, 0x62, 0x9f, 0xc6, 0x62, 0x2e, 0x77, 0x65, + 0x53, 0xc1, 0x1c, 0xa3, 0x8c, 0xec, 0x55, 0x32, 0xb9, 0x03, 0x1d, 0x2f, 0xb0, 0xa9, 0x37, 0x89, + 0x44, 0xc0, 0xe9, 0x4c, 0xda, 0x91, 0x72, 0x6d, 0x24, 0x9e, 0x2a, 0x1a, 0xb9, 0x0f, 0x83, 0x88, + 0x51, 0x6f, 0xf2, 0x92, 0xd3, 0x30, 0x15, 0xdc, 0x52, 0x0a, 0x25, 0xe3, 0x1b, 0x4e, 0x43, 0x2d, + 0x6b, 0xfe, 0xab, 0x06, 0x75, 0x8b, 0xfd, 0x29, 0x66, 0x91, 0x20, 0x5d, 0x28, 0xbb, 0x0e, 0xee, + 0xb6, 0x69, 0x95, 0x5d, 0x87, 0x8c, 0x80, 0x58, 0x2c, 0xf4, 0xa4, 0x69, 0x37, 0xf0, 0x0f, 0xbc, + 0x38, 0x12, 0x8c, 0xeb, 0x3d, 0x6f, 0xe0, 0x90, 0x5b, 0xd0, 0x0c, 0x42, 0xc6, 0x91, 0x86, 0x0e, + 0x68, 0x5a, 0x19, 0x41, 0x6e, 0x3c, 0xa4, 0x62, 0x6e, 0x6c, 0x21, 0x03, 0xbf, 0x25, 0xcd, 0xa1, + 0x82, 0x1a, 0x55, 0x45, 0x93, 0xdf, 0xc4, 0x84, 0x5a, 0xc4, 0x6c, 0xce, 0x84, 0x51, 0xdb, 0x29, + 0xed, 0xb6, 0xf6, 0x61, 0x14, 0x4e, 0x47, 0xa7, 0x48, 0xb1, 0x34, 0x87, 0xdc, 0x82, 0x2d, 0xe9, + 0x17, 0xa3, 0x8e, 0x12, 0x0d, 0x29, 0xf1, 0x24, 0x16, 0x73, 0x0b, 0xa9, 0x64, 0x1f, 0xea, 0xea, + 0x4c, 0x23, 0xa3, 0xb1, 0x53, 0xd9, 0x6d, 0xed, 0x1b, 0x52, 0x40, 0xef, 0x72, 0xa4, 0xc2, 0x20, + 0x3a, 0xf4, 0x05, 0x5f, 0x5a, 0x89, 0x20, 0x79, 0x07, 0xda, 0xb6, 0xe7, 0x32, 0x5f, 0x4c, 0x44, + 0x70, 0xce, 0x7c, 0xa3, 0x89, 0x2b, 0x6a, 0x29, 0xda, 0x58, 0x92, 0xc8, 0x3e, 0xbc, 0x95, 0x17, + 0x99, 0x50, 0xdb, 0x66, 0x51, 0x14, 0x70, 0x03, 0x50, 0xf6, 0x5a, 0x4e, 0xf6, 0x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0x78, 0xbc, 0xab, + 0x68, 0xf1, 0x21, 0x40, 0x56, 0xe8, 0x55, 0x54, 0x14, 0x71, 0x42, 0x4d, 0x5b, 0x05, 0x83, 0xfb, + 0xd0, 0x4c, 0x4b, 0x69, 0xde, 0x06, 0x2a, 0x58, 0xa9, 0xcc, 0x9f, 0x42, 0x6f, 0xa5, 0xfa, 0x6f, + 0xb4, 0x83, 0xee, 0xd9, 0x08, 0x13, 0x73, 0x18, 0x5e, 0x5d, 0x37, 0xc9, 0x5d, 0x9c, 0xf7, 0xba, + 0xea, 0x3c, 0xbc, 0xf3, 0x3a, 0xb1, 0xd0, 0x5b, 0x7e, 0x76, 0xff, 0xf7, 0xbb, 0x33, 0x57, 0xcc, + 0xe3, 0xe9, 0xc8, 0x0e, 0x16, 0x7b, 0x73, 0x1a, 0xcd, 0x5d, 0x3b, 0xe0, 0xe1, 0xde, 0x85, 0x8c, + 0xdb, 0xbd, 0xc2, 0x7f, 0xc3, 0x69, 0x0d, 0xef, 0xcf, 0x8f, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, + 0x2e, 0xfe, 0x10, 0x49, 0x4f, 0x1c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -3611,8 +3611,8 @@ type SystemViewClient interface { // GroupsForEntity returns the group membership information for the given // entity id GroupsForEntity(ctx context.Context, in *EntityInfoArgs, opts ...grpc.CallOption) (*GroupsForEntityReply, error) - // PasswordPolicy returns a password policy if one exists - PasswordPolicy(ctx context.Context, in *PasswordPolicyRequest, opts ...grpc.CallOption) (*PasswordPolicyResponse, error) + // GeneratePasswordFromPolicy generates a password from an existing password policy + GeneratePasswordFromPolicy(ctx context.Context, in *GeneratePasswordFromPolicyRequest, opts ...grpc.CallOption) (*GeneratePasswordFromPolicyReply, error) } type systemViewClient struct { @@ -3722,9 +3722,9 @@ func (c *systemViewClient) GroupsForEntity(ctx context.Context, in *EntityInfoAr return out, nil } -func (c *systemViewClient) PasswordPolicy(ctx context.Context, in *PasswordPolicyRequest, opts ...grpc.CallOption) (*PasswordPolicyResponse, error) { - out := new(PasswordPolicyResponse) - err := c.cc.Invoke(ctx, "/pb.SystemView/PasswordPolicy", in, out, opts...) +func (c *systemViewClient) GeneratePasswordFromPolicy(ctx context.Context, in *GeneratePasswordFromPolicyRequest, opts ...grpc.CallOption) (*GeneratePasswordFromPolicyReply, error) { + out := new(GeneratePasswordFromPolicyReply) + err := c.cc.Invoke(ctx, "/pb.SystemView/GeneratePasswordFromPolicy", in, out, opts...) if err != nil { return nil, err } @@ -3769,8 +3769,8 @@ type SystemViewServer interface { // GroupsForEntity returns the group membership information for the given // entity id GroupsForEntity(context.Context, *EntityInfoArgs) (*GroupsForEntityReply, error) - // PasswordPolicy returns a password policy if one exists - PasswordPolicy(context.Context, *PasswordPolicyRequest) (*PasswordPolicyResponse, error) + // GeneratePasswordFromPolicy generates a password from an existing password policy + GeneratePasswordFromPolicy(context.Context, *GeneratePasswordFromPolicyRequest) (*GeneratePasswordFromPolicyReply, error) } // UnimplementedSystemViewServer can be embedded to have forward compatible implementations. @@ -3810,8 +3810,8 @@ func (*UnimplementedSystemViewServer) PluginEnv(ctx context.Context, req *Empty) func (*UnimplementedSystemViewServer) GroupsForEntity(ctx context.Context, req *EntityInfoArgs) (*GroupsForEntityReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GroupsForEntity not implemented") } -func (*UnimplementedSystemViewServer) PasswordPolicy(ctx context.Context, req *PasswordPolicyRequest) (*PasswordPolicyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PasswordPolicy not implemented") +func (*UnimplementedSystemViewServer) GeneratePasswordFromPolicy(ctx context.Context, req *GeneratePasswordFromPolicyRequest) (*GeneratePasswordFromPolicyReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GeneratePasswordFromPolicy not implemented") } func RegisterSystemViewServer(s *grpc.Server, srv SystemViewServer) { @@ -4016,20 +4016,20 @@ func _SystemView_GroupsForEntity_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } -func _SystemView_PasswordPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PasswordPolicyRequest) +func _SystemView_GeneratePasswordFromPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GeneratePasswordFromPolicyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SystemViewServer).PasswordPolicy(ctx, in) + return srv.(SystemViewServer).GeneratePasswordFromPolicy(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/pb.SystemView/PasswordPolicy", + FullMethod: "/pb.SystemView/GeneratePasswordFromPolicy", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SystemViewServer).PasswordPolicy(ctx, req.(*PasswordPolicyRequest)) + return srv.(SystemViewServer).GeneratePasswordFromPolicy(ctx, req.(*GeneratePasswordFromPolicyRequest)) } return interceptor(ctx, in, info, handler) } @@ -4083,8 +4083,8 @@ var _SystemView_serviceDesc = grpc.ServiceDesc{ Handler: _SystemView_GroupsForEntity_Handler, }, { - MethodName: "PasswordPolicy", - Handler: _SystemView_PasswordPolicy_Handler, + MethodName: "GeneratePasswordFromPolicy", + Handler: _SystemView_GeneratePasswordFromPolicy_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.proto b/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.proto index 0d907b695596..e7244df50b8e 100644 --- a/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.proto +++ b/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.proto @@ -554,12 +554,12 @@ message PluginEnvReply { string err = 2; } -message PasswordPolicyRequest { +message GeneratePasswordFromPolicyRequest { string policy_name = 1; } -message PasswordPolicyResponse { - bytes raw_policy = 1; +message GeneratePasswordFromPolicyReply { + string password = 1; } // SystemView exposes system configuration information in a safe way for plugins @@ -567,7 +567,7 @@ message PasswordPolicyResponse { service SystemView { // DefaultLeaseTTL returns the default lease TTL set in Vault configuration rpc DefaultLeaseTTL(Empty) returns (TTLReply); - + // MaxLeaseTTL returns the max lease TTL set in Vault configuration; backend // authors should take care not to issue credentials that last longer than // this value, as Vault will revoke them @@ -612,8 +612,8 @@ service SystemView { // entity id rpc GroupsForEntity(EntityInfoArgs) returns (GroupsForEntityReply); - // PasswordPolicy returns a password policy if one exists - rpc PasswordPolicy(PasswordPolicyRequest) returns (PasswordPolicyResponse); + // GeneratePasswordFromPolicy generates a password from an existing password policy + rpc GeneratePasswordFromPolicy(GeneratePasswordFromPolicyRequest) returns (GeneratePasswordFromPolicyReply); } message Connection { From 042407b3b340d344d7bbc8fec0445513d448bc33 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Thu, 23 Apr 2020 17:03:17 -0600 Subject: [PATCH 17/29] min_chars -> min-chars --- sdk/helper/random/parser_test.go | 10 +++++----- sdk/helper/random/serializing.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index 865f9088f702..5dbad3dd60e7 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -30,7 +30,7 @@ func TestParse(t *testing.T) { length = 20 rule "Charset" { charset = "abcde" - min_chars = 2 + min-chars = 2 }`, expected: StringGenerator{ Length: 20, @@ -118,7 +118,7 @@ func TestParser_Parse(t *testing.T) { length = 20 rule "Charset" { charset = "abcde" - min_chars = 2 + min-chars = 2 }`, expected: StringGenerator{ Length: 20, @@ -167,7 +167,7 @@ func TestParser_Parse(t *testing.T) { } rule "Charset" { charset = "abcde" - min_chars = 2 + min-chars = 2 }`, expected: StringGenerator{ Length: 20, @@ -221,7 +221,7 @@ func TestParser_Parse(t *testing.T) { "Charset": [ { "charset": "abcde", - "min_chars": 2 + "min-chars": 2 } ] } @@ -552,7 +552,7 @@ func BenchmarkParser_Parse(b *testing.B) { config := `length = 20 rule "Charset" { charset = "abcde" - min_chars = 2 + min-chars = 2 }` for i := 0; i < b.N; i++ { diff --git a/sdk/helper/random/serializing.go b/sdk/helper/random/serializing.go index dd8418fe938c..90331663e203 100644 --- a/sdk/helper/random/serializing.go +++ b/sdk/helper/random/serializing.go @@ -26,7 +26,7 @@ func (r serializableRules) MarshalJSON() (b []byte, err error) { // "Charset": [ // { // "charset": "abcde", - // "min_chars": 2 + // "min-chars": 2 // } // ] // } From 69abee53a6b2808526b5b85a15a2501c74923b17 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Thu, 30 Apr 2020 10:58:46 -0600 Subject: [PATCH 18/29] `Charset` rule -> `charset` Also fixes import ordering --- go.sum | 7 ++++ sdk/helper/random/parser_test.go | 20 ++++++------ sdk/helper/random/registry.go | 2 +- sdk/helper/random/rules.go | 2 +- sdk/helper/random/serializing.go | 2 +- sdk/helper/random/string_generator_test.go | 2 +- vault/dynamic_system_view.go | 3 +- vault/dynamic_system_view_test.go | 6 ++-- vault/logical_system.go | 7 ++-- vault/logical_system_test.go | 32 +++++++++---------- .../database/dbplugin/databasemiddleware.go | 13 ++++++-- .../vault/sdk/helper/random/registry.go | 2 +- .../vault/sdk/helper/random/rules.go | 2 +- .../vault/sdk/helper/random/serializing.go | 4 +-- vendor/modules.txt | 5 +-- 15 files changed, 62 insertions(+), 47 deletions(-) diff --git a/go.sum b/go.sum index eed22a25adbc..77681ea02c66 100644 --- a/go.sum +++ b/go.sum @@ -247,6 +247,7 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekf github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903 h1:LbsanbbD6LieFkXbj9YNNBupiGHJgFeLpO0j0Fza1h8= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -513,6 +514,8 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -561,6 +564,8 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.2.2 h1:dxe5oCinTXiTIcfgmZecdCzPmAJKd46KsCWc35r0TV4= +github.com/mitchellh/mapstructure v1.2.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v0.0.0-20190430161007-f252a8fd71c8 h1:1CO5wil3HuiVLrUQ2ovSTO+6AfNOA5EMkHHVyHE9IwA= github.com/mitchellh/pointerstructure v0.0.0-20190430161007-f252a8fd71c8/go.mod h1:k4XwG94++jLVsSiTxo7qdIfXA9pj9EAeo0QsNNJOLZ8= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= @@ -720,6 +725,7 @@ github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tL github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.1 h1:aCvUg6QPl3ibpQUxyLkrEkCHtPqYJL4x9AuhqVqFis4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= @@ -737,6 +743,7 @@ github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index 5dbad3dd60e7..f9d399188c06 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -28,7 +28,7 @@ func TestParse(t *testing.T) { "charset restrictions": { rawConfig: ` length = 20 - rule "Charset" { + rule "charset" { charset = "abcde" min-chars = 2 }`, @@ -96,7 +96,7 @@ func TestParser_Parse(t *testing.T) { registry: defaultRuleNameMapping, rawConfig: ` length = 0 - rule "Charset" { + rule "charset" { charset = "abcde" }`, expected: StringGenerator{}, @@ -106,7 +106,7 @@ func TestParser_Parse(t *testing.T) { registry: defaultRuleNameMapping, rawConfig: ` length = -2 - rule "Charset" { + rule "charset" { charset = "abcde" }`, expected: StringGenerator{}, @@ -116,7 +116,7 @@ func TestParser_Parse(t *testing.T) { registry: defaultRuleNameMapping, rawConfig: ` length = 20 - rule "Charset" { + rule "charset" { charset = "abcde" min-chars = 2 }`, @@ -157,7 +157,7 @@ func TestParser_Parse(t *testing.T) { "test rule and charset restrictions": { registry: map[string]ruleConstructor{ "testrule": newTestRule, - "Charset": ParseCharset, + "charset": ParseCharset, }, rawConfig: ` length = 20 @@ -165,7 +165,7 @@ func TestParser_Parse(t *testing.T) { string = "teststring" int = 123 } - rule "Charset" { + rule "charset" { charset = "abcde" min-chars = 2 }`, @@ -202,7 +202,7 @@ func TestParser_Parse(t *testing.T) { "manually JSONified HCL": { registry: map[string]ruleConstructor{ "testrule": newTestRule, - "Charset": ParseCharset, + "charset": ParseCharset, }, rawConfig: ` { @@ -218,7 +218,7 @@ func TestParser_Parse(t *testing.T) { ] }, { - "Charset": [ + "charset": [ { "charset": "abcde", "min-chars": 2 @@ -246,7 +246,7 @@ func TestParser_Parse(t *testing.T) { "JSONified HCL": { registry: map[string]ruleConstructor{ "testrule": newTestRule, - "Charset": ParseCharset, + "charset": ParseCharset, }, rawConfig: toJSON(t, StringGenerator{ Length: 20, @@ -550,7 +550,7 @@ func TestGetRuleInfo(t *testing.T) { func BenchmarkParser_Parse(b *testing.B) { config := `length = 20 - rule "Charset" { + rule "charset" { charset = "abcde" min-chars = 2 }` diff --git a/sdk/helper/random/registry.go b/sdk/helper/random/registry.go index 812142e3f9c1..c0c78557e851 100644 --- a/sdk/helper/random/registry.go +++ b/sdk/helper/random/registry.go @@ -10,7 +10,7 @@ var ( // defaultRuleNameMapping is the default mapping of HCL rule names to the appropriate rule constructor. // Add to this map when adding a new Rule type to be recognized in HCL. defaultRuleNameMapping = map[string]ruleConstructor{ - "Charset": ParseCharset, + "charset": ParseCharset, } defaultRegistry = Registry{ diff --git a/sdk/helper/random/rules.go b/sdk/helper/random/rules.go index 8c2e1e5cc694..2a8c6020cd3c 100644 --- a/sdk/helper/random/rules.go +++ b/sdk/helper/random/rules.go @@ -37,7 +37,7 @@ func ParseCharset(data map[string]interface{}) (rule Rule, err error) { } func (c Charset) Type() string { - return "Charset" + return "charset" } // Chars returns the charset that this rule is looking for. diff --git a/sdk/helper/random/serializing.go b/sdk/helper/random/serializing.go index 90331663e203..c99d631aad0e 100644 --- a/sdk/helper/random/serializing.go +++ b/sdk/helper/random/serializing.go @@ -23,7 +23,7 @@ func (r serializableRules) MarshalJSON() (b []byte, err error) { // ] // }, // { - // "Charset": [ + // "charset": [ // { // "charset": "abcde", // "min-chars": 2 diff --git a/sdk/helper/random/string_generator_test.go b/sdk/helper/random/string_generator_test.go index 6e8b89b99014..f4f2423625be 100644 --- a/sdk/helper/random/string_generator_test.go +++ b/sdk/helper/random/string_generator_test.go @@ -534,7 +534,7 @@ func TestStringGenerator_JSON(t *testing.T) { RuleRegistry: Registry{ Rules: map[string]ruleConstructor{ "testrule": newTestRule, - "Charset": ParseCharset, + "charset": ParseCharset, }, }, } diff --git a/vault/dynamic_system_view.go b/vault/dynamic_system_view.go index fe65e54e7da5..3e391fcf4ca4 100644 --- a/vault/dynamic_system_view.go +++ b/vault/dynamic_system_view.go @@ -6,13 +6,12 @@ import ( "time" "github.com/hashicorp/errwrap" - "github.com/hashicorp/vault/sdk/helper/random" - "github.com/hashicorp/vault/helper/identity" "github.com/hashicorp/vault/helper/namespace" "github.com/hashicorp/vault/sdk/helper/consts" "github.com/hashicorp/vault/sdk/helper/license" "github.com/hashicorp/vault/sdk/helper/pluginutil" + "github.com/hashicorp/vault/sdk/helper/random" "github.com/hashicorp/vault/sdk/helper/wrapping" "github.com/hashicorp/vault/sdk/logical" "github.com/hashicorp/vault/sdk/version" diff --git a/vault/dynamic_system_view_test.go b/vault/dynamic_system_view_test.go index 673351f57170..b5a90f1d7693 100644 --- a/vault/dynamic_system_view_test.go +++ b/vault/dynamic_system_view_test.go @@ -160,15 +160,15 @@ func TestDynamicSystemView_GeneratePasswordFromPolicy_successful(t *testing.T) { policyName := "testpolicy" rawPolicy := map[string]interface{}{ "policy": `length = 20 -rule "Charset" { +rule "charset" { charset = "abcdefghijklmnopqrstuvwxyz" min_chars = 1 } -rule "Charset" { +rule "charset" { charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" min_chars = 1 } -rule "Charset" { +rule "charset" { charset = "0123456789" min_chars = 1 }`, diff --git a/vault/logical_system.go b/vault/logical_system.go index c09abd726159..3ec8f1c2a8fe 100644 --- a/vault/logical_system.go +++ b/vault/logical_system.go @@ -18,22 +18,21 @@ import ( "sync" "time" - multierror "github.com/hashicorp/go-multierror" - "github.com/hashicorp/vault/physical/raft" - "github.com/hashicorp/vault/sdk/helper/random" - "github.com/hashicorp/errwrap" log "github.com/hashicorp/go-hclog" memdb "github.com/hashicorp/go-memdb" + multierror "github.com/hashicorp/go-multierror" uuid "github.com/hashicorp/go-uuid" "github.com/hashicorp/vault/helper/hostutil" "github.com/hashicorp/vault/helper/identity" "github.com/hashicorp/vault/helper/metricsutil" "github.com/hashicorp/vault/helper/namespace" + "github.com/hashicorp/vault/physical/raft" "github.com/hashicorp/vault/sdk/framework" "github.com/hashicorp/vault/sdk/helper/consts" "github.com/hashicorp/vault/sdk/helper/jsonutil" "github.com/hashicorp/vault/sdk/helper/parseutil" + "github.com/hashicorp/vault/sdk/helper/random" "github.com/hashicorp/vault/sdk/helper/strutil" "github.com/hashicorp/vault/sdk/helper/wrapping" "github.com/hashicorp/vault/sdk/logical" diff --git a/vault/logical_system_test.go b/vault/logical_system_test.go index f4f6a4b697fb..23cc89c0e6ed 100644 --- a/vault/logical_system_test.go +++ b/vault/logical_system_test.go @@ -2753,7 +2753,7 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { storage: &fakeStorage{}, data: passwordPoliciesFieldData(map[string]interface{}{ "policy": `length = 20 - rule "Charset" { + rule "charset" { charset="abcdefghij" }`, }), @@ -2784,7 +2784,7 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { data: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", "policy": "length = 20\n" + - "rule \"Charset\" {\n" + + "rule \"charset\" {\n" + " charset=\"abcdefghij\"\n" + "}", }), @@ -2796,7 +2796,7 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { data: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", "policy": "length = 20\n" + - "rule \"Charset\" {\n" + + "rule \"charset\" {\n" + " charset=\"a\"\n" + " min-chars = 30\n" + "}", @@ -2809,7 +2809,7 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { data: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", "policy": "length = 20\n" + - "rule \"Charset\" {\n" + + "rule \"charset\" {\n" + " charset=\"abcdefghij\"\n" + "}", }), @@ -2823,7 +2823,7 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { expectedStore: map[string][]byte{ "password_policy/testpolicy": toJson(t, map[string]interface{}{ "policy": "length = 20\n" + - "rule \"Charset\" {\n" + + "rule \"charset\" {\n" + " charset=\"abcdefghij\"\n" + "}"}), }, @@ -2833,7 +2833,7 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { data: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", "policy": base64Encode("length = 20\n" + - "rule \"Charset\" {\n" + + "rule \"charset\" {\n" + " charset=\"abcdefghij\"\n" + "}"), }), @@ -2847,7 +2847,7 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { expectedStore: map[string][]byte{ "password_policy/testpolicy": toJson(t, map[string]interface{}{ "policy": "length = 20\n" + - "rule \"Charset\" {\n" + + "rule \"charset\" {\n" + " charset=\"abcdefghij\"\n" + "}"}), }, @@ -2991,7 +2991,7 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { data: map[string][]byte{ "password_policy/testpolicy": toJson(t, map[string]interface{}{ "policy": `length = 20 - rule "Charset" { + rule "charset" { charset="abcdefghij" }`}), }, @@ -3002,7 +3002,7 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { expectedStore: map[string][]byte{ "password_policy/testpolicy": toJson(t, map[string]interface{}{ "policy": `length = 20 - rule "Charset" { + rule "charset" { charset="abcdefghij" }`}), }, @@ -3012,7 +3012,7 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { data: map[string][]byte{ "password_policy/testpolicy": toJson(t, map[string]interface{}{ "policy": `length = 20 - rule "Charset" { + rule "charset" { charset="abcdefghij" }`}), }, @@ -3026,7 +3026,7 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { expectedStore: map[string][]byte{ "password_policy/testpolicy": toJson(t, map[string]interface{}{ "policy": `length = 20 - rule "Charset" { + rule "charset" { charset="abcdefghij" }`}), }, @@ -3036,7 +3036,7 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { data: map[string][]byte{ "password_policy/testpolicy": toJson(t, map[string]interface{}{ "policy": `length = 20 - rule "Charset" { + rule "charset" { charset="abcdefghij" }`}), }, @@ -3101,7 +3101,7 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { data: map[string][]byte{ "password_policy/testpolicy": toJson(t, map[string]interface{}{ "policy": `length = 20 - rule "Charset" { + rule "charset" { charset="abcdefghij" }`}), }, @@ -3115,7 +3115,7 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { data: map[string][]byte{ "password_policy/testpolicy": toJson(t, map[string]interface{}{ "policy": `length = 20 - rule "Charset" { + rule "charset" { charset="abcdefghij" }`}), }, @@ -3155,7 +3155,7 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { data: map[string][]byte{ "password_policy/testpolicy": toJson(t, map[string]interface{}{ "policy": `length = 20 - rule "Charset" { + rule "charset" { charset="abcdefghij" }`}), }, @@ -3200,7 +3200,7 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { data: map[string][]byte{ "password_policy/testpolicy": toJson(t, map[string]interface{}{ "policy": `length = 20 - rule "Charset" { + rule "charset" { charset="abcdefghij" }`}), }, diff --git a/vendor/github.com/hashicorp/vault/sdk/database/dbplugin/databasemiddleware.go b/vendor/github.com/hashicorp/vault/sdk/database/dbplugin/databasemiddleware.go index 19cfa3374b62..e7cb0a2f5af1 100644 --- a/vendor/github.com/hashicorp/vault/sdk/database/dbplugin/databasemiddleware.go +++ b/vendor/github.com/hashicorp/vault/sdk/database/dbplugin/databasemiddleware.go @@ -8,10 +8,10 @@ import ( "sync" "time" - "github.com/hashicorp/errwrap" - metrics "github.com/armon/go-metrics" + "github.com/hashicorp/errwrap" log "github.com/hashicorp/go-hclog" + "google.golang.org/grpc/status" ) // ---- Tracing Middleware Domain ---- @@ -318,6 +318,15 @@ func (mw *DatabaseErrorSanitizerMiddleware) sanitize(err error) error { if k == "" { continue } + + // Attempt to keep the status code attached to the + // error without changing the actual error message + s, ok := status.FromError(err) + if ok { + err = status.Error(s.Code(), strings.Replace(s.Message(), k, v.(string), -1)) + continue + } + err = errors.New(strings.Replace(err.Error(), k, v.(string), -1)) } } diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go index 812142e3f9c1..c0c78557e851 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go @@ -10,7 +10,7 @@ var ( // defaultRuleNameMapping is the default mapping of HCL rule names to the appropriate rule constructor. // Add to this map when adding a new Rule type to be recognized in HCL. defaultRuleNameMapping = map[string]ruleConstructor{ - "Charset": ParseCharset, + "charset": ParseCharset, } defaultRegistry = Registry{ diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go index 8c2e1e5cc694..2a8c6020cd3c 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go @@ -37,7 +37,7 @@ func ParseCharset(data map[string]interface{}) (rule Rule, err error) { } func (c Charset) Type() string { - return "Charset" + return "charset" } // Chars returns the charset that this rule is looking for. diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go index dd8418fe938c..c99d631aad0e 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/serializing.go @@ -23,10 +23,10 @@ func (r serializableRules) MarshalJSON() (b []byte, err error) { // ] // }, // { - // "Charset": [ + // "charset": [ // { // "charset": "abcde", - // "min_chars": 2 + // "min-chars": 2 // } // ] // } diff --git a/vendor/modules.txt b/vendor/modules.txt index 4079b8eb1ab3..ccb081f027e2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -462,6 +462,7 @@ github.com/hashicorp/vault/sdk/helper/pathmanager github.com/hashicorp/vault/sdk/helper/pluginutil github.com/hashicorp/vault/sdk/helper/pointerutil github.com/hashicorp/vault/sdk/helper/policyutil +github.com/hashicorp/vault/sdk/helper/random github.com/hashicorp/vault/sdk/helper/salt github.com/hashicorp/vault/sdk/helper/strutil github.com/hashicorp/vault/sdk/helper/tlsutil @@ -569,7 +570,7 @@ github.com/keybase/go-crypto/openpgp/s2k github.com/keybase/go-crypto/rsa # github.com/konsorten/go-windows-terminal-sequences v1.0.1 github.com/konsorten/go-windows-terminal-sequences -# github.com/kr/pretty v0.1.0 +# github.com/kr/pretty v0.2.0 github.com/kr/pretty # github.com/kr/text v0.1.0 github.com/kr/text @@ -599,7 +600,7 @@ github.com/mitchellh/go-homedir github.com/mitchellh/go-testing-interface # github.com/mitchellh/hashstructure v1.0.0 github.com/mitchellh/hashstructure -# github.com/mitchellh/mapstructure v1.1.2 +# github.com/mitchellh/mapstructure v1.2.2 github.com/mitchellh/mapstructure # github.com/mitchellh/pointerstructure v0.0.0-20190430161007-f252a8fd71c8 github.com/mitchellh/pointerstructure From b5dcc867f7f255fdc235b01ed2277a9d38fe1f68 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Fri, 1 May 2020 13:10:09 -0600 Subject: [PATCH 19/29] Remove bias from candiate password generation --- sdk/helper/random/string_generator.go | 68 +++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 9 deletions(-) diff --git a/sdk/helper/random/string_generator.go b/sdk/helper/random/string_generator.go index ec9bb7d14259..73f07651aeef 100644 --- a/sdk/helper/random/string_generator.go +++ b/sdk/helper/random/string_generator.go @@ -142,6 +142,12 @@ func (g *StringGenerator) generate() (str string, err error) { return string(candidate), nil } +const ( + // maxCharsetLen is the maximum length a charset is allowed to be when generating a candidate string. + // This is the total number of numbers available for selecting an index out of the charset slice. + maxCharsetLen = 256 +) + // randomRunes creates a random string based on the provided charset. The charset is limited to 255 characters, but // could be expanded if needed. Expanding the maximum charset size will decrease performance because it will need to // combine bytes into a larger integer using binary.BigEndian.Uint16() function. @@ -149,28 +155,72 @@ func randomRunes(rng io.Reader, charset []rune, length int) (candidate []rune, e if len(charset) == 0 { return nil, fmt.Errorf("no charset specified") } - if len(charset) > math.MaxUint8 { + if len(charset) > maxCharsetLen { return nil, fmt.Errorf("charset is too long: limited to %d characters", math.MaxUint8) } if length <= 0 { return nil, fmt.Errorf("unable to generate a zero or negative length runeset") } + // This can't always select indexes from [0-maxCharsetLen) because it could introduce bias to the character selection. + // For instance, if the length of the charset is [a-zA-Z0-9-] (length of 63): + // RNG ranges: [0-62][63-125][126-188][189-251] will equally select from the entirety of the charset. However, + // the RNG values [252-255] will select the first 4 characters of the charset while ignoring the remaining 59. + // This results in a bias towards the front of the charset. + // + // To avoid this, we determine the largest integer multiplier of the charset length that is <= maxCharsetLen + // For instance, if the maxCharsetLen is 256 (the size of one byte) and the charset is length 63, the multiplier + // equals 4: + // 256/63 => 4.06 + // Trunc(4.06) => 4 + // Multiply the multiplier by the charset length to get the maximum value we can generate to avoid bias: 252 + // maxAllowedRNGValue := (maxCharsetLen / len(charset)) * len(charset) + maxAllowedRNGValue := len(charset) - 1 + + // rngBufferMultiplier increases the size of the RNG buffer to account for lost + // indexes due to the maxAllowedRNGValue + rngBufferMultiplier := 1.0 + + // Don't set a multiplier if we are able to use the entire range of indexes + if maxAllowedRNGValue < maxCharsetLen { + // Anything more complicated than an arbitrary percentage appears to have little practical performance benefit + rngBufferMultiplier = 1.5 + } + if rng == nil { rng = rand.Reader } charsetLen := byte(len(charset)) - data := make([]byte, length) - _, err = rng.Read(data) - if err != nil { - return nil, err - } runes := make([]rune, 0, length) - for i := 0; i < len(data); i++ { - r := charset[data[i]%charsetLen] - runes = append(runes, r) + + for len(runes) < length { + // Generate a bunch of indexes + data := make([]byte, int(float64(length)*rngBufferMultiplier)) + numBytes, err := rng.Read(data) + if err != nil { + return nil, err + } + + // Append characters until either we're out of indexes or the length is long enough + for i := 0; i < numBytes; i++ { + // If the max allowed value is equal to the max byte size, we don't need to do any checking + // If we don't check this, the conversion of `byte(maxAllowedRNGValue)` may wrap from 256 -> 0 + if maxAllowedRNGValue < maxCharsetLen { + if data[i] > byte(maxAllowedRNGValue) { + continue + } + } + + // r := charset[data[i]%byte(len(charset))] + r := charset[data[i]%charsetLen] + runes = append(runes, r) + + if len(runes) == length { + break + } + } } return runes, nil From 411ee27fbd407b3041bf95a60ee45233f501f926 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Mon, 4 May 2020 11:45:39 -0600 Subject: [PATCH 20/29] Add test for detecting bias; better error checking --- sdk/helper/random/string_generator.go | 22 ++--- sdk/helper/random/string_generator_test.go | 108 +++++++++++++++++++-- 2 files changed, 111 insertions(+), 19 deletions(-) diff --git a/sdk/helper/random/string_generator.go b/sdk/helper/random/string_generator.go index 73f07651aeef..9d877920c1aa 100644 --- a/sdk/helper/random/string_generator.go +++ b/sdk/helper/random/string_generator.go @@ -173,9 +173,9 @@ func randomRunes(rng io.Reader, charset []rune, length int) (candidate []rune, e // equals 4: // 256/63 => 4.06 // Trunc(4.06) => 4 - // Multiply the multiplier by the charset length to get the maximum value we can generate to avoid bias: 252 - // maxAllowedRNGValue := (maxCharsetLen / len(charset)) * len(charset) - maxAllowedRNGValue := len(charset) - 1 + // Multiply by the charset length + // Subtract 1 to account for 0-based counting and you get the max index value: 251 + maxAllowedRNGValue := (maxCharsetLen/len(charset))*len(charset) - 1 // rngBufferMultiplier increases the size of the RNG buffer to account for lost // indexes due to the maxAllowedRNGValue @@ -205,16 +205,16 @@ func randomRunes(rng io.Reader, charset []rune, length int) (candidate []rune, e // Append characters until either we're out of indexes or the length is long enough for i := 0; i < numBytes; i++ { - // If the max allowed value is equal to the max byte size, we don't need to do any checking - // If we don't check this, the conversion of `byte(maxAllowedRNGValue)` may wrap from 256 -> 0 - if maxAllowedRNGValue < maxCharsetLen { - if data[i] > byte(maxAllowedRNGValue) { - continue - } + if data[i] > byte(maxAllowedRNGValue) { + continue } - // r := charset[data[i]%byte(len(charset))] - r := charset[data[i]%charsetLen] + // Be careful about byte conversions - you don't want 256 to wrap to 0 + index := data[i] + if len(charset) != maxCharsetLen { + index = index % charsetLen + } + r := charset[index] runes = append(runes, r) if len(runes) == length { diff --git a/sdk/helper/random/string_generator_test.go b/sdk/helper/random/string_generator_test.go index f4f2423625be..ae4609a6aef1 100644 --- a/sdk/helper/random/string_generator_test.go +++ b/sdk/helper/random/string_generator_test.go @@ -6,6 +6,7 @@ import ( "encoding/json" "fmt" "io" + "math" MRAND "math/rand" "reflect" "sort" @@ -183,13 +184,6 @@ func TestStringGenerator_Generate_errors(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { - // sg := StringGenerator{ - // Length: 20, - // charset: []rune(test.charset), - // Rules: test.rules, - // rng: test.rng, - // } - // One context to rule them all, one context to find them, one context to bring them all and in the darkness bind them. ctx, cancel := context.WithTimeout(context.Background(), test.timeout) defer cancel() @@ -226,7 +220,7 @@ func TestRandomRunes_deterministic(t *testing.T) { rngSeed: 1585593298447807001, charset: AlphaNumericShortSymbolCharset, length: 20, - expected: "1ON6lVjnBs84zJbUBVEz", + expected: "ON6lVjnBs84zJbUBVEzb", }, "max size charset": { rngSeed: 1585593298447807002, @@ -729,3 +723,101 @@ func TestDeduplicateRunes(t *testing.T) { }) } } + +func TestRandomRunes_Bias(t *testing.T) { + type testCase struct { + charset []rune + maxStdDev float64 + } + + tests := map[string]testCase{ + "small charset": { + charset: []rune("abcde"), + maxStdDev: 2700, + }, + "lowercase characters": { + charset: LowercaseRuneset, + maxStdDev: 1000, + }, + "alphabetical characters": { + charset: AlphabeticRuneset, + maxStdDev: 800, + }, + "alphanumeric": { + charset: AlphaNumericRuneset, + maxStdDev: 800, + }, + "alphanumeric with symbol": { + charset: AlphaNumericShortSymbolRuneset, + maxStdDev: 800, + }, + "charset evenly divisible into 256": { + charset: append(AlphaNumericRuneset, '!', '@'), + maxStdDev: 800, + }, + "large charset": { + charset: FullSymbolRuneset, + maxStdDev: 800, + }, + "just under half size charset": { + charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + + "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğ"), + maxStdDev: 800, + }, + "half size charset": { + charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + + "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ"), + maxStdDev: 800, + }, + } + + for name, test := range tests { + t.Run(fmt.Sprintf("%s (%d chars)", name, len(test.charset)), func(t *testing.T) { + runeCounts := map[rune]int{} + + generations := 50000 + length := 100 + for i := 0; i < generations; i++ { + str, err := randomRunes(nil, test.charset, length) + if err != nil { + t.Fatal(err) + } + for _, r := range str { + runeCounts[r]++ + } + } + + chars := charCounts{} + + var sum float64 + for r, count := range runeCounts { + chars = append(chars, charCount{r, count}) + sum += float64(count) + } + + mean := sum / float64(len(runeCounts)) + var stdDev float64 + for _, count := range runeCounts { + stdDev += math.Pow(float64(count)-mean, 2) + } + + stdDev = math.Sqrt(stdDev / float64(len(runeCounts))) + t.Logf("Mean : %10.4f", mean) + + if stdDev > test.maxStdDev { + t.Fatalf("Standard deviation is too large: %.2f > %.2f", stdDev, test.maxStdDev) + } + }) + } +} + +type charCount struct { + r rune + count int +} + +type charCounts []charCount + +func (s charCounts) Len() int { return len(s) } +func (s charCounts) Less(i, j int) bool { return s[i].r < s[j].r } +func (s charCounts) Swap(i, j int) { s[i], s[j] = s[j], s[i] } From 83aa2287502d223c8429ede571b5b349c109419d Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Thu, 7 May 2020 12:20:36 -0600 Subject: [PATCH 21/29] Remove commented out code --- sdk/helper/random/parser.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/sdk/helper/random/parser.go b/sdk/helper/random/parser.go index 5510ad4e5cbb..1cdd35183857 100644 --- a/sdk/helper/random/parser.go +++ b/sdk/helper/random/parser.go @@ -83,9 +83,6 @@ func parseRules(registry Registry, rawRules []map[string]interface{}) (rules []R return nil, fmt.Errorf("unable to get rule info: %w", err) } - // Map names like "lower-alpha" to lowercase alphabetical characters - // applyShortcuts(info.data) - rule, err := registry.parseRule(info.ruleType, info.data) if err != nil { return nil, fmt.Errorf("unable to parse rule %s: %w", info.ruleType, err) From 56daa9a81421101e9af4b22f4c810150a6dd0227 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Mon, 11 May 2020 13:31:29 -0600 Subject: [PATCH 22/29] Numerous small changes from code review * Renamed some functions in StringGenerator to be clearer * Fixed several tests to test charsets of length 256 instead of 255 * Added additional comments * Renamed Charset struct -> CharsetRule (HCL rule name unchanged) * Moved random io.Reader to the Generate() func instead of the struct * Returns 204 instead of 200 when no body is returned * Fixed an inconsistency in policy saving - should error on any failures when generating passwords prior to save * Minor local variable renaming --- sdk/helper/random/parser.go | 24 +++-- sdk/helper/random/parser_test.go | 22 ++-- sdk/helper/random/registry.go | 1 + sdk/helper/random/rules.go | 25 +++-- sdk/helper/random/rules_test.go | 2 +- sdk/helper/random/serializing_test.go | 8 +- sdk/helper/random/string_generator.go | 34 +++--- sdk/helper/random/string_generator_test.go | 81 +++++++------- sdk/logical/system_view.go | 5 +- sdk/plugin/grpc_system_test.go | 8 +- vault/dynamic_system_view.go | 4 +- vault/logical_system.go | 25 ++--- vault/logical_system_test.go | 57 +++------- .../vault/sdk/helper/random/parser.go | 27 ++--- .../vault/sdk/helper/random/registry.go | 1 + .../vault/sdk/helper/random/rules.go | 25 +++-- .../sdk/helper/random/string_generator.go | 102 ++++++++++++------ .../vault/sdk/logical/system_view.go | 5 +- 18 files changed, 242 insertions(+), 214 deletions(-) diff --git a/sdk/helper/random/parser.go b/sdk/helper/random/parser.go index 1cdd35183857..572767263e3b 100644 --- a/sdk/helper/random/parser.go +++ b/sdk/helper/random/parser.go @@ -9,28 +9,31 @@ import ( "github.com/mitchellh/mapstructure" ) -// Parse is a convenience function for parsing HCL into a StringGenerator. See Parser.Parse for details. -func Parse(raw string) (gen StringGenerator, err error) { - parser := Parser{ +// ParsePolicy is a convenience function for parsing HCL into a StringGenerator. +// See PolicyParser.ParsePolicy for details. +func ParsePolicy(raw string) (gen StringGenerator, err error) { + parser := PolicyParser{ RuleRegistry: Registry{ Rules: defaultRuleNameMapping, }, } - return parser.Parse(raw) + return parser.ParsePolicy(raw) } -func ParseBytes(raw []byte) (gen StringGenerator, err error) { - return Parse(string(raw)) +// ParsePolicyBytes is a convenience function for parsing HCL into a StringGenerator. +// See PolicyParser.ParsePolicy for details. +func ParsePolicyBytes(raw []byte) (gen StringGenerator, err error) { + return ParsePolicy(string(raw)) } -// Parser parses string generator configuration from HCL. -type Parser struct { +// PolicyParser parses string generator configuration from HCL. +type PolicyParser struct { // RuleRegistry maps rule names in HCL to Rule constructors. RuleRegistry Registry } -// Parse parses the provided HCL into a StringGenerator. -func (p Parser) Parse(raw string) (sg StringGenerator, err error) { +// ParsePolicy parses the provided HCL into a StringGenerator. +func (p PolicyParser) ParsePolicy(raw string) (sg StringGenerator, err error) { rawData := map[string]interface{}{} err = hcl.Decode(&rawData, raw) if err != nil { @@ -132,6 +135,7 @@ func getRuleInfo(rule map[string]interface{}) (data ruleInfo, err error) { return data, fmt.Errorf("rule is empty") } +// stringToRunesFunc converts a string to a []rune for use in the mapstructure library func stringToRunesFunc(from reflect.Kind, to reflect.Kind, data interface{}) (interface{}, error) { if from != reflect.String || to != reflect.Slice { return data, nil diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index f9d399188c06..d099888a9634 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -36,7 +36,7 @@ func TestParse(t *testing.T) { Length: 20, charset: []rune("abcde"), Rules: []Rule{ - Charset{ + CharsetRule{ Charset: []rune("abcde"), MinChars: 2, }, @@ -48,7 +48,7 @@ func TestParse(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { - actual, err := Parse(test.rawConfig) + actual, err := ParsePolicy(test.rawConfig) if test.expectErr && err == nil { t.Fatalf("err expected, got nil") } @@ -124,7 +124,7 @@ func TestParser_Parse(t *testing.T) { Length: 20, charset: []rune("abcde"), Rules: []Rule{ - Charset{ + CharsetRule{ Charset: []rune("abcde"), MinChars: 2, }, @@ -177,7 +177,7 @@ func TestParser_Parse(t *testing.T) { String: "teststring", Integer: 123, }, - Charset{ + CharsetRule{ Charset: []rune("abcde"), MinChars: 2, }, @@ -235,7 +235,7 @@ func TestParser_Parse(t *testing.T) { String: "teststring", Integer: 123, }, - Charset{ + CharsetRule{ Charset: []rune("abcde"), MinChars: 2, }, @@ -255,7 +255,7 @@ func TestParser_Parse(t *testing.T) { String: "teststring", Integer: 123, }, - Charset{ + CharsetRule{ Charset: []rune("abcde"), MinChars: 2, }, @@ -269,7 +269,7 @@ func TestParser_Parse(t *testing.T) { String: "teststring", Integer: 123, }, - Charset{ + CharsetRule{ Charset: []rune("abcde"), MinChars: 2, }, @@ -301,13 +301,13 @@ func TestParser_Parse(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { - parser := Parser{ + parser := PolicyParser{ RuleRegistry: Registry{ Rules: test.registry, }, } - actual, err := parser.Parse(test.rawConfig) + actual, err := parser.ParsePolicy(test.rawConfig) if test.expectErr && err == nil { t.Fatalf("err expected, got nil") } @@ -556,12 +556,12 @@ func BenchmarkParser_Parse(b *testing.B) { }` for i := 0; i < b.N; i++ { - parser := Parser{ + parser := PolicyParser{ RuleRegistry: Registry{ Rules: defaultRuleNameMapping, }, } - _, err := parser.Parse(config) + _, err := parser.ParsePolicy(config) if err != nil { b.Fatalf("Failed to parse: %s", err) } diff --git a/sdk/helper/random/registry.go b/sdk/helper/random/registry.go index c0c78557e851..efdcf5c302f5 100644 --- a/sdk/helper/random/registry.go +++ b/sdk/helper/random/registry.go @@ -20,6 +20,7 @@ var ( // Registry of HCL rule names to rule constructors. type Registry struct { + // Rules maps names of rules to a constructor for the rule Rules map[string]ruleConstructor } diff --git a/sdk/helper/random/rules.go b/sdk/helper/random/rules.go index 2a8c6020cd3c..fead5b4ffe65 100644 --- a/sdk/helper/random/rules.go +++ b/sdk/helper/random/rules.go @@ -6,9 +6,18 @@ import ( "github.com/mitchellh/mapstructure" ) -// Charset requires a certain number of characters from the specified charset. -type Charset struct { - // Charset is the list of rules that candidate strings must contain a minimum number of. +// Rule to assert on string values. +type Rule interface { + // Pass should return true if the provided value passes any assertions this Rule is making. + Pass(value []rune) bool + + // Type returns the name of the rule as associated in the registry + Type() string +} + +// CharsetRule requires a certain number of characters from the specified charset. +type CharsetRule struct { + // CharsetRule is the list of rules that candidate strings must contain a minimum number of. Charset runes `mapstructure:"charset" json:"charset"` // MinChars indicates the minimum (inclusive) number of characters from the charset that should appear in the string. @@ -17,7 +26,7 @@ type Charset struct { // ParseCharset from the provided data map. The data map is expected to be parsed from HCL. func ParseCharset(data map[string]interface{}) (rule Rule, err error) { - cr := &Charset{} + cr := &CharsetRule{} decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ Metadata: nil, @@ -36,22 +45,22 @@ func ParseCharset(data map[string]interface{}) (rule Rule, err error) { return *cr, nil } -func (c Charset) Type() string { +func (c CharsetRule) Type() string { return "charset" } // Chars returns the charset that this rule is looking for. -func (c Charset) Chars() []rune { +func (c CharsetRule) Chars() []rune { return c.Charset } -func (c Charset) MinLength() int { +func (c CharsetRule) MinLength() int { return c.MinChars } // Pass returns true if the provided candidate string has a minimum number of chars in it. // This adheres to the Rule interface -func (c Charset) Pass(value []rune) bool { +func (c CharsetRule) Pass(value []rune) bool { if c.MinChars <= 0 { return true } diff --git a/sdk/helper/random/rules_test.go b/sdk/helper/random/rules_test.go index 10e96ee324fb..18aa00879826 100644 --- a/sdk/helper/random/rules_test.go +++ b/sdk/helper/random/rules_test.go @@ -77,7 +77,7 @@ func TestCharset(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { - cr := Charset{ + cr := CharsetRule{ Charset: []rune(test.charset), MinChars: test.minChars, } diff --git a/sdk/helper/random/serializing_test.go b/sdk/helper/random/serializing_test.go index 65ec1fbe8fba..171053742993 100644 --- a/sdk/helper/random/serializing_test.go +++ b/sdk/helper/random/serializing_test.go @@ -8,19 +8,19 @@ import ( func TestJSONMarshalling(t *testing.T) { expected := serializableRules{ - Charset{ + CharsetRule{ Charset: LowercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: UppercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: NumericRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: ShortSymbolRuneset, MinChars: 1, }, diff --git a/sdk/helper/random/string_generator.go b/sdk/helper/random/string_generator.go index 9d877920c1aa..527a96aae6fb 100644 --- a/sdk/helper/random/string_generator.go +++ b/sdk/helper/random/string_generator.go @@ -40,19 +40,19 @@ var ( DefaultStringGenerator = StringGenerator{ Length: 20, Rules: []Rule{ - Charset{ + CharsetRule{ Charset: LowercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: UppercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: NumericRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: ShortSymbolRuneset, MinChars: 1, }, @@ -66,17 +66,8 @@ func sortCharset(chars string) string { return string(r) } -// Rule to assert on string values. -type Rule interface { - // Pass should return true if the provided value passes any assertions this Rule is making. - Pass(value []rune) bool - - // Type returns the name of the rule as associated in the registry - Type() string -} - // StringGenerator generats random strings from the provided charset & adhering to a set of rules. The set of rules -// are things like Charset which requires a certain number of characters from a sub-charset. +// are things like CharsetRule which requires a certain number of characters from a sub-charset. type StringGenerator struct { // Length of the string to generate. Length int `mapstructure:"length" json:"length"` @@ -84,15 +75,13 @@ type StringGenerator struct { // Rules the generated strings must adhere to. Rules serializableRules `mapstructure:"-" json:"rule"` // This is "rule" in JSON so it matches the HCL property type - // Charset to choose runes from. This is computed from the rules, not directly configurable + // CharsetRule to choose runes from. This is computed from the rules, not directly configurable charset runes - - // rng for testing purposes to ensure error handling from the crypto/rand package is working properly. - rng io.Reader } // Generate a random string from the charset and adhering to the provided rules. -func (g *StringGenerator) Generate(ctx context.Context) (str string, err error) { +// The io.Reader is optional. If not provided, it will default to the reader from crypto/rand +func (g *StringGenerator) Generate(ctx context.Context, rng io.Reader) (str string, err error) { if _, hasTimeout := ctx.Deadline(); !hasTimeout { var cancel func() ctx, cancel = context.WithTimeout(ctx, 1*time.Second) // Ensure there's a timeout on the context @@ -111,7 +100,7 @@ LOOP: case <-ctx.Done(): return "", fmt.Errorf("timed out generating string") default: - str, err = g.generate() + str, err = g.generate(rng) if err != nil { return "", err } @@ -123,11 +112,11 @@ LOOP: } } -func (g *StringGenerator) generate() (str string, err error) { +func (g *StringGenerator) generate(rng io.Reader) (str string, err error) { // If performance improvements need to be made, this can be changed to read a batch of // potential strings at once rather than one at a time. This will significantly // improve performance, but at the cost of added complexity. - candidate, err := randomRunes(g.rng, g.charset, g.Length) + candidate, err := randomRunes(rng, g.charset, g.Length) if err != nil { return "", fmt.Errorf("unable to generate random characters: %w", err) } @@ -187,6 +176,7 @@ func randomRunes(rng io.Reader, charset []rune, length int) (candidate []rune, e rngBufferMultiplier = 1.5 } + // Default to the standard crypto reader if one isn't provided if rng == nil { rng = rand.Reader } diff --git a/sdk/helper/random/string_generator_test.go b/sdk/helper/random/string_generator_test.go index ae4609a6aef1..55b252a4f9eb 100644 --- a/sdk/helper/random/string_generator_test.go +++ b/sdk/helper/random/string_generator_test.go @@ -26,19 +26,19 @@ func TestStringGenerator_Generate_successful(t *testing.T) { generator: &StringGenerator{ Length: 20, Rules: []Rule{ - Charset{ + CharsetRule{ Charset: LowercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: UppercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: NumericRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: ShortSymbolRuneset, MinChars: 1, }, @@ -51,15 +51,15 @@ func TestStringGenerator_Generate_successful(t *testing.T) { generator: &StringGenerator{ Length: 20, Rules: []Rule{ - Charset{ + CharsetRule{ Charset: LowercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: UppercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: NumericRuneset, MinChars: 1, }, @@ -78,7 +78,7 @@ func TestStringGenerator_Generate_successful(t *testing.T) { runesFound := []rune{} for i := 0; i < 100; i++ { - actual, err := test.generator.Generate(ctx) + actual, err := test.generator.Generate(ctx, nil) if err != nil { t.Fatalf("no error expected, but got: %s", err) } @@ -106,6 +106,7 @@ func TestStringGenerator_Generate_errors(t *testing.T) { type testCase struct { timeout time.Duration generator *StringGenerator + rng io.Reader } tests := map[string]testCase{ @@ -119,8 +120,8 @@ func TestStringGenerator_Generate_errors(t *testing.T) { }, }, charset: AlphaNumericShortSymbolRuneset, - rng: rand.Reader, }, + rng: rand.Reader, }, "impossible rules": { timeout: 10 * time.Millisecond, // Keep this short so the test doesn't take too long @@ -132,8 +133,8 @@ func TestStringGenerator_Generate_errors(t *testing.T) { }, }, charset: AlphaNumericShortSymbolRuneset, - rng: rand.Reader, }, + rng: rand.Reader, }, "bad RNG reader": { timeout: 10 * time.Millisecond, // Keep this short so the test doesn't take too long @@ -141,44 +142,44 @@ func TestStringGenerator_Generate_errors(t *testing.T) { Length: 20, Rules: []Rule{}, charset: AlphaNumericShortSymbolRuneset, - rng: badReader{}, }, + rng: badReader{}, }, "0 length": { timeout: 10 * time.Millisecond, generator: &StringGenerator{ Length: 0, Rules: []Rule{ - Charset{ + CharsetRule{ Charset: []rune("abcde"), MinChars: 0, }, }, charset: []rune("abcde"), - rng: rand.Reader, }, + rng: rand.Reader, }, "-1 length": { timeout: 10 * time.Millisecond, generator: &StringGenerator{ Length: -1, Rules: []Rule{ - Charset{ + CharsetRule{ Charset: []rune("abcde"), MinChars: 0, }, }, charset: []rune("abcde"), - rng: rand.Reader, }, + rng: rand.Reader, }, "no charset": { timeout: 10 * time.Millisecond, generator: &StringGenerator{ Length: 20, Rules: []Rule{}, - rng: rand.Reader, }, + rng: rand.Reader, }, } @@ -188,7 +189,7 @@ func TestStringGenerator_Generate_errors(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), test.timeout) defer cancel() - actual, err := test.generator.Generate(ctx) + actual, err := test.generator.Generate(ctx, test.rng) if err == nil { t.Fatalf("Expected error but none found") } @@ -227,7 +228,7 @@ func TestRandomRunes_deterministic(t *testing.T) { charset: " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ" + "ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠ" + - "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟", + "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟℠", length: 20, expected: "tųŎ℄ņ℃Œ.@řHš-ℍ}ħGIJLℏ", }, @@ -270,7 +271,7 @@ func TestRandomRunes_successful(t *testing.T) { " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ" + "ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠ" + - "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟", + "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟℠", ), length: 20, }, @@ -329,9 +330,10 @@ func TestRandomRunes_errors(t *testing.T) { charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ" + "ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠ" + - "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟" + + "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟℠" + "Σ", ), + length:20, rng: rand.Reader, }, "length is zero": { @@ -387,19 +389,19 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { generator: StringGenerator{ charset: AlphaNumericFullSymbolRuneset, Rules: []Rule{ - Charset{ + CharsetRule{ Charset: LowercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: UppercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: NumericRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: FullSymbolRuneset, MinChars: 1, }, @@ -411,18 +413,18 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { charset: []rune(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" + "`abcdefghijklmnopqrstuvwxyz{|}~ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠ" + "ġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠ" + - "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟", + "šŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ℀℁ℂ℃℄℅℆ℇ℈℉ℊℋℌℍℎℏℐℑℒℓ℔ℕ№℗℘ℙℚℛℜℝ℞℟℠", ), Rules: []Rule{ - Charset{ + CharsetRule{ Charset: LowercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: UppercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: []rune("ĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒ"), MinChars: 1, }, @@ -433,19 +435,19 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { generator: StringGenerator{ charset: AlphaNumericShortSymbolRuneset, Rules: []Rule{ - Charset{ + CharsetRule{ Charset: []rune("A"), MinChars: 1, }, - Charset{ + CharsetRule{ Charset: []rune("1"), MinChars: 1, }, - Charset{ + CharsetRule{ Charset: []rune("a"), MinChars: 1, }, - Charset{ + CharsetRule{ Charset: []rune("-"), MinChars: 1, }, @@ -464,7 +466,7 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { - str, err := bench.generator.Generate(ctx) + str, err := bench.generator.Generate(ctx, nil) if err != nil { b.Fatalf("Failed to generate string: %s", err) } @@ -483,7 +485,6 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { Length: 16, // 16 because the SQLCredentialsProducer prepends 4 characters to a 20 character password charset: AlphaNumericRuneset, Rules: nil, - rng: rand.Reader, } ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) @@ -491,7 +492,7 @@ func BenchmarkStringGenerator_Generate(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { - str, err := sg.Generate(ctx) + str, err := sg.Generate(ctx, nil) if err != nil { b.Fatalf("Failed to generate string: %s", err) } @@ -512,7 +513,7 @@ func TestStringGenerator_JSON(t *testing.T) { String: "teststring", Integer: 123, }, - Charset{ + CharsetRule{ Charset: ShortSymbolRuneset, MinChars: 1, }, @@ -524,7 +525,7 @@ func TestStringGenerator_JSON(t *testing.T) { t.Fatalf("Failed to marshal to JSON: %s", err) } - parser := Parser{ + parser := PolicyParser{ RuleRegistry: Registry{ Rules: map[string]ruleConstructor{ "testrule": newTestRule, @@ -532,7 +533,7 @@ func TestStringGenerator_JSON(t *testing.T) { }, }, } - actual, err := parser.Parse(string(b)) + actual, err := parser.ParsePolicy(string(b)) if err != nil { t.Fatalf("Failed to parse JSON: %s", err) } @@ -590,7 +591,7 @@ func TestValidate(t *testing.T) { Length: 5, charset: []rune("abcde"), Rules: []Rule{ - Charset{ + CharsetRule{ Charset: []rune("abcde"), MinChars: 6, }, @@ -658,7 +659,7 @@ func TestGetChars(t *testing.T) { }, "rule with chars": { rules: []Rule{ - Charset{ + CharsetRule{ Charset: []rune("abcdefghij"), MinChars: 1, }, diff --git a/sdk/logical/system_view.go b/sdk/logical/system_view.go index 394a30103c48..41f82f36c329 100644 --- a/sdk/logical/system_view.go +++ b/sdk/logical/system_view.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "io" "time" "github.com/hashicorp/vault/sdk/helper/consts" @@ -77,7 +78,7 @@ type SystemView interface { type PasswordPolicy interface { // Generate a random password - Generate(context.Context) (string, error) + Generate(context.Context, io.Reader) (string, error) } type ExtendedSystemView interface { @@ -191,5 +192,5 @@ func (d StaticSystemView) GeneratePasswordFromPolicy(ctx context.Context, policy if !exists { return "", fmt.Errorf("password policy not found") } - return policy.Generate(ctx) + return policy.Generate(ctx, nil) } diff --git a/sdk/plugin/grpc_system_test.go b/sdk/plugin/grpc_system_test.go index 2156256941ed..cf6c115062c4 100644 --- a/sdk/plugin/grpc_system_test.go +++ b/sdk/plugin/grpc_system_test.go @@ -245,19 +245,19 @@ func TestSystem_GRPC_GeneratePasswordFromPolicy(t *testing.T) { expectedPolicy := &random.StringGenerator{ Length: 8, Rules: []random.Rule{ - &random.Charset{ + &random.CharsetRule{ Charset: random.LowercaseRuneset, MinChars: 1, }, - &random.Charset{ + &random.CharsetRule{ Charset: random.UppercaseRuneset, MinChars: 1, }, - &random.Charset{ + &random.CharsetRule{ Charset: random.NumericRuneset, MinChars: 1, }, - &random.Charset{ + &random.CharsetRule{ Charset: random.ShortSymbolRuneset, MinChars: 1, }, diff --git a/vault/dynamic_system_view.go b/vault/dynamic_system_view.go index 3e391fcf4ca4..4b5c14371f8e 100644 --- a/vault/dynamic_system_view.go +++ b/vault/dynamic_system_view.go @@ -349,10 +349,10 @@ func (d dynamicSystemView) GeneratePasswordFromPolicy(ctx context.Context, polic return "", fmt.Errorf("no password policy found") } - passPolicy, err := random.Parse(policyCfg.HCLPolicy) + passPolicy, err := random.ParsePolicy(policyCfg.HCLPolicy) if err != nil { return "", fmt.Errorf("stored password policy is invalid: %w", err) } - return passPolicy.Generate(ctx) + return passPolicy.Generate(ctx, nil) } diff --git a/vault/logical_system.go b/vault/logical_system.go index 3ec8f1c2a8fe..5e4775abd060 100644 --- a/vault/logical_system.go +++ b/vault/logical_system.go @@ -2096,12 +2096,12 @@ func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logica } // Parse the policy to ensure that it's valid - rng, err := random.Parse(rawPolicy) + policy, err := random.ParsePolicy(rawPolicy) if err != nil { return nil, logical.CodedError(http.StatusBadRequest, fmt.Sprintf("invalid password policy: %s", err)) } - if rng.Length > maxPasswordLength || rng.Length < minPasswordLength { + if policy.Length > maxPasswordLength || policy.Length < minPasswordLength { return nil, logical.CodedError(http.StatusBadRequest, fmt.Sprintf("passwords must be between %d and %d characters", minPasswordLength, maxPasswordLength)) } @@ -2114,7 +2114,7 @@ func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logica attempts := 10 failed := 0 for i := 0; i < attempts; i++ { - _, err = rng.Generate(genCtx) + _, err = policy.Generate(genCtx, nil) if err != nil { failed++ } @@ -2126,11 +2126,8 @@ func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logica } if failed > 0 { - resp = &logical.Response{ - Warnings: []string{ - fmt.Sprintf("failed to generate passwords %d times out of %d attempts", failed, attempts), - }, - } + return nil, logical.CodedError(http.StatusBadRequest, + fmt.Sprintf("failed to generate passwords %d times out of %d attempts in %s - is the policy too restrictive?", failed, attempts, timeout)) } cfg := passwordPolicyConfig{ @@ -2147,7 +2144,7 @@ func (*SystemBackend) handlePoliciesPasswordSet(ctx context.Context, req *logica fmt.Sprintf("failed to save policy to storage backend: %s", err)) } - return logical.RespondWithStatusCode(resp, req, http.StatusOK) + return logical.RespondWithStatusCode(nil, req, http.StatusNoContent) } // handlePoliciesPasswordGet retrieves a password policy if it exists @@ -2171,7 +2168,7 @@ func (*SystemBackend) handlePoliciesPasswordGet(ctx context.Context, req *logica }, } - return logical.RespondWithStatusCode(resp, req, http.StatusOK) + return resp, nil } // retrievePasswordPolicy retrieves a password policy from the logical storage @@ -2206,7 +2203,7 @@ func (*SystemBackend) handlePoliciesPasswordDelete(ctx context.Context, req *log fmt.Sprintf("failed to delete password policy: %s", err)) } - return logical.RespondWithStatusCode(nil, req, http.StatusOK) + return nil, nil } // handlePoliciesPasswordGenerate generates a password from the specified password policy @@ -2224,13 +2221,13 @@ func (*SystemBackend) handlePoliciesPasswordGenerate(ctx context.Context, req *l return nil, logical.CodedError(http.StatusNotFound, "policy does not exist") } - rsg, err := random.Parse(cfg.HCLPolicy) + policy, err := random.ParsePolicy(cfg.HCLPolicy) if err != nil { return nil, logical.CodedError(http.StatusInternalServerError, "stored password policy configuration failed to parse") } - password, err := rsg.Generate(ctx) + password, err := policy.Generate(ctx, nil) if err != nil { return nil, logical.CodedError(http.StatusInternalServerError, fmt.Sprintf("failed to generate password from policy: %s", err)) @@ -2241,7 +2238,7 @@ func (*SystemBackend) handlePoliciesPasswordGenerate(ctx context.Context, req *l "password": password, }, } - return logical.RespondWithStatusCode(resp, req, http.StatusOK) + return resp, nil } // handleAuditTable handles the "audit" endpoint to provide the audit table diff --git a/vault/logical_system_test.go b/vault/logical_system_test.go index 23cc89c0e6ed..527a608bb276 100644 --- a/vault/logical_system_test.go +++ b/vault/logical_system_test.go @@ -5,7 +5,6 @@ import ( "crypto/sha256" "encoding/base64" "encoding/hex" - "encoding/json" "fmt" "io/ioutil" "net/http" @@ -2750,7 +2749,7 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { tests := map[string]testCase{ "missing policy name": { - storage: &fakeStorage{}, + storage: &fakeStorage{} , data: passwordPoliciesFieldData(map[string]interface{}{ "policy": `length = 20 rule "charset" { @@ -2816,7 +2815,7 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { expectedResp: &logical.Response{ Data: map[string]interface{}{ logical.HTTPContentType: "application/json", - logical.HTTPStatusCode: http.StatusOK, + logical.HTTPStatusCode: http.StatusNoContent, }, }, expectErr: false, @@ -2840,7 +2839,7 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { expectedResp: &logical.Response{ Data: map[string]interface{}{ logical.HTTPContentType: "application/json", - logical.HTTPStatusCode: http.StatusOK, + logical.HTTPStatusCode: http.StatusNoContent, }, }, expectErr: false, @@ -2937,11 +2936,11 @@ func TestHandlePoliciesPasswordGet(t *testing.T) { data: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), - expectedResp: toHTTPResponse(t, http.StatusOK, - &logical.Response{ - Data: map[string]interface{}{ - "policy": "length = 20\ncharset=\"abcdefghij\"", - }}), + expectedResp: &logical.Response{ + Data: map[string]interface{}{ + "policy": "length = 20\ncharset=\"abcdefghij\"", + }, + }, expectErr: false, }, } @@ -3044,12 +3043,7 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { data: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), - expectedResp: &logical.Response{ - Data: map[string]interface{}{ - logical.HTTPContentType: "application/json", - logical.HTTPStatusCode: http.StatusOK, - }, - }, + expectedResp: nil, expectErr: false, expectedStore: map[string][]byte{}, }, @@ -3210,14 +3204,6 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { }) expectedResp := &logical.Response{ - Data: map[string]interface{}{ - logical.HTTPContentType: "application/json", - logical.HTTPStatusCode: http.StatusOK, - // Not the body as that needs to be pulled out and compared as a non-string - }, - } - - expectedBody := &logical.HTTPResponse{ Data: map[string]interface{}{ // Doesn't include the password as that's pulled out and compared separately }, @@ -3226,7 +3212,7 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { // Password assertions expectedPassLen := 20 rules := []random.Rule{ - random.Charset{ + random.CharsetRule{ Charset: []rune("abcdefghij"), MinChars: expectedPassLen, }, @@ -3247,27 +3233,14 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { assert(t, actualResp != nil, "response is nil") assert(t, actualResp.Data != nil, "expected data, got nil") - assertHasKey(t, actualResp.Data, logical.HTTPRawBody, "key %s not found in data", logical.HTTPRawBody) - assertIsString(t, actualResp.Data[logical.HTTPRawBody], "key %s should have a string value", logical.HTTPRawBody) - rawBody := actualResp.Data[logical.HTTPRawBody].(string) + assertHasKey(t, actualResp.Data, "password", "password key not found in data") + assertIsString(t, actualResp.Data["password"], "password key should have a string value") + password := actualResp.Data["password"].(string) - // Delete the body so the rest of the response can be compared - delete(actualResp.Data, logical.HTTPRawBody) + // Delete the password so the rest of the response can be compared + delete(actualResp.Data, "password") assert(t, reflect.DeepEqual(actualResp, expectedResp), "Actual response: %#v\nExpected response: %#v", actualResp, expectedResp) - actualBody := &logical.HTTPResponse{} - err = json.Unmarshal([]byte(rawBody), actualBody) - assert(t, err == nil, "unable to unmarshal response body: %s", err) - - assert(t, actualBody.Data != nil, "expected data field in body, got nil") - assertHasKey(t, actualBody.Data, "password", "expected data in body to have 'password' field") - assertIsString(t, actualBody.Data["password"], "password field should be a string") - password := actualBody.Data["password"].(string) - - // delete the password field so the rest of the body can be compared - delete(actualBody.Data, "password") - assert(t, reflect.DeepEqual(actualBody, expectedBody), "Actual body: %#v\nExpected body: %#v", actualBody, expectedBody) - // Check to make sure the password is correctly formatted passwordLength := len([]rune(password)) if passwordLength != expectedPassLen { diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go index 5510ad4e5cbb..572767263e3b 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/parser.go @@ -9,28 +9,31 @@ import ( "github.com/mitchellh/mapstructure" ) -// Parse is a convenience function for parsing HCL into a StringGenerator. See Parser.Parse for details. -func Parse(raw string) (gen StringGenerator, err error) { - parser := Parser{ +// ParsePolicy is a convenience function for parsing HCL into a StringGenerator. +// See PolicyParser.ParsePolicy for details. +func ParsePolicy(raw string) (gen StringGenerator, err error) { + parser := PolicyParser{ RuleRegistry: Registry{ Rules: defaultRuleNameMapping, }, } - return parser.Parse(raw) + return parser.ParsePolicy(raw) } -func ParseBytes(raw []byte) (gen StringGenerator, err error) { - return Parse(string(raw)) +// ParsePolicyBytes is a convenience function for parsing HCL into a StringGenerator. +// See PolicyParser.ParsePolicy for details. +func ParsePolicyBytes(raw []byte) (gen StringGenerator, err error) { + return ParsePolicy(string(raw)) } -// Parser parses string generator configuration from HCL. -type Parser struct { +// PolicyParser parses string generator configuration from HCL. +type PolicyParser struct { // RuleRegistry maps rule names in HCL to Rule constructors. RuleRegistry Registry } -// Parse parses the provided HCL into a StringGenerator. -func (p Parser) Parse(raw string) (sg StringGenerator, err error) { +// ParsePolicy parses the provided HCL into a StringGenerator. +func (p PolicyParser) ParsePolicy(raw string) (sg StringGenerator, err error) { rawData := map[string]interface{}{} err = hcl.Decode(&rawData, raw) if err != nil { @@ -83,9 +86,6 @@ func parseRules(registry Registry, rawRules []map[string]interface{}) (rules []R return nil, fmt.Errorf("unable to get rule info: %w", err) } - // Map names like "lower-alpha" to lowercase alphabetical characters - // applyShortcuts(info.data) - rule, err := registry.parseRule(info.ruleType, info.data) if err != nil { return nil, fmt.Errorf("unable to parse rule %s: %w", info.ruleType, err) @@ -135,6 +135,7 @@ func getRuleInfo(rule map[string]interface{}) (data ruleInfo, err error) { return data, fmt.Errorf("rule is empty") } +// stringToRunesFunc converts a string to a []rune for use in the mapstructure library func stringToRunesFunc(from reflect.Kind, to reflect.Kind, data interface{}) (interface{}, error) { if from != reflect.String || to != reflect.Slice { return data, nil diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go index c0c78557e851..efdcf5c302f5 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/registry.go @@ -20,6 +20,7 @@ var ( // Registry of HCL rule names to rule constructors. type Registry struct { + // Rules maps names of rules to a constructor for the rule Rules map[string]ruleConstructor } diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go index 2a8c6020cd3c..fead5b4ffe65 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/rules.go @@ -6,9 +6,18 @@ import ( "github.com/mitchellh/mapstructure" ) -// Charset requires a certain number of characters from the specified charset. -type Charset struct { - // Charset is the list of rules that candidate strings must contain a minimum number of. +// Rule to assert on string values. +type Rule interface { + // Pass should return true if the provided value passes any assertions this Rule is making. + Pass(value []rune) bool + + // Type returns the name of the rule as associated in the registry + Type() string +} + +// CharsetRule requires a certain number of characters from the specified charset. +type CharsetRule struct { + // CharsetRule is the list of rules that candidate strings must contain a minimum number of. Charset runes `mapstructure:"charset" json:"charset"` // MinChars indicates the minimum (inclusive) number of characters from the charset that should appear in the string. @@ -17,7 +26,7 @@ type Charset struct { // ParseCharset from the provided data map. The data map is expected to be parsed from HCL. func ParseCharset(data map[string]interface{}) (rule Rule, err error) { - cr := &Charset{} + cr := &CharsetRule{} decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ Metadata: nil, @@ -36,22 +45,22 @@ func ParseCharset(data map[string]interface{}) (rule Rule, err error) { return *cr, nil } -func (c Charset) Type() string { +func (c CharsetRule) Type() string { return "charset" } // Chars returns the charset that this rule is looking for. -func (c Charset) Chars() []rune { +func (c CharsetRule) Chars() []rune { return c.Charset } -func (c Charset) MinLength() int { +func (c CharsetRule) MinLength() int { return c.MinChars } // Pass returns true if the provided candidate string has a minimum number of chars in it. // This adheres to the Rule interface -func (c Charset) Pass(value []rune) bool { +func (c CharsetRule) Pass(value []rune) bool { if c.MinChars <= 0 { return true } diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go index ec9bb7d14259..527a96aae6fb 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go @@ -40,19 +40,19 @@ var ( DefaultStringGenerator = StringGenerator{ Length: 20, Rules: []Rule{ - Charset{ + CharsetRule{ Charset: LowercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: UppercaseRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: NumericRuneset, MinChars: 1, }, - Charset{ + CharsetRule{ Charset: ShortSymbolRuneset, MinChars: 1, }, @@ -66,17 +66,8 @@ func sortCharset(chars string) string { return string(r) } -// Rule to assert on string values. -type Rule interface { - // Pass should return true if the provided value passes any assertions this Rule is making. - Pass(value []rune) bool - - // Type returns the name of the rule as associated in the registry - Type() string -} - // StringGenerator generats random strings from the provided charset & adhering to a set of rules. The set of rules -// are things like Charset which requires a certain number of characters from a sub-charset. +// are things like CharsetRule which requires a certain number of characters from a sub-charset. type StringGenerator struct { // Length of the string to generate. Length int `mapstructure:"length" json:"length"` @@ -84,15 +75,13 @@ type StringGenerator struct { // Rules the generated strings must adhere to. Rules serializableRules `mapstructure:"-" json:"rule"` // This is "rule" in JSON so it matches the HCL property type - // Charset to choose runes from. This is computed from the rules, not directly configurable + // CharsetRule to choose runes from. This is computed from the rules, not directly configurable charset runes - - // rng for testing purposes to ensure error handling from the crypto/rand package is working properly. - rng io.Reader } // Generate a random string from the charset and adhering to the provided rules. -func (g *StringGenerator) Generate(ctx context.Context) (str string, err error) { +// The io.Reader is optional. If not provided, it will default to the reader from crypto/rand +func (g *StringGenerator) Generate(ctx context.Context, rng io.Reader) (str string, err error) { if _, hasTimeout := ctx.Deadline(); !hasTimeout { var cancel func() ctx, cancel = context.WithTimeout(ctx, 1*time.Second) // Ensure there's a timeout on the context @@ -111,7 +100,7 @@ LOOP: case <-ctx.Done(): return "", fmt.Errorf("timed out generating string") default: - str, err = g.generate() + str, err = g.generate(rng) if err != nil { return "", err } @@ -123,11 +112,11 @@ LOOP: } } -func (g *StringGenerator) generate() (str string, err error) { +func (g *StringGenerator) generate(rng io.Reader) (str string, err error) { // If performance improvements need to be made, this can be changed to read a batch of // potential strings at once rather than one at a time. This will significantly // improve performance, but at the cost of added complexity. - candidate, err := randomRunes(g.rng, g.charset, g.Length) + candidate, err := randomRunes(rng, g.charset, g.Length) if err != nil { return "", fmt.Errorf("unable to generate random characters: %w", err) } @@ -142,6 +131,12 @@ func (g *StringGenerator) generate() (str string, err error) { return string(candidate), nil } +const ( + // maxCharsetLen is the maximum length a charset is allowed to be when generating a candidate string. + // This is the total number of numbers available for selecting an index out of the charset slice. + maxCharsetLen = 256 +) + // randomRunes creates a random string based on the provided charset. The charset is limited to 255 characters, but // could be expanded if needed. Expanding the maximum charset size will decrease performance because it will need to // combine bytes into a larger integer using binary.BigEndian.Uint16() function. @@ -149,28 +144,73 @@ func randomRunes(rng io.Reader, charset []rune, length int) (candidate []rune, e if len(charset) == 0 { return nil, fmt.Errorf("no charset specified") } - if len(charset) > math.MaxUint8 { + if len(charset) > maxCharsetLen { return nil, fmt.Errorf("charset is too long: limited to %d characters", math.MaxUint8) } if length <= 0 { return nil, fmt.Errorf("unable to generate a zero or negative length runeset") } + // This can't always select indexes from [0-maxCharsetLen) because it could introduce bias to the character selection. + // For instance, if the length of the charset is [a-zA-Z0-9-] (length of 63): + // RNG ranges: [0-62][63-125][126-188][189-251] will equally select from the entirety of the charset. However, + // the RNG values [252-255] will select the first 4 characters of the charset while ignoring the remaining 59. + // This results in a bias towards the front of the charset. + // + // To avoid this, we determine the largest integer multiplier of the charset length that is <= maxCharsetLen + // For instance, if the maxCharsetLen is 256 (the size of one byte) and the charset is length 63, the multiplier + // equals 4: + // 256/63 => 4.06 + // Trunc(4.06) => 4 + // Multiply by the charset length + // Subtract 1 to account for 0-based counting and you get the max index value: 251 + maxAllowedRNGValue := (maxCharsetLen/len(charset))*len(charset) - 1 + + // rngBufferMultiplier increases the size of the RNG buffer to account for lost + // indexes due to the maxAllowedRNGValue + rngBufferMultiplier := 1.0 + + // Don't set a multiplier if we are able to use the entire range of indexes + if maxAllowedRNGValue < maxCharsetLen { + // Anything more complicated than an arbitrary percentage appears to have little practical performance benefit + rngBufferMultiplier = 1.5 + } + + // Default to the standard crypto reader if one isn't provided if rng == nil { rng = rand.Reader } charsetLen := byte(len(charset)) - data := make([]byte, length) - _, err = rng.Read(data) - if err != nil { - return nil, err - } runes := make([]rune, 0, length) - for i := 0; i < len(data); i++ { - r := charset[data[i]%charsetLen] - runes = append(runes, r) + + for len(runes) < length { + // Generate a bunch of indexes + data := make([]byte, int(float64(length)*rngBufferMultiplier)) + numBytes, err := rng.Read(data) + if err != nil { + return nil, err + } + + // Append characters until either we're out of indexes or the length is long enough + for i := 0; i < numBytes; i++ { + if data[i] > byte(maxAllowedRNGValue) { + continue + } + + // Be careful about byte conversions - you don't want 256 to wrap to 0 + index := data[i] + if len(charset) != maxCharsetLen { + index = index % charsetLen + } + r := charset[index] + runes = append(runes, r) + + if len(runes) == length { + break + } + } } return runes, nil diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go b/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go index 394a30103c48..41f82f36c329 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/system_view.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "io" "time" "github.com/hashicorp/vault/sdk/helper/consts" @@ -77,7 +78,7 @@ type SystemView interface { type PasswordPolicy interface { // Generate a random password - Generate(context.Context) (string, error) + Generate(context.Context, io.Reader) (string, error) } type ExtendedSystemView interface { @@ -191,5 +192,5 @@ func (d StaticSystemView) GeneratePasswordFromPolicy(ctx context.Context, policy if !exists { return "", fmt.Errorf("password policy not found") } - return policy.Generate(ctx) + return policy.Generate(ctx, nil) } From e6c4dcaa2cbc46ce096a4ac68fedb0f9f2ca5937 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Wed, 13 May 2020 11:13:13 -0600 Subject: [PATCH 23/29] Replace fakeStorage with gomock; Update test names --- Makefile | 3 + go.mod | 1 + go.sum | 1 + sdk/helper/random/parser_test.go | 5 +- vault/logical_mock_test.go | 93 ++++ vault/logical_system_test.go | 441 ++++++++---------- vendor/github.com/golang/mock/AUTHORS | 12 + vendor/github.com/golang/mock/CONTRIBUTORS | 37 ++ vendor/github.com/golang/mock/LICENSE | 202 ++++++++ vendor/github.com/golang/mock/gomock/call.go | 420 +++++++++++++++++ .../github.com/golang/mock/gomock/callset.go | 108 +++++ .../golang/mock/gomock/controller.go | 235 ++++++++++ .../github.com/golang/mock/gomock/matchers.go | 122 +++++ vendor/modules.txt | 2 + 14 files changed, 1441 insertions(+), 241 deletions(-) create mode 100644 vault/logical_mock_test.go create mode 100644 vendor/github.com/golang/mock/AUTHORS create mode 100644 vendor/github.com/golang/mock/CONTRIBUTORS create mode 100644 vendor/github.com/golang/mock/LICENSE create mode 100644 vendor/github.com/golang/mock/gomock/call.go create mode 100644 vendor/github.com/golang/mock/gomock/callset.go create mode 100644 vendor/github.com/golang/mock/gomock/controller.go create mode 100644 vendor/github.com/golang/mock/gomock/matchers.go diff --git a/Makefile b/Makefile index 45e017dbeecc..0cb78ed3291e 100644 --- a/Makefile +++ b/Makefile @@ -210,6 +210,9 @@ proto: sed -i -e 's/Id/ID/' vault/request_forwarding_service.pb.go sed -i -e 's/Idp/IDP/' -e 's/Url/URL/' -e 's/Id/ID/' -e 's/IDentity/Identity/' -e 's/EntityId/EntityID/' -e 's/Api/API/' -e 's/Qr/QR/' -e 's/Totp/TOTP/' -e 's/Mfa/MFA/' -e 's/Pingid/PingID/' -e 's/protobuf:"/sentinel:"" protobuf:"/' -e 's/namespaceId/namespaceID/' -e 's/Ttl/TTL/' -e 's/BoundCidrs/BoundCIDRs/' helper/identity/types.pb.go helper/identity/mfa/types.pb.go helper/storagepacker/types.pb.go sdk/plugin/pb/backend.pb.go sdk/logical/identity.pb.go +mock: + mockgen -destination vault/logical_mock_test.go -package vault github.com/hashicorp/vault/sdk/logical Storage + fmtcheck: @true #@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'" diff --git a/go.mod b/go.mod index 56e8c94c1ee3..b77a59fec454 100644 --- a/go.mod +++ b/go.mod @@ -43,6 +43,7 @@ require ( github.com/go-test/deep v1.0.2 github.com/gocql/gocql v0.0.0-20190402132108-0e1d5de854df github.com/gogo/protobuf v1.2.1 + github.com/golang/mock v1.2.0 github.com/golang/protobuf v1.3.2 github.com/google/go-github v17.0.0+incompatible github.com/google/go-metrics-stackdriver v0.2.0 diff --git a/go.sum b/go.sum index 77681ea02c66..008a5a3fd2c2 100644 --- a/go.sum +++ b/go.sum @@ -251,6 +251,7 @@ github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9 github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index d099888a9634..f608b0692a3f 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -2,11 +2,12 @@ package random import ( "encoding/json" + "fmt" "reflect" "testing" ) -func TestParse(t *testing.T) { +func TestParsePolicy(t *testing.T) { type testCase struct { rawConfig string expected StringGenerator @@ -63,7 +64,7 @@ func TestParse(t *testing.T) { } } -func TestParser_Parse(t *testing.T) { +func TestParser_ParsePolicy(t *testing.T) { type testCase struct { registry map[string]ruleConstructor diff --git a/vault/logical_mock_test.go b/vault/logical_mock_test.go new file mode 100644 index 000000000000..c420183e5750 --- /dev/null +++ b/vault/logical_mock_test.go @@ -0,0 +1,93 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: github.com/hashicorp/vault/sdk/logical (interfaces: Storage) + +// Package vault is a generated GoMock package. +package vault + +import ( + context "context" + gomock "github.com/golang/mock/gomock" + logical "github.com/hashicorp/vault/sdk/logical" + reflect "reflect" +) + +// MockStorage is a mock of Storage interface +type MockStorage struct { + ctrl *gomock.Controller + recorder *MockStorageMockRecorder +} + +// MockStorageMockRecorder is the mock recorder for MockStorage +type MockStorageMockRecorder struct { + mock *MockStorage +} + +// NewMockStorage creates a new mock instance +func NewMockStorage(ctrl *gomock.Controller) *MockStorage { + mock := &MockStorage{ctrl: ctrl} + mock.recorder = &MockStorageMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use +func (m *MockStorage) EXPECT() *MockStorageMockRecorder { + return m.recorder +} + +// Delete mocks base method +func (m *MockStorage) Delete(arg0 context.Context, arg1 string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete +func (mr *MockStorageMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStorage)(nil).Delete), arg0, arg1) +} + +// Get mocks base method +func (m *MockStorage) Get(arg0 context.Context, arg1 string) (*logical.StorageEntry, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret0, _ := ret[0].(*logical.StorageEntry) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Get indicates an expected call of Get +func (mr *MockStorageMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStorage)(nil).Get), arg0, arg1) +} + +// List mocks base method +func (m *MockStorage) List(arg0 context.Context, arg1 string) ([]string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "List", arg0, arg1) + ret0, _ := ret[0].([]string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// List indicates an expected call of List +func (mr *MockStorageMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockStorage)(nil).List), arg0, arg1) +} + +// Put mocks base method +func (m *MockStorage) Put(arg0 context.Context, arg1 *logical.StorageEntry) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Put", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// Put indicates an expected call of Put +func (mr *MockStorageMockRecorder) Put(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockStorage)(nil).Put), arg0, arg1) +} diff --git a/vault/logical_system_test.go b/vault/logical_system_test.go index 527a608bb276..0a30513317c6 100644 --- a/vault/logical_system_test.go +++ b/vault/logical_system_test.go @@ -17,6 +17,7 @@ import ( "github.com/fatih/structs" "github.com/go-test/deep" + "github.com/golang/mock/gomock" hclog "github.com/hashicorp/go-hclog" "github.com/hashicorp/vault/audit" "github.com/hashicorp/vault/helper/builtinplugins" @@ -2734,23 +2735,20 @@ func TestSystemBackend_PathWildcardPreflight(t *testing.T) { } func TestHandlePoliciesPasswordSet(t *testing.T) { - type testStorage interface { - logical.Storage - getAll() map[string][]byte - } - type testCase struct { - storage testStorage - data *framework.FieldData + inputData *framework.FieldData + + putEntry *logical.StorageEntry + putErr error + putTimes int + expectedResp *logical.Response expectErr bool - expectedStore map[string][]byte } tests := map[string]testCase{ "missing policy name": { - storage: &fakeStorage{} , - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "policy": `length = 20 rule "charset" { charset="abcdefghij" @@ -2760,16 +2758,14 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { expectErr: true, }, "missing policy": { - storage: &fakeStorage{}, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), expectedResp: nil, expectErr: true, }, "garbage policy": { - storage: &fakeStorage{}, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", "policy": "hasdukfhiuashdfoiasjdf", }), @@ -2777,22 +2773,26 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { expectErr: true, }, "storage failure": { - storage: &fakeStorage{ - putError: fmt.Errorf("test error"), - }, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", "policy": "length = 20\n" + "rule \"charset\" {\n" + " charset=\"abcdefghij\"\n" + "}", }), + + putEntry: storageEntry(t, "testpolicy", "length = 20\n"+ + "rule \"charset\" {\n"+ + " charset=\"abcdefghij\"\n"+ + "}"), + putErr:fmt.Errorf("test error"), + putTimes:1, + expectedResp: nil, expectErr: true, }, "impossible policy": { - storage: &fakeStorage{}, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", "policy": "length = 20\n" + "rule \"charset\" {\n" + @@ -2804,14 +2804,20 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { expectErr: true, }, "not base64 encoded": { - storage: &fakeStorage{}, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", "policy": "length = 20\n" + "rule \"charset\" {\n" + " charset=\"abcdefghij\"\n" + "}", }), + + putEntry:storageEntry(t, "testpolicy", "length = 20\n" + + "rule \"charset\" {\n" + + " charset=\"abcdefghij\"\n" + + "}"), + putTimes:1, + expectedResp: &logical.Response{ Data: map[string]interface{}{ logical.HTTPContentType: "application/json", @@ -2819,23 +2825,22 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { }, }, expectErr: false, - expectedStore: map[string][]byte{ - "password_policy/testpolicy": toJson(t, map[string]interface{}{ - "policy": "length = 20\n" + - "rule \"charset\" {\n" + - " charset=\"abcdefghij\"\n" + - "}"}), - }, }, "base64 encoded": { - storage: &fakeStorage{}, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", "policy": base64Encode("length = 20\n" + "rule \"charset\" {\n" + " charset=\"abcdefghij\"\n" + "}"), }), + + putEntry:storageEntry(t, "testpolicy", "length = 20\n" + + "rule \"charset\" {\n" + + " charset=\"abcdefghij\"\n" + + "}"), + putTimes:1, + expectedResp: &logical.Response{ Data: map[string]interface{}{ logical.HTTPContentType: "application/json", @@ -2843,28 +2848,27 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { }, }, expectErr: false, - expectedStore: map[string][]byte{ - "password_policy/testpolicy": toJson(t, map[string]interface{}{ - "policy": "length = 20\n" + - "rule \"charset\" {\n" + - " charset=\"abcdefghij\"\n" + - "}"}), - }, }, } for name, test := range tests { t.Run(name, func(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + + storage := NewMockStorage(ctrl) + storage.EXPECT().Put(gomock.Any(), test.putEntry).Return(test.putErr).Times(test.putTimes) + ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) defer cancel() req := &logical.Request{ - Storage: test.storage, + Storage: storage, } b := &SystemBackend{} - actualResp, err := b.handlePoliciesPasswordSet(ctx, req, test.data) + actualResp, err := b.handlePoliciesPasswordSet(ctx, req, test.inputData) if test.expectErr && err == nil { t.Fatalf("err expected, got nil") } @@ -2874,71 +2878,77 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { if !reflect.DeepEqual(actualResp, test.expectedResp) { t.Fatalf("Actual response: %#v\nExpected response: %#v", actualResp, test.expectedResp) } - - actualStore := test.storage.getAll() - - if !reflect.DeepEqual(actualStore, test.expectedStore) { - t.Fatalf("Actual storage: %#v\nExpected storage: %#v", actualStore, test.expectedStore) - } }) } } -func toJson(t *testing.T, val interface{}) []byte { - t.Helper() - - b, err := jsonutil.EncodeJSON(val) - if err != nil { - t.Fatalf("Unable to marshal to JSON: %s", err) - } - return b -} - func TestHandlePoliciesPasswordGet(t *testing.T) { type testCase struct { - storage logical.Storage - data *framework.FieldData + inputData *framework.FieldData + + getPolicyName string + getEntry *logical.StorageEntry + getErr error + getTimes int + expectedResp *logical.Response expectErr bool } tests := map[string]testCase{ "missing policy name": { - storage: &fakeStorage{}, - data: passwordPoliciesFieldData(map[string]interface{}{}), + inputData: passwordPoliciesFieldData(map[string]interface{}{}), + + getTimes:0, + expectedResp: nil, expectErr: true, }, "storage error": { - storage: &fakeStorage{ - getError: fmt.Errorf("test error"), - }, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), + + getPolicyName: getPasswordPolicyKey("testpolicy"), + getEntry:nil, + getErr: fmt.Errorf("test error"), + getTimes: 1, + expectedResp: nil, expectErr: true, }, "missing value": { - storage: &fakeStorage{}, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), + + getPolicyName: getPasswordPolicyKey("testpolicy"), + getEntry: nil, + getErr:nil, + getTimes:1, + expectedResp: nil, expectErr: true, }, "good value": { - storage: &fakeStorage{ - data: map[string][]byte{ - "password_policy/testpolicy": []byte("{\"policy\":\"length = 20\\ncharset=\\\"abcdefghij\\\"\"}\n"), - }, - }, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), + + getPolicyName: getPasswordPolicyKey("testpolicy"), + getEntry:storageEntry(t, "testpolicy", "length = 20\n" + + "rule \"charset\" {\n" + + " charset=\"abcdefghij\"\n" + + "}"), + getErr:nil, + getTimes:1, + expectedResp: &logical.Response{ Data: map[string]interface{}{ - "policy": "length = 20\ncharset=\"abcdefghij\"", + "policy": "length = 20\n" + + "rule \"charset\" {\n" + + " charset=\"abcdefghij\"\n" + + "}", }, }, expectErr: false, @@ -2947,16 +2957,22 @@ func TestHandlePoliciesPasswordGet(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) defer cancel() + storage := NewMockStorage(ctrl) + storage.EXPECT().Get(gomock.Any(), test.getPolicyName).Return(test.getEntry, test.getErr).Times(test.getTimes) + req := &logical.Request{ - Storage: test.storage, + Storage: storage, } b := &SystemBackend{} - actualResp, err := b.handlePoliciesPasswordGet(ctx, req, test.data) + actualResp, err := b.handlePoliciesPasswordGet(ctx, req, test.inputData) if test.expectErr && err == nil { t.Fatalf("err expected, got nil") } @@ -2971,14 +2987,13 @@ func TestHandlePoliciesPasswordGet(t *testing.T) { } func TestHandlePoliciesPasswordDelete(t *testing.T) { - type testStorage interface { - logical.Storage - getAll() map[string][]byte - } - type testCase struct { - storage testStorage - data *framework.FieldData + inputData *framework.FieldData + + policyName string + deleteErr error + deleteTimes int + expectedResp *logical.Response expectErr bool expectedStore map[string][]byte @@ -2986,16 +3001,10 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { tests := map[string]testCase{ "missing policy name": { - storage: &fakeStorage{ - data: map[string][]byte{ - "password_policy/testpolicy": toJson(t, map[string]interface{}{ - "policy": `length = 20 - rule "charset" { - charset="abcdefghij" - }`}), - }, - }, - data: passwordPoliciesFieldData(map[string]interface{}{}), + inputData: passwordPoliciesFieldData(map[string]interface{}{}), + + deleteTimes:0, + expectedResp: nil, expectErr: true, expectedStore: map[string][]byte{ @@ -3007,19 +3016,14 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { }, }, "storage failure": { - storage: &fakeStorage{ - data: map[string][]byte{ - "password_policy/testpolicy": toJson(t, map[string]interface{}{ - "policy": `length = 20 - rule "charset" { - charset="abcdefghij" - }`}), - }, - deleteError: fmt.Errorf("test error"), - }, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), + + policyName: getPasswordPolicyKey("testpolicy"), + deleteErr:fmt.Errorf("test error"), + deleteTimes: 1, + expectedResp: nil, expectErr: true, expectedStore: map[string][]byte{ @@ -3031,18 +3035,14 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { }, }, "successful delete": { - storage: &fakeStorage{ - data: map[string][]byte{ - "password_policy/testpolicy": toJson(t, map[string]interface{}{ - "policy": `length = 20 - rule "charset" { - charset="abcdefghij" - }`}), - }, - }, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), + + policyName: getPasswordPolicyKey("testpolicy"), + deleteErr:nil, + deleteTimes: 1, + expectedResp: nil, expectErr: false, expectedStore: map[string][]byte{}, @@ -3051,16 +3051,22 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) defer cancel() + storage := NewMockStorage(ctrl) + storage.EXPECT().Delete(gomock.Any(), test.policyName).Return(test.deleteErr).Times(test.deleteTimes) + req := &logical.Request{ - Storage: test.storage, + Storage: storage, } b := &SystemBackend{} - actualResp, err := b.handlePoliciesPasswordDelete(ctx, req, test.data) + actualResp, err := b.handlePoliciesPasswordDelete(ctx, req, test.inputData) if test.expectErr && err == nil { t.Fatalf("err expected, got nil") } @@ -3070,11 +3076,6 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { if !reflect.DeepEqual(actualResp, test.expectedResp) { t.Fatalf("Actual response: %#v\nExpected response: %#v", actualResp, test.expectedResp) } - - actualStore := test.storage.getAll() - if !reflect.DeepEqual(actualStore, test.expectedStore) { - t.Fatalf("Actual storage: %#v\nExpected storage: %#v", actualStore, test.expectedStore) - } }) } } @@ -3083,80 +3084,79 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { t.Run("errors", func(t *testing.T) { type testCase struct { timeout time.Duration - storage logical.Storage - data *framework.FieldData + // storage logical.Storage + inputData *framework.FieldData + + policyName string + getEntry *logical.StorageEntry + getErr error + getTimes int + expectedResp *logical.Response expectErr bool } tests := map[string]testCase{ "missing policy name": { - storage: &fakeStorage{ - data: map[string][]byte{ - "password_policy/testpolicy": toJson(t, map[string]interface{}{ - "policy": `length = 20 - rule "charset" { - charset="abcdefghij" - }`}), - }, - }, - data: passwordPoliciesFieldData(map[string]interface{}{}), + inputData: passwordPoliciesFieldData(map[string]interface{}{}), + + getTimes:0, + expectedResp: nil, expectErr: true, }, "storage failure": { - storage: &fakeStorage{ - data: map[string][]byte{ - "password_policy/testpolicy": toJson(t, map[string]interface{}{ - "policy": `length = 20 - rule "charset" { - charset="abcdefghij" - }`}), - }, - getError: fmt.Errorf("test error"), - }, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), + + policyName: getPasswordPolicyKey("testpolicy"), + getErr:fmt.Errorf("test error"), + getTimes:1, + expectedResp: nil, expectErr: true, }, "policy does not exist": { - storage: &fakeStorage{ - data: map[string][]byte{}, - }, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), + + policyName: getPasswordPolicyKey("testpolicy"), + getEntry:nil, + getErr:nil, + getTimes:1, + expectedResp: nil, expectErr: true, }, "policy improperly saved": { - storage: &fakeStorage{ - data: map[string][]byte{ - "password_policy/testpolicy": toJson(t, map[string]interface{}{"policy": "asdfasdf"}), - }, - }, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), + + policyName:getPasswordPolicyKey("testpolicy"), + getEntry:storageEntry(t, "testpolicy", "foo"), + getErr:nil, + getTimes:1, + expectedResp: nil, expectErr: true, }, "failed to generate": { timeout: 0 * time.Second, // Timeout immediately - storage: &fakeStorage{ - data: map[string][]byte{ - "password_policy/testpolicy": toJson(t, map[string]interface{}{ - "policy": `length = 20 - rule "charset" { - charset="abcdefghij" - }`}), - }, - }, - data: passwordPoliciesFieldData(map[string]interface{}{ + inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), + + policyName:getPasswordPolicyKey("testpolicy"), + getEntry:storageEntry(t, "testpolicy", `length = 20 + rule "charset" { + charset="abcdefghij" + }`), + getErr:nil, + getTimes:1, + expectedResp: nil, expectErr: true, }, @@ -3164,16 +3164,22 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + ctx, cancel := context.WithTimeout(context.Background(), test.timeout) defer cancel() + storage := NewMockStorage(ctrl) + storage.EXPECT().Get(gomock.Any(), test.policyName).Return(test.getEntry, test.getErr).Times(test.getTimes) + req := &logical.Request{ - Storage: test.storage, + Storage: storage, } b := &SystemBackend{} - actualResp, err := b.handlePoliciesPasswordGenerate(ctx, req, test.data) + actualResp, err := b.handlePoliciesPasswordGenerate(ctx, req, test.inputData) if test.expectErr && err == nil { t.Fatalf("err expected, got nil") } @@ -3188,18 +3194,23 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { }) t.Run("success", func(t *testing.T) { + ctrl := gomock.NewController(t) + defer ctrl.Finish() + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) defer cancel() - storage := &fakeStorage{ - data: map[string][]byte{ - "password_policy/testpolicy": toJson(t, map[string]interface{}{ - "policy": `length = 20 - rule "charset" { - charset="abcdefghij" - }`}), - }, - } - data := passwordPoliciesFieldData(map[string]interface{}{ + + numCalls := 100 + + storage := NewMockStorage(ctrl) + + policyEntry := storageEntry(t, "testpolicy", `length = 20 + rule "charset" { + charset="abcdefghij" + }`) + storage.EXPECT().Get(gomock.Any(), getPasswordPolicyKey("testpolicy")).Return(policyEntry, nil).Times(numCalls) + + inputData := passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }) @@ -3219,14 +3230,14 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { } // Run the test a bunch of times to help ensure we don't have flaky behavior - for i := 0; i < 100; i++ { + for i := 0; i < numCalls; i++ { req := &logical.Request{ Storage: storage, } b := &SystemBackend{} - actualResp, err := b.handlePoliciesPasswordGenerate(ctx, req, data) + actualResp, err := b.handlePoliciesPasswordGenerate(ctx, req, inputData) if err != nil { t.Fatalf("no error expected, got: %s", err) } @@ -3256,16 +3267,6 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { }) } -func toHTTPResponse(t *testing.T, code int, resp *logical.Response) *logical.Response { - t.Helper() - - httpResp, err := logical.RespondWithStatusCode(resp, nil, code) - if err != nil { - t.Fatalf("failed to convert logical response to HTTP response: %s", err) - } - return httpResp -} - func assert(t *testing.T, pass bool, f string, vals ...interface{}) { t.Helper() if !pass { @@ -3305,63 +3306,25 @@ func passwordPoliciesFieldData(raw map[string]interface{}) *framework.FieldData } } -type fakeStorage struct { - data map[string][]byte - - getError error - putError error - deleteError error -} - -func (f *fakeStorage) getAll() map[string][]byte { - return f.data -} - -func (f *fakeStorage) List(ctx context.Context, prefix string) (keys []string, err error) { - return nil, fmt.Errorf("not yet implemented") -} - -func (f *fakeStorage) Get(ctx context.Context, key string) (*logical.StorageEntry, error) { - if f.getError != nil { - return nil, f.getError - } - - if f.data == nil { - return nil, nil - } - - val, exists := f.data[key] - if !exists { - return nil, nil - } - entry := &logical.StorageEntry{ - Key: key, - Value: val, - } - return entry, nil +func base64Encode(data string) string { + return base64.StdEncoding.EncodeToString([]byte(data)) } -func (f *fakeStorage) Put(ctx context.Context, entry *logical.StorageEntry) error { - if f.putError != nil { - return f.putError - } +func toJson(t *testing.T, val interface{}) []byte { + t.Helper() - if f.data == nil { - f.data = map[string][]byte{} + b, err := jsonutil.EncodeJSON(val) + if err != nil { + t.Fatalf("Unable to marshal to JSON: %s", err) } - f.data[entry.Key] = entry.Value - return nil + return b } -func (f *fakeStorage) Delete(ctx context.Context, key string) error { - if f.deleteError != nil { - return f.deleteError +func storageEntry(t *testing.T, key string, policy string) *logical.StorageEntry { + return &logical.StorageEntry{ + Key: getPasswordPolicyKey(key), + Value: toJson(t, passwordPolicyConfig{ + HCLPolicy: policy, + }), } - - delete(f.data, key) - return nil -} - -func base64Encode(data string) string { - return base64.StdEncoding.EncodeToString([]byte(data)) } diff --git a/vendor/github.com/golang/mock/AUTHORS b/vendor/github.com/golang/mock/AUTHORS new file mode 100644 index 000000000000..660b8ccc8ae0 --- /dev/null +++ b/vendor/github.com/golang/mock/AUTHORS @@ -0,0 +1,12 @@ +# This is the official list of GoMock authors for copyright purposes. +# This file is distinct from the CONTRIBUTORS files. +# See the latter for an explanation. + +# Names should be added to this file as +# Name or Organization +# The email address is not required for organizations. + +# Please keep the list sorted. + +Alex Reece +Google Inc. diff --git a/vendor/github.com/golang/mock/CONTRIBUTORS b/vendor/github.com/golang/mock/CONTRIBUTORS new file mode 100644 index 000000000000..def849cab1bd --- /dev/null +++ b/vendor/github.com/golang/mock/CONTRIBUTORS @@ -0,0 +1,37 @@ +# This is the official list of people who can contribute (and typically +# have contributed) code to the gomock repository. +# The AUTHORS file lists the copyright holders; this file +# lists people. For example, Google employees are listed here +# but not in AUTHORS, because Google holds the copyright. +# +# The submission process automatically checks to make sure +# that people submitting code are listed in this file (by email address). +# +# Names should be added to this file only after verifying that +# the individual or the individual's organization has agreed to +# the appropriate Contributor License Agreement, found here: +# +# http://code.google.com/legal/individual-cla-v1.0.html +# http://code.google.com/legal/corporate-cla-v1.0.html +# +# The agreement for individuals can be filled out on the web. +# +# When adding J Random Contributor's name to this file, +# either J's name or J's organization's name should be +# added to the AUTHORS file, depending on whether the +# individual or corporate CLA was used. + +# Names should be added to this file like so: +# Name +# +# An entry with two email addresses specifies that the +# first address should be used in the submit logs and +# that the second address should be recognized as the +# same person when interacting with Rietveld. + +# Please keep the list sorted. + +Aaron Jacobs +Alex Reece +David Symonds +Ryan Barrett diff --git a/vendor/github.com/golang/mock/LICENSE b/vendor/github.com/golang/mock/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/vendor/github.com/golang/mock/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/golang/mock/gomock/call.go b/vendor/github.com/golang/mock/gomock/call.go new file mode 100644 index 000000000000..3d54d9f5d010 --- /dev/null +++ b/vendor/github.com/golang/mock/gomock/call.go @@ -0,0 +1,420 @@ +// Copyright 2010 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gomock + +import ( + "fmt" + "reflect" + "strconv" + "strings" +) + +// Call represents an expected call to a mock. +type Call struct { + t TestHelper // for triggering test failures on invalid call setup + + receiver interface{} // the receiver of the method call + method string // the name of the method + methodType reflect.Type // the type of the method + args []Matcher // the args + origin string // file and line number of call setup + + preReqs []*Call // prerequisite calls + + // Expectations + minCalls, maxCalls int + + numCalls int // actual number made + + // actions are called when this Call is called. Each action gets the args and + // can set the return values by returning a non-nil slice. Actions run in the + // order they are created. + actions []func([]interface{}) []interface{} +} + +// newCall creates a *Call. It requires the method type in order to support +// unexported methods. +func newCall(t TestHelper, receiver interface{}, method string, methodType reflect.Type, args ...interface{}) *Call { + t.Helper() + + // TODO: check arity, types. + margs := make([]Matcher, len(args)) + for i, arg := range args { + if m, ok := arg.(Matcher); ok { + margs[i] = m + } else if arg == nil { + // Handle nil specially so that passing a nil interface value + // will match the typed nils of concrete args. + margs[i] = Nil() + } else { + margs[i] = Eq(arg) + } + } + + origin := callerInfo(3) + actions := []func([]interface{}) []interface{}{func([]interface{}) []interface{} { + // Synthesize the zero value for each of the return args' types. + rets := make([]interface{}, methodType.NumOut()) + for i := 0; i < methodType.NumOut(); i++ { + rets[i] = reflect.Zero(methodType.Out(i)).Interface() + } + return rets + }} + return &Call{t: t, receiver: receiver, method: method, methodType: methodType, + args: margs, origin: origin, minCalls: 1, maxCalls: 1, actions: actions} +} + +// AnyTimes allows the expectation to be called 0 or more times +func (c *Call) AnyTimes() *Call { + c.minCalls, c.maxCalls = 0, 1e8 // close enough to infinity + return c +} + +// MinTimes requires the call to occur at least n times. If AnyTimes or MaxTimes have not been called, MinTimes also +// sets the maximum number of calls to infinity. +func (c *Call) MinTimes(n int) *Call { + c.minCalls = n + if c.maxCalls == 1 { + c.maxCalls = 1e8 + } + return c +} + +// MaxTimes limits the number of calls to n times. If AnyTimes or MinTimes have not been called, MaxTimes also +// sets the minimum number of calls to 0. +func (c *Call) MaxTimes(n int) *Call { + c.maxCalls = n + if c.minCalls == 1 { + c.minCalls = 0 + } + return c +} + +// DoAndReturn declares the action to run when the call is matched. +// The return values from this function are returned by the mocked function. +// It takes an interface{} argument to support n-arity functions. +func (c *Call) DoAndReturn(f interface{}) *Call { + // TODO: Check arity and types here, rather than dying badly elsewhere. + v := reflect.ValueOf(f) + + c.addAction(func(args []interface{}) []interface{} { + vargs := make([]reflect.Value, len(args)) + ft := v.Type() + for i := 0; i < len(args); i++ { + if args[i] != nil { + vargs[i] = reflect.ValueOf(args[i]) + } else { + // Use the zero value for the arg. + vargs[i] = reflect.Zero(ft.In(i)) + } + } + vrets := v.Call(vargs) + rets := make([]interface{}, len(vrets)) + for i, ret := range vrets { + rets[i] = ret.Interface() + } + return rets + }) + return c +} + +// Do declares the action to run when the call is matched. The function's +// return values are ignored to retain backward compatibility. To use the +// return values call DoAndReturn. +// It takes an interface{} argument to support n-arity functions. +func (c *Call) Do(f interface{}) *Call { + // TODO: Check arity and types here, rather than dying badly elsewhere. + v := reflect.ValueOf(f) + + c.addAction(func(args []interface{}) []interface{} { + vargs := make([]reflect.Value, len(args)) + ft := v.Type() + for i := 0; i < len(args); i++ { + if args[i] != nil { + vargs[i] = reflect.ValueOf(args[i]) + } else { + // Use the zero value for the arg. + vargs[i] = reflect.Zero(ft.In(i)) + } + } + v.Call(vargs) + return nil + }) + return c +} + +// Return declares the values to be returned by the mocked function call. +func (c *Call) Return(rets ...interface{}) *Call { + c.t.Helper() + + mt := c.methodType + if len(rets) != mt.NumOut() { + c.t.Fatalf("wrong number of arguments to Return for %T.%v: got %d, want %d [%s]", + c.receiver, c.method, len(rets), mt.NumOut(), c.origin) + } + for i, ret := range rets { + if got, want := reflect.TypeOf(ret), mt.Out(i); got == want { + // Identical types; nothing to do. + } else if got == nil { + // Nil needs special handling. + switch want.Kind() { + case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + // ok + default: + c.t.Fatalf("argument %d to Return for %T.%v is nil, but %v is not nillable [%s]", + i, c.receiver, c.method, want, c.origin) + } + } else if got.AssignableTo(want) { + // Assignable type relation. Make the assignment now so that the generated code + // can return the values with a type assertion. + v := reflect.New(want).Elem() + v.Set(reflect.ValueOf(ret)) + rets[i] = v.Interface() + } else { + c.t.Fatalf("wrong type of argument %d to Return for %T.%v: %v is not assignable to %v [%s]", + i, c.receiver, c.method, got, want, c.origin) + } + } + + c.addAction(func([]interface{}) []interface{} { + return rets + }) + + return c +} + +// Times declares the exact number of times a function call is expected to be executed. +func (c *Call) Times(n int) *Call { + c.minCalls, c.maxCalls = n, n + return c +} + +// SetArg declares an action that will set the nth argument's value, +// indirected through a pointer. Or, in the case of a slice, SetArg +// will copy value's elements into the nth argument. +func (c *Call) SetArg(n int, value interface{}) *Call { + c.t.Helper() + + mt := c.methodType + // TODO: This will break on variadic methods. + // We will need to check those at invocation time. + if n < 0 || n >= mt.NumIn() { + c.t.Fatalf("SetArg(%d, ...) called for a method with %d args [%s]", + n, mt.NumIn(), c.origin) + } + // Permit setting argument through an interface. + // In the interface case, we don't (nay, can't) check the type here. + at := mt.In(n) + switch at.Kind() { + case reflect.Ptr: + dt := at.Elem() + if vt := reflect.TypeOf(value); !vt.AssignableTo(dt) { + c.t.Fatalf("SetArg(%d, ...) argument is a %v, not assignable to %v [%s]", + n, vt, dt, c.origin) + } + case reflect.Interface: + // nothing to do + case reflect.Slice: + // nothing to do + default: + c.t.Fatalf("SetArg(%d, ...) referring to argument of non-pointer non-interface non-slice type %v [%s]", + n, at, c.origin) + } + + c.addAction(func(args []interface{}) []interface{} { + v := reflect.ValueOf(value) + switch reflect.TypeOf(args[n]).Kind() { + case reflect.Slice: + setSlice(args[n], v) + default: + reflect.ValueOf(args[n]).Elem().Set(v) + } + return nil + }) + return c +} + +// isPreReq returns true if other is a direct or indirect prerequisite to c. +func (c *Call) isPreReq(other *Call) bool { + for _, preReq := range c.preReqs { + if other == preReq || preReq.isPreReq(other) { + return true + } + } + return false +} + +// After declares that the call may only match after preReq has been exhausted. +func (c *Call) After(preReq *Call) *Call { + c.t.Helper() + + if c == preReq { + c.t.Fatalf("A call isn't allowed to be its own prerequisite") + } + if preReq.isPreReq(c) { + c.t.Fatalf("Loop in call order: %v is a prerequisite to %v (possibly indirectly).", c, preReq) + } + + c.preReqs = append(c.preReqs, preReq) + return c +} + +// Returns true if the minimum number of calls have been made. +func (c *Call) satisfied() bool { + return c.numCalls >= c.minCalls +} + +// Returns true iff the maximum number of calls have been made. +func (c *Call) exhausted() bool { + return c.numCalls >= c.maxCalls +} + +func (c *Call) String() string { + args := make([]string, len(c.args)) + for i, arg := range c.args { + args[i] = arg.String() + } + arguments := strings.Join(args, ", ") + return fmt.Sprintf("%T.%v(%s) %s", c.receiver, c.method, arguments, c.origin) +} + +// Tests if the given call matches the expected call. +// If yes, returns nil. If no, returns error with message explaining why it does not match. +func (c *Call) matches(args []interface{}) error { + if !c.methodType.IsVariadic() { + if len(args) != len(c.args) { + return fmt.Errorf("Expected call at %s has the wrong number of arguments. Got: %d, want: %d", + c.origin, len(args), len(c.args)) + } + + for i, m := range c.args { + if !m.Matches(args[i]) { + return fmt.Errorf("Expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v", + c.origin, strconv.Itoa(i), args[i], m) + } + } + } else { + if len(c.args) < c.methodType.NumIn()-1 { + return fmt.Errorf("Expected call at %s has the wrong number of matchers. Got: %d, want: %d", + c.origin, len(c.args), c.methodType.NumIn()-1) + } + if len(c.args) != c.methodType.NumIn() && len(args) != len(c.args) { + return fmt.Errorf("Expected call at %s has the wrong number of arguments. Got: %d, want: %d", + c.origin, len(args), len(c.args)) + } + if len(args) < len(c.args)-1 { + return fmt.Errorf("Expected call at %s has the wrong number of arguments. Got: %d, want: greater than or equal to %d", + c.origin, len(args), len(c.args)-1) + } + + for i, m := range c.args { + if i < c.methodType.NumIn()-1 { + // Non-variadic args + if !m.Matches(args[i]) { + return fmt.Errorf("Expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v", + c.origin, strconv.Itoa(i), args[i], m) + } + continue + } + // The last arg has a possibility of a variadic argument, so let it branch + + // sample: Foo(a int, b int, c ...int) + if i < len(c.args) && i < len(args) { + if m.Matches(args[i]) { + // Got Foo(a, b, c) want Foo(matcherA, matcherB, gomock.Any()) + // Got Foo(a, b, c) want Foo(matcherA, matcherB, someSliceMatcher) + // Got Foo(a, b, c) want Foo(matcherA, matcherB, matcherC) + // Got Foo(a, b) want Foo(matcherA, matcherB) + // Got Foo(a, b, c, d) want Foo(matcherA, matcherB, matcherC, matcherD) + continue + } + } + + // The number of actual args don't match the number of matchers, + // or the last matcher is a slice and the last arg is not. + // If this function still matches it is because the last matcher + // matches all the remaining arguments or the lack of any. + // Convert the remaining arguments, if any, into a slice of the + // expected type. + vargsType := c.methodType.In(c.methodType.NumIn() - 1) + vargs := reflect.MakeSlice(vargsType, 0, len(args)-i) + for _, arg := range args[i:] { + vargs = reflect.Append(vargs, reflect.ValueOf(arg)) + } + if m.Matches(vargs.Interface()) { + // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, gomock.Any()) + // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, someSliceMatcher) + // Got Foo(a, b) want Foo(matcherA, matcherB, gomock.Any()) + // Got Foo(a, b) want Foo(matcherA, matcherB, someEmptySliceMatcher) + break + } + // Wrong number of matchers or not match. Fail. + // Got Foo(a, b) want Foo(matcherA, matcherB, matcherC, matcherD) + // Got Foo(a, b, c) want Foo(matcherA, matcherB, matcherC, matcherD) + // Got Foo(a, b, c, d) want Foo(matcherA, matcherB, matcherC, matcherD, matcherE) + // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, matcherC, matcherD) + // Got Foo(a, b, c) want Foo(matcherA, matcherB) + return fmt.Errorf("Expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v", + c.origin, strconv.Itoa(i), args[i:], c.args[i]) + + } + } + + // Check that all prerequisite calls have been satisfied. + for _, preReqCall := range c.preReqs { + if !preReqCall.satisfied() { + return fmt.Errorf("Expected call at %s doesn't have a prerequisite call satisfied:\n%v\nshould be called before:\n%v", + c.origin, preReqCall, c) + } + } + + // Check that the call is not exhausted. + if c.exhausted() { + return fmt.Errorf("Expected call at %s has already been called the max number of times.", c.origin) + } + + return nil +} + +// dropPrereqs tells the expected Call to not re-check prerequisite calls any +// longer, and to return its current set. +func (c *Call) dropPrereqs() (preReqs []*Call) { + preReqs = c.preReqs + c.preReqs = nil + return +} + +func (c *Call) call(args []interface{}) []func([]interface{}) []interface{} { + c.numCalls++ + return c.actions +} + +// InOrder declares that the given calls should occur in order. +func InOrder(calls ...*Call) { + for i := 1; i < len(calls); i++ { + calls[i].After(calls[i-1]) + } +} + +func setSlice(arg interface{}, v reflect.Value) { + va := reflect.ValueOf(arg) + for i := 0; i < v.Len(); i++ { + va.Index(i).Set(v.Index(i)) + } +} + +func (c *Call) addAction(action func([]interface{}) []interface{}) { + c.actions = append(c.actions, action) +} diff --git a/vendor/github.com/golang/mock/gomock/callset.go b/vendor/github.com/golang/mock/gomock/callset.go new file mode 100644 index 000000000000..c44a8a585b32 --- /dev/null +++ b/vendor/github.com/golang/mock/gomock/callset.go @@ -0,0 +1,108 @@ +// Copyright 2011 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gomock + +import ( + "bytes" + "fmt" +) + +// callSet represents a set of expected calls, indexed by receiver and method +// name. +type callSet struct { + // Calls that are still expected. + expected map[callSetKey][]*Call + // Calls that have been exhausted. + exhausted map[callSetKey][]*Call +} + +// callSetKey is the key in the maps in callSet +type callSetKey struct { + receiver interface{} + fname string +} + +func newCallSet() *callSet { + return &callSet{make(map[callSetKey][]*Call), make(map[callSetKey][]*Call)} +} + +// Add adds a new expected call. +func (cs callSet) Add(call *Call) { + key := callSetKey{call.receiver, call.method} + m := cs.expected + if call.exhausted() { + m = cs.exhausted + } + m[key] = append(m[key], call) +} + +// Remove removes an expected call. +func (cs callSet) Remove(call *Call) { + key := callSetKey{call.receiver, call.method} + calls := cs.expected[key] + for i, c := range calls { + if c == call { + // maintain order for remaining calls + cs.expected[key] = append(calls[:i], calls[i+1:]...) + cs.exhausted[key] = append(cs.exhausted[key], call) + break + } + } +} + +// FindMatch searches for a matching call. Returns error with explanation message if no call matched. +func (cs callSet) FindMatch(receiver interface{}, method string, args []interface{}) (*Call, error) { + key := callSetKey{receiver, method} + + // Search through the expected calls. + expected := cs.expected[key] + var callsErrors bytes.Buffer + for _, call := range expected { + err := call.matches(args) + if err != nil { + fmt.Fprintf(&callsErrors, "\n%v", err) + } else { + return call, nil + } + } + + // If we haven't found a match then search through the exhausted calls so we + // get useful error messages. + exhausted := cs.exhausted[key] + for _, call := range exhausted { + if err := call.matches(args); err != nil { + fmt.Fprintf(&callsErrors, "\n%v", err) + } + } + + if len(expected)+len(exhausted) == 0 { + fmt.Fprintf(&callsErrors, "there are no expected calls of the method %q for that receiver", method) + } + + return nil, fmt.Errorf(callsErrors.String()) +} + +// Failures returns the calls that are not satisfied. +func (cs callSet) Failures() []*Call { + failures := make([]*Call, 0, len(cs.expected)) + for _, calls := range cs.expected { + for _, call := range calls { + if !call.satisfied() { + failures = append(failures, call) + } + } + } + return failures +} diff --git a/vendor/github.com/golang/mock/gomock/controller.go b/vendor/github.com/golang/mock/gomock/controller.go new file mode 100644 index 000000000000..6fde25f5087a --- /dev/null +++ b/vendor/github.com/golang/mock/gomock/controller.go @@ -0,0 +1,235 @@ +// Copyright 2010 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// GoMock - a mock framework for Go. +// +// Standard usage: +// (1) Define an interface that you wish to mock. +// type MyInterface interface { +// SomeMethod(x int64, y string) +// } +// (2) Use mockgen to generate a mock from the interface. +// (3) Use the mock in a test: +// func TestMyThing(t *testing.T) { +// mockCtrl := gomock.NewController(t) +// defer mockCtrl.Finish() +// +// mockObj := something.NewMockMyInterface(mockCtrl) +// mockObj.EXPECT().SomeMethod(4, "blah") +// // pass mockObj to a real object and play with it. +// } +// +// By default, expected calls are not enforced to run in any particular order. +// Call order dependency can be enforced by use of InOrder and/or Call.After. +// Call.After can create more varied call order dependencies, but InOrder is +// often more convenient. +// +// The following examples create equivalent call order dependencies. +// +// Example of using Call.After to chain expected call order: +// +// firstCall := mockObj.EXPECT().SomeMethod(1, "first") +// secondCall := mockObj.EXPECT().SomeMethod(2, "second").After(firstCall) +// mockObj.EXPECT().SomeMethod(3, "third").After(secondCall) +// +// Example of using InOrder to declare expected call order: +// +// gomock.InOrder( +// mockObj.EXPECT().SomeMethod(1, "first"), +// mockObj.EXPECT().SomeMethod(2, "second"), +// mockObj.EXPECT().SomeMethod(3, "third"), +// ) +// +// TODO: +// - Handle different argument/return types (e.g. ..., chan, map, interface). +package gomock + +import ( + "context" + "fmt" + "reflect" + "runtime" + "sync" +) + +// A TestReporter is something that can be used to report test failures. +// It is satisfied by the standard library's *testing.T. +type TestReporter interface { + Errorf(format string, args ...interface{}) + Fatalf(format string, args ...interface{}) +} + +// TestHelper is a TestReporter that has the Helper method. It is satisfied +// by the standard library's *testing.T. +type TestHelper interface { + TestReporter + Helper() +} + +// A Controller represents the top-level control of a mock ecosystem. +// It defines the scope and lifetime of mock objects, as well as their expectations. +// It is safe to call Controller's methods from multiple goroutines. +type Controller struct { + // T should only be called within a generated mock. It is not intended to + // be used in user code and may be changed in future versions. T is the + // TestReporter passed in when creating the Controller via NewController. + // If the TestReporter does not implment a TestHelper it will be wrapped + // with a nopTestHelper. + T TestHelper + mu sync.Mutex + expectedCalls *callSet + finished bool +} + +func NewController(t TestReporter) *Controller { + h, ok := t.(TestHelper) + if !ok { + h = nopTestHelper{t} + } + + return &Controller{ + T: h, + expectedCalls: newCallSet(), + } +} + +type cancelReporter struct { + TestHelper + cancel func() +} + +func (r *cancelReporter) Errorf(format string, args ...interface{}) { + r.TestHelper.Errorf(format, args...) +} +func (r *cancelReporter) Fatalf(format string, args ...interface{}) { + defer r.cancel() + r.TestHelper.Fatalf(format, args...) +} + +// WithContext returns a new Controller and a Context, which is cancelled on any +// fatal failure. +func WithContext(ctx context.Context, t TestReporter) (*Controller, context.Context) { + h, ok := t.(TestHelper) + if !ok { + h = nopTestHelper{t} + } + + ctx, cancel := context.WithCancel(ctx) + return NewController(&cancelReporter{h, cancel}), ctx +} + +type nopTestHelper struct { + TestReporter +} + +func (h nopTestHelper) Helper() {} + +func (ctrl *Controller) RecordCall(receiver interface{}, method string, args ...interface{}) *Call { + ctrl.T.Helper() + + recv := reflect.ValueOf(receiver) + for i := 0; i < recv.Type().NumMethod(); i++ { + if recv.Type().Method(i).Name == method { + return ctrl.RecordCallWithMethodType(receiver, method, recv.Method(i).Type(), args...) + } + } + ctrl.T.Fatalf("gomock: failed finding method %s on %T", method, receiver) + panic("unreachable") +} + +func (ctrl *Controller) RecordCallWithMethodType(receiver interface{}, method string, methodType reflect.Type, args ...interface{}) *Call { + ctrl.T.Helper() + + call := newCall(ctrl.T, receiver, method, methodType, args...) + + ctrl.mu.Lock() + defer ctrl.mu.Unlock() + ctrl.expectedCalls.Add(call) + + return call +} + +func (ctrl *Controller) Call(receiver interface{}, method string, args ...interface{}) []interface{} { + ctrl.T.Helper() + + // Nest this code so we can use defer to make sure the lock is released. + actions := func() []func([]interface{}) []interface{} { + ctrl.T.Helper() + ctrl.mu.Lock() + defer ctrl.mu.Unlock() + + expected, err := ctrl.expectedCalls.FindMatch(receiver, method, args) + if err != nil { + origin := callerInfo(2) + ctrl.T.Fatalf("Unexpected call to %T.%v(%v) at %s because: %s", receiver, method, args, origin, err) + } + + // Two things happen here: + // * the matching call no longer needs to check prerequite calls, + // * and the prerequite calls are no longer expected, so remove them. + preReqCalls := expected.dropPrereqs() + for _, preReqCall := range preReqCalls { + ctrl.expectedCalls.Remove(preReqCall) + } + + actions := expected.call(args) + if expected.exhausted() { + ctrl.expectedCalls.Remove(expected) + } + return actions + }() + + var rets []interface{} + for _, action := range actions { + if r := action(args); r != nil { + rets = r + } + } + + return rets +} + +func (ctrl *Controller) Finish() { + ctrl.T.Helper() + + ctrl.mu.Lock() + defer ctrl.mu.Unlock() + + if ctrl.finished { + ctrl.T.Fatalf("Controller.Finish was called more than once. It has to be called exactly once.") + } + ctrl.finished = true + + // If we're currently panicking, probably because this is a deferred call, + // pass through the panic. + if err := recover(); err != nil { + panic(err) + } + + // Check that all remaining expected calls are satisfied. + failures := ctrl.expectedCalls.Failures() + for _, call := range failures { + ctrl.T.Errorf("missing call(s) to %v", call) + } + if len(failures) != 0 { + ctrl.T.Fatalf("aborting test due to missing call(s)") + } +} + +func callerInfo(skip int) string { + if _, file, line, ok := runtime.Caller(skip + 1); ok { + return fmt.Sprintf("%s:%d", file, line) + } + return "unknown file" +} diff --git a/vendor/github.com/golang/mock/gomock/matchers.go b/vendor/github.com/golang/mock/gomock/matchers.go new file mode 100644 index 000000000000..189796f8656d --- /dev/null +++ b/vendor/github.com/golang/mock/gomock/matchers.go @@ -0,0 +1,122 @@ +// Copyright 2010 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gomock + +import ( + "fmt" + "reflect" +) + +// A Matcher is a representation of a class of values. +// It is used to represent the valid or expected arguments to a mocked method. +type Matcher interface { + // Matches returns whether x is a match. + Matches(x interface{}) bool + + // String describes what the matcher matches. + String() string +} + +type anyMatcher struct{} + +func (anyMatcher) Matches(x interface{}) bool { + return true +} + +func (anyMatcher) String() string { + return "is anything" +} + +type eqMatcher struct { + x interface{} +} + +func (e eqMatcher) Matches(x interface{}) bool { + return reflect.DeepEqual(e.x, x) +} + +func (e eqMatcher) String() string { + return fmt.Sprintf("is equal to %v", e.x) +} + +type nilMatcher struct{} + +func (nilMatcher) Matches(x interface{}) bool { + if x == nil { + return true + } + + v := reflect.ValueOf(x) + switch v.Kind() { + case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, + reflect.Ptr, reflect.Slice: + return v.IsNil() + } + + return false +} + +func (nilMatcher) String() string { + return "is nil" +} + +type notMatcher struct { + m Matcher +} + +func (n notMatcher) Matches(x interface{}) bool { + return !n.m.Matches(x) +} + +func (n notMatcher) String() string { + // TODO: Improve this if we add a NotString method to the Matcher interface. + return "not(" + n.m.String() + ")" +} + +type assignableToTypeOfMatcher struct { + targetType reflect.Type +} + +func (m assignableToTypeOfMatcher) Matches(x interface{}) bool { + return reflect.TypeOf(x).AssignableTo(m.targetType) +} + +func (m assignableToTypeOfMatcher) String() string { + return "is assignable to " + m.targetType.Name() +} + +// Constructors +func Any() Matcher { return anyMatcher{} } +func Eq(x interface{}) Matcher { return eqMatcher{x} } +func Nil() Matcher { return nilMatcher{} } +func Not(x interface{}) Matcher { + if m, ok := x.(Matcher); ok { + return notMatcher{m} + } + return notMatcher{Eq(x)} +} + +// AssignableToTypeOf is a Matcher that matches if the parameter to the mock +// function is assignable to the type of the parameter to this function. +// +// Example usage: +// +// dbMock.EXPECT(). +// Insert(gomock.AssignableToTypeOf(&EmployeeRecord{})). +// Return(errors.New("DB error")) +// +func AssignableToTypeOf(x interface{}) Matcher { + return assignableToTypeOfMatcher{reflect.TypeOf(x)} +} diff --git a/vendor/modules.txt b/vendor/modules.txt index ccb081f027e2..577401f4fe9e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -262,6 +262,8 @@ github.com/gogo/protobuf/io github.com/gogo/protobuf/proto github.com/gogo/protobuf/protoc-gen-gogo/descriptor github.com/gogo/protobuf/sortkeys +# github.com/golang/mock v1.2.0 +github.com/golang/mock/gomock # github.com/golang/protobuf v1.3.2 github.com/golang/protobuf/proto github.com/golang/protobuf/protoc-gen-go/descriptor From 37fee67062fbadc8d2687d2098c550f2fa3d0a86 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Thu, 14 May 2020 15:11:44 -0600 Subject: [PATCH 24/29] Switch from mocks to fakes; improved comments * Exposes failable functions logical.InmemStorage for CRUD ops * Adds function for walking over a logical.Storage - this should be put in a more general location but the obvious places have circular dependencies with it :( * Adds a function to convert a logical.Storage to a map --- Makefile | 3 - sdk/helper/random/string_generator.go | 3 +- sdk/logical/storage_inmem.go | 20 + vault/logical_mock_test.go | 93 ---- vault/logical_system_test.go | 513 ++++++++++++------ .../sdk/helper/random/string_generator.go | 3 +- .../vault/sdk/logical/storage_inmem.go | 20 + 7 files changed, 389 insertions(+), 266 deletions(-) delete mode 100644 vault/logical_mock_test.go diff --git a/Makefile b/Makefile index 0cb78ed3291e..45e017dbeecc 100644 --- a/Makefile +++ b/Makefile @@ -210,9 +210,6 @@ proto: sed -i -e 's/Id/ID/' vault/request_forwarding_service.pb.go sed -i -e 's/Idp/IDP/' -e 's/Url/URL/' -e 's/Id/ID/' -e 's/IDentity/Identity/' -e 's/EntityId/EntityID/' -e 's/Api/API/' -e 's/Qr/QR/' -e 's/Totp/TOTP/' -e 's/Mfa/MFA/' -e 's/Pingid/PingID/' -e 's/protobuf:"/sentinel:"" protobuf:"/' -e 's/namespaceId/namespaceID/' -e 's/Ttl/TTL/' -e 's/BoundCidrs/BoundCIDRs/' helper/identity/types.pb.go helper/identity/mfa/types.pb.go helper/storagepacker/types.pb.go sdk/plugin/pb/backend.pb.go sdk/logical/identity.pb.go -mock: - mockgen -destination vault/logical_mock_test.go -package vault github.com/hashicorp/vault/sdk/logical Storage - fmtcheck: @true #@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'" diff --git a/sdk/helper/random/string_generator.go b/sdk/helper/random/string_generator.go index 527a96aae6fb..761577455a22 100644 --- a/sdk/helper/random/string_generator.go +++ b/sdk/helper/random/string_generator.go @@ -195,11 +195,12 @@ func randomRunes(rng io.Reader, charset []rune, length int) (candidate []rune, e // Append characters until either we're out of indexes or the length is long enough for i := 0; i < numBytes; i++ { + // Be careful to ensure that maxAllowedRNGValue isn't >= 256 as it will overflow and this + // comparison will prevent characters from being selected from the charset if data[i] > byte(maxAllowedRNGValue) { continue } - // Be careful about byte conversions - you don't want 256 to wrap to 0 index := data[i] if len(charset) != maxCharsetLen { index = index % charsetLen diff --git a/sdk/logical/storage_inmem.go b/sdk/logical/storage_inmem.go index 4c7afa1b9284..65368a070fe4 100644 --- a/sdk/logical/storage_inmem.go +++ b/sdk/logical/storage_inmem.go @@ -62,6 +62,26 @@ func (s *InmemStorage) Underlying() *inmem.InmemBackend { return s.underlying.(*inmem.InmemBackend) } +func (s *InmemStorage) FailPut(fail bool) *InmemStorage { + s.Underlying().FailPut(fail) + return s +} + +func (s *InmemStorage) FailGet(fail bool) *InmemStorage { + s.Underlying().FailGet(fail) + return s +} + +func (s *InmemStorage) FailDelete(fail bool) *InmemStorage { + s.Underlying().FailDelete(fail) + return s +} + +func (s *InmemStorage) FailList(fail bool) *InmemStorage { + s.Underlying().FailList(fail) + return s +} + func (s *InmemStorage) init() { s.underlying, _ = inmem.NewInmem(nil, nil) } diff --git a/vault/logical_mock_test.go b/vault/logical_mock_test.go deleted file mode 100644 index c420183e5750..000000000000 --- a/vault/logical_mock_test.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: github.com/hashicorp/vault/sdk/logical (interfaces: Storage) - -// Package vault is a generated GoMock package. -package vault - -import ( - context "context" - gomock "github.com/golang/mock/gomock" - logical "github.com/hashicorp/vault/sdk/logical" - reflect "reflect" -) - -// MockStorage is a mock of Storage interface -type MockStorage struct { - ctrl *gomock.Controller - recorder *MockStorageMockRecorder -} - -// MockStorageMockRecorder is the mock recorder for MockStorage -type MockStorageMockRecorder struct { - mock *MockStorage -} - -// NewMockStorage creates a new mock instance -func NewMockStorage(ctrl *gomock.Controller) *MockStorage { - mock := &MockStorage{ctrl: ctrl} - mock.recorder = &MockStorageMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use -func (m *MockStorage) EXPECT() *MockStorageMockRecorder { - return m.recorder -} - -// Delete mocks base method -func (m *MockStorage) Delete(arg0 context.Context, arg1 string) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// Delete indicates an expected call of Delete -func (mr *MockStorageMockRecorder) Delete(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStorage)(nil).Delete), arg0, arg1) -} - -// Get mocks base method -func (m *MockStorage) Get(arg0 context.Context, arg1 string) (*logical.StorageEntry, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) - ret0, _ := ret[0].(*logical.StorageEntry) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// Get indicates an expected call of Get -func (mr *MockStorageMockRecorder) Get(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStorage)(nil).Get), arg0, arg1) -} - -// List mocks base method -func (m *MockStorage) List(arg0 context.Context, arg1 string) ([]string, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "List", arg0, arg1) - ret0, _ := ret[0].([]string) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// List indicates an expected call of List -func (mr *MockStorageMockRecorder) List(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockStorage)(nil).List), arg0, arg1) -} - -// Put mocks base method -func (m *MockStorage) Put(arg0 context.Context, arg1 *logical.StorageEntry) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Put", arg0, arg1) - ret0, _ := ret[0].(error) - return ret0 -} - -// Put indicates an expected call of Put -func (mr *MockStorageMockRecorder) Put(arg0, arg1 interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockStorage)(nil).Put), arg0, arg1) -} diff --git a/vault/logical_system_test.go b/vault/logical_system_test.go index 0a30513317c6..7f13ba1f68b9 100644 --- a/vault/logical_system_test.go +++ b/vault/logical_system_test.go @@ -17,7 +17,6 @@ import ( "github.com/fatih/structs" "github.com/go-test/deep" - "github.com/golang/mock/gomock" hclog "github.com/hashicorp/go-hclog" "github.com/hashicorp/vault/audit" "github.com/hashicorp/vault/helper/builtinplugins" @@ -2736,14 +2735,13 @@ func TestSystemBackend_PathWildcardPreflight(t *testing.T) { func TestHandlePoliciesPasswordSet(t *testing.T) { type testCase struct { - inputData *framework.FieldData + inputData *framework.FieldData - putEntry *logical.StorageEntry - putErr error - putTimes int + storage *logical.InmemStorage expectedResp *logical.Response expectErr bool + expectedStore map[string]*logical.StorageEntry } tests := map[string]testCase{ @@ -2754,23 +2752,35 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { charset="abcdefghij" }`, }), - expectedResp: nil, - expectErr: true, + + storage: new(logical.InmemStorage), + + expectedResp: nil, + expectErr: true, + expectedStore: map[string]*logical.StorageEntry{}, }, "missing policy": { inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), - expectedResp: nil, - expectErr: true, + + storage: new(logical.InmemStorage), + + expectedResp: nil, + expectErr: true, + expectedStore: map[string]*logical.StorageEntry{}, }, "garbage policy": { inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", "policy": "hasdukfhiuashdfoiasjdf", }), - expectedResp: nil, - expectErr: true, + + storage: new(logical.InmemStorage), + + expectedResp: nil, + expectErr: true, + expectedStore: map[string]*logical.StorageEntry{}, }, "storage failure": { inputData: passwordPoliciesFieldData(map[string]interface{}{ @@ -2781,15 +2791,11 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { "}", }), - putEntry: storageEntry(t, "testpolicy", "length = 20\n"+ - "rule \"charset\" {\n"+ - " charset=\"abcdefghij\"\n"+ - "}"), - putErr:fmt.Errorf("test error"), - putTimes:1, + storage: new(logical.InmemStorage).FailPut(true), - expectedResp: nil, - expectErr: true, + expectedResp: nil, + expectErr: true, + expectedStore: map[string]*logical.StorageEntry{}, }, "impossible policy": { inputData: passwordPoliciesFieldData(map[string]interface{}{ @@ -2800,8 +2806,12 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { " min-chars = 30\n" + "}", }), - expectedResp: nil, - expectErr: true, + + storage: new(logical.InmemStorage), + + expectedResp: nil, + expectErr: true, + expectedStore: map[string]*logical.StorageEntry{}, }, "not base64 encoded": { inputData: passwordPoliciesFieldData(map[string]interface{}{ @@ -2812,11 +2822,7 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { "}", }), - putEntry:storageEntry(t, "testpolicy", "length = 20\n" + - "rule \"charset\" {\n" + - " charset=\"abcdefghij\"\n" + - "}"), - putTimes:1, + storage: new(logical.InmemStorage), expectedResp: &logical.Response{ Data: map[string]interface{}{ @@ -2825,21 +2831,22 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { }, }, expectErr: false, + expectedStore: makeStorageMap(storageEntry(t, "testpolicy", "length = 20\n"+ + "rule \"charset\" {\n"+ + " charset=\"abcdefghij\"\n"+ + "}")), }, "base64 encoded": { inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", - "policy": base64Encode("length = 20\n" + - "rule \"charset\" {\n" + - " charset=\"abcdefghij\"\n" + - "}"), + "policy": base64Encode( + "length = 20\n" + + "rule \"charset\" {\n" + + " charset=\"abcdefghij\"\n" + + "}"), }), - putEntry:storageEntry(t, "testpolicy", "length = 20\n" + - "rule \"charset\" {\n" + - " charset=\"abcdefghij\"\n" + - "}"), - putTimes:1, + storage: new(logical.InmemStorage), expectedResp: &logical.Response{ Data: map[string]interface{}{ @@ -2848,22 +2855,21 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { }, }, expectErr: false, + expectedStore: makeStorageMap(storageEntry(t, "testpolicy", + "length = 20\n"+ + "rule \"charset\" {\n"+ + " charset=\"abcdefghij\"\n"+ + "}")), }, } for name, test := range tests { t.Run(name, func(t *testing.T) { - ctrl := gomock.NewController(t) - defer ctrl.Finish() - - storage := NewMockStorage(ctrl) - storage.EXPECT().Put(gomock.Any(), test.putEntry).Return(test.putErr).Times(test.putTimes) - ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) defer cancel() req := &logical.Request{ - Storage: storage, + Storage: test.storage, } b := &SystemBackend{} @@ -2878,70 +2884,68 @@ func TestHandlePoliciesPasswordSet(t *testing.T) { if !reflect.DeepEqual(actualResp, test.expectedResp) { t.Fatalf("Actual response: %#v\nExpected response: %#v", actualResp, test.expectedResp) } + + actualStore := LogicalToMap(t, ctx, test.storage) + if !reflect.DeepEqual(actualStore, test.expectedStore) { + t.Fatalf("Actual: %#v\nActual: %#v", dereferenceMap(actualStore), dereferenceMap(test.expectedStore)) + } }) } } func TestHandlePoliciesPasswordGet(t *testing.T) { type testCase struct { - inputData *framework.FieldData + inputData *framework.FieldData - getPolicyName string - getEntry *logical.StorageEntry - getErr error - getTimes int + storage *logical.InmemStorage - expectedResp *logical.Response - expectErr bool + expectedResp *logical.Response + expectErr bool + expectedStore map[string]*logical.StorageEntry } tests := map[string]testCase{ "missing policy name": { - inputData: passwordPoliciesFieldData(map[string]interface{}{}), + inputData: passwordPoliciesFieldData(map[string]interface{}{}), - getTimes:0, + storage: new(logical.InmemStorage), - expectedResp: nil, - expectErr: true, + expectedResp: nil, + expectErr: true, + expectedStore: map[string]*logical.StorageEntry{}, }, "storage error": { inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), - getPolicyName: getPasswordPolicyKey("testpolicy"), - getEntry:nil, - getErr: fmt.Errorf("test error"), - getTimes: 1, + storage: new(logical.InmemStorage).FailGet(true), - expectedResp: nil, - expectErr: true, + expectedResp: nil, + expectErr: true, + expectedStore: map[string]*logical.StorageEntry{}, }, "missing value": { inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), - getPolicyName: getPasswordPolicyKey("testpolicy"), - getEntry: nil, - getErr:nil, - getTimes:1, + storage: new(logical.InmemStorage), - expectedResp: nil, - expectErr: true, + expectedResp: nil, + expectErr: true, + expectedStore: map[string]*logical.StorageEntry{}, }, "good value": { inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), - getPolicyName: getPasswordPolicyKey("testpolicy"), - getEntry:storageEntry(t, "testpolicy", "length = 20\n" + - "rule \"charset\" {\n" + - " charset=\"abcdefghij\"\n" + - "}"), - getErr:nil, - getTimes:1, + storage: makeStorage(t, storageEntry(t, "testpolicy", + "length = 20\n"+ + "rule \"charset\" {\n"+ + " charset=\"abcdefghij\"\n"+ + "}")), expectedResp: &logical.Response{ Data: map[string]interface{}{ @@ -2952,22 +2956,21 @@ func TestHandlePoliciesPasswordGet(t *testing.T) { }, }, expectErr: false, + expectedStore: makeStorageMap(storageEntry(t, "testpolicy", + "length = 20\n"+ + "rule \"charset\" {\n"+ + " charset=\"abcdefghij\"\n"+ + "}")), }, } for name, test := range tests { t.Run(name, func(t *testing.T) { - ctrl := gomock.NewController(t) - defer ctrl.Finish() - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) defer cancel() - storage := NewMockStorage(ctrl) - storage.EXPECT().Get(gomock.Any(), test.getPolicyName).Return(test.getEntry, test.getErr).Times(test.getTimes) - req := &logical.Request{ - Storage: storage, + Storage: test.storage, } b := &SystemBackend{} @@ -2982,86 +2985,92 @@ func TestHandlePoliciesPasswordGet(t *testing.T) { if !reflect.DeepEqual(actualResp, test.expectedResp) { t.Fatalf("Actual response: %#v\nExpected response: %#v", actualResp, test.expectedResp) } + + actualStore := LogicalToMap(t, ctx, test.storage) + if !reflect.DeepEqual(actualStore, test.expectedStore) { + t.Fatalf("Actual: %#v\nActual: %#v", dereferenceMap(actualStore), dereferenceMap(test.expectedStore)) + } }) } } func TestHandlePoliciesPasswordDelete(t *testing.T) { type testCase struct { - inputData *framework.FieldData + inputData *framework.FieldData - policyName string - deleteErr error - deleteTimes int + storage logical.Storage expectedResp *logical.Response expectErr bool - expectedStore map[string][]byte + expectedStore map[string]*logical.StorageEntry } tests := map[string]testCase{ "missing policy name": { - inputData: passwordPoliciesFieldData(map[string]interface{}{}), + inputData: passwordPoliciesFieldData(map[string]interface{}{}), - deleteTimes:0, + storage: new(logical.InmemStorage), - expectedResp: nil, - expectErr: true, - expectedStore: map[string][]byte{ - "password_policy/testpolicy": toJson(t, map[string]interface{}{ - "policy": `length = 20 - rule "charset" { - charset="abcdefghij" - }`}), - }, + expectedResp: nil, + expectErr: true, + expectedStore: map[string]*logical.StorageEntry{}, }, "storage failure": { inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), - policyName: getPasswordPolicyKey("testpolicy"), - deleteErr:fmt.Errorf("test error"), - deleteTimes: 1, + storage: new(logical.InmemStorage).FailDelete(true), - expectedResp: nil, - expectErr: true, - expectedStore: map[string][]byte{ - "password_policy/testpolicy": toJson(t, map[string]interface{}{ - "policy": `length = 20 - rule "charset" { - charset="abcdefghij" - }`}), - }, + expectedResp: nil, + expectErr: true, + expectedStore: map[string]*logical.StorageEntry{}, }, "successful delete": { inputData: passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", }), - policyName: getPasswordPolicyKey("testpolicy"), - deleteErr:nil, - deleteTimes: 1, + storage: makeStorage(t, + &logical.StorageEntry{ + Key: getPasswordPolicyKey("testpolicy"), + Value: toJson(t, + passwordPolicyConfig{ + HCLPolicy: "length = 18\n" + + "rule \"charset\" {\n" + + " charset=\"ABCDEFGHIJ\"\n" + + "}", + }), + }, + &logical.StorageEntry{ + Key: getPasswordPolicyKey("unrelated_policy"), + Value: toJson(t, + passwordPolicyConfig{ + HCLPolicy: "length = 20\n" + + "rule \"charset\" {\n" + + " charset=\"abcdefghij\"\n" + + "}", + }), + }, + ), expectedResp: nil, - expectErr: false, - expectedStore: map[string][]byte{}, + expectErr: false, + expectedStore: makeStorageMap(storageEntry(t, "unrelated_policy", + "length = 20\n"+ + "rule \"charset\" {\n"+ + " charset=\"abcdefghij\"\n"+ + "}")), }, } for name, test := range tests { t.Run(name, func(t *testing.T) { - ctrl := gomock.NewController(t) - defer ctrl.Finish() - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Millisecond) defer cancel() - storage := NewMockStorage(ctrl) - storage.EXPECT().Delete(gomock.Any(), test.policyName).Return(test.deleteErr).Times(test.deleteTimes) - req := &logical.Request{ - Storage: storage, + Storage: test.storage, } b := &SystemBackend{} @@ -3076,6 +3085,11 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { if !reflect.DeepEqual(actualResp, test.expectedResp) { t.Fatalf("Actual response: %#v\nExpected response: %#v", actualResp, test.expectedResp) } + + actualStore := LogicalToMap(t, ctx, test.storage) + if !reflect.DeepEqual(actualStore, test.expectedStore) { + t.Fatalf("Actual: %#v\nExpected: %#v", dereferenceMap(actualStore), dereferenceMap(test.expectedStore)) + } }) } } @@ -3083,14 +3097,10 @@ func TestHandlePoliciesPasswordDelete(t *testing.T) { func TestHandlePoliciesPasswordGenerate(t *testing.T) { t.Run("errors", func(t *testing.T) { type testCase struct { - timeout time.Duration - // storage logical.Storage - inputData *framework.FieldData + timeout time.Duration + inputData *framework.FieldData - policyName string - getEntry *logical.StorageEntry - getErr error - getTimes int + storage *logical.InmemStorage expectedResp *logical.Response expectErr bool @@ -3098,9 +3108,9 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { tests := map[string]testCase{ "missing policy name": { - inputData: passwordPoliciesFieldData(map[string]interface{}{}), + inputData: passwordPoliciesFieldData(map[string]interface{}{}), - getTimes:0, + storage: new(logical.InmemStorage), expectedResp: nil, expectErr: true, @@ -3110,9 +3120,7 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { "name": "testpolicy", }), - policyName: getPasswordPolicyKey("testpolicy"), - getErr:fmt.Errorf("test error"), - getTimes:1, + storage: new(logical.InmemStorage).FailGet(true), expectedResp: nil, expectErr: true, @@ -3122,10 +3130,7 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { "name": "testpolicy", }), - policyName: getPasswordPolicyKey("testpolicy"), - getEntry:nil, - getErr:nil, - getTimes:1, + storage: new(logical.InmemStorage), expectedResp: nil, expectErr: true, @@ -3135,10 +3140,7 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { "name": "testpolicy", }), - policyName:getPasswordPolicyKey("testpolicy"), - getEntry:storageEntry(t, "testpolicy", "foo"), - getErr:nil, - getTimes:1, + storage: makeStorage(t, storageEntry(t, "testpolicy", "badpolicy")), expectedResp: nil, expectErr: true, @@ -3149,13 +3151,11 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { "name": "testpolicy", }), - policyName:getPasswordPolicyKey("testpolicy"), - getEntry:storageEntry(t, "testpolicy", `length = 20 - rule "charset" { - charset="abcdefghij" - }`), - getErr:nil, - getTimes:1, + storage: makeStorage(t, storageEntry(t, "testpolicy", + "length = 20\n"+ + "rule \"charset\" {\n"+ + " charset=\"abcdefghij\"\n"+ + "}")), expectedResp: nil, expectErr: true, @@ -3164,17 +3164,11 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { for name, test := range tests { t.Run(name, func(t *testing.T) { - ctrl := gomock.NewController(t) - defer ctrl.Finish() - ctx, cancel := context.WithTimeout(context.Background(), test.timeout) defer cancel() - storage := NewMockStorage(ctrl) - storage.EXPECT().Get(gomock.Any(), test.policyName).Return(test.getEntry, test.getErr).Times(test.getTimes) - req := &logical.Request{ - Storage: storage, + Storage: test.storage, } b := &SystemBackend{} @@ -3194,21 +3188,15 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { }) t.Run("success", func(t *testing.T) { - ctrl := gomock.NewController(t) - defer ctrl.Finish() - ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second) defer cancel() - numCalls := 100 - - storage := NewMockStorage(ctrl) - - policyEntry := storageEntry(t, "testpolicy", `length = 20 - rule "charset" { - charset="abcdefghij" - }`) - storage.EXPECT().Get(gomock.Any(), getPasswordPolicyKey("testpolicy")).Return(policyEntry, nil).Times(numCalls) + policyEntry := storageEntry(t, "testpolicy", + "length = 20\n"+ + "rule \"charset\" {\n"+ + " charset=\"abcdefghij\"\n"+ + "}") + storage := makeStorage(t, policyEntry) inputData := passwordPoliciesFieldData(map[string]interface{}{ "name": "testpolicy", @@ -3230,7 +3218,7 @@ func TestHandlePoliciesPasswordGenerate(t *testing.T) { } // Run the test a bunch of times to help ensure we don't have flaky behavior - for i := 0; i < numCalls; i++ { + for i := 0; i < 1000; i++ { req := &logical.Request{ Storage: storage, } @@ -3322,9 +3310,198 @@ func toJson(t *testing.T, val interface{}) []byte { func storageEntry(t *testing.T, key string, policy string) *logical.StorageEntry { return &logical.StorageEntry{ - Key: getPasswordPolicyKey(key), - Value: toJson(t, passwordPolicyConfig{ + Key: getPasswordPolicyKey(key), + Value: toJson(t, passwordPolicyConfig{ HCLPolicy: policy, }), } } + +func makeStorageMap(entries ...*logical.StorageEntry) map[string]*logical.StorageEntry { + m := map[string]*logical.StorageEntry{} + for _, entry := range entries { + m[entry.Key] = entry + } + return m +} + +func dereferenceMap(store map[string]*logical.StorageEntry) map[string]interface{} { + m := map[string]interface{}{} + + for k, v := range store { + m[k] = map[string]string{ + "Key": v.Key, + "Value": string(v.Value), + } + } + return m +} + +type walkFunc func(*logical.StorageEntry) error + +// WalkLogicalStorage applies the provided walkFunc against each entry in the logical storage. +// This operates as a breadth first search. +// TODO: Figure out a place for this to live permanently. This is generic and should be in a helper package somewhere. +// At the time of writing, none of these locations work due to import cycles: +// - vault/helper/testhelpers +// - vault/helper/testhelpers/logical +// - vault/helper/testhelpers/teststorage +func WalkLogicalStorage(ctx context.Context, store logical.Storage, walker walkFunc) (err error) { + if store == nil { + return fmt.Errorf("no storage provided") + } + if walker == nil { + return fmt.Errorf("no walk function provided") + } + + keys, err := store.List(ctx, "") + if err != nil { + return fmt.Errorf("unable to list root keys: %w", err) + } + + // Non-recursive breadth-first search through all keys + for i := 0; i < len(keys); i++ { + key := keys[i] + + entry, err := store.Get(ctx, key) + if err != nil { + return fmt.Errorf("unable to retrieve key at [%s]: %w", key, err) + } + if entry != nil { + err = walker(entry) + if err != nil { + return err + } + } + + if strings.HasSuffix(key, "/") { + // Directory + subkeys, err := store.List(ctx, key) + if err != nil { + return fmt.Errorf("unable to list keys at [%s]: %w", key, err) + } + + // Append the sub-keys to the keys slice so it searches into the sub-directory + for _, subkey := range subkeys { + // Avoids infinite loop if the subkey is empty which then repeats indefinitely + if subkey == "" { + continue + } + subkey = fmt.Sprintf("%s%s", key, subkey) + keys = append(keys, subkey) + } + } + } + return nil +} + +// LogicalToMap retrieves all entries in the store and returns them as a map of key -> StorageEntry +func LogicalToMap(t *testing.T, ctx context.Context, store logical.Storage) (data map[string]*logical.StorageEntry) { + data = map[string]*logical.StorageEntry{} + f := func(entry *logical.StorageEntry) error { + data[entry.Key] = entry + return nil + } + + err := WalkLogicalStorage(ctx, store, f) + if err != nil { + t.Fatalf("Unable to walk the storage: %s", err) + } + return data +} + +// Ensure the WalkLogicalStorage function works +func TestWalkLogicalStorage(t *testing.T) { + type testCase struct { + entries []*logical.StorageEntry + } + + tests := map[string]testCase{ + "no entries": { + entries: []*logical.StorageEntry{}, + }, + "one entry": { + entries: []*logical.StorageEntry{ + { + Key: "root", + }, + }, + }, + "many entries": { + entries: []*logical.StorageEntry{ + // Alphabetical, breadth-first + {Key: "bar"}, + {Key: "foo"}, + {Key: "bar/sub-bar1"}, + {Key: "bar/sub-bar2"}, + {Key: "foo/sub-foo1"}, + {Key: "foo/sub-foo2"}, + {Key: "foo/sub-foo3"}, + {Key: "bar/sub-bar1/sub-sub-bar1"}, + {Key: "bar/sub-bar1/sub-sub-bar2"}, + {Key: "bar/sub-bar2/sub-sub-bar1"}, + {Key: "foo/sub-foo1/sub-sub-foo1"}, + {Key: "foo/sub-foo2/sub-sub-foo1"}, + {Key: "foo/sub-foo3/sub-sub-foo1"}, + {Key: "foo/sub-foo3/sub-sub-foo2"}, + }, + }, + "sub key without root key": { + entries: []*logical.StorageEntry{ + {Key: "foo/bar/baz"}, + }, + }, + "key with trailing slash": { + entries: []*logical.StorageEntry{ + {Key: "foo/"}, + }, + }, + "double slash": { + entries: []*logical.StorageEntry{ + {Key: "foo//"}, + {Key: "foo//bar"}, + }, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + + store := makeStorage(t, test.entries...) + + actualEntries := []*logical.StorageEntry{} + f := func(entry *logical.StorageEntry) error { + actualEntries = append(actualEntries, entry) + return nil + } + + err := WalkLogicalStorage(ctx, store, f) + if err != nil { + t.Fatalf("Failed to walk storage: %s", err) + } + + if !reflect.DeepEqual(actualEntries, test.entries) { + t.Fatalf("Actual: %#v\nExpected: %#v", actualEntries, test.entries) + } + }) + } +} + +func makeStorage(t *testing.T, entries ...*logical.StorageEntry) *logical.InmemStorage { + t.Helper() + + ctx := context.Background() + + store := new(logical.InmemStorage) + + for _, entry := range entries { + err := store.Put(ctx, entry) + if err != nil { + t.Fatalf("Unable to load test storage: %s", err) + } + } + + return store +} diff --git a/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go b/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go index 527a96aae6fb..761577455a22 100644 --- a/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go +++ b/vendor/github.com/hashicorp/vault/sdk/helper/random/string_generator.go @@ -195,11 +195,12 @@ func randomRunes(rng io.Reader, charset []rune, length int) (candidate []rune, e // Append characters until either we're out of indexes or the length is long enough for i := 0; i < numBytes; i++ { + // Be careful to ensure that maxAllowedRNGValue isn't >= 256 as it will overflow and this + // comparison will prevent characters from being selected from the charset if data[i] > byte(maxAllowedRNGValue) { continue } - // Be careful about byte conversions - you don't want 256 to wrap to 0 index := data[i] if len(charset) != maxCharsetLen { index = index % charsetLen diff --git a/vendor/github.com/hashicorp/vault/sdk/logical/storage_inmem.go b/vendor/github.com/hashicorp/vault/sdk/logical/storage_inmem.go index 4c7afa1b9284..65368a070fe4 100644 --- a/vendor/github.com/hashicorp/vault/sdk/logical/storage_inmem.go +++ b/vendor/github.com/hashicorp/vault/sdk/logical/storage_inmem.go @@ -62,6 +62,26 @@ func (s *InmemStorage) Underlying() *inmem.InmemBackend { return s.underlying.(*inmem.InmemBackend) } +func (s *InmemStorage) FailPut(fail bool) *InmemStorage { + s.Underlying().FailPut(fail) + return s +} + +func (s *InmemStorage) FailGet(fail bool) *InmemStorage { + s.Underlying().FailGet(fail) + return s +} + +func (s *InmemStorage) FailDelete(fail bool) *InmemStorage { + s.Underlying().FailDelete(fail) + return s +} + +func (s *InmemStorage) FailList(fail bool) *InmemStorage { + s.Underlying().FailList(fail) + return s +} + func (s *InmemStorage) init() { s.underlying, _ = inmem.NewInmem(nil, nil) } From 6ac5d491bc903f018033f0e3b8c461c12d502326 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Thu, 14 May 2020 16:53:56 -0600 Subject: [PATCH 25/29] Remove gomock; update protos --- sdk/database/dbplugin/database.pb.go | 1791 +++--- sdk/plugin/pb/backend.pb.go | 4998 +++++++++++------ vendor/github.com/golang/mock/AUTHORS | 12 - vendor/github.com/golang/mock/CONTRIBUTORS | 37 - vendor/github.com/golang/mock/LICENSE | 202 - vendor/github.com/golang/mock/gomock/call.go | 420 -- .../github.com/golang/mock/gomock/callset.go | 108 - .../golang/mock/gomock/controller.go | 235 - .../github.com/golang/mock/gomock/matchers.go | 122 - vendor/github.com/hashicorp/vault/api/go.sum | 1 + 10 files changed, 4346 insertions(+), 3580 deletions(-) delete mode 100644 vendor/github.com/golang/mock/AUTHORS delete mode 100644 vendor/github.com/golang/mock/CONTRIBUTORS delete mode 100644 vendor/github.com/golang/mock/LICENSE delete mode 100644 vendor/github.com/golang/mock/gomock/call.go delete mode 100644 vendor/github.com/golang/mock/gomock/callset.go delete mode 100644 vendor/github.com/golang/mock/gomock/controller.go delete mode 100644 vendor/github.com/golang/mock/gomock/matchers.go diff --git a/sdk/database/dbplugin/database.pb.go b/sdk/database/dbplugin/database.pb.go index c820015136cc..de3518270981 100644 --- a/sdk/database/dbplugin/database.pb.go +++ b/sdk/database/dbplugin/database.pb.go @@ -1,950 +1,1485 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.22.0 +// protoc v3.11.4 // source: sdk/database/dbplugin/database.proto package dbplugin import ( context "context" - fmt "fmt" proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 // Deprecated: Do not use. type InitializeRequest struct { - Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - VerifyConnection bool `protobuf:"varint,2,opt,name=verify_connection,json=verifyConnection,proto3" json:"verify_connection,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *InitializeRequest) Reset() { *m = InitializeRequest{} } -func (m *InitializeRequest) String() string { return proto.CompactTextString(m) } -func (*InitializeRequest) ProtoMessage() {} -func (*InitializeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{0} + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + VerifyConnection bool `protobuf:"varint,2,opt,name=verify_connection,json=verifyConnection,proto3" json:"verify_connection,omitempty"` } -func (m *InitializeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InitializeRequest.Unmarshal(m, b) -} -func (m *InitializeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InitializeRequest.Marshal(b, m, deterministic) -} -func (m *InitializeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_InitializeRequest.Merge(m, src) +func (x *InitializeRequest) Reset() { + *x = InitializeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *InitializeRequest) XXX_Size() int { - return xxx_messageInfo_InitializeRequest.Size(m) + +func (x *InitializeRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InitializeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_InitializeRequest.DiscardUnknown(m) + +func (*InitializeRequest) ProtoMessage() {} + +func (x *InitializeRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_InitializeRequest proto.InternalMessageInfo +// Deprecated: Use InitializeRequest.ProtoReflect.Descriptor instead. +func (*InitializeRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{0} +} -func (m *InitializeRequest) GetConfig() []byte { - if m != nil { - return m.Config +func (x *InitializeRequest) GetConfig() []byte { + if x != nil { + return x.Config } return nil } -func (m *InitializeRequest) GetVerifyConnection() bool { - if m != nil { - return m.VerifyConnection +func (x *InitializeRequest) GetVerifyConnection() bool { + if x != nil { + return x.VerifyConnection } return false } type InitRequest struct { - Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - VerifyConnection bool `protobuf:"varint,2,opt,name=verify_connection,json=verifyConnection,proto3" json:"verify_connection,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *InitRequest) Reset() { *m = InitRequest{} } -func (m *InitRequest) String() string { return proto.CompactTextString(m) } -func (*InitRequest) ProtoMessage() {} -func (*InitRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{1} + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + VerifyConnection bool `protobuf:"varint,2,opt,name=verify_connection,json=verifyConnection,proto3" json:"verify_connection,omitempty"` } -func (m *InitRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InitRequest.Unmarshal(m, b) -} -func (m *InitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InitRequest.Marshal(b, m, deterministic) -} -func (m *InitRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_InitRequest.Merge(m, src) +func (x *InitRequest) Reset() { + *x = InitRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *InitRequest) XXX_Size() int { - return xxx_messageInfo_InitRequest.Size(m) + +func (x *InitRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InitRequest) XXX_DiscardUnknown() { - xxx_messageInfo_InitRequest.DiscardUnknown(m) + +func (*InitRequest) ProtoMessage() {} + +func (x *InitRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_InitRequest proto.InternalMessageInfo +// Deprecated: Use InitRequest.ProtoReflect.Descriptor instead. +func (*InitRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{1} +} -func (m *InitRequest) GetConfig() []byte { - if m != nil { - return m.Config +func (x *InitRequest) GetConfig() []byte { + if x != nil { + return x.Config } return nil } -func (m *InitRequest) GetVerifyConnection() bool { - if m != nil { - return m.VerifyConnection +func (x *InitRequest) GetVerifyConnection() bool { + if x != nil { + return x.VerifyConnection } return false } type CreateUserRequest struct { - Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` - UsernameConfig *UsernameConfig `protobuf:"bytes,2,opt,name=username_config,json=usernameConfig,proto3" json:"username_config,omitempty"` - Expiration *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *CreateUserRequest) Reset() { *m = CreateUserRequest{} } -func (m *CreateUserRequest) String() string { return proto.CompactTextString(m) } -func (*CreateUserRequest) ProtoMessage() {} -func (*CreateUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{2} + Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` + UsernameConfig *UsernameConfig `protobuf:"bytes,2,opt,name=username_config,json=usernameConfig,proto3" json:"username_config,omitempty"` + Expiration *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration,omitempty"` } -func (m *CreateUserRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateUserRequest.Unmarshal(m, b) -} -func (m *CreateUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateUserRequest.Marshal(b, m, deterministic) -} -func (m *CreateUserRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateUserRequest.Merge(m, src) +func (x *CreateUserRequest) Reset() { + *x = CreateUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CreateUserRequest) XXX_Size() int { - return xxx_messageInfo_CreateUserRequest.Size(m) + +func (x *CreateUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CreateUserRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateUserRequest.DiscardUnknown(m) + +func (*CreateUserRequest) ProtoMessage() {} + +func (x *CreateUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_CreateUserRequest proto.InternalMessageInfo +// Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead. +func (*CreateUserRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{2} +} -func (m *CreateUserRequest) GetStatements() *Statements { - if m != nil { - return m.Statements +func (x *CreateUserRequest) GetStatements() *Statements { + if x != nil { + return x.Statements } return nil } -func (m *CreateUserRequest) GetUsernameConfig() *UsernameConfig { - if m != nil { - return m.UsernameConfig +func (x *CreateUserRequest) GetUsernameConfig() *UsernameConfig { + if x != nil { + return x.UsernameConfig } return nil } -func (m *CreateUserRequest) GetExpiration() *timestamp.Timestamp { - if m != nil { - return m.Expiration +func (x *CreateUserRequest) GetExpiration() *timestamp.Timestamp { + if x != nil { + return x.Expiration } return nil } type RenewUserRequest struct { - Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - Expiration *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *RenewUserRequest) Reset() { *m = RenewUserRequest{} } -func (m *RenewUserRequest) String() string { return proto.CompactTextString(m) } -func (*RenewUserRequest) ProtoMessage() {} -func (*RenewUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{3} + Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Expiration *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration,omitempty"` } -func (m *RenewUserRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RenewUserRequest.Unmarshal(m, b) -} -func (m *RenewUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RenewUserRequest.Marshal(b, m, deterministic) -} -func (m *RenewUserRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RenewUserRequest.Merge(m, src) +func (x *RenewUserRequest) Reset() { + *x = RenewUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RenewUserRequest) XXX_Size() int { - return xxx_messageInfo_RenewUserRequest.Size(m) + +func (x *RenewUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RenewUserRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RenewUserRequest.DiscardUnknown(m) + +func (*RenewUserRequest) ProtoMessage() {} + +func (x *RenewUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RenewUserRequest proto.InternalMessageInfo +// Deprecated: Use RenewUserRequest.ProtoReflect.Descriptor instead. +func (*RenewUserRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{3} +} -func (m *RenewUserRequest) GetStatements() *Statements { - if m != nil { - return m.Statements +func (x *RenewUserRequest) GetStatements() *Statements { + if x != nil { + return x.Statements } return nil } -func (m *RenewUserRequest) GetUsername() string { - if m != nil { - return m.Username +func (x *RenewUserRequest) GetUsername() string { + if x != nil { + return x.Username } return "" } -func (m *RenewUserRequest) GetExpiration() *timestamp.Timestamp { - if m != nil { - return m.Expiration +func (x *RenewUserRequest) GetExpiration() *timestamp.Timestamp { + if x != nil { + return x.Expiration } return nil } type RevokeUserRequest struct { - Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *RevokeUserRequest) Reset() { *m = RevokeUserRequest{} } -func (m *RevokeUserRequest) String() string { return proto.CompactTextString(m) } -func (*RevokeUserRequest) ProtoMessage() {} -func (*RevokeUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{4} + Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` } -func (m *RevokeUserRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RevokeUserRequest.Unmarshal(m, b) -} -func (m *RevokeUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RevokeUserRequest.Marshal(b, m, deterministic) -} -func (m *RevokeUserRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RevokeUserRequest.Merge(m, src) +func (x *RevokeUserRequest) Reset() { + *x = RevokeUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RevokeUserRequest) XXX_Size() int { - return xxx_messageInfo_RevokeUserRequest.Size(m) + +func (x *RevokeUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RevokeUserRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RevokeUserRequest.DiscardUnknown(m) + +func (*RevokeUserRequest) ProtoMessage() {} + +func (x *RevokeUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RevokeUserRequest proto.InternalMessageInfo +// Deprecated: Use RevokeUserRequest.ProtoReflect.Descriptor instead. +func (*RevokeUserRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{4} +} -func (m *RevokeUserRequest) GetStatements() *Statements { - if m != nil { - return m.Statements +func (x *RevokeUserRequest) GetStatements() *Statements { + if x != nil { + return x.Statements } return nil } -func (m *RevokeUserRequest) GetUsername() string { - if m != nil { - return m.Username +func (x *RevokeUserRequest) GetUsername() string { + if x != nil { + return x.Username } return "" } type RotateRootCredentialsRequest struct { - Statements []string `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *RotateRootCredentialsRequest) Reset() { *m = RotateRootCredentialsRequest{} } -func (m *RotateRootCredentialsRequest) String() string { return proto.CompactTextString(m) } -func (*RotateRootCredentialsRequest) ProtoMessage() {} -func (*RotateRootCredentialsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{5} + Statements []string `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"` } -func (m *RotateRootCredentialsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RotateRootCredentialsRequest.Unmarshal(m, b) -} -func (m *RotateRootCredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RotateRootCredentialsRequest.Marshal(b, m, deterministic) -} -func (m *RotateRootCredentialsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RotateRootCredentialsRequest.Merge(m, src) +func (x *RotateRootCredentialsRequest) Reset() { + *x = RotateRootCredentialsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RotateRootCredentialsRequest) XXX_Size() int { - return xxx_messageInfo_RotateRootCredentialsRequest.Size(m) + +func (x *RotateRootCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RotateRootCredentialsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RotateRootCredentialsRequest.DiscardUnknown(m) + +func (*RotateRootCredentialsRequest) ProtoMessage() {} + +func (x *RotateRootCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RotateRootCredentialsRequest proto.InternalMessageInfo +// Deprecated: Use RotateRootCredentialsRequest.ProtoReflect.Descriptor instead. +func (*RotateRootCredentialsRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{5} +} -func (m *RotateRootCredentialsRequest) GetStatements() []string { - if m != nil { - return m.Statements +func (x *RotateRootCredentialsRequest) GetStatements() []string { + if x != nil { + return x.Statements } return nil } type Statements struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // DEPRECATED, will be removed in 0.12 - CreationStatements string `protobuf:"bytes,1,opt,name=creation_statements,json=creationStatements,proto3" json:"creation_statements,omitempty"` // Deprecated: Do not use. + // + // Deprecated: Do not use. + CreationStatements string `protobuf:"bytes,1,opt,name=creation_statements,json=creationStatements,proto3" json:"creation_statements,omitempty"` // DEPRECATED, will be removed in 0.12 - RevocationStatements string `protobuf:"bytes,2,opt,name=revocation_statements,json=revocationStatements,proto3" json:"revocation_statements,omitempty"` // Deprecated: Do not use. + // + // Deprecated: Do not use. + RevocationStatements string `protobuf:"bytes,2,opt,name=revocation_statements,json=revocationStatements,proto3" json:"revocation_statements,omitempty"` // DEPRECATED, will be removed in 0.12 - RollbackStatements string `protobuf:"bytes,3,opt,name=rollback_statements,json=rollbackStatements,proto3" json:"rollback_statements,omitempty"` // Deprecated: Do not use. + // + // Deprecated: Do not use. + RollbackStatements string `protobuf:"bytes,3,opt,name=rollback_statements,json=rollbackStatements,proto3" json:"rollback_statements,omitempty"` // DEPRECATED, will be removed in 0.12 - RenewStatements string `protobuf:"bytes,4,opt,name=renew_statements,json=renewStatements,proto3" json:"renew_statements,omitempty"` // Deprecated: Do not use. - Creation []string `protobuf:"bytes,5,rep,name=creation,proto3" json:"creation,omitempty"` - Revocation []string `protobuf:"bytes,6,rep,name=revocation,proto3" json:"revocation,omitempty"` - Rollback []string `protobuf:"bytes,7,rep,name=rollback,proto3" json:"rollback,omitempty"` - Renewal []string `protobuf:"bytes,8,rep,name=renewal,proto3" json:"renewal,omitempty"` - Rotation []string `protobuf:"bytes,9,rep,name=rotation,proto3" json:"rotation,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Statements) Reset() { *m = Statements{} } -func (m *Statements) String() string { return proto.CompactTextString(m) } -func (*Statements) ProtoMessage() {} -func (*Statements) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{6} + // + // Deprecated: Do not use. + RenewStatements string `protobuf:"bytes,4,opt,name=renew_statements,json=renewStatements,proto3" json:"renew_statements,omitempty"` + Creation []string `protobuf:"bytes,5,rep,name=creation,proto3" json:"creation,omitempty"` + Revocation []string `protobuf:"bytes,6,rep,name=revocation,proto3" json:"revocation,omitempty"` + Rollback []string `protobuf:"bytes,7,rep,name=rollback,proto3" json:"rollback,omitempty"` + Renewal []string `protobuf:"bytes,8,rep,name=renewal,proto3" json:"renewal,omitempty"` + Rotation []string `protobuf:"bytes,9,rep,name=rotation,proto3" json:"rotation,omitempty"` } -func (m *Statements) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Statements.Unmarshal(m, b) -} -func (m *Statements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Statements.Marshal(b, m, deterministic) -} -func (m *Statements) XXX_Merge(src proto.Message) { - xxx_messageInfo_Statements.Merge(m, src) +func (x *Statements) Reset() { + *x = Statements{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Statements) XXX_Size() int { - return xxx_messageInfo_Statements.Size(m) + +func (x *Statements) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Statements) XXX_DiscardUnknown() { - xxx_messageInfo_Statements.DiscardUnknown(m) + +func (*Statements) ProtoMessage() {} + +func (x *Statements) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Statements proto.InternalMessageInfo +// Deprecated: Use Statements.ProtoReflect.Descriptor instead. +func (*Statements) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{6} +} // Deprecated: Do not use. -func (m *Statements) GetCreationStatements() string { - if m != nil { - return m.CreationStatements +func (x *Statements) GetCreationStatements() string { + if x != nil { + return x.CreationStatements } return "" } // Deprecated: Do not use. -func (m *Statements) GetRevocationStatements() string { - if m != nil { - return m.RevocationStatements +func (x *Statements) GetRevocationStatements() string { + if x != nil { + return x.RevocationStatements } return "" } // Deprecated: Do not use. -func (m *Statements) GetRollbackStatements() string { - if m != nil { - return m.RollbackStatements +func (x *Statements) GetRollbackStatements() string { + if x != nil { + return x.RollbackStatements } return "" } // Deprecated: Do not use. -func (m *Statements) GetRenewStatements() string { - if m != nil { - return m.RenewStatements +func (x *Statements) GetRenewStatements() string { + if x != nil { + return x.RenewStatements } return "" } -func (m *Statements) GetCreation() []string { - if m != nil { - return m.Creation +func (x *Statements) GetCreation() []string { + if x != nil { + return x.Creation } return nil } -func (m *Statements) GetRevocation() []string { - if m != nil { - return m.Revocation +func (x *Statements) GetRevocation() []string { + if x != nil { + return x.Revocation } return nil } -func (m *Statements) GetRollback() []string { - if m != nil { - return m.Rollback +func (x *Statements) GetRollback() []string { + if x != nil { + return x.Rollback } return nil } -func (m *Statements) GetRenewal() []string { - if m != nil { - return m.Renewal +func (x *Statements) GetRenewal() []string { + if x != nil { + return x.Renewal } return nil } -func (m *Statements) GetRotation() []string { - if m != nil { - return m.Rotation +func (x *Statements) GetRotation() []string { + if x != nil { + return x.Rotation } return nil } type UsernameConfig struct { - DisplayName string `protobuf:"bytes,1,opt,name=DisplayName,proto3" json:"DisplayName,omitempty"` - RoleName string `protobuf:"bytes,2,opt,name=RoleName,proto3" json:"RoleName,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *UsernameConfig) Reset() { *m = UsernameConfig{} } -func (m *UsernameConfig) String() string { return proto.CompactTextString(m) } -func (*UsernameConfig) ProtoMessage() {} -func (*UsernameConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{7} + DisplayName string `protobuf:"bytes,1,opt,name=DisplayName,proto3" json:"DisplayName,omitempty"` + RoleName string `protobuf:"bytes,2,opt,name=RoleName,proto3" json:"RoleName,omitempty"` } -func (m *UsernameConfig) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UsernameConfig.Unmarshal(m, b) -} -func (m *UsernameConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UsernameConfig.Marshal(b, m, deterministic) -} -func (m *UsernameConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_UsernameConfig.Merge(m, src) +func (x *UsernameConfig) Reset() { + *x = UsernameConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *UsernameConfig) XXX_Size() int { - return xxx_messageInfo_UsernameConfig.Size(m) + +func (x *UsernameConfig) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UsernameConfig) XXX_DiscardUnknown() { - xxx_messageInfo_UsernameConfig.DiscardUnknown(m) + +func (*UsernameConfig) ProtoMessage() {} + +func (x *UsernameConfig) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_UsernameConfig proto.InternalMessageInfo +// Deprecated: Use UsernameConfig.ProtoReflect.Descriptor instead. +func (*UsernameConfig) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{7} +} -func (m *UsernameConfig) GetDisplayName() string { - if m != nil { - return m.DisplayName +func (x *UsernameConfig) GetDisplayName() string { + if x != nil { + return x.DisplayName } return "" } -func (m *UsernameConfig) GetRoleName() string { - if m != nil { - return m.RoleName +func (x *UsernameConfig) GetRoleName() string { + if x != nil { + return x.RoleName } return "" } type InitResponse struct { - Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *InitResponse) Reset() { *m = InitResponse{} } -func (m *InitResponse) String() string { return proto.CompactTextString(m) } -func (*InitResponse) ProtoMessage() {} -func (*InitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{8} + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` } -func (m *InitResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InitResponse.Unmarshal(m, b) -} -func (m *InitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InitResponse.Marshal(b, m, deterministic) -} -func (m *InitResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_InitResponse.Merge(m, src) +func (x *InitResponse) Reset() { + *x = InitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *InitResponse) XXX_Size() int { - return xxx_messageInfo_InitResponse.Size(m) + +func (x *InitResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InitResponse) XXX_DiscardUnknown() { - xxx_messageInfo_InitResponse.DiscardUnknown(m) + +func (*InitResponse) ProtoMessage() {} + +func (x *InitResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_InitResponse proto.InternalMessageInfo +// Deprecated: Use InitResponse.ProtoReflect.Descriptor instead. +func (*InitResponse) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{8} +} -func (m *InitResponse) GetConfig() []byte { - if m != nil { - return m.Config +func (x *InitResponse) GetConfig() []byte { + if x != nil { + return x.Config } return nil } type CreateUserResponse struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *CreateUserResponse) Reset() { *m = CreateUserResponse{} } -func (m *CreateUserResponse) String() string { return proto.CompactTextString(m) } -func (*CreateUserResponse) ProtoMessage() {} -func (*CreateUserResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{9} + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` } -func (m *CreateUserResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateUserResponse.Unmarshal(m, b) -} -func (m *CreateUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateUserResponse.Marshal(b, m, deterministic) -} -func (m *CreateUserResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateUserResponse.Merge(m, src) +func (x *CreateUserResponse) Reset() { + *x = CreateUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CreateUserResponse) XXX_Size() int { - return xxx_messageInfo_CreateUserResponse.Size(m) + +func (x *CreateUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CreateUserResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateUserResponse.DiscardUnknown(m) + +func (*CreateUserResponse) ProtoMessage() {} + +func (x *CreateUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_CreateUserResponse proto.InternalMessageInfo +// Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead. +func (*CreateUserResponse) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{9} +} -func (m *CreateUserResponse) GetUsername() string { - if m != nil { - return m.Username +func (x *CreateUserResponse) GetUsername() string { + if x != nil { + return x.Username } return "" } -func (m *CreateUserResponse) GetPassword() string { - if m != nil { - return m.Password +func (x *CreateUserResponse) GetPassword() string { + if x != nil { + return x.Password } return "" } type TypeResponse struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TypeResponse) Reset() { *m = TypeResponse{} } -func (m *TypeResponse) String() string { return proto.CompactTextString(m) } -func (*TypeResponse) ProtoMessage() {} -func (*TypeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{10} + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` } -func (m *TypeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TypeResponse.Unmarshal(m, b) -} -func (m *TypeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TypeResponse.Marshal(b, m, deterministic) -} -func (m *TypeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypeResponse.Merge(m, src) +func (x *TypeResponse) Reset() { + *x = TypeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TypeResponse) XXX_Size() int { - return xxx_messageInfo_TypeResponse.Size(m) + +func (x *TypeResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TypeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TypeResponse.DiscardUnknown(m) + +func (*TypeResponse) ProtoMessage() {} + +func (x *TypeResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TypeResponse proto.InternalMessageInfo +// Deprecated: Use TypeResponse.ProtoReflect.Descriptor instead. +func (*TypeResponse) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{10} +} -func (m *TypeResponse) GetType() string { - if m != nil { - return m.Type +func (x *TypeResponse) GetType() string { + if x != nil { + return x.Type } return "" } type RotateRootCredentialsResponse struct { - Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *RotateRootCredentialsResponse) Reset() { *m = RotateRootCredentialsResponse{} } -func (m *RotateRootCredentialsResponse) String() string { return proto.CompactTextString(m) } -func (*RotateRootCredentialsResponse) ProtoMessage() {} -func (*RotateRootCredentialsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{11} + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` } -func (m *RotateRootCredentialsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RotateRootCredentialsResponse.Unmarshal(m, b) -} -func (m *RotateRootCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RotateRootCredentialsResponse.Marshal(b, m, deterministic) -} -func (m *RotateRootCredentialsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RotateRootCredentialsResponse.Merge(m, src) +func (x *RotateRootCredentialsResponse) Reset() { + *x = RotateRootCredentialsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RotateRootCredentialsResponse) XXX_Size() int { - return xxx_messageInfo_RotateRootCredentialsResponse.Size(m) + +func (x *RotateRootCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RotateRootCredentialsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RotateRootCredentialsResponse.DiscardUnknown(m) + +func (*RotateRootCredentialsResponse) ProtoMessage() {} + +func (x *RotateRootCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RotateRootCredentialsResponse proto.InternalMessageInfo +// Deprecated: Use RotateRootCredentialsResponse.ProtoReflect.Descriptor instead. +func (*RotateRootCredentialsResponse) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{11} +} -func (m *RotateRootCredentialsResponse) GetConfig() []byte { - if m != nil { - return m.Config +func (x *RotateRootCredentialsResponse) GetConfig() []byte { + if x != nil { + return x.Config } return nil } type Empty struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{12} +func (x *Empty) Reset() { + *x = Empty{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Empty) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Empty.Unmarshal(m, b) -} -func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Empty.Marshal(b, m, deterministic) -} -func (m *Empty) XXX_Merge(src proto.Message) { - xxx_messageInfo_Empty.Merge(m, src) -} -func (m *Empty) XXX_Size() int { - return xxx_messageInfo_Empty.Size(m) -} -func (m *Empty) XXX_DiscardUnknown() { - xxx_messageInfo_Empty.DiscardUnknown(m) +func (x *Empty) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_Empty proto.InternalMessageInfo +func (*Empty) ProtoMessage() {} -type GenerateCredentialsResponse struct { - Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GenerateCredentialsResponse) Reset() { *m = GenerateCredentialsResponse{} } -func (m *GenerateCredentialsResponse) String() string { return proto.CompactTextString(m) } -func (*GenerateCredentialsResponse) ProtoMessage() {} -func (*GenerateCredentialsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{13} +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{12} } -func (m *GenerateCredentialsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GenerateCredentialsResponse.Unmarshal(m, b) -} -func (m *GenerateCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GenerateCredentialsResponse.Marshal(b, m, deterministic) +type GenerateCredentialsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` } -func (m *GenerateCredentialsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenerateCredentialsResponse.Merge(m, src) + +func (x *GenerateCredentialsResponse) Reset() { + *x = GenerateCredentialsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GenerateCredentialsResponse) XXX_Size() int { - return xxx_messageInfo_GenerateCredentialsResponse.Size(m) + +func (x *GenerateCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GenerateCredentialsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GenerateCredentialsResponse.DiscardUnknown(m) + +func (*GenerateCredentialsResponse) ProtoMessage() {} + +func (x *GenerateCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GenerateCredentialsResponse proto.InternalMessageInfo +// Deprecated: Use GenerateCredentialsResponse.ProtoReflect.Descriptor instead. +func (*GenerateCredentialsResponse) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{13} +} -func (m *GenerateCredentialsResponse) GetPassword() string { - if m != nil { - return m.Password +func (x *GenerateCredentialsResponse) GetPassword() string { + if x != nil { + return x.Password } return "" } type StaticUserConfig struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - Create bool `protobuf:"varint,3,opt,name=create,proto3" json:"create,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StaticUserConfig) Reset() { *m = StaticUserConfig{} } -func (m *StaticUserConfig) String() string { return proto.CompactTextString(m) } -func (*StaticUserConfig) ProtoMessage() {} -func (*StaticUserConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{14} + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + Create bool `protobuf:"varint,3,opt,name=create,proto3" json:"create,omitempty"` } -func (m *StaticUserConfig) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StaticUserConfig.Unmarshal(m, b) -} -func (m *StaticUserConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StaticUserConfig.Marshal(b, m, deterministic) -} -func (m *StaticUserConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_StaticUserConfig.Merge(m, src) +func (x *StaticUserConfig) Reset() { + *x = StaticUserConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StaticUserConfig) XXX_Size() int { - return xxx_messageInfo_StaticUserConfig.Size(m) + +func (x *StaticUserConfig) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StaticUserConfig) XXX_DiscardUnknown() { - xxx_messageInfo_StaticUserConfig.DiscardUnknown(m) + +func (*StaticUserConfig) ProtoMessage() {} + +func (x *StaticUserConfig) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StaticUserConfig proto.InternalMessageInfo +// Deprecated: Use StaticUserConfig.ProtoReflect.Descriptor instead. +func (*StaticUserConfig) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{14} +} -func (m *StaticUserConfig) GetUsername() string { - if m != nil { - return m.Username +func (x *StaticUserConfig) GetUsername() string { + if x != nil { + return x.Username } return "" } -func (m *StaticUserConfig) GetPassword() string { - if m != nil { - return m.Password +func (x *StaticUserConfig) GetPassword() string { + if x != nil { + return x.Password } return "" } -func (m *StaticUserConfig) GetCreate() bool { - if m != nil { - return m.Create +func (x *StaticUserConfig) GetCreate() bool { + if x != nil { + return x.Create } return false } type SetCredentialsRequest struct { - Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` - StaticUserConfig *StaticUserConfig `protobuf:"bytes,2,opt,name=static_user_config,json=staticUserConfig,proto3" json:"static_user_config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SetCredentialsRequest) Reset() { *m = SetCredentialsRequest{} } -func (m *SetCredentialsRequest) String() string { return proto.CompactTextString(m) } -func (*SetCredentialsRequest) ProtoMessage() {} -func (*SetCredentialsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{15} + Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` + StaticUserConfig *StaticUserConfig `protobuf:"bytes,2,opt,name=static_user_config,json=staticUserConfig,proto3" json:"static_user_config,omitempty"` } -func (m *SetCredentialsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetCredentialsRequest.Unmarshal(m, b) -} -func (m *SetCredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetCredentialsRequest.Marshal(b, m, deterministic) -} -func (m *SetCredentialsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetCredentialsRequest.Merge(m, src) +func (x *SetCredentialsRequest) Reset() { + *x = SetCredentialsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SetCredentialsRequest) XXX_Size() int { - return xxx_messageInfo_SetCredentialsRequest.Size(m) + +func (x *SetCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetCredentialsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SetCredentialsRequest.DiscardUnknown(m) + +func (*SetCredentialsRequest) ProtoMessage() {} + +func (x *SetCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SetCredentialsRequest proto.InternalMessageInfo +// Deprecated: Use SetCredentialsRequest.ProtoReflect.Descriptor instead. +func (*SetCredentialsRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{15} +} -func (m *SetCredentialsRequest) GetStatements() *Statements { - if m != nil { - return m.Statements +func (x *SetCredentialsRequest) GetStatements() *Statements { + if x != nil { + return x.Statements } return nil } -func (m *SetCredentialsRequest) GetStaticUserConfig() *StaticUserConfig { - if m != nil { - return m.StaticUserConfig +func (x *SetCredentialsRequest) GetStaticUserConfig() *StaticUserConfig { + if x != nil { + return x.StaticUserConfig } return nil } type SetCredentialsResponse struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SetCredentialsResponse) Reset() { *m = SetCredentialsResponse{} } -func (m *SetCredentialsResponse) String() string { return proto.CompactTextString(m) } -func (*SetCredentialsResponse) ProtoMessage() {} -func (*SetCredentialsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{16} + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` } -func (m *SetCredentialsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetCredentialsResponse.Unmarshal(m, b) -} -func (m *SetCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetCredentialsResponse.Marshal(b, m, deterministic) -} -func (m *SetCredentialsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetCredentialsResponse.Merge(m, src) +func (x *SetCredentialsResponse) Reset() { + *x = SetCredentialsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SetCredentialsResponse) XXX_Size() int { - return xxx_messageInfo_SetCredentialsResponse.Size(m) + +func (x *SetCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetCredentialsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SetCredentialsResponse.DiscardUnknown(m) + +func (*SetCredentialsResponse) ProtoMessage() {} + +func (x *SetCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SetCredentialsResponse proto.InternalMessageInfo +// Deprecated: Use SetCredentialsResponse.ProtoReflect.Descriptor instead. +func (*SetCredentialsResponse) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{16} +} -func (m *SetCredentialsResponse) GetUsername() string { - if m != nil { - return m.Username +func (x *SetCredentialsResponse) GetUsername() string { + if x != nil { + return x.Username } return "" } -func (m *SetCredentialsResponse) GetPassword() string { - if m != nil { - return m.Password +func (x *SetCredentialsResponse) GetPassword() string { + if x != nil { + return x.Password } return "" } -func init() { - proto.RegisterType((*InitializeRequest)(nil), "dbplugin.InitializeRequest") - proto.RegisterType((*InitRequest)(nil), "dbplugin.InitRequest") - proto.RegisterType((*CreateUserRequest)(nil), "dbplugin.CreateUserRequest") - proto.RegisterType((*RenewUserRequest)(nil), "dbplugin.RenewUserRequest") - proto.RegisterType((*RevokeUserRequest)(nil), "dbplugin.RevokeUserRequest") - proto.RegisterType((*RotateRootCredentialsRequest)(nil), "dbplugin.RotateRootCredentialsRequest") - proto.RegisterType((*Statements)(nil), "dbplugin.Statements") - proto.RegisterType((*UsernameConfig)(nil), "dbplugin.UsernameConfig") - proto.RegisterType((*InitResponse)(nil), "dbplugin.InitResponse") - proto.RegisterType((*CreateUserResponse)(nil), "dbplugin.CreateUserResponse") - proto.RegisterType((*TypeResponse)(nil), "dbplugin.TypeResponse") - proto.RegisterType((*RotateRootCredentialsResponse)(nil), "dbplugin.RotateRootCredentialsResponse") - proto.RegisterType((*Empty)(nil), "dbplugin.Empty") - proto.RegisterType((*GenerateCredentialsResponse)(nil), "dbplugin.GenerateCredentialsResponse") - proto.RegisterType((*StaticUserConfig)(nil), "dbplugin.StaticUserConfig") - proto.RegisterType((*SetCredentialsRequest)(nil), "dbplugin.SetCredentialsRequest") - proto.RegisterType((*SetCredentialsResponse)(nil), "dbplugin.SetCredentialsResponse") -} - -func init() { - proto.RegisterFile("sdk/database/dbplugin/database.proto", fileDescriptor_cfa445f4444c6876) -} - -var fileDescriptor_cfa445f4444c6876 = []byte{ - // 839 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x8e, 0xdb, 0x44, - 0x14, 0x96, 0xf3, 0xb3, 0x9b, 0x9c, 0x5d, 0xed, 0x26, 0xd3, 0x66, 0x65, 0xb9, 0x85, 0x46, 0x23, - 0x28, 0x8b, 0x10, 0x31, 0xda, 0x82, 0x0a, 0xbd, 0x00, 0xd1, 0x14, 0x15, 0x24, 0x58, 0xa1, 0x49, - 0x7b, 0x83, 0x90, 0xa2, 0x89, 0x33, 0x9b, 0x58, 0xeb, 0x78, 0x8c, 0x67, 0x92, 0x12, 0x9e, 0x80, - 0x37, 0xe0, 0x96, 0x7b, 0x5e, 0x84, 0x87, 0xe1, 0x21, 0x90, 0xc7, 0x1e, 0x7b, 0xfc, 0xb3, 0xad, - 0xd4, 0x85, 0x3b, 0x9f, 0x39, 0xe7, 0x3b, 0xf3, 0x9d, 0x5f, 0x0f, 0xbc, 0x27, 0x96, 0xd7, 0xee, - 0x92, 0x4a, 0xba, 0xa0, 0x82, 0xb9, 0xcb, 0x45, 0x14, 0x6c, 0x57, 0x7e, 0x98, 0x9f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0x73, 0x28, 0x0a, 0x00, 0x00, +var File_sdk_database_dbplugin_database_proto protoreflect.FileDescriptor + +var file_sdk_database_dbplugin_database_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x73, 0x64, 0x6b, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x64, + 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x5c, 0x0a, 0x11, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, + 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x02, 0x18, 0x01, 0x22, + 0x52, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xc8, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0x41, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x3a, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa0, + 0x01, 0x0a, 0x10, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x65, 0x0a, 0x11, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x62, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x1c, 0x52, 0x6f, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xec, 0x02, 0x0a, 0x0a, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x15, + 0x72, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x14, 0x72, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x10, 0x72, 0x65, + 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x76, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x72, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4e, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x52, + 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x52, + 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x26, 0x0a, 0x0c, 0x49, 0x6e, 0x69, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0x4c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x22, 0x0a, + 0x0c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x37, 0x0a, 0x1d, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x39, 0x0a, 0x1b, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x62, + 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x50, 0x0a, 0x16, + 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0xab, + 0x05, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0f, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x64, 0x62, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x55, 0x73, + 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, + 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, + 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, + 0x3a, 0x0a, 0x0a, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1b, 0x2e, + 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x64, 0x62, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x68, 0x0a, 0x15, 0x52, + 0x6f, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x12, 0x26, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, + 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, + 0x6f, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x15, 0x2e, + 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, + 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x0f, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x53, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x1f, 0x2e, 0x64, 0x62, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x62, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x13, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x12, 0x0f, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x25, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x49, + 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x62, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x03, 0x88, 0x02, 0x01, 0x42, 0x32, 0x5a, 0x30, + 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, 0x64, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sdk_database_dbplugin_database_proto_rawDescOnce sync.Once + file_sdk_database_dbplugin_database_proto_rawDescData = file_sdk_database_dbplugin_database_proto_rawDesc +) + +func file_sdk_database_dbplugin_database_proto_rawDescGZIP() []byte { + file_sdk_database_dbplugin_database_proto_rawDescOnce.Do(func() { + file_sdk_database_dbplugin_database_proto_rawDescData = protoimpl.X.CompressGZIP(file_sdk_database_dbplugin_database_proto_rawDescData) + }) + return file_sdk_database_dbplugin_database_proto_rawDescData +} + +var file_sdk_database_dbplugin_database_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_sdk_database_dbplugin_database_proto_goTypes = []interface{}{ + (*InitializeRequest)(nil), // 0: dbplugin.InitializeRequest + (*InitRequest)(nil), // 1: dbplugin.InitRequest + (*CreateUserRequest)(nil), // 2: dbplugin.CreateUserRequest + (*RenewUserRequest)(nil), // 3: dbplugin.RenewUserRequest + (*RevokeUserRequest)(nil), // 4: dbplugin.RevokeUserRequest + (*RotateRootCredentialsRequest)(nil), // 5: dbplugin.RotateRootCredentialsRequest + (*Statements)(nil), // 6: dbplugin.Statements + (*UsernameConfig)(nil), // 7: dbplugin.UsernameConfig + (*InitResponse)(nil), // 8: dbplugin.InitResponse + (*CreateUserResponse)(nil), // 9: dbplugin.CreateUserResponse + (*TypeResponse)(nil), // 10: dbplugin.TypeResponse + (*RotateRootCredentialsResponse)(nil), // 11: dbplugin.RotateRootCredentialsResponse + (*Empty)(nil), // 12: dbplugin.Empty + (*GenerateCredentialsResponse)(nil), // 13: dbplugin.GenerateCredentialsResponse + (*StaticUserConfig)(nil), // 14: dbplugin.StaticUserConfig + (*SetCredentialsRequest)(nil), // 15: dbplugin.SetCredentialsRequest + (*SetCredentialsResponse)(nil), // 16: dbplugin.SetCredentialsResponse + (*timestamp.Timestamp)(nil), // 17: google.protobuf.Timestamp +} +var file_sdk_database_dbplugin_database_proto_depIdxs = []int32{ + 6, // 0: dbplugin.CreateUserRequest.statements:type_name -> dbplugin.Statements + 7, // 1: dbplugin.CreateUserRequest.username_config:type_name -> dbplugin.UsernameConfig + 17, // 2: dbplugin.CreateUserRequest.expiration:type_name -> google.protobuf.Timestamp + 6, // 3: dbplugin.RenewUserRequest.statements:type_name -> dbplugin.Statements + 17, // 4: dbplugin.RenewUserRequest.expiration:type_name -> google.protobuf.Timestamp + 6, // 5: dbplugin.RevokeUserRequest.statements:type_name -> dbplugin.Statements + 6, // 6: dbplugin.SetCredentialsRequest.statements:type_name -> dbplugin.Statements + 14, // 7: dbplugin.SetCredentialsRequest.static_user_config:type_name -> dbplugin.StaticUserConfig + 12, // 8: dbplugin.Database.Type:input_type -> dbplugin.Empty + 2, // 9: dbplugin.Database.CreateUser:input_type -> dbplugin.CreateUserRequest + 3, // 10: dbplugin.Database.RenewUser:input_type -> dbplugin.RenewUserRequest + 4, // 11: dbplugin.Database.RevokeUser:input_type -> dbplugin.RevokeUserRequest + 5, // 12: dbplugin.Database.RotateRootCredentials:input_type -> dbplugin.RotateRootCredentialsRequest + 1, // 13: dbplugin.Database.Init:input_type -> dbplugin.InitRequest + 12, // 14: dbplugin.Database.Close:input_type -> dbplugin.Empty + 15, // 15: dbplugin.Database.SetCredentials:input_type -> dbplugin.SetCredentialsRequest + 12, // 16: dbplugin.Database.GenerateCredentials:input_type -> dbplugin.Empty + 0, // 17: dbplugin.Database.Initialize:input_type -> dbplugin.InitializeRequest + 10, // 18: dbplugin.Database.Type:output_type -> dbplugin.TypeResponse + 9, // 19: dbplugin.Database.CreateUser:output_type -> dbplugin.CreateUserResponse + 12, // 20: dbplugin.Database.RenewUser:output_type -> dbplugin.Empty + 12, // 21: dbplugin.Database.RevokeUser:output_type -> dbplugin.Empty + 11, // 22: dbplugin.Database.RotateRootCredentials:output_type -> dbplugin.RotateRootCredentialsResponse + 8, // 23: dbplugin.Database.Init:output_type -> dbplugin.InitResponse + 12, // 24: dbplugin.Database.Close:output_type -> dbplugin.Empty + 16, // 25: dbplugin.Database.SetCredentials:output_type -> dbplugin.SetCredentialsResponse + 13, // 26: dbplugin.Database.GenerateCredentials:output_type -> dbplugin.GenerateCredentialsResponse + 12, // 27: dbplugin.Database.Initialize:output_type -> dbplugin.Empty + 18, // [18:28] is the sub-list for method output_type + 8, // [8:18] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_sdk_database_dbplugin_database_proto_init() } +func file_sdk_database_dbplugin_database_proto_init() { + if File_sdk_database_dbplugin_database_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sdk_database_dbplugin_database_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitializeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenewUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RevokeUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RotateRootCredentialsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Statements); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UsernameConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RotateRootCredentialsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenerateCredentialsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StaticUserConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetCredentialsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetCredentialsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sdk_database_dbplugin_database_proto_rawDesc, + NumEnums: 0, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_sdk_database_dbplugin_database_proto_goTypes, + DependencyIndexes: file_sdk_database_dbplugin_database_proto_depIdxs, + MessageInfos: file_sdk_database_dbplugin_database_proto_msgTypes, + }.Build() + File_sdk_database_dbplugin_database_proto = out.File + file_sdk_database_dbplugin_database_proto_rawDesc = nil + file_sdk_database_dbplugin_database_proto_goTypes = nil + file_sdk_database_dbplugin_database_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // DatabaseClient is the client API for Database service. // @@ -959,14 +1494,15 @@ type DatabaseClient interface { Close(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) SetCredentials(ctx context.Context, in *SetCredentialsRequest, opts ...grpc.CallOption) (*SetCredentialsResponse, error) GenerateCredentials(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GenerateCredentialsResponse, error) + // Deprecated: Do not use. Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*Empty, error) } type databaseClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewDatabaseClient(cc *grpc.ClientConn) DatabaseClient { +func NewDatabaseClient(cc grpc.ClientConnInterface) DatabaseClient { return &databaseClient{cc} } @@ -1072,6 +1608,7 @@ type DatabaseServer interface { Close(context.Context, *Empty) (*Empty, error) SetCredentials(context.Context, *SetCredentialsRequest) (*SetCredentialsResponse, error) GenerateCredentials(context.Context, *Empty) (*GenerateCredentialsResponse, error) + // Deprecated: Do not use. Initialize(context.Context, *InitializeRequest) (*Empty, error) } @@ -1079,34 +1616,34 @@ type DatabaseServer interface { type UnimplementedDatabaseServer struct { } -func (*UnimplementedDatabaseServer) Type(ctx context.Context, req *Empty) (*TypeResponse, error) { +func (*UnimplementedDatabaseServer) Type(context.Context, *Empty) (*TypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Type not implemented") } -func (*UnimplementedDatabaseServer) CreateUser(ctx context.Context, req *CreateUserRequest) (*CreateUserResponse, error) { +func (*UnimplementedDatabaseServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented") } -func (*UnimplementedDatabaseServer) RenewUser(ctx context.Context, req *RenewUserRequest) (*Empty, error) { +func (*UnimplementedDatabaseServer) RenewUser(context.Context, *RenewUserRequest) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method RenewUser not implemented") } -func (*UnimplementedDatabaseServer) RevokeUser(ctx context.Context, req *RevokeUserRequest) (*Empty, error) { +func (*UnimplementedDatabaseServer) RevokeUser(context.Context, *RevokeUserRequest) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method RevokeUser not implemented") } -func (*UnimplementedDatabaseServer) RotateRootCredentials(ctx context.Context, req *RotateRootCredentialsRequest) (*RotateRootCredentialsResponse, error) { +func (*UnimplementedDatabaseServer) RotateRootCredentials(context.Context, *RotateRootCredentialsRequest) (*RotateRootCredentialsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RotateRootCredentials not implemented") } -func (*UnimplementedDatabaseServer) Init(ctx context.Context, req *InitRequest) (*InitResponse, error) { +func (*UnimplementedDatabaseServer) Init(context.Context, *InitRequest) (*InitResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Init not implemented") } -func (*UnimplementedDatabaseServer) Close(ctx context.Context, req *Empty) (*Empty, error) { +func (*UnimplementedDatabaseServer) Close(context.Context, *Empty) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Close not implemented") } -func (*UnimplementedDatabaseServer) SetCredentials(ctx context.Context, req *SetCredentialsRequest) (*SetCredentialsResponse, error) { +func (*UnimplementedDatabaseServer) SetCredentials(context.Context, *SetCredentialsRequest) (*SetCredentialsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetCredentials not implemented") } -func (*UnimplementedDatabaseServer) GenerateCredentials(ctx context.Context, req *Empty) (*GenerateCredentialsResponse, error) { +func (*UnimplementedDatabaseServer) GenerateCredentials(context.Context, *Empty) (*GenerateCredentialsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GenerateCredentials not implemented") } -func (*UnimplementedDatabaseServer) Initialize(ctx context.Context, req *InitializeRequest) (*Empty, error) { +func (*UnimplementedDatabaseServer) Initialize(context.Context, *InitializeRequest) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented") } diff --git a/sdk/plugin/pb/backend.pb.go b/sdk/plugin/pb/backend.pb.go index bd1b2c765b7d..50e815674855 100644 --- a/sdk/plugin/pb/backend.pb.go +++ b/sdk/plugin/pb/backend.pb.go @@ -1,102 +1,126 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.22.0 +// protoc v3.11.4 // source: sdk/plugin/pb/backend.proto package pb import ( context "context" - fmt "fmt" proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" logical "github.com/hashicorp/vault/sdk/logical" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 type Empty struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{0} +func (x *Empty) Reset() { + *x = Empty{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Empty) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Empty.Unmarshal(m, b) -} -func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Empty.Marshal(b, m, deterministic) -} -func (m *Empty) XXX_Merge(src proto.Message) { - xxx_messageInfo_Empty.Merge(m, src) -} -func (m *Empty) XXX_Size() int { - return xxx_messageInfo_Empty.Size(m) -} -func (m *Empty) XXX_DiscardUnknown() { - xxx_messageInfo_Empty.DiscardUnknown(m) +func (x *Empty) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_Empty proto.InternalMessageInfo +func (*Empty) ProtoMessage() {} -type Header struct { - Header []string `sentinel:"" protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *Header) Reset() { *m = Header{} } -func (m *Header) String() string { return proto.CompactTextString(m) } -func (*Header) ProtoMessage() {} -func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{1} +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{0} } -func (m *Header) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Header.Unmarshal(m, b) -} -func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Header.Marshal(b, m, deterministic) +type Header struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header []string `sentinel:"" protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty"` } -func (m *Header) XXX_Merge(src proto.Message) { - xxx_messageInfo_Header.Merge(m, src) + +func (x *Header) Reset() { + *x = Header{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Header) XXX_Size() int { - return xxx_messageInfo_Header.Size(m) + +func (x *Header) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Header) XXX_DiscardUnknown() { - xxx_messageInfo_Header.DiscardUnknown(m) + +func (*Header) ProtoMessage() {} + +func (x *Header) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Header proto.InternalMessageInfo +// Deprecated: Use Header.ProtoReflect.Descriptor instead. +func (*Header) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{1} +} -func (m *Header) GetHeader() []string { - if m != nil { - return m.Header +func (x *Header) GetHeader() []string { + if x != nil { + return x.Header } return nil } type ProtoError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Error type can be one of: // ErrTypeUnknown uint32 = iota // ErrTypeUserError @@ -108,62 +132,70 @@ type ProtoError struct { // ErrTypeInvalidRequest // ErrTypePermissionDenied // ErrTypeMultiAuthzPending - ErrType uint32 `sentinel:"" protobuf:"varint,1,opt,name=err_type,json=errType,proto3" json:"err_type,omitempty"` - ErrMsg string `sentinel:"" protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"` - ErrCode int64 `sentinel:"" protobuf:"varint,3,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrType uint32 `sentinel:"" protobuf:"varint,1,opt,name=err_type,json=errType,proto3" json:"err_type,omitempty"` + ErrMsg string `sentinel:"" protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"` + ErrCode int64 `sentinel:"" protobuf:"varint,3,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"` } -func (m *ProtoError) Reset() { *m = ProtoError{} } -func (m *ProtoError) String() string { return proto.CompactTextString(m) } -func (*ProtoError) ProtoMessage() {} -func (*ProtoError) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{2} +func (x *ProtoError) Reset() { + *x = ProtoError{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ProtoError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProtoError.Unmarshal(m, b) -} -func (m *ProtoError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProtoError.Marshal(b, m, deterministic) +func (x *ProtoError) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ProtoError) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProtoError.Merge(m, src) -} -func (m *ProtoError) XXX_Size() int { - return xxx_messageInfo_ProtoError.Size(m) -} -func (m *ProtoError) XXX_DiscardUnknown() { - xxx_messageInfo_ProtoError.DiscardUnknown(m) + +func (*ProtoError) ProtoMessage() {} + +func (x *ProtoError) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ProtoError proto.InternalMessageInfo +// Deprecated: Use ProtoError.ProtoReflect.Descriptor instead. +func (*ProtoError) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{2} +} -func (m *ProtoError) GetErrType() uint32 { - if m != nil { - return m.ErrType +func (x *ProtoError) GetErrType() uint32 { + if x != nil { + return x.ErrType } return 0 } -func (m *ProtoError) GetErrMsg() string { - if m != nil { - return m.ErrMsg +func (x *ProtoError) GetErrMsg() string { + if x != nil { + return x.ErrMsg } return "" } -func (m *ProtoError) GetErrCode() int64 { - if m != nil { - return m.ErrCode +func (x *ProtoError) GetErrCode() int64 { + if x != nil { + return x.ErrCode } return 0 } // Paths is the structure of special paths that is used for SpecialPaths. type Paths struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Root are the paths that require a root token to access Root []string `sentinel:"" protobuf:"bytes,1,rep,name=root,proto3" json:"root,omitempty"` // Unauthenticated are the paths that can be accessed without any auth. @@ -174,66 +206,74 @@ type Paths struct { // SealWrapStorage are storage paths that, when using a capable seal, // should be seal wrapped with extra encryption. It is exact matching // unless it ends with '/' in which case it will be treated as a prefix. - SealWrapStorage []string `sentinel:"" protobuf:"bytes,4,rep,name=seal_wrap_storage,json=sealWrapStorage,proto3" json:"seal_wrap_storage,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SealWrapStorage []string `sentinel:"" protobuf:"bytes,4,rep,name=seal_wrap_storage,json=sealWrapStorage,proto3" json:"seal_wrap_storage,omitempty"` } -func (m *Paths) Reset() { *m = Paths{} } -func (m *Paths) String() string { return proto.CompactTextString(m) } -func (*Paths) ProtoMessage() {} -func (*Paths) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{3} +func (x *Paths) Reset() { + *x = Paths{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Paths) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Paths.Unmarshal(m, b) -} -func (m *Paths) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Paths.Marshal(b, m, deterministic) -} -func (m *Paths) XXX_Merge(src proto.Message) { - xxx_messageInfo_Paths.Merge(m, src) +func (x *Paths) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Paths) XXX_Size() int { - return xxx_messageInfo_Paths.Size(m) -} -func (m *Paths) XXX_DiscardUnknown() { - xxx_messageInfo_Paths.DiscardUnknown(m) + +func (*Paths) ProtoMessage() {} + +func (x *Paths) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Paths proto.InternalMessageInfo +// Deprecated: Use Paths.ProtoReflect.Descriptor instead. +func (*Paths) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{3} +} -func (m *Paths) GetRoot() []string { - if m != nil { - return m.Root +func (x *Paths) GetRoot() []string { + if x != nil { + return x.Root } return nil } -func (m *Paths) GetUnauthenticated() []string { - if m != nil { - return m.Unauthenticated +func (x *Paths) GetUnauthenticated() []string { + if x != nil { + return x.Unauthenticated } return nil } -func (m *Paths) GetLocalStorage() []string { - if m != nil { - return m.LocalStorage +func (x *Paths) GetLocalStorage() []string { + if x != nil { + return x.LocalStorage } return nil } -func (m *Paths) GetSealWrapStorage() []string { - if m != nil { - return m.SealWrapStorage +func (x *Paths) GetSealWrapStorage() []string { + if x != nil { + return x.SealWrapStorage } return nil } type Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // ID is the uuid associated with each request ID string `sentinel:"" protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // If set, the name given to the replication secondary where this request @@ -299,178 +339,186 @@ type Request struct { // Connection will be non-nil only for credential providers to // inspect the connection information and potentially use it for // authentication/protection. - Connection *Connection `sentinel:"" protobuf:"bytes,20,opt,name=connection,proto3" json:"connection,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Connection *Connection `sentinel:"" protobuf:"bytes,20,opt,name=connection,proto3" json:"connection,omitempty"` } -func (m *Request) Reset() { *m = Request{} } -func (m *Request) String() string { return proto.CompactTextString(m) } -func (*Request) ProtoMessage() {} -func (*Request) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{4} +func (x *Request) Reset() { + *x = Request{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Request) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Request.Unmarshal(m, b) -} -func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Request.Marshal(b, m, deterministic) -} -func (m *Request) XXX_Merge(src proto.Message) { - xxx_messageInfo_Request.Merge(m, src) -} -func (m *Request) XXX_Size() int { - return xxx_messageInfo_Request.Size(m) +func (x *Request) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Request) XXX_DiscardUnknown() { - xxx_messageInfo_Request.DiscardUnknown(m) + +func (*Request) ProtoMessage() {} + +func (x *Request) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Request proto.InternalMessageInfo +// Deprecated: Use Request.ProtoReflect.Descriptor instead. +func (*Request) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{4} +} -func (m *Request) GetID() string { - if m != nil { - return m.ID +func (x *Request) GetID() string { + if x != nil { + return x.ID } return "" } -func (m *Request) GetReplicationCluster() string { - if m != nil { - return m.ReplicationCluster +func (x *Request) GetReplicationCluster() string { + if x != nil { + return x.ReplicationCluster } return "" } -func (m *Request) GetOperation() string { - if m != nil { - return m.Operation +func (x *Request) GetOperation() string { + if x != nil { + return x.Operation } return "" } -func (m *Request) GetPath() string { - if m != nil { - return m.Path +func (x *Request) GetPath() string { + if x != nil { + return x.Path } return "" } -func (m *Request) GetData() string { - if m != nil { - return m.Data +func (x *Request) GetData() string { + if x != nil { + return x.Data } return "" } -func (m *Request) GetSecret() *Secret { - if m != nil { - return m.Secret +func (x *Request) GetSecret() *Secret { + if x != nil { + return x.Secret } return nil } -func (m *Request) GetAuth() *Auth { - if m != nil { - return m.Auth +func (x *Request) GetAuth() *Auth { + if x != nil { + return x.Auth } return nil } -func (m *Request) GetHeaders() map[string]*Header { - if m != nil { - return m.Headers +func (x *Request) GetHeaders() map[string]*Header { + if x != nil { + return x.Headers } return nil } -func (m *Request) GetClientToken() string { - if m != nil { - return m.ClientToken +func (x *Request) GetClientToken() string { + if x != nil { + return x.ClientToken } return "" } -func (m *Request) GetClientTokenAccessor() string { - if m != nil { - return m.ClientTokenAccessor +func (x *Request) GetClientTokenAccessor() string { + if x != nil { + return x.ClientTokenAccessor } return "" } -func (m *Request) GetDisplayName() string { - if m != nil { - return m.DisplayName +func (x *Request) GetDisplayName() string { + if x != nil { + return x.DisplayName } return "" } -func (m *Request) GetMountPoint() string { - if m != nil { - return m.MountPoint +func (x *Request) GetMountPoint() string { + if x != nil { + return x.MountPoint } return "" } -func (m *Request) GetMountType() string { - if m != nil { - return m.MountType +func (x *Request) GetMountType() string { + if x != nil { + return x.MountType } return "" } -func (m *Request) GetMountAccessor() string { - if m != nil { - return m.MountAccessor +func (x *Request) GetMountAccessor() string { + if x != nil { + return x.MountAccessor } return "" } -func (m *Request) GetWrapInfo() *RequestWrapInfo { - if m != nil { - return m.WrapInfo +func (x *Request) GetWrapInfo() *RequestWrapInfo { + if x != nil { + return x.WrapInfo } return nil } -func (m *Request) GetClientTokenRemainingUses() int64 { - if m != nil { - return m.ClientTokenRemainingUses +func (x *Request) GetClientTokenRemainingUses() int64 { + if x != nil { + return x.ClientTokenRemainingUses } return 0 } -func (m *Request) GetEntityID() string { - if m != nil { - return m.EntityID +func (x *Request) GetEntityID() string { + if x != nil { + return x.EntityID } return "" } -func (m *Request) GetPolicyOverride() bool { - if m != nil { - return m.PolicyOverride +func (x *Request) GetPolicyOverride() bool { + if x != nil { + return x.PolicyOverride } return false } -func (m *Request) GetUnauthenticated() bool { - if m != nil { - return m.Unauthenticated +func (x *Request) GetUnauthenticated() bool { + if x != nil { + return x.Unauthenticated } return false } -func (m *Request) GetConnection() *Connection { - if m != nil { - return m.Connection +func (x *Request) GetConnection() *Connection { + if x != nil { + return x.Connection } return nil } type Auth struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + LeaseOptions *LeaseOptions `sentinel:"" protobuf:"bytes,1,opt,name=lease_options,json=leaseOptions,proto3" json:"lease_options,omitempty"` // InternalData is a JSON object that is stored with the auth struct. // This will be sent back during a Renew/Revoke for storing internal data @@ -530,410 +578,434 @@ type Auth struct { // TokenType is the type of token being requested TokenType uint32 `sentinel:"" protobuf:"varint,17,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` // Whether the default policy should be added automatically by core - NoDefaultPolicy bool `sentinel:"" protobuf:"varint,18,opt,name=no_default_policy,json=noDefaultPolicy,proto3" json:"no_default_policy,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NoDefaultPolicy bool `sentinel:"" protobuf:"varint,18,opt,name=no_default_policy,json=noDefaultPolicy,proto3" json:"no_default_policy,omitempty"` } -func (m *Auth) Reset() { *m = Auth{} } -func (m *Auth) String() string { return proto.CompactTextString(m) } -func (*Auth) ProtoMessage() {} -func (*Auth) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{5} +func (x *Auth) Reset() { + *x = Auth{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Auth) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Auth.Unmarshal(m, b) +func (x *Auth) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Auth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Auth.Marshal(b, m, deterministic) -} -func (m *Auth) XXX_Merge(src proto.Message) { - xxx_messageInfo_Auth.Merge(m, src) -} -func (m *Auth) XXX_Size() int { - return xxx_messageInfo_Auth.Size(m) -} -func (m *Auth) XXX_DiscardUnknown() { - xxx_messageInfo_Auth.DiscardUnknown(m) + +func (*Auth) ProtoMessage() {} + +func (x *Auth) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Auth proto.InternalMessageInfo +// Deprecated: Use Auth.ProtoReflect.Descriptor instead. +func (*Auth) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{5} +} -func (m *Auth) GetLeaseOptions() *LeaseOptions { - if m != nil { - return m.LeaseOptions +func (x *Auth) GetLeaseOptions() *LeaseOptions { + if x != nil { + return x.LeaseOptions } return nil } -func (m *Auth) GetInternalData() string { - if m != nil { - return m.InternalData +func (x *Auth) GetInternalData() string { + if x != nil { + return x.InternalData } return "" } -func (m *Auth) GetDisplayName() string { - if m != nil { - return m.DisplayName +func (x *Auth) GetDisplayName() string { + if x != nil { + return x.DisplayName } return "" } -func (m *Auth) GetPolicies() []string { - if m != nil { - return m.Policies +func (x *Auth) GetPolicies() []string { + if x != nil { + return x.Policies } return nil } -func (m *Auth) GetMetadata() map[string]string { - if m != nil { - return m.Metadata +func (x *Auth) GetMetadata() map[string]string { + if x != nil { + return x.Metadata } return nil } -func (m *Auth) GetClientToken() string { - if m != nil { - return m.ClientToken +func (x *Auth) GetClientToken() string { + if x != nil { + return x.ClientToken } return "" } -func (m *Auth) GetAccessor() string { - if m != nil { - return m.Accessor +func (x *Auth) GetAccessor() string { + if x != nil { + return x.Accessor } return "" } -func (m *Auth) GetPeriod() int64 { - if m != nil { - return m.Period +func (x *Auth) GetPeriod() int64 { + if x != nil { + return x.Period } return 0 } -func (m *Auth) GetNumUses() int64 { - if m != nil { - return m.NumUses +func (x *Auth) GetNumUses() int64 { + if x != nil { + return x.NumUses } return 0 } -func (m *Auth) GetEntityID() string { - if m != nil { - return m.EntityID +func (x *Auth) GetEntityID() string { + if x != nil { + return x.EntityID } return "" } -func (m *Auth) GetAlias() *logical.Alias { - if m != nil { - return m.Alias +func (x *Auth) GetAlias() *logical.Alias { + if x != nil { + return x.Alias } return nil } -func (m *Auth) GetGroupAliases() []*logical.Alias { - if m != nil { - return m.GroupAliases +func (x *Auth) GetGroupAliases() []*logical.Alias { + if x != nil { + return x.GroupAliases } return nil } -func (m *Auth) GetBoundCIDRs() []string { - if m != nil { - return m.BoundCIDRs +func (x *Auth) GetBoundCIDRs() []string { + if x != nil { + return x.BoundCIDRs } return nil } -func (m *Auth) GetTokenPolicies() []string { - if m != nil { - return m.TokenPolicies +func (x *Auth) GetTokenPolicies() []string { + if x != nil { + return x.TokenPolicies } return nil } -func (m *Auth) GetIdentityPolicies() []string { - if m != nil { - return m.IdentityPolicies +func (x *Auth) GetIdentityPolicies() []string { + if x != nil { + return x.IdentityPolicies } return nil } -func (m *Auth) GetExplicitMaxTTL() int64 { - if m != nil { - return m.ExplicitMaxTTL +func (x *Auth) GetExplicitMaxTTL() int64 { + if x != nil { + return x.ExplicitMaxTTL } return 0 } -func (m *Auth) GetTokenType() uint32 { - if m != nil { - return m.TokenType +func (x *Auth) GetTokenType() uint32 { + if x != nil { + return x.TokenType } return 0 } -func (m *Auth) GetNoDefaultPolicy() bool { - if m != nil { - return m.NoDefaultPolicy +func (x *Auth) GetNoDefaultPolicy() bool { + if x != nil { + return x.NoDefaultPolicy } return false } type TokenEntry struct { - ID string `sentinel:"" protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Accessor string `sentinel:"" protobuf:"bytes,2,opt,name=accessor,proto3" json:"accessor,omitempty"` - Parent string `sentinel:"" protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"` - Policies []string `sentinel:"" protobuf:"bytes,4,rep,name=policies,proto3" json:"policies,omitempty"` - Path string `sentinel:"" protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` - Meta map[string]string `sentinel:"" protobuf:"bytes,6,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - DisplayName string `sentinel:"" protobuf:"bytes,7,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - NumUses int64 `sentinel:"" protobuf:"varint,8,opt,name=num_uses,json=numUses,proto3" json:"num_uses,omitempty"` - CreationTime int64 `sentinel:"" protobuf:"varint,9,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` - TTL int64 `sentinel:"" protobuf:"varint,10,opt,name=ttl,proto3" json:"ttl,omitempty"` - ExplicitMaxTTL int64 `sentinel:"" protobuf:"varint,11,opt,name=explicit_max_ttl,json=explicitMaxTtl,proto3" json:"explicit_max_ttl,omitempty"` - Role string `sentinel:"" protobuf:"bytes,12,opt,name=role,proto3" json:"role,omitempty"` - Period int64 `sentinel:"" protobuf:"varint,13,opt,name=period,proto3" json:"period,omitempty"` - EntityID string `sentinel:"" protobuf:"bytes,14,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` - BoundCIDRs []string `sentinel:"" protobuf:"bytes,15,rep,name=bound_cidrs,json=boundCidrs,proto3" json:"bound_cidrs,omitempty"` - NamespaceID string `sentinel:"" protobuf:"bytes,16,opt,name=namespace_id,json=namespaceID,proto3" json:"namespace_id,omitempty"` - CubbyholeID string `sentinel:"" protobuf:"bytes,17,opt,name=cubbyhole_id,json=cubbyholeId,proto3" json:"cubbyhole_id,omitempty"` - Type uint32 `sentinel:"" protobuf:"varint,18,opt,name=type,proto3" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TokenEntry) Reset() { *m = TokenEntry{} } -func (m *TokenEntry) String() string { return proto.CompactTextString(m) } -func (*TokenEntry) ProtoMessage() {} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ID string `sentinel:"" protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Accessor string `sentinel:"" protobuf:"bytes,2,opt,name=accessor,proto3" json:"accessor,omitempty"` + Parent string `sentinel:"" protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"` + Policies []string `sentinel:"" protobuf:"bytes,4,rep,name=policies,proto3" json:"policies,omitempty"` + Path string `sentinel:"" protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` + Meta map[string]string `sentinel:"" protobuf:"bytes,6,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + DisplayName string `sentinel:"" protobuf:"bytes,7,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + NumUses int64 `sentinel:"" protobuf:"varint,8,opt,name=num_uses,json=numUses,proto3" json:"num_uses,omitempty"` + CreationTime int64 `sentinel:"" protobuf:"varint,9,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` + TTL int64 `sentinel:"" protobuf:"varint,10,opt,name=ttl,proto3" json:"ttl,omitempty"` + ExplicitMaxTTL int64 `sentinel:"" protobuf:"varint,11,opt,name=explicit_max_ttl,json=explicitMaxTtl,proto3" json:"explicit_max_ttl,omitempty"` + Role string `sentinel:"" protobuf:"bytes,12,opt,name=role,proto3" json:"role,omitempty"` + Period int64 `sentinel:"" protobuf:"varint,13,opt,name=period,proto3" json:"period,omitempty"` + EntityID string `sentinel:"" protobuf:"bytes,14,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` + BoundCIDRs []string `sentinel:"" protobuf:"bytes,15,rep,name=bound_cidrs,json=boundCidrs,proto3" json:"bound_cidrs,omitempty"` + NamespaceID string `sentinel:"" protobuf:"bytes,16,opt,name=namespace_id,json=namespaceID,proto3" json:"namespace_id,omitempty"` + CubbyholeID string `sentinel:"" protobuf:"bytes,17,opt,name=cubbyhole_id,json=cubbyholeId,proto3" json:"cubbyhole_id,omitempty"` + Type uint32 `sentinel:"" protobuf:"varint,18,opt,name=type,proto3" json:"type,omitempty"` +} + +func (x *TokenEntry) Reset() { + *x = TokenEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenEntry) ProtoMessage() {} + +func (x *TokenEntry) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenEntry.ProtoReflect.Descriptor instead. func (*TokenEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{6} -} - -func (m *TokenEntry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TokenEntry.Unmarshal(m, b) -} -func (m *TokenEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TokenEntry.Marshal(b, m, deterministic) -} -func (m *TokenEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenEntry.Merge(m, src) -} -func (m *TokenEntry) XXX_Size() int { - return xxx_messageInfo_TokenEntry.Size(m) -} -func (m *TokenEntry) XXX_DiscardUnknown() { - xxx_messageInfo_TokenEntry.DiscardUnknown(m) + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{6} } -var xxx_messageInfo_TokenEntry proto.InternalMessageInfo - -func (m *TokenEntry) GetID() string { - if m != nil { - return m.ID +func (x *TokenEntry) GetID() string { + if x != nil { + return x.ID } return "" } -func (m *TokenEntry) GetAccessor() string { - if m != nil { - return m.Accessor +func (x *TokenEntry) GetAccessor() string { + if x != nil { + return x.Accessor } return "" } -func (m *TokenEntry) GetParent() string { - if m != nil { - return m.Parent +func (x *TokenEntry) GetParent() string { + if x != nil { + return x.Parent } return "" } -func (m *TokenEntry) GetPolicies() []string { - if m != nil { - return m.Policies +func (x *TokenEntry) GetPolicies() []string { + if x != nil { + return x.Policies } return nil } -func (m *TokenEntry) GetPath() string { - if m != nil { - return m.Path +func (x *TokenEntry) GetPath() string { + if x != nil { + return x.Path } return "" } -func (m *TokenEntry) GetMeta() map[string]string { - if m != nil { - return m.Meta +func (x *TokenEntry) GetMeta() map[string]string { + if x != nil { + return x.Meta } return nil } -func (m *TokenEntry) GetDisplayName() string { - if m != nil { - return m.DisplayName +func (x *TokenEntry) GetDisplayName() string { + if x != nil { + return x.DisplayName } return "" } -func (m *TokenEntry) GetNumUses() int64 { - if m != nil { - return m.NumUses +func (x *TokenEntry) GetNumUses() int64 { + if x != nil { + return x.NumUses } return 0 } -func (m *TokenEntry) GetCreationTime() int64 { - if m != nil { - return m.CreationTime +func (x *TokenEntry) GetCreationTime() int64 { + if x != nil { + return x.CreationTime } return 0 } -func (m *TokenEntry) GetTTL() int64 { - if m != nil { - return m.TTL +func (x *TokenEntry) GetTTL() int64 { + if x != nil { + return x.TTL } return 0 } -func (m *TokenEntry) GetExplicitMaxTTL() int64 { - if m != nil { - return m.ExplicitMaxTTL +func (x *TokenEntry) GetExplicitMaxTTL() int64 { + if x != nil { + return x.ExplicitMaxTTL } return 0 } -func (m *TokenEntry) GetRole() string { - if m != nil { - return m.Role +func (x *TokenEntry) GetRole() string { + if x != nil { + return x.Role } return "" } -func (m *TokenEntry) GetPeriod() int64 { - if m != nil { - return m.Period +func (x *TokenEntry) GetPeriod() int64 { + if x != nil { + return x.Period } return 0 } -func (m *TokenEntry) GetEntityID() string { - if m != nil { - return m.EntityID +func (x *TokenEntry) GetEntityID() string { + if x != nil { + return x.EntityID } return "" } -func (m *TokenEntry) GetBoundCIDRs() []string { - if m != nil { - return m.BoundCIDRs +func (x *TokenEntry) GetBoundCIDRs() []string { + if x != nil { + return x.BoundCIDRs } return nil } -func (m *TokenEntry) GetNamespaceID() string { - if m != nil { - return m.NamespaceID +func (x *TokenEntry) GetNamespaceID() string { + if x != nil { + return x.NamespaceID } return "" } -func (m *TokenEntry) GetCubbyholeID() string { - if m != nil { - return m.CubbyholeID +func (x *TokenEntry) GetCubbyholeID() string { + if x != nil { + return x.CubbyholeID } return "" } -func (m *TokenEntry) GetType() uint32 { - if m != nil { - return m.Type +func (x *TokenEntry) GetType() uint32 { + if x != nil { + return x.Type } return 0 } type LeaseOptions struct { - TTL int64 `sentinel:"" protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` - Renewable bool `sentinel:"" protobuf:"varint,2,opt,name=renewable,proto3" json:"renewable,omitempty"` - Increment int64 `sentinel:"" protobuf:"varint,3,opt,name=increment,proto3" json:"increment,omitempty"` - IssueTime *timestamp.Timestamp `sentinel:"" protobuf:"bytes,4,opt,name=issue_time,json=issueTime,proto3" json:"issue_time,omitempty"` - MaxTTL int64 `sentinel:"" protobuf:"varint,5,opt,name=MaxTTL,proto3" json:"MaxTTL,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseOptions) Reset() { *m = LeaseOptions{} } -func (m *LeaseOptions) String() string { return proto.CompactTextString(m) } -func (*LeaseOptions) ProtoMessage() {} -func (*LeaseOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{7} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *LeaseOptions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LeaseOptions.Unmarshal(m, b) -} -func (m *LeaseOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LeaseOptions.Marshal(b, m, deterministic) + TTL int64 `sentinel:"" protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` + Renewable bool `sentinel:"" protobuf:"varint,2,opt,name=renewable,proto3" json:"renewable,omitempty"` + Increment int64 `sentinel:"" protobuf:"varint,3,opt,name=increment,proto3" json:"increment,omitempty"` + IssueTime *timestamp.Timestamp `sentinel:"" protobuf:"bytes,4,opt,name=issue_time,json=issueTime,proto3" json:"issue_time,omitempty"` + MaxTTL int64 `sentinel:"" protobuf:"varint,5,opt,name=MaxTTL,proto3" json:"MaxTTL,omitempty"` } -func (m *LeaseOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseOptions.Merge(m, src) + +func (x *LeaseOptions) Reset() { + *x = LeaseOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *LeaseOptions) XXX_Size() int { - return xxx_messageInfo_LeaseOptions.Size(m) + +func (x *LeaseOptions) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LeaseOptions) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseOptions.DiscardUnknown(m) + +func (*LeaseOptions) ProtoMessage() {} + +func (x *LeaseOptions) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_LeaseOptions proto.InternalMessageInfo +// Deprecated: Use LeaseOptions.ProtoReflect.Descriptor instead. +func (*LeaseOptions) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{7} +} -func (m *LeaseOptions) GetTTL() int64 { - if m != nil { - return m.TTL +func (x *LeaseOptions) GetTTL() int64 { + if x != nil { + return x.TTL } return 0 } -func (m *LeaseOptions) GetRenewable() bool { - if m != nil { - return m.Renewable +func (x *LeaseOptions) GetRenewable() bool { + if x != nil { + return x.Renewable } return false } -func (m *LeaseOptions) GetIncrement() int64 { - if m != nil { - return m.Increment +func (x *LeaseOptions) GetIncrement() int64 { + if x != nil { + return x.Increment } return 0 } -func (m *LeaseOptions) GetIssueTime() *timestamp.Timestamp { - if m != nil { - return m.IssueTime +func (x *LeaseOptions) GetIssueTime() *timestamp.Timestamp { + if x != nil { + return x.IssueTime } return nil } -func (m *LeaseOptions) GetMaxTTL() int64 { - if m != nil { - return m.MaxTTL +func (x *LeaseOptions) GetMaxTTL() int64 { + if x != nil { + return x.MaxTTL } return 0 } type Secret struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + LeaseOptions *LeaseOptions `sentinel:"" protobuf:"bytes,1,opt,name=lease_options,json=leaseOptions,proto3" json:"lease_options,omitempty"` // InternalData is a JSON object that is stored with the secret. // This will be sent back during a Renew/Revoke for storing internal data @@ -942,59 +1014,67 @@ type Secret struct { // LeaseID is the ID returned to the user to manage this secret. // This is generated by Vault core. Any set value will be ignored. // For requests, this will always be blank. - LeaseID string `sentinel:"" protobuf:"bytes,3,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + LeaseID string `sentinel:"" protobuf:"bytes,3,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"` } -func (m *Secret) Reset() { *m = Secret{} } -func (m *Secret) String() string { return proto.CompactTextString(m) } -func (*Secret) ProtoMessage() {} -func (*Secret) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{8} +func (x *Secret) Reset() { + *x = Secret{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Secret) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Secret.Unmarshal(m, b) -} -func (m *Secret) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Secret.Marshal(b, m, deterministic) -} -func (m *Secret) XXX_Merge(src proto.Message) { - xxx_messageInfo_Secret.Merge(m, src) -} -func (m *Secret) XXX_Size() int { - return xxx_messageInfo_Secret.Size(m) +func (x *Secret) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Secret) XXX_DiscardUnknown() { - xxx_messageInfo_Secret.DiscardUnknown(m) + +func (*Secret) ProtoMessage() {} + +func (x *Secret) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Secret proto.InternalMessageInfo +// Deprecated: Use Secret.ProtoReflect.Descriptor instead. +func (*Secret) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{8} +} -func (m *Secret) GetLeaseOptions() *LeaseOptions { - if m != nil { - return m.LeaseOptions +func (x *Secret) GetLeaseOptions() *LeaseOptions { + if x != nil { + return x.LeaseOptions } return nil } -func (m *Secret) GetInternalData() string { - if m != nil { - return m.InternalData +func (x *Secret) GetInternalData() string { + if x != nil { + return x.InternalData } return "" } -func (m *Secret) GetLeaseID() string { - if m != nil { - return m.LeaseID +func (x *Secret) GetLeaseID() string { + if x != nil { + return x.LeaseID } return "" } type Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Secret, if not nil, denotes that this response represents a secret. Secret *Secret `sentinel:"" protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` // Auth, if not nil, contains the authentication information for @@ -1018,87 +1098,95 @@ type Response struct { // Headers will contain the http headers from the response. This value will // be used in the audit broker to ensure we are auditing only the allowed // headers. - Headers map[string]*Header `sentinel:"" protobuf:"bytes,7,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Headers map[string]*Header `sentinel:"" protobuf:"bytes,7,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *Response) Reset() { *m = Response{} } -func (m *Response) String() string { return proto.CompactTextString(m) } -func (*Response) ProtoMessage() {} -func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{9} +func (x *Response) Reset() { + *x = Response{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Response) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Response.Unmarshal(m, b) +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Response.Marshal(b, m, deterministic) -} -func (m *Response) XXX_Merge(src proto.Message) { - xxx_messageInfo_Response.Merge(m, src) -} -func (m *Response) XXX_Size() int { - return xxx_messageInfo_Response.Size(m) -} -func (m *Response) XXX_DiscardUnknown() { - xxx_messageInfo_Response.DiscardUnknown(m) + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Response proto.InternalMessageInfo +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{9} +} -func (m *Response) GetSecret() *Secret { - if m != nil { - return m.Secret +func (x *Response) GetSecret() *Secret { + if x != nil { + return x.Secret } return nil } -func (m *Response) GetAuth() *Auth { - if m != nil { - return m.Auth +func (x *Response) GetAuth() *Auth { + if x != nil { + return x.Auth } return nil } -func (m *Response) GetData() string { - if m != nil { - return m.Data +func (x *Response) GetData() string { + if x != nil { + return x.Data } return "" } -func (m *Response) GetRedirect() string { - if m != nil { - return m.Redirect +func (x *Response) GetRedirect() string { + if x != nil { + return x.Redirect } return "" } -func (m *Response) GetWarnings() []string { - if m != nil { - return m.Warnings +func (x *Response) GetWarnings() []string { + if x != nil { + return x.Warnings } return nil } -func (m *Response) GetWrapInfo() *ResponseWrapInfo { - if m != nil { - return m.WrapInfo +func (x *Response) GetWrapInfo() *ResponseWrapInfo { + if x != nil { + return x.WrapInfo } return nil } -func (m *Response) GetHeaders() map[string]*Header { - if m != nil { - return m.Headers +func (x *Response) GetHeaders() map[string]*Header { + if x != nil { + return x.Headers } return nil } type ResponseWrapInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Setting to non-zero specifies that the response should be wrapped. // Specifies the desired TTL of the wrapping token. TTL int64 `sentinel:"" protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` @@ -1121,101 +1209,109 @@ type ResponseWrapInfo struct { // the wrapped response. CreationPath string `sentinel:"" protobuf:"bytes,8,opt,name=creation_path,json=creationPath,proto3" json:"creation_path,omitempty"` // Controls seal wrapping behavior downstream for specific use cases - SealWrap bool `sentinel:"" protobuf:"varint,9,opt,name=seal_wrap,json=sealWrap,proto3" json:"seal_wrap,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SealWrap bool `sentinel:"" protobuf:"varint,9,opt,name=seal_wrap,json=sealWrap,proto3" json:"seal_wrap,omitempty"` } -func (m *ResponseWrapInfo) Reset() { *m = ResponseWrapInfo{} } -func (m *ResponseWrapInfo) String() string { return proto.CompactTextString(m) } -func (*ResponseWrapInfo) ProtoMessage() {} -func (*ResponseWrapInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{10} +func (x *ResponseWrapInfo) Reset() { + *x = ResponseWrapInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ResponseWrapInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResponseWrapInfo.Unmarshal(m, b) -} -func (m *ResponseWrapInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResponseWrapInfo.Marshal(b, m, deterministic) +func (x *ResponseWrapInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ResponseWrapInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseWrapInfo.Merge(m, src) -} -func (m *ResponseWrapInfo) XXX_Size() int { - return xxx_messageInfo_ResponseWrapInfo.Size(m) -} -func (m *ResponseWrapInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseWrapInfo.DiscardUnknown(m) + +func (*ResponseWrapInfo) ProtoMessage() {} + +func (x *ResponseWrapInfo) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ResponseWrapInfo proto.InternalMessageInfo +// Deprecated: Use ResponseWrapInfo.ProtoReflect.Descriptor instead. +func (*ResponseWrapInfo) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{10} +} -func (m *ResponseWrapInfo) GetTTL() int64 { - if m != nil { - return m.TTL +func (x *ResponseWrapInfo) GetTTL() int64 { + if x != nil { + return x.TTL } return 0 } -func (m *ResponseWrapInfo) GetToken() string { - if m != nil { - return m.Token +func (x *ResponseWrapInfo) GetToken() string { + if x != nil { + return x.Token } return "" } -func (m *ResponseWrapInfo) GetAccessor() string { - if m != nil { - return m.Accessor +func (x *ResponseWrapInfo) GetAccessor() string { + if x != nil { + return x.Accessor } return "" } -func (m *ResponseWrapInfo) GetCreationTime() *timestamp.Timestamp { - if m != nil { - return m.CreationTime +func (x *ResponseWrapInfo) GetCreationTime() *timestamp.Timestamp { + if x != nil { + return x.CreationTime } return nil } -func (m *ResponseWrapInfo) GetWrappedAccessor() string { - if m != nil { - return m.WrappedAccessor +func (x *ResponseWrapInfo) GetWrappedAccessor() string { + if x != nil { + return x.WrappedAccessor } return "" } -func (m *ResponseWrapInfo) GetWrappedEntityID() string { - if m != nil { - return m.WrappedEntityID +func (x *ResponseWrapInfo) GetWrappedEntityID() string { + if x != nil { + return x.WrappedEntityID } return "" } -func (m *ResponseWrapInfo) GetFormat() string { - if m != nil { - return m.Format +func (x *ResponseWrapInfo) GetFormat() string { + if x != nil { + return x.Format } return "" } -func (m *ResponseWrapInfo) GetCreationPath() string { - if m != nil { - return m.CreationPath +func (x *ResponseWrapInfo) GetCreationPath() string { + if x != nil { + return x.CreationPath } return "" } -func (m *ResponseWrapInfo) GetSealWrap() bool { - if m != nil { - return m.SealWrap +func (x *ResponseWrapInfo) GetSealWrap() bool { + if x != nil { + return x.SealWrap } return false } type RequestWrapInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Setting to non-zero specifies that the response should be wrapped. // Specifies the desired TTL of the wrapping token. TTL int64 `sentinel:"" protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` @@ -1224,1794 +1320,3062 @@ type RequestWrapInfo struct { Format string `sentinel:"" protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"` // A flag to conforming backends that data for a given request should be // seal wrapped - SealWrap bool `sentinel:"" protobuf:"varint,3,opt,name=seal_wrap,json=sealWrap,proto3" json:"seal_wrap,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SealWrap bool `sentinel:"" protobuf:"varint,3,opt,name=seal_wrap,json=sealWrap,proto3" json:"seal_wrap,omitempty"` } -func (m *RequestWrapInfo) Reset() { *m = RequestWrapInfo{} } -func (m *RequestWrapInfo) String() string { return proto.CompactTextString(m) } -func (*RequestWrapInfo) ProtoMessage() {} -func (*RequestWrapInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{11} +func (x *RequestWrapInfo) Reset() { + *x = RequestWrapInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RequestWrapInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RequestWrapInfo.Unmarshal(m, b) -} -func (m *RequestWrapInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RequestWrapInfo.Marshal(b, m, deterministic) -} -func (m *RequestWrapInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestWrapInfo.Merge(m, src) +func (x *RequestWrapInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RequestWrapInfo) XXX_Size() int { - return xxx_messageInfo_RequestWrapInfo.Size(m) -} -func (m *RequestWrapInfo) XXX_DiscardUnknown() { - xxx_messageInfo_RequestWrapInfo.DiscardUnknown(m) + +func (*RequestWrapInfo) ProtoMessage() {} + +func (x *RequestWrapInfo) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RequestWrapInfo proto.InternalMessageInfo +// Deprecated: Use RequestWrapInfo.ProtoReflect.Descriptor instead. +func (*RequestWrapInfo) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{11} +} -func (m *RequestWrapInfo) GetTTL() int64 { - if m != nil { - return m.TTL +func (x *RequestWrapInfo) GetTTL() int64 { + if x != nil { + return x.TTL } return 0 } -func (m *RequestWrapInfo) GetFormat() string { - if m != nil { - return m.Format +func (x *RequestWrapInfo) GetFormat() string { + if x != nil { + return x.Format } return "" } -func (m *RequestWrapInfo) GetSealWrap() bool { - if m != nil { - return m.SealWrap +func (x *RequestWrapInfo) GetSealWrap() bool { + if x != nil { + return x.SealWrap } return false } // HandleRequestArgs is the args for HandleRequest method. type HandleRequestArgs struct { - StorageID uint32 `sentinel:"" protobuf:"varint,1,opt,name=storage_id,json=storageId,proto3" json:"storage_id,omitempty"` - Request *Request `sentinel:"" protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *HandleRequestArgs) Reset() { *m = HandleRequestArgs{} } -func (m *HandleRequestArgs) String() string { return proto.CompactTextString(m) } -func (*HandleRequestArgs) ProtoMessage() {} -func (*HandleRequestArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{12} + StorageID uint32 `sentinel:"" protobuf:"varint,1,opt,name=storage_id,json=storageId,proto3" json:"storage_id,omitempty"` + Request *Request `sentinel:"" protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` } -func (m *HandleRequestArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HandleRequestArgs.Unmarshal(m, b) -} -func (m *HandleRequestArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HandleRequestArgs.Marshal(b, m, deterministic) -} -func (m *HandleRequestArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandleRequestArgs.Merge(m, src) +func (x *HandleRequestArgs) Reset() { + *x = HandleRequestArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *HandleRequestArgs) XXX_Size() int { - return xxx_messageInfo_HandleRequestArgs.Size(m) + +func (x *HandleRequestArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HandleRequestArgs) XXX_DiscardUnknown() { - xxx_messageInfo_HandleRequestArgs.DiscardUnknown(m) + +func (*HandleRequestArgs) ProtoMessage() {} + +func (x *HandleRequestArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HandleRequestArgs proto.InternalMessageInfo +// Deprecated: Use HandleRequestArgs.ProtoReflect.Descriptor instead. +func (*HandleRequestArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{12} +} -func (m *HandleRequestArgs) GetStorageID() uint32 { - if m != nil { - return m.StorageID +func (x *HandleRequestArgs) GetStorageID() uint32 { + if x != nil { + return x.StorageID } return 0 } -func (m *HandleRequestArgs) GetRequest() *Request { - if m != nil { - return m.Request +func (x *HandleRequestArgs) GetRequest() *Request { + if x != nil { + return x.Request } return nil } // HandleRequestReply is the reply for HandleRequest method. type HandleRequestReply struct { - Response *Response `sentinel:"" protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Err *ProtoError `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *HandleRequestReply) Reset() { *m = HandleRequestReply{} } -func (m *HandleRequestReply) String() string { return proto.CompactTextString(m) } -func (*HandleRequestReply) ProtoMessage() {} -func (*HandleRequestReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{13} + Response *Response `sentinel:"" protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Err *ProtoError `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *HandleRequestReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HandleRequestReply.Unmarshal(m, b) -} -func (m *HandleRequestReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HandleRequestReply.Marshal(b, m, deterministic) -} -func (m *HandleRequestReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandleRequestReply.Merge(m, src) +func (x *HandleRequestReply) Reset() { + *x = HandleRequestReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *HandleRequestReply) XXX_Size() int { - return xxx_messageInfo_HandleRequestReply.Size(m) + +func (x *HandleRequestReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HandleRequestReply) XXX_DiscardUnknown() { - xxx_messageInfo_HandleRequestReply.DiscardUnknown(m) + +func (*HandleRequestReply) ProtoMessage() {} + +func (x *HandleRequestReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HandleRequestReply proto.InternalMessageInfo +// Deprecated: Use HandleRequestReply.ProtoReflect.Descriptor instead. +func (*HandleRequestReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{13} +} -func (m *HandleRequestReply) GetResponse() *Response { - if m != nil { - return m.Response +func (x *HandleRequestReply) GetResponse() *Response { + if x != nil { + return x.Response } return nil } -func (m *HandleRequestReply) GetErr() *ProtoError { - if m != nil { - return m.Err +func (x *HandleRequestReply) GetErr() *ProtoError { + if x != nil { + return x.Err } return nil } // InitializeArgs is the args for Initialize method. type InitializeArgs struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *InitializeArgs) Reset() { *m = InitializeArgs{} } -func (m *InitializeArgs) String() string { return proto.CompactTextString(m) } -func (*InitializeArgs) ProtoMessage() {} -func (*InitializeArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{14} +func (x *InitializeArgs) Reset() { + *x = InitializeArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *InitializeArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InitializeArgs.Unmarshal(m, b) -} -func (m *InitializeArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InitializeArgs.Marshal(b, m, deterministic) -} -func (m *InitializeArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_InitializeArgs.Merge(m, src) +func (x *InitializeArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InitializeArgs) XXX_Size() int { - return xxx_messageInfo_InitializeArgs.Size(m) -} -func (m *InitializeArgs) XXX_DiscardUnknown() { - xxx_messageInfo_InitializeArgs.DiscardUnknown(m) + +func (*InitializeArgs) ProtoMessage() {} + +func (x *InitializeArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_InitializeArgs proto.InternalMessageInfo +// Deprecated: Use InitializeArgs.ProtoReflect.Descriptor instead. +func (*InitializeArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{14} +} // InitializeReply is the reply for Initialize method. type InitializeReply struct { - Err *ProtoError `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *InitializeReply) Reset() { *m = InitializeReply{} } -func (m *InitializeReply) String() string { return proto.CompactTextString(m) } -func (*InitializeReply) ProtoMessage() {} -func (*InitializeReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{15} + Err *ProtoError `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` } -func (m *InitializeReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InitializeReply.Unmarshal(m, b) -} -func (m *InitializeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InitializeReply.Marshal(b, m, deterministic) -} -func (m *InitializeReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_InitializeReply.Merge(m, src) +func (x *InitializeReply) Reset() { + *x = InitializeReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *InitializeReply) XXX_Size() int { - return xxx_messageInfo_InitializeReply.Size(m) + +func (x *InitializeReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InitializeReply) XXX_DiscardUnknown() { - xxx_messageInfo_InitializeReply.DiscardUnknown(m) + +func (*InitializeReply) ProtoMessage() {} + +func (x *InitializeReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_InitializeReply proto.InternalMessageInfo +// Deprecated: Use InitializeReply.ProtoReflect.Descriptor instead. +func (*InitializeReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{15} +} -func (m *InitializeReply) GetErr() *ProtoError { - if m != nil { - return m.Err +func (x *InitializeReply) GetErr() *ProtoError { + if x != nil { + return x.Err } return nil } // SpecialPathsReply is the reply for SpecialPaths method. type SpecialPathsReply struct { - Paths *Paths `sentinel:"" protobuf:"bytes,1,opt,name=paths,proto3" json:"paths,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SpecialPathsReply) Reset() { *m = SpecialPathsReply{} } -func (m *SpecialPathsReply) String() string { return proto.CompactTextString(m) } -func (*SpecialPathsReply) ProtoMessage() {} -func (*SpecialPathsReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{16} + Paths *Paths `sentinel:"" protobuf:"bytes,1,opt,name=paths,proto3" json:"paths,omitempty"` } -func (m *SpecialPathsReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SpecialPathsReply.Unmarshal(m, b) -} -func (m *SpecialPathsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SpecialPathsReply.Marshal(b, m, deterministic) -} -func (m *SpecialPathsReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpecialPathsReply.Merge(m, src) +func (x *SpecialPathsReply) Reset() { + *x = SpecialPathsReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SpecialPathsReply) XXX_Size() int { - return xxx_messageInfo_SpecialPathsReply.Size(m) + +func (x *SpecialPathsReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpecialPathsReply) XXX_DiscardUnknown() { - xxx_messageInfo_SpecialPathsReply.DiscardUnknown(m) + +func (*SpecialPathsReply) ProtoMessage() {} + +func (x *SpecialPathsReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpecialPathsReply proto.InternalMessageInfo +// Deprecated: Use SpecialPathsReply.ProtoReflect.Descriptor instead. +func (*SpecialPathsReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{16} +} -func (m *SpecialPathsReply) GetPaths() *Paths { - if m != nil { - return m.Paths +func (x *SpecialPathsReply) GetPaths() *Paths { + if x != nil { + return x.Paths } return nil } // HandleExistenceCheckArgs is the args for HandleExistenceCheck method. type HandleExistenceCheckArgs struct { - StorageID uint32 `sentinel:"" protobuf:"varint,1,opt,name=storage_id,json=storageId,proto3" json:"storage_id,omitempty"` - Request *Request `sentinel:"" protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *HandleExistenceCheckArgs) Reset() { *m = HandleExistenceCheckArgs{} } -func (m *HandleExistenceCheckArgs) String() string { return proto.CompactTextString(m) } -func (*HandleExistenceCheckArgs) ProtoMessage() {} -func (*HandleExistenceCheckArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{17} + StorageID uint32 `sentinel:"" protobuf:"varint,1,opt,name=storage_id,json=storageId,proto3" json:"storage_id,omitempty"` + Request *Request `sentinel:"" protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` } -func (m *HandleExistenceCheckArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HandleExistenceCheckArgs.Unmarshal(m, b) -} -func (m *HandleExistenceCheckArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HandleExistenceCheckArgs.Marshal(b, m, deterministic) -} -func (m *HandleExistenceCheckArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandleExistenceCheckArgs.Merge(m, src) +func (x *HandleExistenceCheckArgs) Reset() { + *x = HandleExistenceCheckArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *HandleExistenceCheckArgs) XXX_Size() int { - return xxx_messageInfo_HandleExistenceCheckArgs.Size(m) + +func (x *HandleExistenceCheckArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HandleExistenceCheckArgs) XXX_DiscardUnknown() { - xxx_messageInfo_HandleExistenceCheckArgs.DiscardUnknown(m) + +func (*HandleExistenceCheckArgs) ProtoMessage() {} + +func (x *HandleExistenceCheckArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HandleExistenceCheckArgs proto.InternalMessageInfo +// Deprecated: Use HandleExistenceCheckArgs.ProtoReflect.Descriptor instead. +func (*HandleExistenceCheckArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{17} +} -func (m *HandleExistenceCheckArgs) GetStorageID() uint32 { - if m != nil { - return m.StorageID +func (x *HandleExistenceCheckArgs) GetStorageID() uint32 { + if x != nil { + return x.StorageID } return 0 } -func (m *HandleExistenceCheckArgs) GetRequest() *Request { - if m != nil { - return m.Request +func (x *HandleExistenceCheckArgs) GetRequest() *Request { + if x != nil { + return x.Request } return nil } // HandleExistenceCheckReply is the reply for HandleExistenceCheck method. type HandleExistenceCheckReply struct { - CheckFound bool `sentinel:"" protobuf:"varint,1,opt,name=check_found,json=checkFound,proto3" json:"check_found,omitempty"` - Exists bool `sentinel:"" protobuf:"varint,2,opt,name=exists,proto3" json:"exists,omitempty"` - Err *ProtoError `sentinel:"" protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *HandleExistenceCheckReply) Reset() { *m = HandleExistenceCheckReply{} } -func (m *HandleExistenceCheckReply) String() string { return proto.CompactTextString(m) } -func (*HandleExistenceCheckReply) ProtoMessage() {} -func (*HandleExistenceCheckReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{18} + CheckFound bool `sentinel:"" protobuf:"varint,1,opt,name=check_found,json=checkFound,proto3" json:"check_found,omitempty"` + Exists bool `sentinel:"" protobuf:"varint,2,opt,name=exists,proto3" json:"exists,omitempty"` + Err *ProtoError `sentinel:"" protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"` } -func (m *HandleExistenceCheckReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HandleExistenceCheckReply.Unmarshal(m, b) -} -func (m *HandleExistenceCheckReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HandleExistenceCheckReply.Marshal(b, m, deterministic) -} -func (m *HandleExistenceCheckReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandleExistenceCheckReply.Merge(m, src) +func (x *HandleExistenceCheckReply) Reset() { + *x = HandleExistenceCheckReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *HandleExistenceCheckReply) XXX_Size() int { - return xxx_messageInfo_HandleExistenceCheckReply.Size(m) + +func (x *HandleExistenceCheckReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HandleExistenceCheckReply) XXX_DiscardUnknown() { - xxx_messageInfo_HandleExistenceCheckReply.DiscardUnknown(m) + +func (*HandleExistenceCheckReply) ProtoMessage() {} + +func (x *HandleExistenceCheckReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HandleExistenceCheckReply proto.InternalMessageInfo +// Deprecated: Use HandleExistenceCheckReply.ProtoReflect.Descriptor instead. +func (*HandleExistenceCheckReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{18} +} -func (m *HandleExistenceCheckReply) GetCheckFound() bool { - if m != nil { - return m.CheckFound +func (x *HandleExistenceCheckReply) GetCheckFound() bool { + if x != nil { + return x.CheckFound } return false } -func (m *HandleExistenceCheckReply) GetExists() bool { - if m != nil { - return m.Exists +func (x *HandleExistenceCheckReply) GetExists() bool { + if x != nil { + return x.Exists } return false } -func (m *HandleExistenceCheckReply) GetErr() *ProtoError { - if m != nil { - return m.Err +func (x *HandleExistenceCheckReply) GetErr() *ProtoError { + if x != nil { + return x.Err } return nil } // SetupArgs is the args for Setup method. type SetupArgs struct { - BrokerID uint32 `sentinel:"" protobuf:"varint,1,opt,name=broker_id,json=brokerId,proto3" json:"broker_id,omitempty"` - Config map[string]string `sentinel:"" protobuf:"bytes,2,rep,name=Config,proto3" json:"Config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - BackendUUID string `sentinel:"" protobuf:"bytes,3,opt,name=backendUUID,proto3" json:"backendUUID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SetupArgs) Reset() { *m = SetupArgs{} } -func (m *SetupArgs) String() string { return proto.CompactTextString(m) } -func (*SetupArgs) ProtoMessage() {} -func (*SetupArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{19} + BrokerID uint32 `sentinel:"" protobuf:"varint,1,opt,name=broker_id,json=brokerId,proto3" json:"broker_id,omitempty"` + Config map[string]string `sentinel:"" protobuf:"bytes,2,rep,name=Config,proto3" json:"Config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + BackendUUID string `sentinel:"" protobuf:"bytes,3,opt,name=backendUUID,proto3" json:"backendUUID,omitempty"` } -func (m *SetupArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetupArgs.Unmarshal(m, b) -} -func (m *SetupArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetupArgs.Marshal(b, m, deterministic) -} -func (m *SetupArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetupArgs.Merge(m, src) +func (x *SetupArgs) Reset() { + *x = SetupArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SetupArgs) XXX_Size() int { - return xxx_messageInfo_SetupArgs.Size(m) + +func (x *SetupArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetupArgs) XXX_DiscardUnknown() { - xxx_messageInfo_SetupArgs.DiscardUnknown(m) + +func (*SetupArgs) ProtoMessage() {} + +func (x *SetupArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SetupArgs proto.InternalMessageInfo +// Deprecated: Use SetupArgs.ProtoReflect.Descriptor instead. +func (*SetupArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{19} +} -func (m *SetupArgs) GetBrokerID() uint32 { - if m != nil { - return m.BrokerID +func (x *SetupArgs) GetBrokerID() uint32 { + if x != nil { + return x.BrokerID } return 0 } -func (m *SetupArgs) GetConfig() map[string]string { - if m != nil { - return m.Config +func (x *SetupArgs) GetConfig() map[string]string { + if x != nil { + return x.Config } return nil } -func (m *SetupArgs) GetBackendUUID() string { - if m != nil { - return m.BackendUUID +func (x *SetupArgs) GetBackendUUID() string { + if x != nil { + return x.BackendUUID } return "" } // SetupReply is the reply for Setup method. type SetupReply struct { - Err string `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SetupReply) Reset() { *m = SetupReply{} } -func (m *SetupReply) String() string { return proto.CompactTextString(m) } -func (*SetupReply) ProtoMessage() {} -func (*SetupReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{20} + Err string `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` } -func (m *SetupReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetupReply.Unmarshal(m, b) -} -func (m *SetupReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetupReply.Marshal(b, m, deterministic) -} -func (m *SetupReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetupReply.Merge(m, src) +func (x *SetupReply) Reset() { + *x = SetupReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SetupReply) XXX_Size() int { - return xxx_messageInfo_SetupReply.Size(m) + +func (x *SetupReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetupReply) XXX_DiscardUnknown() { - xxx_messageInfo_SetupReply.DiscardUnknown(m) + +func (*SetupReply) ProtoMessage() {} + +func (x *SetupReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SetupReply proto.InternalMessageInfo +// Deprecated: Use SetupReply.ProtoReflect.Descriptor instead. +func (*SetupReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{20} +} -func (m *SetupReply) GetErr() string { - if m != nil { - return m.Err +func (x *SetupReply) GetErr() string { + if x != nil { + return x.Err } return "" } // TypeReply is the reply for the Type method. type TypeReply struct { - Type uint32 `sentinel:"" protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TypeReply) Reset() { *m = TypeReply{} } -func (m *TypeReply) String() string { return proto.CompactTextString(m) } -func (*TypeReply) ProtoMessage() {} -func (*TypeReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{21} + Type uint32 `sentinel:"" protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` } -func (m *TypeReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TypeReply.Unmarshal(m, b) -} -func (m *TypeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TypeReply.Marshal(b, m, deterministic) -} -func (m *TypeReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypeReply.Merge(m, src) +func (x *TypeReply) Reset() { + *x = TypeReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TypeReply) XXX_Size() int { - return xxx_messageInfo_TypeReply.Size(m) + +func (x *TypeReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TypeReply) XXX_DiscardUnknown() { - xxx_messageInfo_TypeReply.DiscardUnknown(m) + +func (*TypeReply) ProtoMessage() {} + +func (x *TypeReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TypeReply proto.InternalMessageInfo +// Deprecated: Use TypeReply.ProtoReflect.Descriptor instead. +func (*TypeReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{21} +} -func (m *TypeReply) GetType() uint32 { - if m != nil { - return m.Type +func (x *TypeReply) GetType() uint32 { + if x != nil { + return x.Type } return 0 } type InvalidateKeyArgs struct { - Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *InvalidateKeyArgs) Reset() { *m = InvalidateKeyArgs{} } -func (m *InvalidateKeyArgs) String() string { return proto.CompactTextString(m) } -func (*InvalidateKeyArgs) ProtoMessage() {} -func (*InvalidateKeyArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{22} + Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } -func (m *InvalidateKeyArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InvalidateKeyArgs.Unmarshal(m, b) -} -func (m *InvalidateKeyArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InvalidateKeyArgs.Marshal(b, m, deterministic) -} -func (m *InvalidateKeyArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_InvalidateKeyArgs.Merge(m, src) +func (x *InvalidateKeyArgs) Reset() { + *x = InvalidateKeyArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *InvalidateKeyArgs) XXX_Size() int { - return xxx_messageInfo_InvalidateKeyArgs.Size(m) + +func (x *InvalidateKeyArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InvalidateKeyArgs) XXX_DiscardUnknown() { - xxx_messageInfo_InvalidateKeyArgs.DiscardUnknown(m) + +func (*InvalidateKeyArgs) ProtoMessage() {} + +func (x *InvalidateKeyArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_InvalidateKeyArgs proto.InternalMessageInfo +// Deprecated: Use InvalidateKeyArgs.ProtoReflect.Descriptor instead. +func (*InvalidateKeyArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{22} +} -func (m *InvalidateKeyArgs) GetKey() string { - if m != nil { - return m.Key +func (x *InvalidateKeyArgs) GetKey() string { + if x != nil { + return x.Key } return "" } type StorageEntry struct { - Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `sentinel:"" protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - SealWrap bool `sentinel:"" protobuf:"varint,3,opt,name=seal_wrap,json=sealWrap,proto3" json:"seal_wrap,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `sentinel:"" protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + SealWrap bool `sentinel:"" protobuf:"varint,3,opt,name=seal_wrap,json=sealWrap,proto3" json:"seal_wrap,omitempty"` } -func (m *StorageEntry) Reset() { *m = StorageEntry{} } -func (m *StorageEntry) String() string { return proto.CompactTextString(m) } -func (*StorageEntry) ProtoMessage() {} -func (*StorageEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{23} +func (x *StorageEntry) Reset() { + *x = StorageEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageEntry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageEntry.Unmarshal(m, b) +func (x *StorageEntry) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageEntry.Marshal(b, m, deterministic) -} -func (m *StorageEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageEntry.Merge(m, src) -} -func (m *StorageEntry) XXX_Size() int { - return xxx_messageInfo_StorageEntry.Size(m) -} -func (m *StorageEntry) XXX_DiscardUnknown() { - xxx_messageInfo_StorageEntry.DiscardUnknown(m) + +func (*StorageEntry) ProtoMessage() {} + +func (x *StorageEntry) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageEntry proto.InternalMessageInfo +// Deprecated: Use StorageEntry.ProtoReflect.Descriptor instead. +func (*StorageEntry) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{23} +} -func (m *StorageEntry) GetKey() string { - if m != nil { - return m.Key +func (x *StorageEntry) GetKey() string { + if x != nil { + return x.Key } return "" } -func (m *StorageEntry) GetValue() []byte { - if m != nil { - return m.Value +func (x *StorageEntry) GetValue() []byte { + if x != nil { + return x.Value } return nil } -func (m *StorageEntry) GetSealWrap() bool { - if m != nil { - return m.SealWrap +func (x *StorageEntry) GetSealWrap() bool { + if x != nil { + return x.SealWrap } return false } type StorageListArgs struct { - Prefix string `sentinel:"" protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StorageListArgs) Reset() { *m = StorageListArgs{} } -func (m *StorageListArgs) String() string { return proto.CompactTextString(m) } -func (*StorageListArgs) ProtoMessage() {} -func (*StorageListArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{24} + Prefix string `sentinel:"" protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` } -func (m *StorageListArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageListArgs.Unmarshal(m, b) -} -func (m *StorageListArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageListArgs.Marshal(b, m, deterministic) -} -func (m *StorageListArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageListArgs.Merge(m, src) +func (x *StorageListArgs) Reset() { + *x = StorageListArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageListArgs) XXX_Size() int { - return xxx_messageInfo_StorageListArgs.Size(m) + +func (x *StorageListArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageListArgs) XXX_DiscardUnknown() { - xxx_messageInfo_StorageListArgs.DiscardUnknown(m) + +func (*StorageListArgs) ProtoMessage() {} + +func (x *StorageListArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageListArgs proto.InternalMessageInfo +// Deprecated: Use StorageListArgs.ProtoReflect.Descriptor instead. +func (*StorageListArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{24} +} -func (m *StorageListArgs) GetPrefix() string { - if m != nil { - return m.Prefix +func (x *StorageListArgs) GetPrefix() string { + if x != nil { + return x.Prefix } return "" } type StorageListReply struct { - Keys []string `sentinel:"" protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` - Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StorageListReply) Reset() { *m = StorageListReply{} } -func (m *StorageListReply) String() string { return proto.CompactTextString(m) } -func (*StorageListReply) ProtoMessage() {} -func (*StorageListReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{25} + Keys []string `sentinel:"" protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` + Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *StorageListReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageListReply.Unmarshal(m, b) -} -func (m *StorageListReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageListReply.Marshal(b, m, deterministic) -} -func (m *StorageListReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageListReply.Merge(m, src) +func (x *StorageListReply) Reset() { + *x = StorageListReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageListReply) XXX_Size() int { - return xxx_messageInfo_StorageListReply.Size(m) + +func (x *StorageListReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageListReply) XXX_DiscardUnknown() { - xxx_messageInfo_StorageListReply.DiscardUnknown(m) + +func (*StorageListReply) ProtoMessage() {} + +func (x *StorageListReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageListReply proto.InternalMessageInfo +// Deprecated: Use StorageListReply.ProtoReflect.Descriptor instead. +func (*StorageListReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{25} +} -func (m *StorageListReply) GetKeys() []string { - if m != nil { - return m.Keys +func (x *StorageListReply) GetKeys() []string { + if x != nil { + return x.Keys } return nil } -func (m *StorageListReply) GetErr() string { - if m != nil { - return m.Err +func (x *StorageListReply) GetErr() string { + if x != nil { + return x.Err } return "" } type StorageGetArgs struct { - Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StorageGetArgs) Reset() { *m = StorageGetArgs{} } -func (m *StorageGetArgs) String() string { return proto.CompactTextString(m) } -func (*StorageGetArgs) ProtoMessage() {} -func (*StorageGetArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{26} + Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } -func (m *StorageGetArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageGetArgs.Unmarshal(m, b) -} -func (m *StorageGetArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageGetArgs.Marshal(b, m, deterministic) -} -func (m *StorageGetArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageGetArgs.Merge(m, src) +func (x *StorageGetArgs) Reset() { + *x = StorageGetArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageGetArgs) XXX_Size() int { - return xxx_messageInfo_StorageGetArgs.Size(m) + +func (x *StorageGetArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageGetArgs) XXX_DiscardUnknown() { - xxx_messageInfo_StorageGetArgs.DiscardUnknown(m) + +func (*StorageGetArgs) ProtoMessage() {} + +func (x *StorageGetArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageGetArgs proto.InternalMessageInfo +// Deprecated: Use StorageGetArgs.ProtoReflect.Descriptor instead. +func (*StorageGetArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{26} +} -func (m *StorageGetArgs) GetKey() string { - if m != nil { - return m.Key +func (x *StorageGetArgs) GetKey() string { + if x != nil { + return x.Key } return "" } type StorageGetReply struct { - Entry *StorageEntry `sentinel:"" protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` - Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StorageGetReply) Reset() { *m = StorageGetReply{} } -func (m *StorageGetReply) String() string { return proto.CompactTextString(m) } -func (*StorageGetReply) ProtoMessage() {} -func (*StorageGetReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{27} + Entry *StorageEntry `sentinel:"" protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` + Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *StorageGetReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageGetReply.Unmarshal(m, b) -} -func (m *StorageGetReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageGetReply.Marshal(b, m, deterministic) -} -func (m *StorageGetReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageGetReply.Merge(m, src) +func (x *StorageGetReply) Reset() { + *x = StorageGetReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageGetReply) XXX_Size() int { - return xxx_messageInfo_StorageGetReply.Size(m) + +func (x *StorageGetReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageGetReply) XXX_DiscardUnknown() { - xxx_messageInfo_StorageGetReply.DiscardUnknown(m) + +func (*StorageGetReply) ProtoMessage() {} + +func (x *StorageGetReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageGetReply proto.InternalMessageInfo +// Deprecated: Use StorageGetReply.ProtoReflect.Descriptor instead. +func (*StorageGetReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{27} +} -func (m *StorageGetReply) GetEntry() *StorageEntry { - if m != nil { - return m.Entry +func (x *StorageGetReply) GetEntry() *StorageEntry { + if x != nil { + return x.Entry } return nil } -func (m *StorageGetReply) GetErr() string { - if m != nil { - return m.Err +func (x *StorageGetReply) GetErr() string { + if x != nil { + return x.Err } return "" } type StoragePutArgs struct { - Entry *StorageEntry `sentinel:"" protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StoragePutArgs) Reset() { *m = StoragePutArgs{} } -func (m *StoragePutArgs) String() string { return proto.CompactTextString(m) } -func (*StoragePutArgs) ProtoMessage() {} -func (*StoragePutArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{28} + Entry *StorageEntry `sentinel:"" protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` } -func (m *StoragePutArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StoragePutArgs.Unmarshal(m, b) -} -func (m *StoragePutArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StoragePutArgs.Marshal(b, m, deterministic) -} -func (m *StoragePutArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoragePutArgs.Merge(m, src) +func (x *StoragePutArgs) Reset() { + *x = StoragePutArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StoragePutArgs) XXX_Size() int { - return xxx_messageInfo_StoragePutArgs.Size(m) + +func (x *StoragePutArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StoragePutArgs) XXX_DiscardUnknown() { - xxx_messageInfo_StoragePutArgs.DiscardUnknown(m) + +func (*StoragePutArgs) ProtoMessage() {} + +func (x *StoragePutArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StoragePutArgs proto.InternalMessageInfo +// Deprecated: Use StoragePutArgs.ProtoReflect.Descriptor instead. +func (*StoragePutArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{28} +} -func (m *StoragePutArgs) GetEntry() *StorageEntry { - if m != nil { - return m.Entry +func (x *StoragePutArgs) GetEntry() *StorageEntry { + if x != nil { + return x.Entry } return nil } type StoragePutReply struct { - Err string `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StoragePutReply) Reset() { *m = StoragePutReply{} } -func (m *StoragePutReply) String() string { return proto.CompactTextString(m) } -func (*StoragePutReply) ProtoMessage() {} -func (*StoragePutReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{29} + Err string `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` } -func (m *StoragePutReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StoragePutReply.Unmarshal(m, b) -} -func (m *StoragePutReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StoragePutReply.Marshal(b, m, deterministic) -} -func (m *StoragePutReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoragePutReply.Merge(m, src) +func (x *StoragePutReply) Reset() { + *x = StoragePutReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StoragePutReply) XXX_Size() int { - return xxx_messageInfo_StoragePutReply.Size(m) + +func (x *StoragePutReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StoragePutReply) XXX_DiscardUnknown() { - xxx_messageInfo_StoragePutReply.DiscardUnknown(m) + +func (*StoragePutReply) ProtoMessage() {} + +func (x *StoragePutReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StoragePutReply proto.InternalMessageInfo +// Deprecated: Use StoragePutReply.ProtoReflect.Descriptor instead. +func (*StoragePutReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{29} +} -func (m *StoragePutReply) GetErr() string { - if m != nil { - return m.Err +func (x *StoragePutReply) GetErr() string { + if x != nil { + return x.Err } return "" } type StorageDeleteArgs struct { - Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StorageDeleteArgs) Reset() { *m = StorageDeleteArgs{} } -func (m *StorageDeleteArgs) String() string { return proto.CompactTextString(m) } -func (*StorageDeleteArgs) ProtoMessage() {} -func (*StorageDeleteArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{30} + Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } -func (m *StorageDeleteArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageDeleteArgs.Unmarshal(m, b) -} -func (m *StorageDeleteArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageDeleteArgs.Marshal(b, m, deterministic) -} -func (m *StorageDeleteArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageDeleteArgs.Merge(m, src) +func (x *StorageDeleteArgs) Reset() { + *x = StorageDeleteArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageDeleteArgs) XXX_Size() int { - return xxx_messageInfo_StorageDeleteArgs.Size(m) + +func (x *StorageDeleteArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageDeleteArgs) XXX_DiscardUnknown() { - xxx_messageInfo_StorageDeleteArgs.DiscardUnknown(m) + +func (*StorageDeleteArgs) ProtoMessage() {} + +func (x *StorageDeleteArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageDeleteArgs proto.InternalMessageInfo +// Deprecated: Use StorageDeleteArgs.ProtoReflect.Descriptor instead. +func (*StorageDeleteArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{30} +} -func (m *StorageDeleteArgs) GetKey() string { - if m != nil { - return m.Key +func (x *StorageDeleteArgs) GetKey() string { + if x != nil { + return x.Key } return "" } type StorageDeleteReply struct { - Err string `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StorageDeleteReply) Reset() { *m = StorageDeleteReply{} } -func (m *StorageDeleteReply) String() string { return proto.CompactTextString(m) } -func (*StorageDeleteReply) ProtoMessage() {} -func (*StorageDeleteReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{31} + Err string `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` } -func (m *StorageDeleteReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageDeleteReply.Unmarshal(m, b) -} -func (m *StorageDeleteReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageDeleteReply.Marshal(b, m, deterministic) -} -func (m *StorageDeleteReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageDeleteReply.Merge(m, src) +func (x *StorageDeleteReply) Reset() { + *x = StorageDeleteReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageDeleteReply) XXX_Size() int { - return xxx_messageInfo_StorageDeleteReply.Size(m) + +func (x *StorageDeleteReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageDeleteReply) XXX_DiscardUnknown() { - xxx_messageInfo_StorageDeleteReply.DiscardUnknown(m) + +func (*StorageDeleteReply) ProtoMessage() {} + +func (x *StorageDeleteReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageDeleteReply proto.InternalMessageInfo +// Deprecated: Use StorageDeleteReply.ProtoReflect.Descriptor instead. +func (*StorageDeleteReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{31} +} -func (m *StorageDeleteReply) GetErr() string { - if m != nil { - return m.Err +func (x *StorageDeleteReply) GetErr() string { + if x != nil { + return x.Err } return "" } type TTLReply struct { - TTL int64 `sentinel:"" protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TTLReply) Reset() { *m = TTLReply{} } -func (m *TTLReply) String() string { return proto.CompactTextString(m) } -func (*TTLReply) ProtoMessage() {} -func (*TTLReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{32} + TTL int64 `sentinel:"" protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` } -func (m *TTLReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TTLReply.Unmarshal(m, b) -} -func (m *TTLReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TTLReply.Marshal(b, m, deterministic) -} -func (m *TTLReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_TTLReply.Merge(m, src) +func (x *TTLReply) Reset() { + *x = TTLReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TTLReply) XXX_Size() int { - return xxx_messageInfo_TTLReply.Size(m) + +func (x *TTLReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TTLReply) XXX_DiscardUnknown() { - xxx_messageInfo_TTLReply.DiscardUnknown(m) + +func (*TTLReply) ProtoMessage() {} + +func (x *TTLReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TTLReply proto.InternalMessageInfo +// Deprecated: Use TTLReply.ProtoReflect.Descriptor instead. +func (*TTLReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{32} +} -func (m *TTLReply) GetTTL() int64 { - if m != nil { - return m.TTL +func (x *TTLReply) GetTTL() int64 { + if x != nil { + return x.TTL } return 0 } type TaintedReply struct { - Tainted bool `sentinel:"" protobuf:"varint,1,opt,name=tainted,proto3" json:"tainted,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TaintedReply) Reset() { *m = TaintedReply{} } -func (m *TaintedReply) String() string { return proto.CompactTextString(m) } -func (*TaintedReply) ProtoMessage() {} -func (*TaintedReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{33} + Tainted bool `sentinel:"" protobuf:"varint,1,opt,name=tainted,proto3" json:"tainted,omitempty"` } -func (m *TaintedReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TaintedReply.Unmarshal(m, b) -} -func (m *TaintedReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TaintedReply.Marshal(b, m, deterministic) -} -func (m *TaintedReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_TaintedReply.Merge(m, src) +func (x *TaintedReply) Reset() { + *x = TaintedReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TaintedReply) XXX_Size() int { - return xxx_messageInfo_TaintedReply.Size(m) + +func (x *TaintedReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TaintedReply) XXX_DiscardUnknown() { - xxx_messageInfo_TaintedReply.DiscardUnknown(m) + +func (*TaintedReply) ProtoMessage() {} + +func (x *TaintedReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TaintedReply proto.InternalMessageInfo +// Deprecated: Use TaintedReply.ProtoReflect.Descriptor instead. +func (*TaintedReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{33} +} -func (m *TaintedReply) GetTainted() bool { - if m != nil { - return m.Tainted +func (x *TaintedReply) GetTainted() bool { + if x != nil { + return x.Tainted } return false } type CachingDisabledReply struct { - Disabled bool `sentinel:"" protobuf:"varint,1,opt,name=disabled,proto3" json:"disabled,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *CachingDisabledReply) Reset() { *m = CachingDisabledReply{} } -func (m *CachingDisabledReply) String() string { return proto.CompactTextString(m) } -func (*CachingDisabledReply) ProtoMessage() {} -func (*CachingDisabledReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{34} + Disabled bool `sentinel:"" protobuf:"varint,1,opt,name=disabled,proto3" json:"disabled,omitempty"` } -func (m *CachingDisabledReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CachingDisabledReply.Unmarshal(m, b) -} -func (m *CachingDisabledReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CachingDisabledReply.Marshal(b, m, deterministic) -} -func (m *CachingDisabledReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_CachingDisabledReply.Merge(m, src) +func (x *CachingDisabledReply) Reset() { + *x = CachingDisabledReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CachingDisabledReply) XXX_Size() int { - return xxx_messageInfo_CachingDisabledReply.Size(m) + +func (x *CachingDisabledReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CachingDisabledReply) XXX_DiscardUnknown() { - xxx_messageInfo_CachingDisabledReply.DiscardUnknown(m) + +func (*CachingDisabledReply) ProtoMessage() {} + +func (x *CachingDisabledReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_CachingDisabledReply proto.InternalMessageInfo +// Deprecated: Use CachingDisabledReply.ProtoReflect.Descriptor instead. +func (*CachingDisabledReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{34} +} -func (m *CachingDisabledReply) GetDisabled() bool { - if m != nil { - return m.Disabled +func (x *CachingDisabledReply) GetDisabled() bool { + if x != nil { + return x.Disabled } return false } type ReplicationStateReply struct { - State int32 `sentinel:"" protobuf:"varint,1,opt,name=state,proto3" json:"state,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ReplicationStateReply) Reset() { *m = ReplicationStateReply{} } -func (m *ReplicationStateReply) String() string { return proto.CompactTextString(m) } -func (*ReplicationStateReply) ProtoMessage() {} -func (*ReplicationStateReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{35} + State int32 `sentinel:"" protobuf:"varint,1,opt,name=state,proto3" json:"state,omitempty"` } -func (m *ReplicationStateReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ReplicationStateReply.Unmarshal(m, b) -} -func (m *ReplicationStateReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ReplicationStateReply.Marshal(b, m, deterministic) -} -func (m *ReplicationStateReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicationStateReply.Merge(m, src) +func (x *ReplicationStateReply) Reset() { + *x = ReplicationStateReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ReplicationStateReply) XXX_Size() int { - return xxx_messageInfo_ReplicationStateReply.Size(m) + +func (x *ReplicationStateReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ReplicationStateReply) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicationStateReply.DiscardUnknown(m) + +func (*ReplicationStateReply) ProtoMessage() {} + +func (x *ReplicationStateReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ReplicationStateReply proto.InternalMessageInfo +// Deprecated: Use ReplicationStateReply.ProtoReflect.Descriptor instead. +func (*ReplicationStateReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{35} +} -func (m *ReplicationStateReply) GetState() int32 { - if m != nil { - return m.State +func (x *ReplicationStateReply) GetState() int32 { + if x != nil { + return x.State } return 0 } type ResponseWrapDataArgs struct { - Data string `sentinel:"" protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - TTL int64 `sentinel:"" protobuf:"varint,2,opt,name=TTL,proto3" json:"TTL,omitempty"` - JWT bool `sentinel:"" protobuf:"varint,3,opt,name=JWT,proto3" json:"JWT,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ResponseWrapDataArgs) Reset() { *m = ResponseWrapDataArgs{} } -func (m *ResponseWrapDataArgs) String() string { return proto.CompactTextString(m) } -func (*ResponseWrapDataArgs) ProtoMessage() {} -func (*ResponseWrapDataArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{36} + Data string `sentinel:"" protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + TTL int64 `sentinel:"" protobuf:"varint,2,opt,name=TTL,proto3" json:"TTL,omitempty"` + JWT bool `sentinel:"" protobuf:"varint,3,opt,name=JWT,proto3" json:"JWT,omitempty"` } -func (m *ResponseWrapDataArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResponseWrapDataArgs.Unmarshal(m, b) -} -func (m *ResponseWrapDataArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResponseWrapDataArgs.Marshal(b, m, deterministic) -} -func (m *ResponseWrapDataArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseWrapDataArgs.Merge(m, src) +func (x *ResponseWrapDataArgs) Reset() { + *x = ResponseWrapDataArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ResponseWrapDataArgs) XXX_Size() int { - return xxx_messageInfo_ResponseWrapDataArgs.Size(m) + +func (x *ResponseWrapDataArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ResponseWrapDataArgs) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseWrapDataArgs.DiscardUnknown(m) + +func (*ResponseWrapDataArgs) ProtoMessage() {} + +func (x *ResponseWrapDataArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ResponseWrapDataArgs proto.InternalMessageInfo +// Deprecated: Use ResponseWrapDataArgs.ProtoReflect.Descriptor instead. +func (*ResponseWrapDataArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{36} +} -func (m *ResponseWrapDataArgs) GetData() string { - if m != nil { - return m.Data +func (x *ResponseWrapDataArgs) GetData() string { + if x != nil { + return x.Data } return "" } -func (m *ResponseWrapDataArgs) GetTTL() int64 { - if m != nil { - return m.TTL +func (x *ResponseWrapDataArgs) GetTTL() int64 { + if x != nil { + return x.TTL } return 0 } -func (m *ResponseWrapDataArgs) GetJWT() bool { - if m != nil { - return m.JWT +func (x *ResponseWrapDataArgs) GetJWT() bool { + if x != nil { + return x.JWT } return false } type ResponseWrapDataReply struct { - WrapInfo *ResponseWrapInfo `sentinel:"" protobuf:"bytes,1,opt,name=wrap_info,json=wrapInfo,proto3" json:"wrap_info,omitempty"` - Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ResponseWrapDataReply) Reset() { *m = ResponseWrapDataReply{} } -func (m *ResponseWrapDataReply) String() string { return proto.CompactTextString(m) } -func (*ResponseWrapDataReply) ProtoMessage() {} -func (*ResponseWrapDataReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{37} + WrapInfo *ResponseWrapInfo `sentinel:"" protobuf:"bytes,1,opt,name=wrap_info,json=wrapInfo,proto3" json:"wrap_info,omitempty"` + Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *ResponseWrapDataReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResponseWrapDataReply.Unmarshal(m, b) -} -func (m *ResponseWrapDataReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResponseWrapDataReply.Marshal(b, m, deterministic) -} -func (m *ResponseWrapDataReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseWrapDataReply.Merge(m, src) +func (x *ResponseWrapDataReply) Reset() { + *x = ResponseWrapDataReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ResponseWrapDataReply) XXX_Size() int { - return xxx_messageInfo_ResponseWrapDataReply.Size(m) + +func (x *ResponseWrapDataReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ResponseWrapDataReply) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseWrapDataReply.DiscardUnknown(m) + +func (*ResponseWrapDataReply) ProtoMessage() {} + +func (x *ResponseWrapDataReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ResponseWrapDataReply proto.InternalMessageInfo +// Deprecated: Use ResponseWrapDataReply.ProtoReflect.Descriptor instead. +func (*ResponseWrapDataReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{37} +} -func (m *ResponseWrapDataReply) GetWrapInfo() *ResponseWrapInfo { - if m != nil { - return m.WrapInfo +func (x *ResponseWrapDataReply) GetWrapInfo() *ResponseWrapInfo { + if x != nil { + return x.WrapInfo } return nil } -func (m *ResponseWrapDataReply) GetErr() string { - if m != nil { - return m.Err +func (x *ResponseWrapDataReply) GetErr() string { + if x != nil { + return x.Err } return "" } type MlockEnabledReply struct { - Enabled bool `sentinel:"" protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *MlockEnabledReply) Reset() { *m = MlockEnabledReply{} } -func (m *MlockEnabledReply) String() string { return proto.CompactTextString(m) } -func (*MlockEnabledReply) ProtoMessage() {} -func (*MlockEnabledReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{38} + Enabled bool `sentinel:"" protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` } -func (m *MlockEnabledReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MlockEnabledReply.Unmarshal(m, b) -} -func (m *MlockEnabledReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MlockEnabledReply.Marshal(b, m, deterministic) -} -func (m *MlockEnabledReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_MlockEnabledReply.Merge(m, src) +func (x *MlockEnabledReply) Reset() { + *x = MlockEnabledReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *MlockEnabledReply) XXX_Size() int { - return xxx_messageInfo_MlockEnabledReply.Size(m) + +func (x *MlockEnabledReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *MlockEnabledReply) XXX_DiscardUnknown() { - xxx_messageInfo_MlockEnabledReply.DiscardUnknown(m) + +func (*MlockEnabledReply) ProtoMessage() {} + +func (x *MlockEnabledReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_MlockEnabledReply proto.InternalMessageInfo +// Deprecated: Use MlockEnabledReply.ProtoReflect.Descriptor instead. +func (*MlockEnabledReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{38} +} -func (m *MlockEnabledReply) GetEnabled() bool { - if m != nil { - return m.Enabled +func (x *MlockEnabledReply) GetEnabled() bool { + if x != nil { + return x.Enabled } return false } type LocalMountReply struct { - Local bool `sentinel:"" protobuf:"varint,1,opt,name=local,proto3" json:"local,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *LocalMountReply) Reset() { *m = LocalMountReply{} } -func (m *LocalMountReply) String() string { return proto.CompactTextString(m) } -func (*LocalMountReply) ProtoMessage() {} -func (*LocalMountReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{39} + Local bool `sentinel:"" protobuf:"varint,1,opt,name=local,proto3" json:"local,omitempty"` } -func (m *LocalMountReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LocalMountReply.Unmarshal(m, b) -} -func (m *LocalMountReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LocalMountReply.Marshal(b, m, deterministic) -} -func (m *LocalMountReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalMountReply.Merge(m, src) +func (x *LocalMountReply) Reset() { + *x = LocalMountReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *LocalMountReply) XXX_Size() int { - return xxx_messageInfo_LocalMountReply.Size(m) + +func (x *LocalMountReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LocalMountReply) XXX_DiscardUnknown() { - xxx_messageInfo_LocalMountReply.DiscardUnknown(m) + +func (*LocalMountReply) ProtoMessage() {} + +func (x *LocalMountReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_LocalMountReply proto.InternalMessageInfo +// Deprecated: Use LocalMountReply.ProtoReflect.Descriptor instead. +func (*LocalMountReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{39} +} -func (m *LocalMountReply) GetLocal() bool { - if m != nil { - return m.Local +func (x *LocalMountReply) GetLocal() bool { + if x != nil { + return x.Local } return false } type EntityInfoArgs struct { - EntityID string `sentinel:"" protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *EntityInfoArgs) Reset() { *m = EntityInfoArgs{} } -func (m *EntityInfoArgs) String() string { return proto.CompactTextString(m) } -func (*EntityInfoArgs) ProtoMessage() {} -func (*EntityInfoArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{40} + EntityID string `sentinel:"" protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` } -func (m *EntityInfoArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EntityInfoArgs.Unmarshal(m, b) -} -func (m *EntityInfoArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EntityInfoArgs.Marshal(b, m, deterministic) -} -func (m *EntityInfoArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_EntityInfoArgs.Merge(m, src) +func (x *EntityInfoArgs) Reset() { + *x = EntityInfoArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *EntityInfoArgs) XXX_Size() int { - return xxx_messageInfo_EntityInfoArgs.Size(m) + +func (x *EntityInfoArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *EntityInfoArgs) XXX_DiscardUnknown() { - xxx_messageInfo_EntityInfoArgs.DiscardUnknown(m) + +func (*EntityInfoArgs) ProtoMessage() {} + +func (x *EntityInfoArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_EntityInfoArgs proto.InternalMessageInfo +// Deprecated: Use EntityInfoArgs.ProtoReflect.Descriptor instead. +func (*EntityInfoArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{40} +} -func (m *EntityInfoArgs) GetEntityID() string { - if m != nil { - return m.EntityID +func (x *EntityInfoArgs) GetEntityID() string { + if x != nil { + return x.EntityID } return "" } type EntityInfoReply struct { - Entity *logical.Entity `sentinel:"" protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` - Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *EntityInfoReply) Reset() { *m = EntityInfoReply{} } -func (m *EntityInfoReply) String() string { return proto.CompactTextString(m) } -func (*EntityInfoReply) ProtoMessage() {} -func (*EntityInfoReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{41} + Entity *logical.Entity `sentinel:"" protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *EntityInfoReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EntityInfoReply.Unmarshal(m, b) -} -func (m *EntityInfoReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EntityInfoReply.Marshal(b, m, deterministic) -} -func (m *EntityInfoReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_EntityInfoReply.Merge(m, src) +func (x *EntityInfoReply) Reset() { + *x = EntityInfoReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *EntityInfoReply) XXX_Size() int { - return xxx_messageInfo_EntityInfoReply.Size(m) + +func (x *EntityInfoReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *EntityInfoReply) XXX_DiscardUnknown() { - xxx_messageInfo_EntityInfoReply.DiscardUnknown(m) + +func (*EntityInfoReply) ProtoMessage() {} + +func (x *EntityInfoReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_EntityInfoReply proto.InternalMessageInfo +// Deprecated: Use EntityInfoReply.ProtoReflect.Descriptor instead. +func (*EntityInfoReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{41} +} -func (m *EntityInfoReply) GetEntity() *logical.Entity { - if m != nil { - return m.Entity +func (x *EntityInfoReply) GetEntity() *logical.Entity { + if x != nil { + return x.Entity } return nil } -func (m *EntityInfoReply) GetErr() string { - if m != nil { - return m.Err +func (x *EntityInfoReply) GetErr() string { + if x != nil { + return x.Err } return "" } type GroupsForEntityReply struct { - Groups []*logical.Group `sentinel:"" protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` - Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GroupsForEntityReply) Reset() { *m = GroupsForEntityReply{} } -func (m *GroupsForEntityReply) String() string { return proto.CompactTextString(m) } -func (*GroupsForEntityReply) ProtoMessage() {} -func (*GroupsForEntityReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{42} + Groups []*logical.Group `sentinel:"" protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` + Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *GroupsForEntityReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupsForEntityReply.Unmarshal(m, b) -} -func (m *GroupsForEntityReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupsForEntityReply.Marshal(b, m, deterministic) -} -func (m *GroupsForEntityReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupsForEntityReply.Merge(m, src) +func (x *GroupsForEntityReply) Reset() { + *x = GroupsForEntityReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GroupsForEntityReply) XXX_Size() int { - return xxx_messageInfo_GroupsForEntityReply.Size(m) + +func (x *GroupsForEntityReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GroupsForEntityReply) XXX_DiscardUnknown() { - xxx_messageInfo_GroupsForEntityReply.DiscardUnknown(m) + +func (*GroupsForEntityReply) ProtoMessage() {} + +func (x *GroupsForEntityReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GroupsForEntityReply proto.InternalMessageInfo +// Deprecated: Use GroupsForEntityReply.ProtoReflect.Descriptor instead. +func (*GroupsForEntityReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{42} +} -func (m *GroupsForEntityReply) GetGroups() []*logical.Group { - if m != nil { - return m.Groups +func (x *GroupsForEntityReply) GetGroups() []*logical.Group { + if x != nil { + return x.Groups } return nil } -func (m *GroupsForEntityReply) GetErr() string { - if m != nil { - return m.Err +func (x *GroupsForEntityReply) GetErr() string { + if x != nil { + return x.Err } return "" } type PluginEnvReply struct { - PluginEnvironment *logical.PluginEnvironment `sentinel:"" protobuf:"bytes,1,opt,name=plugin_environment,json=pluginEnvironment,proto3" json:"plugin_environment,omitempty"` - Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *PluginEnvReply) Reset() { *m = PluginEnvReply{} } -func (m *PluginEnvReply) String() string { return proto.CompactTextString(m) } -func (*PluginEnvReply) ProtoMessage() {} -func (*PluginEnvReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{43} + PluginEnvironment *logical.PluginEnvironment `sentinel:"" protobuf:"bytes,1,opt,name=plugin_environment,json=pluginEnvironment,proto3" json:"plugin_environment,omitempty"` + Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *PluginEnvReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PluginEnvReply.Unmarshal(m, b) -} -func (m *PluginEnvReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PluginEnvReply.Marshal(b, m, deterministic) -} -func (m *PluginEnvReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_PluginEnvReply.Merge(m, src) +func (x *PluginEnvReply) Reset() { + *x = PluginEnvReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PluginEnvReply) XXX_Size() int { - return xxx_messageInfo_PluginEnvReply.Size(m) + +func (x *PluginEnvReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PluginEnvReply) XXX_DiscardUnknown() { - xxx_messageInfo_PluginEnvReply.DiscardUnknown(m) + +func (*PluginEnvReply) ProtoMessage() {} + +func (x *PluginEnvReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_PluginEnvReply proto.InternalMessageInfo +// Deprecated: Use PluginEnvReply.ProtoReflect.Descriptor instead. +func (*PluginEnvReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{43} +} -func (m *PluginEnvReply) GetPluginEnvironment() *logical.PluginEnvironment { - if m != nil { - return m.PluginEnvironment +func (x *PluginEnvReply) GetPluginEnvironment() *logical.PluginEnvironment { + if x != nil { + return x.PluginEnvironment } return nil } -func (m *PluginEnvReply) GetErr() string { - if m != nil { - return m.Err +func (x *PluginEnvReply) GetErr() string { + if x != nil { + return x.Err } return "" } type GeneratePasswordFromPolicyRequest struct { - PolicyName string `sentinel:"" protobuf:"bytes,1,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GeneratePasswordFromPolicyRequest) Reset() { *m = GeneratePasswordFromPolicyRequest{} } -func (m *GeneratePasswordFromPolicyRequest) String() string { return proto.CompactTextString(m) } -func (*GeneratePasswordFromPolicyRequest) ProtoMessage() {} -func (*GeneratePasswordFromPolicyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{44} + PolicyName string `sentinel:"" protobuf:"bytes,1,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` } -func (m *GeneratePasswordFromPolicyRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GeneratePasswordFromPolicyRequest.Unmarshal(m, b) -} -func (m *GeneratePasswordFromPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GeneratePasswordFromPolicyRequest.Marshal(b, m, deterministic) -} -func (m *GeneratePasswordFromPolicyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GeneratePasswordFromPolicyRequest.Merge(m, src) +func (x *GeneratePasswordFromPolicyRequest) Reset() { + *x = GeneratePasswordFromPolicyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GeneratePasswordFromPolicyRequest) XXX_Size() int { - return xxx_messageInfo_GeneratePasswordFromPolicyRequest.Size(m) + +func (x *GeneratePasswordFromPolicyRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GeneratePasswordFromPolicyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GeneratePasswordFromPolicyRequest.DiscardUnknown(m) + +func (*GeneratePasswordFromPolicyRequest) ProtoMessage() {} + +func (x *GeneratePasswordFromPolicyRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GeneratePasswordFromPolicyRequest proto.InternalMessageInfo +// Deprecated: Use GeneratePasswordFromPolicyRequest.ProtoReflect.Descriptor instead. +func (*GeneratePasswordFromPolicyRequest) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{44} +} -func (m *GeneratePasswordFromPolicyRequest) GetPolicyName() string { - if m != nil { - return m.PolicyName +func (x *GeneratePasswordFromPolicyRequest) GetPolicyName() string { + if x != nil { + return x.PolicyName } return "" } type GeneratePasswordFromPolicyReply struct { - Password string `sentinel:"" protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GeneratePasswordFromPolicyReply) Reset() { *m = GeneratePasswordFromPolicyReply{} } -func (m *GeneratePasswordFromPolicyReply) String() string { return proto.CompactTextString(m) } -func (*GeneratePasswordFromPolicyReply) ProtoMessage() {} -func (*GeneratePasswordFromPolicyReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{45} + Password string `sentinel:"" protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` } -func (m *GeneratePasswordFromPolicyReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GeneratePasswordFromPolicyReply.Unmarshal(m, b) -} -func (m *GeneratePasswordFromPolicyReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GeneratePasswordFromPolicyReply.Marshal(b, m, deterministic) -} -func (m *GeneratePasswordFromPolicyReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_GeneratePasswordFromPolicyReply.Merge(m, src) +func (x *GeneratePasswordFromPolicyReply) Reset() { + *x = GeneratePasswordFromPolicyReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GeneratePasswordFromPolicyReply) XXX_Size() int { - return xxx_messageInfo_GeneratePasswordFromPolicyReply.Size(m) + +func (x *GeneratePasswordFromPolicyReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GeneratePasswordFromPolicyReply) XXX_DiscardUnknown() { - xxx_messageInfo_GeneratePasswordFromPolicyReply.DiscardUnknown(m) + +func (*GeneratePasswordFromPolicyReply) ProtoMessage() {} + +func (x *GeneratePasswordFromPolicyReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GeneratePasswordFromPolicyReply proto.InternalMessageInfo +// Deprecated: Use GeneratePasswordFromPolicyReply.ProtoReflect.Descriptor instead. +func (*GeneratePasswordFromPolicyReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{45} +} -func (m *GeneratePasswordFromPolicyReply) GetPassword() string { - if m != nil { - return m.Password +func (x *GeneratePasswordFromPolicyReply) GetPassword() string { + if x != nil { + return x.Password } return "" } type Connection struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // RemoteAddr is the network address that sent the request. - RemoteAddr string `sentinel:"" protobuf:"bytes,1,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + RemoteAddr string `sentinel:"" protobuf:"bytes,1,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` } -func (m *Connection) Reset() { *m = Connection{} } -func (m *Connection) String() string { return proto.CompactTextString(m) } -func (*Connection) ProtoMessage() {} -func (*Connection) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{46} +func (x *Connection) Reset() { + *x = Connection{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Connection) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Connection.Unmarshal(m, b) -} -func (m *Connection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Connection.Marshal(b, m, deterministic) -} -func (m *Connection) XXX_Merge(src proto.Message) { - xxx_messageInfo_Connection.Merge(m, src) -} -func (m *Connection) XXX_Size() int { - return xxx_messageInfo_Connection.Size(m) +func (x *Connection) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Connection) XXX_DiscardUnknown() { - xxx_messageInfo_Connection.DiscardUnknown(m) + +func (*Connection) ProtoMessage() {} + +func (x *Connection) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Connection proto.InternalMessageInfo +// Deprecated: Use Connection.ProtoReflect.Descriptor instead. +func (*Connection) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{46} +} -func (m *Connection) GetRemoteAddr() string { - if m != nil { - return m.RemoteAddr +func (x *Connection) GetRemoteAddr() string { + if x != nil { + return x.RemoteAddr } return "" } -func init() { - proto.RegisterType((*Empty)(nil), "pb.Empty") - proto.RegisterType((*Header)(nil), "pb.Header") - proto.RegisterType((*ProtoError)(nil), "pb.ProtoError") - proto.RegisterType((*Paths)(nil), "pb.Paths") - proto.RegisterType((*Request)(nil), "pb.Request") - proto.RegisterMapType((map[string]*Header)(nil), "pb.Request.HeadersEntry") - proto.RegisterType((*Auth)(nil), "pb.Auth") - proto.RegisterMapType((map[string]string)(nil), "pb.Auth.MetadataEntry") - proto.RegisterType((*TokenEntry)(nil), "pb.TokenEntry") - proto.RegisterMapType((map[string]string)(nil), "pb.TokenEntry.MetaEntry") - proto.RegisterType((*LeaseOptions)(nil), "pb.LeaseOptions") - proto.RegisterType((*Secret)(nil), "pb.Secret") - proto.RegisterType((*Response)(nil), "pb.Response") - proto.RegisterMapType((map[string]*Header)(nil), "pb.Response.HeadersEntry") - proto.RegisterType((*ResponseWrapInfo)(nil), "pb.ResponseWrapInfo") - proto.RegisterType((*RequestWrapInfo)(nil), "pb.RequestWrapInfo") - proto.RegisterType((*HandleRequestArgs)(nil), "pb.HandleRequestArgs") - proto.RegisterType((*HandleRequestReply)(nil), "pb.HandleRequestReply") - proto.RegisterType((*InitializeArgs)(nil), "pb.InitializeArgs") - proto.RegisterType((*InitializeReply)(nil), "pb.InitializeReply") - proto.RegisterType((*SpecialPathsReply)(nil), "pb.SpecialPathsReply") - proto.RegisterType((*HandleExistenceCheckArgs)(nil), "pb.HandleExistenceCheckArgs") - proto.RegisterType((*HandleExistenceCheckReply)(nil), "pb.HandleExistenceCheckReply") - proto.RegisterType((*SetupArgs)(nil), "pb.SetupArgs") - proto.RegisterMapType((map[string]string)(nil), "pb.SetupArgs.ConfigEntry") - proto.RegisterType((*SetupReply)(nil), "pb.SetupReply") - proto.RegisterType((*TypeReply)(nil), "pb.TypeReply") - proto.RegisterType((*InvalidateKeyArgs)(nil), "pb.InvalidateKeyArgs") - proto.RegisterType((*StorageEntry)(nil), "pb.StorageEntry") - proto.RegisterType((*StorageListArgs)(nil), "pb.StorageListArgs") - proto.RegisterType((*StorageListReply)(nil), "pb.StorageListReply") - proto.RegisterType((*StorageGetArgs)(nil), "pb.StorageGetArgs") - proto.RegisterType((*StorageGetReply)(nil), "pb.StorageGetReply") - proto.RegisterType((*StoragePutArgs)(nil), "pb.StoragePutArgs") - proto.RegisterType((*StoragePutReply)(nil), "pb.StoragePutReply") - proto.RegisterType((*StorageDeleteArgs)(nil), "pb.StorageDeleteArgs") - proto.RegisterType((*StorageDeleteReply)(nil), "pb.StorageDeleteReply") - proto.RegisterType((*TTLReply)(nil), "pb.TTLReply") - proto.RegisterType((*TaintedReply)(nil), "pb.TaintedReply") - proto.RegisterType((*CachingDisabledReply)(nil), "pb.CachingDisabledReply") - proto.RegisterType((*ReplicationStateReply)(nil), "pb.ReplicationStateReply") - proto.RegisterType((*ResponseWrapDataArgs)(nil), "pb.ResponseWrapDataArgs") - proto.RegisterType((*ResponseWrapDataReply)(nil), "pb.ResponseWrapDataReply") - proto.RegisterType((*MlockEnabledReply)(nil), "pb.MlockEnabledReply") - proto.RegisterType((*LocalMountReply)(nil), "pb.LocalMountReply") - proto.RegisterType((*EntityInfoArgs)(nil), "pb.EntityInfoArgs") - proto.RegisterType((*EntityInfoReply)(nil), "pb.EntityInfoReply") - proto.RegisterType((*GroupsForEntityReply)(nil), "pb.GroupsForEntityReply") - proto.RegisterType((*PluginEnvReply)(nil), "pb.PluginEnvReply") - proto.RegisterType((*GeneratePasswordFromPolicyRequest)(nil), "pb.GeneratePasswordFromPolicyRequest") - proto.RegisterType((*GeneratePasswordFromPolicyReply)(nil), "pb.GeneratePasswordFromPolicyReply") - proto.RegisterType((*Connection)(nil), "pb.Connection") -} - -func init() { proto.RegisterFile("sdk/plugin/pb/backend.proto", fileDescriptor_4dbf1dfe0c11846b) } - -var fileDescriptor_4dbf1dfe0c11846b = []byte{ - // 2616 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x72, 0x1b, 0xc7, - 0x11, 0x2e, 0x00, 0xc4, 0x5f, 0xe3, 0x7f, 0x44, 0x2b, 0x2b, 0x48, 0x8e, 0xe8, 0x55, 0x24, 0xd3, - 0x8a, 0x05, 0x5a, 0x54, 0x1c, 0xcb, 0x49, 0x39, 0x2e, 0x99, 0xa2, 0x64, 0xc6, 0x94, 0xcd, 0x5a, - 0xc2, 0x71, 0xfe, 0xaa, 0xe0, 0xc1, 0xee, 0x10, 0xd8, 0xe2, 0x62, 0x77, 0x33, 0x3b, 0x4b, 0x11, - 0xb9, 0xe4, 0x2d, 0xf2, 0x06, 0x39, 0xa7, 0x72, 0xcb, 0x2d, 0x57, 0x57, 0xee, 0x79, 0x85, 0x3c, - 0x47, 0x6a, 0x7a, 0x66, 0xff, 0x00, 0x50, 0x92, 0xab, 0x9c, 0xdb, 0x4e, 0x77, 0x4f, 0xf7, 0x4c, - 0x4f, 0x77, 0x7f, 0x3d, 0xb3, 0x70, 0x33, 0x72, 0xce, 0xf7, 0x42, 0x2f, 0x9e, 0xb9, 0xfe, 0x5e, - 0x38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 0xf0, 0x3a, 0x6d, 0xac, 0x82, 0x41, 0x02, 0x45, 0xc3, 0x1b, 0x9b, 0x38, 0x69, 0xe6, 0xe5, - 0xf1, 0x60, 0x2d, 0xf3, 0xd6, 0xc1, 0xe2, 0x7d, 0x80, 0x0c, 0x12, 0xf2, 0xf2, 0x78, 0xbc, 0xab, - 0x68, 0xf1, 0x21, 0x40, 0x56, 0xe8, 0x55, 0x54, 0x14, 0x71, 0x42, 0x4d, 0x5b, 0x05, 0x83, 0xfb, - 0xd0, 0x4c, 0x4b, 0x69, 0xde, 0x06, 0x2a, 0x58, 0xa9, 0xcc, 0x9f, 0x42, 0x6f, 0xa5, 0xfa, 0x6f, - 0xb4, 0x83, 0xee, 0xd9, 0x08, 0x13, 0x73, 0x18, 0x5e, 0x5d, 0x37, 0xc9, 0x5d, 0x9c, 0xf7, 0xba, - 0xea, 0x3c, 0xbc, 0xf3, 0x3a, 0xb1, 0xd0, 0x5b, 0x7e, 0x76, 0xff, 0xf7, 0xbb, 0x33, 0x57, 0xcc, - 0xe3, 0xe9, 0xc8, 0x0e, 0x16, 0x7b, 0x73, 0x1a, 0xcd, 0x5d, 0x3b, 0xe0, 0xe1, 0xde, 0x85, 0x8c, - 0xdb, 0xbd, 0xc2, 0x7f, 0xc3, 0x69, 0x0d, 0xef, 0xcf, 0x8f, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, - 0x2e, 0xfe, 0x10, 0x49, 0x4f, 0x1c, 0x00, 0x00, +var File_sdk_plugin_pb_backend_proto protoreflect.FileDescriptor + +var file_sdk_plugin_pb_backend_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x62, 0x2f, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, + 0x62, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x64, 0x6b, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2f, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 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, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x20, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x22, 0x5b, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x07, 0x65, 0x72, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, + 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, + 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, + 0x22, 0x96, 0x01, 0x0a, 0x05, 0x50, 0x61, 0x74, 0x68, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, + 0x6f, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x28, + 0x0a, 0x0f, 0x75, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, + 0x11, 0x73, 0x65, 0x61, 0x6c, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x61, 0x6c, 0x57, 0x72, + 0x61, 0x70, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x22, 0xbf, 0x06, 0x0a, 0x07, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x12, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x06, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, + 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, + 0x1c, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, + 0x70, 0x62, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x12, 0x32, 0x0a, + 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x13, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x09, 0x77, 0x72, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x57, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x77, 0x72, 0x61, 0x70, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x1b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x75, + 0x73, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x55, + 0x73, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, + 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x75, 0x6e, 0x61, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x13, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0f, 0x75, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x1a, 0x46, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe6, 0x05, 0x0a, 0x04, + 0x41, 0x75, 0x74, 0x68, 0x12, 0x35, 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, + 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, + 0x32, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x75, + 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6e, 0x75, + 0x6d, 0x55, 0x73, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x49, 0x64, 0x12, 0x24, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x33, 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, + 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x69, 0x64, 0x72, 0x73, 0x12, 0x25, + 0x0a, 0x0e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, + 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x6d, + 0x61, 0x78, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x65, 0x78, + 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4d, 0x61, 0x78, 0x54, 0x74, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6e, + 0x6f, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6e, 0x6f, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xca, 0x04, 0x0a, 0x0a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, + 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x69, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x5f, + 0x75, 0x73, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6e, 0x75, 0x6d, 0x55, + 0x73, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x28, 0x0a, 0x10, 0x65, 0x78, + 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4d, 0x61, + 0x78, 0x54, 0x74, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x73, 0x18, 0x0f, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x69, 0x64, 0x72, 0x73, 0x12, 0x21, + 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x62, 0x62, 0x79, 0x68, 0x6f, 0x6c, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x62, 0x62, 0x79, 0x68, 0x6f, + 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x61, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0xaf, 0x01, 0x0a, 0x0c, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x54, 0x4c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x54, 0x54, 0x4c, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x61, 0x62, 0x6c, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x39, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x69, 0x73, 0x73, 0x75, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x4d, + 0x61, 0x78, 0x54, 0x54, 0x4c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x4d, 0x61, 0x78, + 0x54, 0x54, 0x4c, 0x22, 0x7f, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x35, 0x0a, + 0x0d, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x49, 0x64, 0x22, 0xc8, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x06, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, 0x61, + 0x75, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x31, 0x0a, 0x09, 0x77, 0x72, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x57, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x77, 0x72, 0x61, 0x70, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x33, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x46, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0xc8, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x57, 0x72, 0x61, 0x70, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x54, 0x4c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x54, 0x54, 0x4c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x77, 0x72, 0x61, + 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1b, 0x0a, + 0x09, 0x73, 0x65, 0x61, 0x6c, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x73, 0x65, 0x61, 0x6c, 0x57, 0x72, 0x61, 0x70, 0x22, 0x58, 0x0a, 0x0f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, + 0x03, 0x54, 0x54, 0x4c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x54, 0x54, 0x4c, 0x12, + 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x6c, 0x5f, + 0x77, 0x72, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x61, 0x6c, + 0x57, 0x72, 0x61, 0x70, 0x22, 0x59, 0x0a, 0x11, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x60, 0x0a, 0x12, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x20, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, + 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, + 0x72, 0x22, 0x10, 0x0a, 0x0e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x41, + 0x72, 0x67, 0x73, 0x22, 0x33, 0x0a, 0x0f, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x34, 0x0a, 0x11, 0x53, 0x70, 0x65, 0x63, + 0x69, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1f, 0x0a, + 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, + 0x62, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x73, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, 0x60, + 0x0a, 0x18, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, + 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x72, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x76, 0x0a, 0x19, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1f, 0x0a, + 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0xb8, 0x01, 0x0a, 0x09, 0x53, 0x65, 0x74, + 0x75, 0x70, 0x41, 0x72, 0x67, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x62, 0x72, 0x6f, 0x6b, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x75, 0x70, 0x41, 0x72, + 0x67, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x55, 0x55, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x55, 0x49, 0x44, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x1e, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x75, 0x70, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x65, 0x72, 0x72, 0x22, 0x1f, 0x0a, 0x09, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x22, 0x25, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x72, 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x53, 0x0a, 0x0c, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x6c, 0x5f, 0x77, 0x72, 0x61, 0x70, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x61, 0x6c, 0x57, 0x72, 0x61, 0x70, + 0x22, 0x29, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x72, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x38, 0x0a, 0x10, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, + 0x65, 0x79, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x22, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x47, 0x65, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x4b, 0x0a, 0x0f, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x26, 0x0a, 0x05, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, + 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x38, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x50, 0x75, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x22, 0x23, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x75, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x25, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x26, 0x0a, 0x12, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x65, 0x72, 0x72, 0x22, 0x1c, 0x0a, 0x08, 0x54, 0x54, 0x4c, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x54, 0x54, 0x4c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x54, + 0x54, 0x4c, 0x22, 0x28, 0x0a, 0x0c, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x22, 0x32, 0x0a, 0x14, + 0x43, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x22, 0x2d, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, + 0x4e, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x57, 0x72, 0x61, 0x70, 0x44, + 0x61, 0x74, 0x61, 0x41, 0x72, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x54, + 0x54, 0x4c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x54, 0x54, 0x4c, 0x12, 0x10, 0x0a, + 0x03, 0x4a, 0x57, 0x54, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x4a, 0x57, 0x54, 0x22, + 0x5c, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x57, 0x72, 0x61, 0x70, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x09, 0x77, 0x72, 0x61, 0x70, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x57, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x08, 0x77, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x65, + 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x2d, 0x0a, + 0x11, 0x4d, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x27, 0x0a, 0x0f, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x22, 0x2d, 0x0a, 0x0e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, + 0x6e, 0x66, 0x6f, 0x41, 0x72, 0x67, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x0f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x27, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, + 0x6c, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, + 0x72, 0x72, 0x22, 0x50, 0x0a, 0x14, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, + 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x65, 0x72, 0x72, 0x22, 0x6d, 0x0a, 0x0e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, + 0x76, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x5f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x11, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x65, 0x72, 0x72, 0x22, 0x44, 0x0a, 0x21, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3d, 0x0a, 0x1f, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x46, 0x72, 0x6f, + 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x2d, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x32, 0xa5, 0x03, 0x0a, 0x07, 0x42, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x12, 0x3e, 0x0a, 0x0d, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x70, 0x62, + 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x0c, 0x53, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x50, 0x61, + 0x74, 0x68, 0x73, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, + 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x73, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x53, 0x0a, 0x14, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, + 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1c, 0x2e, + 0x70, 0x62, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1d, 0x2e, 0x70, 0x62, + 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x65, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1f, 0x0a, 0x07, 0x43, 0x6c, + 0x65, 0x61, 0x6e, 0x75, 0x70, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x0d, 0x49, + 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x15, 0x2e, 0x70, + 0x62, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, + 0x72, 0x67, 0x73, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x26, + 0x0a, 0x05, 0x53, 0x65, 0x74, 0x75, 0x70, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, + 0x75, 0x70, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x75, + 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x35, 0x0a, 0x0a, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x20, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, + 0xd5, 0x01, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e, + 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x47, 0x65, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e, + 0x0a, 0x03, 0x50, 0x75, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x50, 0x75, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x75, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x37, + 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, + 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, 0xb1, 0x05, 0x0a, 0x0a, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x56, 0x69, 0x65, 0x77, 0x12, 0x2a, 0x0a, 0x0f, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x54, 0x4c, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x54, 0x4c, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x26, 0x0a, 0x0b, 0x4d, 0x61, 0x78, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x54, + 0x4c, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0c, 0x2e, 0x70, + 0x62, 0x2e, 0x54, 0x54, 0x4c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x26, 0x0a, 0x07, 0x54, 0x61, + 0x69, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x36, 0x0a, 0x0f, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x38, 0x0a, 0x10, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x09, + 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x47, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x57, 0x72, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x57, 0x72, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x41, 0x72, + 0x67, 0x73, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x57, 0x72, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, + 0x0c, 0x4d, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x09, 0x2e, + 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x6c, + 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x2c, 0x0a, 0x0a, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x09, 0x2e, + 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, + 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x35, 0x0a, + 0x0a, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x2e, 0x70, 0x62, + 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x41, 0x72, 0x67, 0x73, 0x1a, + 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x09, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, + 0x76, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x70, + 0x62, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x12, 0x3f, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, + 0x6e, 0x66, 0x6f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x12, 0x68, 0x0a, 0x1a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x46, 0x72, 0x6f, 0x6d, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x2a, 0x5a, 0x28, 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, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sdk_plugin_pb_backend_proto_rawDescOnce sync.Once + file_sdk_plugin_pb_backend_proto_rawDescData = file_sdk_plugin_pb_backend_proto_rawDesc +) + +func file_sdk_plugin_pb_backend_proto_rawDescGZIP() []byte { + file_sdk_plugin_pb_backend_proto_rawDescOnce.Do(func() { + file_sdk_plugin_pb_backend_proto_rawDescData = protoimpl.X.CompressGZIP(file_sdk_plugin_pb_backend_proto_rawDescData) + }) + return file_sdk_plugin_pb_backend_proto_rawDescData +} + +var file_sdk_plugin_pb_backend_proto_msgTypes = make([]protoimpl.MessageInfo, 52) +var file_sdk_plugin_pb_backend_proto_goTypes = []interface{}{ + (*Empty)(nil), // 0: pb.Empty + (*Header)(nil), // 1: pb.Header + (*ProtoError)(nil), // 2: pb.ProtoError + (*Paths)(nil), // 3: pb.Paths + (*Request)(nil), // 4: pb.Request + (*Auth)(nil), // 5: pb.Auth + (*TokenEntry)(nil), // 6: pb.TokenEntry + (*LeaseOptions)(nil), // 7: pb.LeaseOptions + (*Secret)(nil), // 8: pb.Secret + (*Response)(nil), // 9: pb.Response + (*ResponseWrapInfo)(nil), // 10: pb.ResponseWrapInfo + (*RequestWrapInfo)(nil), // 11: pb.RequestWrapInfo + (*HandleRequestArgs)(nil), // 12: pb.HandleRequestArgs + (*HandleRequestReply)(nil), // 13: pb.HandleRequestReply + (*InitializeArgs)(nil), // 14: pb.InitializeArgs + (*InitializeReply)(nil), // 15: pb.InitializeReply + (*SpecialPathsReply)(nil), // 16: pb.SpecialPathsReply + (*HandleExistenceCheckArgs)(nil), // 17: pb.HandleExistenceCheckArgs + (*HandleExistenceCheckReply)(nil), // 18: pb.HandleExistenceCheckReply + (*SetupArgs)(nil), // 19: pb.SetupArgs + (*SetupReply)(nil), // 20: pb.SetupReply + (*TypeReply)(nil), // 21: pb.TypeReply + (*InvalidateKeyArgs)(nil), // 22: pb.InvalidateKeyArgs + (*StorageEntry)(nil), // 23: pb.StorageEntry + (*StorageListArgs)(nil), // 24: pb.StorageListArgs + (*StorageListReply)(nil), // 25: pb.StorageListReply + (*StorageGetArgs)(nil), // 26: pb.StorageGetArgs + (*StorageGetReply)(nil), // 27: pb.StorageGetReply + (*StoragePutArgs)(nil), // 28: pb.StoragePutArgs + (*StoragePutReply)(nil), // 29: pb.StoragePutReply + (*StorageDeleteArgs)(nil), // 30: pb.StorageDeleteArgs + (*StorageDeleteReply)(nil), // 31: pb.StorageDeleteReply + (*TTLReply)(nil), // 32: pb.TTLReply + (*TaintedReply)(nil), // 33: pb.TaintedReply + (*CachingDisabledReply)(nil), // 34: pb.CachingDisabledReply + (*ReplicationStateReply)(nil), // 35: pb.ReplicationStateReply + (*ResponseWrapDataArgs)(nil), // 36: pb.ResponseWrapDataArgs + (*ResponseWrapDataReply)(nil), // 37: pb.ResponseWrapDataReply + (*MlockEnabledReply)(nil), // 38: pb.MlockEnabledReply + (*LocalMountReply)(nil), // 39: pb.LocalMountReply + (*EntityInfoArgs)(nil), // 40: pb.EntityInfoArgs + (*EntityInfoReply)(nil), // 41: pb.EntityInfoReply + (*GroupsForEntityReply)(nil), // 42: pb.GroupsForEntityReply + (*PluginEnvReply)(nil), // 43: pb.PluginEnvReply + (*GeneratePasswordFromPolicyRequest)(nil), // 44: pb.GeneratePasswordFromPolicyRequest + (*GeneratePasswordFromPolicyReply)(nil), // 45: pb.GeneratePasswordFromPolicyReply + (*Connection)(nil), // 46: pb.Connection + nil, // 47: pb.Request.HeadersEntry + nil, // 48: pb.Auth.MetadataEntry + nil, // 49: pb.TokenEntry.MetaEntry + nil, // 50: pb.Response.HeadersEntry + nil, // 51: pb.SetupArgs.ConfigEntry + (*logical.Alias)(nil), // 52: logical.Alias + (*timestamp.Timestamp)(nil), // 53: google.protobuf.Timestamp + (*logical.Entity)(nil), // 54: logical.Entity + (*logical.Group)(nil), // 55: logical.Group + (*logical.PluginEnvironment)(nil), // 56: logical.PluginEnvironment +} +var file_sdk_plugin_pb_backend_proto_depIDxs = []int32{ + 8, // 0: pb.Request.secret:type_name -> pb.Secret + 5, // 1: pb.Request.auth:type_name -> pb.Auth + 47, // 2: pb.Request.headers:type_name -> pb.Request.HeadersEntry + 11, // 3: pb.Request.wrap_info:type_name -> pb.RequestWrapInfo + 46, // 4: pb.Request.connection:type_name -> pb.Connection + 7, // 5: pb.Auth.lease_options:type_name -> pb.LeaseOptions + 48, // 6: pb.Auth.metadata:type_name -> pb.Auth.MetadataEntry + 52, // 7: pb.Auth.alias:type_name -> logical.Alias + 52, // 8: pb.Auth.group_aliases:type_name -> logical.Alias + 49, // 9: pb.TokenEntry.meta:type_name -> pb.TokenEntry.MetaEntry + 53, // 10: pb.LeaseOptions.issue_time:type_name -> google.protobuf.Timestamp + 7, // 11: pb.Secret.lease_options:type_name -> pb.LeaseOptions + 8, // 12: pb.Response.secret:type_name -> pb.Secret + 5, // 13: pb.Response.auth:type_name -> pb.Auth + 10, // 14: pb.Response.wrap_info:type_name -> pb.ResponseWrapInfo + 50, // 15: pb.Response.headers:type_name -> pb.Response.HeadersEntry + 53, // 16: pb.ResponseWrapInfo.creation_time:type_name -> google.protobuf.Timestamp + 4, // 17: pb.HandleRequestArgs.request:type_name -> pb.Request + 9, // 18: pb.HandleRequestReply.response:type_name -> pb.Response + 2, // 19: pb.HandleRequestReply.err:type_name -> pb.ProtoError + 2, // 20: pb.InitializeReply.err:type_name -> pb.ProtoError + 3, // 21: pb.SpecialPathsReply.paths:type_name -> pb.Paths + 4, // 22: pb.HandleExistenceCheckArgs.request:type_name -> pb.Request + 2, // 23: pb.HandleExistenceCheckReply.err:type_name -> pb.ProtoError + 51, // 24: pb.SetupArgs.Config:type_name -> pb.SetupArgs.ConfigEntry + 23, // 25: pb.StorageGetReply.entry:type_name -> pb.StorageEntry + 23, // 26: pb.StoragePutArgs.entry:type_name -> pb.StorageEntry + 10, // 27: pb.ResponseWrapDataReply.wrap_info:type_name -> pb.ResponseWrapInfo + 54, // 28: pb.EntityInfoReply.entity:type_name -> logical.Entity + 55, // 29: pb.GroupsForEntityReply.groups:type_name -> logical.Group + 56, // 30: pb.PluginEnvReply.plugin_environment:type_name -> logical.PluginEnvironment + 1, // 31: pb.Request.HeadersEntry.value:type_name -> pb.Header + 1, // 32: pb.Response.HeadersEntry.value:type_name -> pb.Header + 12, // 33: pb.Backend.HandleRequest:input_type -> pb.HandleRequestArgs + 0, // 34: pb.Backend.SpecialPaths:input_type -> pb.Empty + 17, // 35: pb.Backend.HandleExistenceCheck:input_type -> pb.HandleExistenceCheckArgs + 0, // 36: pb.Backend.Cleanup:input_type -> pb.Empty + 22, // 37: pb.Backend.InvalidateKey:input_type -> pb.InvalidateKeyArgs + 19, // 38: pb.Backend.Setup:input_type -> pb.SetupArgs + 14, // 39: pb.Backend.Initialize:input_type -> pb.InitializeArgs + 0, // 40: pb.Backend.Type:input_type -> pb.Empty + 24, // 41: pb.Storage.List:input_type -> pb.StorageListArgs + 26, // 42: pb.Storage.Get:input_type -> pb.StorageGetArgs + 28, // 43: pb.Storage.Put:input_type -> pb.StoragePutArgs + 30, // 44: pb.Storage.Delete:input_type -> pb.StorageDeleteArgs + 0, // 45: pb.SystemView.DefaultLeaseTTL:input_type -> pb.Empty + 0, // 46: pb.SystemView.MaxLeaseTTL:input_type -> pb.Empty + 0, // 47: pb.SystemView.Tainted:input_type -> pb.Empty + 0, // 48: pb.SystemView.CachingDisabled:input_type -> pb.Empty + 0, // 49: pb.SystemView.ReplicationState:input_type -> pb.Empty + 36, // 50: pb.SystemView.ResponseWrapData:input_type -> pb.ResponseWrapDataArgs + 0, // 51: pb.SystemView.MlockEnabled:input_type -> pb.Empty + 0, // 52: pb.SystemView.LocalMount:input_type -> pb.Empty + 40, // 53: pb.SystemView.EntityInfo:input_type -> pb.EntityInfoArgs + 0, // 54: pb.SystemView.PluginEnv:input_type -> pb.Empty + 40, // 55: pb.SystemView.GroupsForEntity:input_type -> pb.EntityInfoArgs + 44, // 56: pb.SystemView.GeneratePasswordFromPolicy:input_type -> pb.GeneratePasswordFromPolicyRequest + 13, // 57: pb.Backend.HandleRequest:output_type -> pb.HandleRequestReply + 16, // 58: pb.Backend.SpecialPaths:output_type -> pb.SpecialPathsReply + 18, // 59: pb.Backend.HandleExistenceCheck:output_type -> pb.HandleExistenceCheckReply + 0, // 60: pb.Backend.Cleanup:output_type -> pb.Empty + 0, // 61: pb.Backend.InvalidateKey:output_type -> pb.Empty + 20, // 62: pb.Backend.Setup:output_type -> pb.SetupReply + 15, // 63: pb.Backend.Initialize:output_type -> pb.InitializeReply + 21, // 64: pb.Backend.Type:output_type -> pb.TypeReply + 25, // 65: pb.Storage.List:output_type -> pb.StorageListReply + 27, // 66: pb.Storage.Get:output_type -> pb.StorageGetReply + 29, // 67: pb.Storage.Put:output_type -> pb.StoragePutReply + 31, // 68: pb.Storage.Delete:output_type -> pb.StorageDeleteReply + 32, // 69: pb.SystemView.DefaultLeaseTTL:output_type -> pb.TTLReply + 32, // 70: pb.SystemView.MaxLeaseTTL:output_type -> pb.TTLReply + 33, // 71: pb.SystemView.Tainted:output_type -> pb.TaintedReply + 34, // 72: pb.SystemView.CachingDisabled:output_type -> pb.CachingDisabledReply + 35, // 73: pb.SystemView.ReplicationState:output_type -> pb.ReplicationStateReply + 37, // 74: pb.SystemView.ResponseWrapData:output_type -> pb.ResponseWrapDataReply + 38, // 75: pb.SystemView.MlockEnabled:output_type -> pb.MlockEnabledReply + 39, // 76: pb.SystemView.LocalMount:output_type -> pb.LocalMountReply + 41, // 77: pb.SystemView.EntityInfo:output_type -> pb.EntityInfoReply + 43, // 78: pb.SystemView.PluginEnv:output_type -> pb.PluginEnvReply + 42, // 79: pb.SystemView.GroupsForEntity:output_type -> pb.GroupsForEntityReply + 45, // 80: pb.SystemView.GeneratePasswordFromPolicy:output_type -> pb.GeneratePasswordFromPolicyReply + 57, // [57:81] is the sub-list for method output_type + 33, // [33:57] is the sub-list for method input_type + 33, // [33:33] is the sub-list for extension type_name + 33, // [33:33] is the sub-list for extension extendee + 0, // [0:33] is the sub-list for field type_name +} + +func init() { file_sdk_plugin_pb_backend_proto_init() } +func file_sdk_plugin_pb_backend_proto_init() { + if File_sdk_plugin_pb_backend_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sdk_plugin_pb_backend_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Header); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProtoError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Paths); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Auth); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LeaseOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Secret); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseWrapInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RequestWrapInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandleRequestArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandleRequestReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitializeArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitializeReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpecialPathsReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandleExistenceCheckArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandleExistenceCheckReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetupArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetupReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypeReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvalidateKeyArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageListArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageListReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageGetArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageGetReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StoragePutArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StoragePutReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageDeleteArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageDeleteReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TTLReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaintedReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CachingDisabledReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReplicationStateReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseWrapDataArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseWrapDataReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MlockEnabledReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocalMountReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EntityInfoArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EntityInfoReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupsForEntityReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PluginEnvReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GeneratePasswordFromPolicyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GeneratePasswordFromPolicyReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Connection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sdk_plugin_pb_backend_proto_rawDesc, + NumEnums: 0, + NumMessages: 52, + NumExtensions: 0, + NumServices: 3, + }, + GoTypes: file_sdk_plugin_pb_backend_proto_goTypes, + DependencyIndexes: file_sdk_plugin_pb_backend_proto_depIDxs, + MessageInfos: file_sdk_plugin_pb_backend_proto_msgTypes, + }.Build() + File_sdk_plugin_pb_backend_proto = out.File + file_sdk_plugin_pb_backend_proto_rawDesc = nil + file_sdk_plugin_pb_backend_proto_goTypes = nil + file_sdk_plugin_pb_backend_proto_depIDxs = nil } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // BackendClient is the client API for Backend service. // @@ -3055,10 +4419,10 @@ type BackendClient interface { } type backendClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewBackendClient(cc *grpc.ClientConn) BackendClient { +func NewBackendClient(cc grpc.ClientConnInterface) BackendClient { return &backendClient{cc} } @@ -3177,28 +4541,28 @@ type BackendServer interface { type UnimplementedBackendServer struct { } -func (*UnimplementedBackendServer) HandleRequest(ctx context.Context, req *HandleRequestArgs) (*HandleRequestReply, error) { +func (*UnimplementedBackendServer) HandleRequest(context.Context, *HandleRequestArgs) (*HandleRequestReply, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleRequest not implemented") } -func (*UnimplementedBackendServer) SpecialPaths(ctx context.Context, req *Empty) (*SpecialPathsReply, error) { +func (*UnimplementedBackendServer) SpecialPaths(context.Context, *Empty) (*SpecialPathsReply, error) { return nil, status.Errorf(codes.Unimplemented, "method SpecialPaths not implemented") } -func (*UnimplementedBackendServer) HandleExistenceCheck(ctx context.Context, req *HandleExistenceCheckArgs) (*HandleExistenceCheckReply, error) { +func (*UnimplementedBackendServer) HandleExistenceCheck(context.Context, *HandleExistenceCheckArgs) (*HandleExistenceCheckReply, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleExistenceCheck not implemented") } -func (*UnimplementedBackendServer) Cleanup(ctx context.Context, req *Empty) (*Empty, error) { +func (*UnimplementedBackendServer) Cleanup(context.Context, *Empty) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Cleanup not implemented") } -func (*UnimplementedBackendServer) InvalidateKey(ctx context.Context, req *InvalidateKeyArgs) (*Empty, error) { +func (*UnimplementedBackendServer) InvalidateKey(context.Context, *InvalidateKeyArgs) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method InvalidateKey not implemented") } -func (*UnimplementedBackendServer) Setup(ctx context.Context, req *SetupArgs) (*SetupReply, error) { +func (*UnimplementedBackendServer) Setup(context.Context, *SetupArgs) (*SetupReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Setup not implemented") } -func (*UnimplementedBackendServer) Initialize(ctx context.Context, req *InitializeArgs) (*InitializeReply, error) { +func (*UnimplementedBackendServer) Initialize(context.Context, *InitializeArgs) (*InitializeReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented") } -func (*UnimplementedBackendServer) Type(ctx context.Context, req *Empty) (*TypeReply, error) { +func (*UnimplementedBackendServer) Type(context.Context, *Empty) (*TypeReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Type not implemented") } @@ -3402,10 +4766,10 @@ type StorageClient interface { } type storageClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewStorageClient(cc *grpc.ClientConn) StorageClient { +func NewStorageClient(cc grpc.ClientConnInterface) StorageClient { return &storageClient{cc} } @@ -3457,16 +4821,16 @@ type StorageServer interface { type UnimplementedStorageServer struct { } -func (*UnimplementedStorageServer) List(ctx context.Context, req *StorageListArgs) (*StorageListReply, error) { +func (*UnimplementedStorageServer) List(context.Context, *StorageListArgs) (*StorageListReply, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } -func (*UnimplementedStorageServer) Get(ctx context.Context, req *StorageGetArgs) (*StorageGetReply, error) { +func (*UnimplementedStorageServer) Get(context.Context, *StorageGetArgs) (*StorageGetReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") } -func (*UnimplementedStorageServer) Put(ctx context.Context, req *StoragePutArgs) (*StoragePutReply, error) { +func (*UnimplementedStorageServer) Put(context.Context, *StoragePutArgs) (*StoragePutReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Put not implemented") } -func (*UnimplementedStorageServer) Delete(ctx context.Context, req *StorageDeleteArgs) (*StorageDeleteReply, error) { +func (*UnimplementedStorageServer) Delete(context.Context, *StorageDeleteArgs) (*StorageDeleteReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") } @@ -3616,10 +4980,10 @@ type SystemViewClient interface { } type systemViewClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewSystemViewClient(cc *grpc.ClientConn) SystemViewClient { +func NewSystemViewClient(cc grpc.ClientConnInterface) SystemViewClient { return &systemViewClient{cc} } @@ -3777,40 +5141,40 @@ type SystemViewServer interface { type UnimplementedSystemViewServer struct { } -func (*UnimplementedSystemViewServer) DefaultLeaseTTL(ctx context.Context, req *Empty) (*TTLReply, error) { +func (*UnimplementedSystemViewServer) DefaultLeaseTTL(context.Context, *Empty) (*TTLReply, error) { return nil, status.Errorf(codes.Unimplemented, "method DefaultLeaseTTL not implemented") } -func (*UnimplementedSystemViewServer) MaxLeaseTTL(ctx context.Context, req *Empty) (*TTLReply, error) { +func (*UnimplementedSystemViewServer) MaxLeaseTTL(context.Context, *Empty) (*TTLReply, error) { return nil, status.Errorf(codes.Unimplemented, "method MaxLeaseTTL not implemented") } -func (*UnimplementedSystemViewServer) Tainted(ctx context.Context, req *Empty) (*TaintedReply, error) { +func (*UnimplementedSystemViewServer) Tainted(context.Context, *Empty) (*TaintedReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Tainted not implemented") } -func (*UnimplementedSystemViewServer) CachingDisabled(ctx context.Context, req *Empty) (*CachingDisabledReply, error) { +func (*UnimplementedSystemViewServer) CachingDisabled(context.Context, *Empty) (*CachingDisabledReply, error) { return nil, status.Errorf(codes.Unimplemented, "method CachingDisabled not implemented") } -func (*UnimplementedSystemViewServer) ReplicationState(ctx context.Context, req *Empty) (*ReplicationStateReply, error) { +func (*UnimplementedSystemViewServer) ReplicationState(context.Context, *Empty) (*ReplicationStateReply, error) { return nil, status.Errorf(codes.Unimplemented, "method ReplicationState not implemented") } -func (*UnimplementedSystemViewServer) ResponseWrapData(ctx context.Context, req *ResponseWrapDataArgs) (*ResponseWrapDataReply, error) { +func (*UnimplementedSystemViewServer) ResponseWrapData(context.Context, *ResponseWrapDataArgs) (*ResponseWrapDataReply, error) { return nil, status.Errorf(codes.Unimplemented, "method ResponseWrapData not implemented") } -func (*UnimplementedSystemViewServer) MlockEnabled(ctx context.Context, req *Empty) (*MlockEnabledReply, error) { +func (*UnimplementedSystemViewServer) MlockEnabled(context.Context, *Empty) (*MlockEnabledReply, error) { return nil, status.Errorf(codes.Unimplemented, "method MlockEnabled not implemented") } -func (*UnimplementedSystemViewServer) LocalMount(ctx context.Context, req *Empty) (*LocalMountReply, error) { +func (*UnimplementedSystemViewServer) LocalMount(context.Context, *Empty) (*LocalMountReply, error) { return nil, status.Errorf(codes.Unimplemented, "method LocalMount not implemented") } -func (*UnimplementedSystemViewServer) EntityInfo(ctx context.Context, req *EntityInfoArgs) (*EntityInfoReply, error) { +func (*UnimplementedSystemViewServer) EntityInfo(context.Context, *EntityInfoArgs) (*EntityInfoReply, error) { return nil, status.Errorf(codes.Unimplemented, "method EntityInfo not implemented") } -func (*UnimplementedSystemViewServer) PluginEnv(ctx context.Context, req *Empty) (*PluginEnvReply, error) { +func (*UnimplementedSystemViewServer) PluginEnv(context.Context, *Empty) (*PluginEnvReply, error) { return nil, status.Errorf(codes.Unimplemented, "method PluginEnv not implemented") } -func (*UnimplementedSystemViewServer) GroupsForEntity(ctx context.Context, req *EntityInfoArgs) (*GroupsForEntityReply, error) { +func (*UnimplementedSystemViewServer) GroupsForEntity(context.Context, *EntityInfoArgs) (*GroupsForEntityReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GroupsForEntity not implemented") } -func (*UnimplementedSystemViewServer) GeneratePasswordFromPolicy(ctx context.Context, req *GeneratePasswordFromPolicyRequest) (*GeneratePasswordFromPolicyReply, error) { +func (*UnimplementedSystemViewServer) GeneratePasswordFromPolicy(context.Context, *GeneratePasswordFromPolicyRequest) (*GeneratePasswordFromPolicyReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GeneratePasswordFromPolicy not implemented") } diff --git a/vendor/github.com/golang/mock/AUTHORS b/vendor/github.com/golang/mock/AUTHORS deleted file mode 100644 index 660b8ccc8ae0..000000000000 --- a/vendor/github.com/golang/mock/AUTHORS +++ /dev/null @@ -1,12 +0,0 @@ -# This is the official list of GoMock authors for copyright purposes. -# This file is distinct from the CONTRIBUTORS files. -# See the latter for an explanation. - -# Names should be added to this file as -# Name or Organization -# The email address is not required for organizations. - -# Please keep the list sorted. - -Alex Reece -Google Inc. diff --git a/vendor/github.com/golang/mock/CONTRIBUTORS b/vendor/github.com/golang/mock/CONTRIBUTORS deleted file mode 100644 index def849cab1bd..000000000000 --- a/vendor/github.com/golang/mock/CONTRIBUTORS +++ /dev/null @@ -1,37 +0,0 @@ -# This is the official list of people who can contribute (and typically -# have contributed) code to the gomock repository. -# The AUTHORS file lists the copyright holders; this file -# lists people. For example, Google employees are listed here -# but not in AUTHORS, because Google holds the copyright. -# -# The submission process automatically checks to make sure -# that people submitting code are listed in this file (by email address). -# -# Names should be added to this file only after verifying that -# the individual or the individual's organization has agreed to -# the appropriate Contributor License Agreement, found here: -# -# http://code.google.com/legal/individual-cla-v1.0.html -# http://code.google.com/legal/corporate-cla-v1.0.html -# -# The agreement for individuals can be filled out on the web. -# -# When adding J Random Contributor's name to this file, -# either J's name or J's organization's name should be -# added to the AUTHORS file, depending on whether the -# individual or corporate CLA was used. - -# Names should be added to this file like so: -# Name -# -# An entry with two email addresses specifies that the -# first address should be used in the submit logs and -# that the second address should be recognized as the -# same person when interacting with Rietveld. - -# Please keep the list sorted. - -Aaron Jacobs -Alex Reece -David Symonds -Ryan Barrett diff --git a/vendor/github.com/golang/mock/LICENSE b/vendor/github.com/golang/mock/LICENSE deleted file mode 100644 index d64569567334..000000000000 --- a/vendor/github.com/golang/mock/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/golang/mock/gomock/call.go b/vendor/github.com/golang/mock/gomock/call.go deleted file mode 100644 index 3d54d9f5d010..000000000000 --- a/vendor/github.com/golang/mock/gomock/call.go +++ /dev/null @@ -1,420 +0,0 @@ -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package gomock - -import ( - "fmt" - "reflect" - "strconv" - "strings" -) - -// Call represents an expected call to a mock. -type Call struct { - t TestHelper // for triggering test failures on invalid call setup - - receiver interface{} // the receiver of the method call - method string // the name of the method - methodType reflect.Type // the type of the method - args []Matcher // the args - origin string // file and line number of call setup - - preReqs []*Call // prerequisite calls - - // Expectations - minCalls, maxCalls int - - numCalls int // actual number made - - // actions are called when this Call is called. Each action gets the args and - // can set the return values by returning a non-nil slice. Actions run in the - // order they are created. - actions []func([]interface{}) []interface{} -} - -// newCall creates a *Call. It requires the method type in order to support -// unexported methods. -func newCall(t TestHelper, receiver interface{}, method string, methodType reflect.Type, args ...interface{}) *Call { - t.Helper() - - // TODO: check arity, types. - margs := make([]Matcher, len(args)) - for i, arg := range args { - if m, ok := arg.(Matcher); ok { - margs[i] = m - } else if arg == nil { - // Handle nil specially so that passing a nil interface value - // will match the typed nils of concrete args. - margs[i] = Nil() - } else { - margs[i] = Eq(arg) - } - } - - origin := callerInfo(3) - actions := []func([]interface{}) []interface{}{func([]interface{}) []interface{} { - // Synthesize the zero value for each of the return args' types. - rets := make([]interface{}, methodType.NumOut()) - for i := 0; i < methodType.NumOut(); i++ { - rets[i] = reflect.Zero(methodType.Out(i)).Interface() - } - return rets - }} - return &Call{t: t, receiver: receiver, method: method, methodType: methodType, - args: margs, origin: origin, minCalls: 1, maxCalls: 1, actions: actions} -} - -// AnyTimes allows the expectation to be called 0 or more times -func (c *Call) AnyTimes() *Call { - c.minCalls, c.maxCalls = 0, 1e8 // close enough to infinity - return c -} - -// MinTimes requires the call to occur at least n times. If AnyTimes or MaxTimes have not been called, MinTimes also -// sets the maximum number of calls to infinity. -func (c *Call) MinTimes(n int) *Call { - c.minCalls = n - if c.maxCalls == 1 { - c.maxCalls = 1e8 - } - return c -} - -// MaxTimes limits the number of calls to n times. If AnyTimes or MinTimes have not been called, MaxTimes also -// sets the minimum number of calls to 0. -func (c *Call) MaxTimes(n int) *Call { - c.maxCalls = n - if c.minCalls == 1 { - c.minCalls = 0 - } - return c -} - -// DoAndReturn declares the action to run when the call is matched. -// The return values from this function are returned by the mocked function. -// It takes an interface{} argument to support n-arity functions. -func (c *Call) DoAndReturn(f interface{}) *Call { - // TODO: Check arity and types here, rather than dying badly elsewhere. - v := reflect.ValueOf(f) - - c.addAction(func(args []interface{}) []interface{} { - vargs := make([]reflect.Value, len(args)) - ft := v.Type() - for i := 0; i < len(args); i++ { - if args[i] != nil { - vargs[i] = reflect.ValueOf(args[i]) - } else { - // Use the zero value for the arg. - vargs[i] = reflect.Zero(ft.In(i)) - } - } - vrets := v.Call(vargs) - rets := make([]interface{}, len(vrets)) - for i, ret := range vrets { - rets[i] = ret.Interface() - } - return rets - }) - return c -} - -// Do declares the action to run when the call is matched. The function's -// return values are ignored to retain backward compatibility. To use the -// return values call DoAndReturn. -// It takes an interface{} argument to support n-arity functions. -func (c *Call) Do(f interface{}) *Call { - // TODO: Check arity and types here, rather than dying badly elsewhere. - v := reflect.ValueOf(f) - - c.addAction(func(args []interface{}) []interface{} { - vargs := make([]reflect.Value, len(args)) - ft := v.Type() - for i := 0; i < len(args); i++ { - if args[i] != nil { - vargs[i] = reflect.ValueOf(args[i]) - } else { - // Use the zero value for the arg. - vargs[i] = reflect.Zero(ft.In(i)) - } - } - v.Call(vargs) - return nil - }) - return c -} - -// Return declares the values to be returned by the mocked function call. -func (c *Call) Return(rets ...interface{}) *Call { - c.t.Helper() - - mt := c.methodType - if len(rets) != mt.NumOut() { - c.t.Fatalf("wrong number of arguments to Return for %T.%v: got %d, want %d [%s]", - c.receiver, c.method, len(rets), mt.NumOut(), c.origin) - } - for i, ret := range rets { - if got, want := reflect.TypeOf(ret), mt.Out(i); got == want { - // Identical types; nothing to do. - } else if got == nil { - // Nil needs special handling. - switch want.Kind() { - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - // ok - default: - c.t.Fatalf("argument %d to Return for %T.%v is nil, but %v is not nillable [%s]", - i, c.receiver, c.method, want, c.origin) - } - } else if got.AssignableTo(want) { - // Assignable type relation. Make the assignment now so that the generated code - // can return the values with a type assertion. - v := reflect.New(want).Elem() - v.Set(reflect.ValueOf(ret)) - rets[i] = v.Interface() - } else { - c.t.Fatalf("wrong type of argument %d to Return for %T.%v: %v is not assignable to %v [%s]", - i, c.receiver, c.method, got, want, c.origin) - } - } - - c.addAction(func([]interface{}) []interface{} { - return rets - }) - - return c -} - -// Times declares the exact number of times a function call is expected to be executed. -func (c *Call) Times(n int) *Call { - c.minCalls, c.maxCalls = n, n - return c -} - -// SetArg declares an action that will set the nth argument's value, -// indirected through a pointer. Or, in the case of a slice, SetArg -// will copy value's elements into the nth argument. -func (c *Call) SetArg(n int, value interface{}) *Call { - c.t.Helper() - - mt := c.methodType - // TODO: This will break on variadic methods. - // We will need to check those at invocation time. - if n < 0 || n >= mt.NumIn() { - c.t.Fatalf("SetArg(%d, ...) called for a method with %d args [%s]", - n, mt.NumIn(), c.origin) - } - // Permit setting argument through an interface. - // In the interface case, we don't (nay, can't) check the type here. - at := mt.In(n) - switch at.Kind() { - case reflect.Ptr: - dt := at.Elem() - if vt := reflect.TypeOf(value); !vt.AssignableTo(dt) { - c.t.Fatalf("SetArg(%d, ...) argument is a %v, not assignable to %v [%s]", - n, vt, dt, c.origin) - } - case reflect.Interface: - // nothing to do - case reflect.Slice: - // nothing to do - default: - c.t.Fatalf("SetArg(%d, ...) referring to argument of non-pointer non-interface non-slice type %v [%s]", - n, at, c.origin) - } - - c.addAction(func(args []interface{}) []interface{} { - v := reflect.ValueOf(value) - switch reflect.TypeOf(args[n]).Kind() { - case reflect.Slice: - setSlice(args[n], v) - default: - reflect.ValueOf(args[n]).Elem().Set(v) - } - return nil - }) - return c -} - -// isPreReq returns true if other is a direct or indirect prerequisite to c. -func (c *Call) isPreReq(other *Call) bool { - for _, preReq := range c.preReqs { - if other == preReq || preReq.isPreReq(other) { - return true - } - } - return false -} - -// After declares that the call may only match after preReq has been exhausted. -func (c *Call) After(preReq *Call) *Call { - c.t.Helper() - - if c == preReq { - c.t.Fatalf("A call isn't allowed to be its own prerequisite") - } - if preReq.isPreReq(c) { - c.t.Fatalf("Loop in call order: %v is a prerequisite to %v (possibly indirectly).", c, preReq) - } - - c.preReqs = append(c.preReqs, preReq) - return c -} - -// Returns true if the minimum number of calls have been made. -func (c *Call) satisfied() bool { - return c.numCalls >= c.minCalls -} - -// Returns true iff the maximum number of calls have been made. -func (c *Call) exhausted() bool { - return c.numCalls >= c.maxCalls -} - -func (c *Call) String() string { - args := make([]string, len(c.args)) - for i, arg := range c.args { - args[i] = arg.String() - } - arguments := strings.Join(args, ", ") - return fmt.Sprintf("%T.%v(%s) %s", c.receiver, c.method, arguments, c.origin) -} - -// Tests if the given call matches the expected call. -// If yes, returns nil. If no, returns error with message explaining why it does not match. -func (c *Call) matches(args []interface{}) error { - if !c.methodType.IsVariadic() { - if len(args) != len(c.args) { - return fmt.Errorf("Expected call at %s has the wrong number of arguments. Got: %d, want: %d", - c.origin, len(args), len(c.args)) - } - - for i, m := range c.args { - if !m.Matches(args[i]) { - return fmt.Errorf("Expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v", - c.origin, strconv.Itoa(i), args[i], m) - } - } - } else { - if len(c.args) < c.methodType.NumIn()-1 { - return fmt.Errorf("Expected call at %s has the wrong number of matchers. Got: %d, want: %d", - c.origin, len(c.args), c.methodType.NumIn()-1) - } - if len(c.args) != c.methodType.NumIn() && len(args) != len(c.args) { - return fmt.Errorf("Expected call at %s has the wrong number of arguments. Got: %d, want: %d", - c.origin, len(args), len(c.args)) - } - if len(args) < len(c.args)-1 { - return fmt.Errorf("Expected call at %s has the wrong number of arguments. Got: %d, want: greater than or equal to %d", - c.origin, len(args), len(c.args)-1) - } - - for i, m := range c.args { - if i < c.methodType.NumIn()-1 { - // Non-variadic args - if !m.Matches(args[i]) { - return fmt.Errorf("Expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v", - c.origin, strconv.Itoa(i), args[i], m) - } - continue - } - // The last arg has a possibility of a variadic argument, so let it branch - - // sample: Foo(a int, b int, c ...int) - if i < len(c.args) && i < len(args) { - if m.Matches(args[i]) { - // Got Foo(a, b, c) want Foo(matcherA, matcherB, gomock.Any()) - // Got Foo(a, b, c) want Foo(matcherA, matcherB, someSliceMatcher) - // Got Foo(a, b, c) want Foo(matcherA, matcherB, matcherC) - // Got Foo(a, b) want Foo(matcherA, matcherB) - // Got Foo(a, b, c, d) want Foo(matcherA, matcherB, matcherC, matcherD) - continue - } - } - - // The number of actual args don't match the number of matchers, - // or the last matcher is a slice and the last arg is not. - // If this function still matches it is because the last matcher - // matches all the remaining arguments or the lack of any. - // Convert the remaining arguments, if any, into a slice of the - // expected type. - vargsType := c.methodType.In(c.methodType.NumIn() - 1) - vargs := reflect.MakeSlice(vargsType, 0, len(args)-i) - for _, arg := range args[i:] { - vargs = reflect.Append(vargs, reflect.ValueOf(arg)) - } - if m.Matches(vargs.Interface()) { - // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, gomock.Any()) - // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, someSliceMatcher) - // Got Foo(a, b) want Foo(matcherA, matcherB, gomock.Any()) - // Got Foo(a, b) want Foo(matcherA, matcherB, someEmptySliceMatcher) - break - } - // Wrong number of matchers or not match. Fail. - // Got Foo(a, b) want Foo(matcherA, matcherB, matcherC, matcherD) - // Got Foo(a, b, c) want Foo(matcherA, matcherB, matcherC, matcherD) - // Got Foo(a, b, c, d) want Foo(matcherA, matcherB, matcherC, matcherD, matcherE) - // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, matcherC, matcherD) - // Got Foo(a, b, c) want Foo(matcherA, matcherB) - return fmt.Errorf("Expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v", - c.origin, strconv.Itoa(i), args[i:], c.args[i]) - - } - } - - // Check that all prerequisite calls have been satisfied. - for _, preReqCall := range c.preReqs { - if !preReqCall.satisfied() { - return fmt.Errorf("Expected call at %s doesn't have a prerequisite call satisfied:\n%v\nshould be called before:\n%v", - c.origin, preReqCall, c) - } - } - - // Check that the call is not exhausted. - if c.exhausted() { - return fmt.Errorf("Expected call at %s has already been called the max number of times.", c.origin) - } - - return nil -} - -// dropPrereqs tells the expected Call to not re-check prerequisite calls any -// longer, and to return its current set. -func (c *Call) dropPrereqs() (preReqs []*Call) { - preReqs = c.preReqs - c.preReqs = nil - return -} - -func (c *Call) call(args []interface{}) []func([]interface{}) []interface{} { - c.numCalls++ - return c.actions -} - -// InOrder declares that the given calls should occur in order. -func InOrder(calls ...*Call) { - for i := 1; i < len(calls); i++ { - calls[i].After(calls[i-1]) - } -} - -func setSlice(arg interface{}, v reflect.Value) { - va := reflect.ValueOf(arg) - for i := 0; i < v.Len(); i++ { - va.Index(i).Set(v.Index(i)) - } -} - -func (c *Call) addAction(action func([]interface{}) []interface{}) { - c.actions = append(c.actions, action) -} diff --git a/vendor/github.com/golang/mock/gomock/callset.go b/vendor/github.com/golang/mock/gomock/callset.go deleted file mode 100644 index c44a8a585b32..000000000000 --- a/vendor/github.com/golang/mock/gomock/callset.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package gomock - -import ( - "bytes" - "fmt" -) - -// callSet represents a set of expected calls, indexed by receiver and method -// name. -type callSet struct { - // Calls that are still expected. - expected map[callSetKey][]*Call - // Calls that have been exhausted. - exhausted map[callSetKey][]*Call -} - -// callSetKey is the key in the maps in callSet -type callSetKey struct { - receiver interface{} - fname string -} - -func newCallSet() *callSet { - return &callSet{make(map[callSetKey][]*Call), make(map[callSetKey][]*Call)} -} - -// Add adds a new expected call. -func (cs callSet) Add(call *Call) { - key := callSetKey{call.receiver, call.method} - m := cs.expected - if call.exhausted() { - m = cs.exhausted - } - m[key] = append(m[key], call) -} - -// Remove removes an expected call. -func (cs callSet) Remove(call *Call) { - key := callSetKey{call.receiver, call.method} - calls := cs.expected[key] - for i, c := range calls { - if c == call { - // maintain order for remaining calls - cs.expected[key] = append(calls[:i], calls[i+1:]...) - cs.exhausted[key] = append(cs.exhausted[key], call) - break - } - } -} - -// FindMatch searches for a matching call. Returns error with explanation message if no call matched. -func (cs callSet) FindMatch(receiver interface{}, method string, args []interface{}) (*Call, error) { - key := callSetKey{receiver, method} - - // Search through the expected calls. - expected := cs.expected[key] - var callsErrors bytes.Buffer - for _, call := range expected { - err := call.matches(args) - if err != nil { - fmt.Fprintf(&callsErrors, "\n%v", err) - } else { - return call, nil - } - } - - // If we haven't found a match then search through the exhausted calls so we - // get useful error messages. - exhausted := cs.exhausted[key] - for _, call := range exhausted { - if err := call.matches(args); err != nil { - fmt.Fprintf(&callsErrors, "\n%v", err) - } - } - - if len(expected)+len(exhausted) == 0 { - fmt.Fprintf(&callsErrors, "there are no expected calls of the method %q for that receiver", method) - } - - return nil, fmt.Errorf(callsErrors.String()) -} - -// Failures returns the calls that are not satisfied. -func (cs callSet) Failures() []*Call { - failures := make([]*Call, 0, len(cs.expected)) - for _, calls := range cs.expected { - for _, call := range calls { - if !call.satisfied() { - failures = append(failures, call) - } - } - } - return failures -} diff --git a/vendor/github.com/golang/mock/gomock/controller.go b/vendor/github.com/golang/mock/gomock/controller.go deleted file mode 100644 index 6fde25f5087a..000000000000 --- a/vendor/github.com/golang/mock/gomock/controller.go +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// GoMock - a mock framework for Go. -// -// Standard usage: -// (1) Define an interface that you wish to mock. -// type MyInterface interface { -// SomeMethod(x int64, y string) -// } -// (2) Use mockgen to generate a mock from the interface. -// (3) Use the mock in a test: -// func TestMyThing(t *testing.T) { -// mockCtrl := gomock.NewController(t) -// defer mockCtrl.Finish() -// -// mockObj := something.NewMockMyInterface(mockCtrl) -// mockObj.EXPECT().SomeMethod(4, "blah") -// // pass mockObj to a real object and play with it. -// } -// -// By default, expected calls are not enforced to run in any particular order. -// Call order dependency can be enforced by use of InOrder and/or Call.After. -// Call.After can create more varied call order dependencies, but InOrder is -// often more convenient. -// -// The following examples create equivalent call order dependencies. -// -// Example of using Call.After to chain expected call order: -// -// firstCall := mockObj.EXPECT().SomeMethod(1, "first") -// secondCall := mockObj.EXPECT().SomeMethod(2, "second").After(firstCall) -// mockObj.EXPECT().SomeMethod(3, "third").After(secondCall) -// -// Example of using InOrder to declare expected call order: -// -// gomock.InOrder( -// mockObj.EXPECT().SomeMethod(1, "first"), -// mockObj.EXPECT().SomeMethod(2, "second"), -// mockObj.EXPECT().SomeMethod(3, "third"), -// ) -// -// TODO: -// - Handle different argument/return types (e.g. ..., chan, map, interface). -package gomock - -import ( - "context" - "fmt" - "reflect" - "runtime" - "sync" -) - -// A TestReporter is something that can be used to report test failures. -// It is satisfied by the standard library's *testing.T. -type TestReporter interface { - Errorf(format string, args ...interface{}) - Fatalf(format string, args ...interface{}) -} - -// TestHelper is a TestReporter that has the Helper method. It is satisfied -// by the standard library's *testing.T. -type TestHelper interface { - TestReporter - Helper() -} - -// A Controller represents the top-level control of a mock ecosystem. -// It defines the scope and lifetime of mock objects, as well as their expectations. -// It is safe to call Controller's methods from multiple goroutines. -type Controller struct { - // T should only be called within a generated mock. It is not intended to - // be used in user code and may be changed in future versions. T is the - // TestReporter passed in when creating the Controller via NewController. - // If the TestReporter does not implment a TestHelper it will be wrapped - // with a nopTestHelper. - T TestHelper - mu sync.Mutex - expectedCalls *callSet - finished bool -} - -func NewController(t TestReporter) *Controller { - h, ok := t.(TestHelper) - if !ok { - h = nopTestHelper{t} - } - - return &Controller{ - T: h, - expectedCalls: newCallSet(), - } -} - -type cancelReporter struct { - TestHelper - cancel func() -} - -func (r *cancelReporter) Errorf(format string, args ...interface{}) { - r.TestHelper.Errorf(format, args...) -} -func (r *cancelReporter) Fatalf(format string, args ...interface{}) { - defer r.cancel() - r.TestHelper.Fatalf(format, args...) -} - -// WithContext returns a new Controller and a Context, which is cancelled on any -// fatal failure. -func WithContext(ctx context.Context, t TestReporter) (*Controller, context.Context) { - h, ok := t.(TestHelper) - if !ok { - h = nopTestHelper{t} - } - - ctx, cancel := context.WithCancel(ctx) - return NewController(&cancelReporter{h, cancel}), ctx -} - -type nopTestHelper struct { - TestReporter -} - -func (h nopTestHelper) Helper() {} - -func (ctrl *Controller) RecordCall(receiver interface{}, method string, args ...interface{}) *Call { - ctrl.T.Helper() - - recv := reflect.ValueOf(receiver) - for i := 0; i < recv.Type().NumMethod(); i++ { - if recv.Type().Method(i).Name == method { - return ctrl.RecordCallWithMethodType(receiver, method, recv.Method(i).Type(), args...) - } - } - ctrl.T.Fatalf("gomock: failed finding method %s on %T", method, receiver) - panic("unreachable") -} - -func (ctrl *Controller) RecordCallWithMethodType(receiver interface{}, method string, methodType reflect.Type, args ...interface{}) *Call { - ctrl.T.Helper() - - call := newCall(ctrl.T, receiver, method, methodType, args...) - - ctrl.mu.Lock() - defer ctrl.mu.Unlock() - ctrl.expectedCalls.Add(call) - - return call -} - -func (ctrl *Controller) Call(receiver interface{}, method string, args ...interface{}) []interface{} { - ctrl.T.Helper() - - // Nest this code so we can use defer to make sure the lock is released. - actions := func() []func([]interface{}) []interface{} { - ctrl.T.Helper() - ctrl.mu.Lock() - defer ctrl.mu.Unlock() - - expected, err := ctrl.expectedCalls.FindMatch(receiver, method, args) - if err != nil { - origin := callerInfo(2) - ctrl.T.Fatalf("Unexpected call to %T.%v(%v) at %s because: %s", receiver, method, args, origin, err) - } - - // Two things happen here: - // * the matching call no longer needs to check prerequite calls, - // * and the prerequite calls are no longer expected, so remove them. - preReqCalls := expected.dropPrereqs() - for _, preReqCall := range preReqCalls { - ctrl.expectedCalls.Remove(preReqCall) - } - - actions := expected.call(args) - if expected.exhausted() { - ctrl.expectedCalls.Remove(expected) - } - return actions - }() - - var rets []interface{} - for _, action := range actions { - if r := action(args); r != nil { - rets = r - } - } - - return rets -} - -func (ctrl *Controller) Finish() { - ctrl.T.Helper() - - ctrl.mu.Lock() - defer ctrl.mu.Unlock() - - if ctrl.finished { - ctrl.T.Fatalf("Controller.Finish was called more than once. It has to be called exactly once.") - } - ctrl.finished = true - - // If we're currently panicking, probably because this is a deferred call, - // pass through the panic. - if err := recover(); err != nil { - panic(err) - } - - // Check that all remaining expected calls are satisfied. - failures := ctrl.expectedCalls.Failures() - for _, call := range failures { - ctrl.T.Errorf("missing call(s) to %v", call) - } - if len(failures) != 0 { - ctrl.T.Fatalf("aborting test due to missing call(s)") - } -} - -func callerInfo(skip int) string { - if _, file, line, ok := runtime.Caller(skip + 1); ok { - return fmt.Sprintf("%s:%d", file, line) - } - return "unknown file" -} diff --git a/vendor/github.com/golang/mock/gomock/matchers.go b/vendor/github.com/golang/mock/gomock/matchers.go deleted file mode 100644 index 189796f8656d..000000000000 --- a/vendor/github.com/golang/mock/gomock/matchers.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package gomock - -import ( - "fmt" - "reflect" -) - -// A Matcher is a representation of a class of values. -// It is used to represent the valid or expected arguments to a mocked method. -type Matcher interface { - // Matches returns whether x is a match. - Matches(x interface{}) bool - - // String describes what the matcher matches. - String() string -} - -type anyMatcher struct{} - -func (anyMatcher) Matches(x interface{}) bool { - return true -} - -func (anyMatcher) String() string { - return "is anything" -} - -type eqMatcher struct { - x interface{} -} - -func (e eqMatcher) Matches(x interface{}) bool { - return reflect.DeepEqual(e.x, x) -} - -func (e eqMatcher) String() string { - return fmt.Sprintf("is equal to %v", e.x) -} - -type nilMatcher struct{} - -func (nilMatcher) Matches(x interface{}) bool { - if x == nil { - return true - } - - v := reflect.ValueOf(x) - switch v.Kind() { - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, - reflect.Ptr, reflect.Slice: - return v.IsNil() - } - - return false -} - -func (nilMatcher) String() string { - return "is nil" -} - -type notMatcher struct { - m Matcher -} - -func (n notMatcher) Matches(x interface{}) bool { - return !n.m.Matches(x) -} - -func (n notMatcher) String() string { - // TODO: Improve this if we add a NotString method to the Matcher interface. - return "not(" + n.m.String() + ")" -} - -type assignableToTypeOfMatcher struct { - targetType reflect.Type -} - -func (m assignableToTypeOfMatcher) Matches(x interface{}) bool { - return reflect.TypeOf(x).AssignableTo(m.targetType) -} - -func (m assignableToTypeOfMatcher) String() string { - return "is assignable to " + m.targetType.Name() -} - -// Constructors -func Any() Matcher { return anyMatcher{} } -func Eq(x interface{}) Matcher { return eqMatcher{x} } -func Nil() Matcher { return nilMatcher{} } -func Not(x interface{}) Matcher { - if m, ok := x.(Matcher); ok { - return notMatcher{m} - } - return notMatcher{Eq(x)} -} - -// AssignableToTypeOf is a Matcher that matches if the parameter to the mock -// function is assignable to the type of the parameter to this function. -// -// Example usage: -// -// dbMock.EXPECT(). -// Insert(gomock.AssignableToTypeOf(&EmployeeRecord{})). -// Return(errors.New("DB error")) -// -func AssignableToTypeOf(x interface{}) Matcher { - return assignableToTypeOfMatcher{reflect.TypeOf(x)} -} diff --git a/vendor/github.com/hashicorp/vault/api/go.sum b/vendor/github.com/hashicorp/vault/api/go.sum index 035be8361a26..54026ef089aa 100644 --- a/vendor/github.com/hashicorp/vault/api/go.sum +++ b/vendor/github.com/hashicorp/vault/api/go.sum @@ -91,6 +91,7 @@ github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFo github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= From b7214649f365d018d5c403b5bf5a201be243d106 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Fri, 15 May 2020 12:26:47 -0600 Subject: [PATCH 26/29] Updated vendoring --- .../sdk/database/dbplugin/database.pb.go | 1791 +++--- .../vault/sdk/plugin/pb/backend.pb.go | 4998 +++++++++++------ 2 files changed, 4345 insertions(+), 2444 deletions(-) diff --git a/vendor/github.com/hashicorp/vault/sdk/database/dbplugin/database.pb.go b/vendor/github.com/hashicorp/vault/sdk/database/dbplugin/database.pb.go index c820015136cc..de3518270981 100644 --- a/vendor/github.com/hashicorp/vault/sdk/database/dbplugin/database.pb.go +++ b/vendor/github.com/hashicorp/vault/sdk/database/dbplugin/database.pb.go @@ -1,950 +1,1485 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.22.0 +// protoc v3.11.4 // source: sdk/database/dbplugin/database.proto package dbplugin import ( context "context" - fmt "fmt" proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 // Deprecated: Do not use. type InitializeRequest struct { - Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - VerifyConnection bool `protobuf:"varint,2,opt,name=verify_connection,json=verifyConnection,proto3" json:"verify_connection,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *InitializeRequest) Reset() { *m = InitializeRequest{} } -func (m *InitializeRequest) String() string { return proto.CompactTextString(m) } -func (*InitializeRequest) ProtoMessage() {} -func (*InitializeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{0} + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + VerifyConnection bool `protobuf:"varint,2,opt,name=verify_connection,json=verifyConnection,proto3" json:"verify_connection,omitempty"` } -func (m *InitializeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InitializeRequest.Unmarshal(m, b) -} -func (m *InitializeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InitializeRequest.Marshal(b, m, deterministic) -} -func (m *InitializeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_InitializeRequest.Merge(m, src) +func (x *InitializeRequest) Reset() { + *x = InitializeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *InitializeRequest) XXX_Size() int { - return xxx_messageInfo_InitializeRequest.Size(m) + +func (x *InitializeRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InitializeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_InitializeRequest.DiscardUnknown(m) + +func (*InitializeRequest) ProtoMessage() {} + +func (x *InitializeRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_InitializeRequest proto.InternalMessageInfo +// Deprecated: Use InitializeRequest.ProtoReflect.Descriptor instead. +func (*InitializeRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{0} +} -func (m *InitializeRequest) GetConfig() []byte { - if m != nil { - return m.Config +func (x *InitializeRequest) GetConfig() []byte { + if x != nil { + return x.Config } return nil } -func (m *InitializeRequest) GetVerifyConnection() bool { - if m != nil { - return m.VerifyConnection +func (x *InitializeRequest) GetVerifyConnection() bool { + if x != nil { + return x.VerifyConnection } return false } type InitRequest struct { - Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - VerifyConnection bool `protobuf:"varint,2,opt,name=verify_connection,json=verifyConnection,proto3" json:"verify_connection,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *InitRequest) Reset() { *m = InitRequest{} } -func (m *InitRequest) String() string { return proto.CompactTextString(m) } -func (*InitRequest) ProtoMessage() {} -func (*InitRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{1} + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` + VerifyConnection bool `protobuf:"varint,2,opt,name=verify_connection,json=verifyConnection,proto3" json:"verify_connection,omitempty"` } -func (m *InitRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InitRequest.Unmarshal(m, b) -} -func (m *InitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InitRequest.Marshal(b, m, deterministic) -} -func (m *InitRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_InitRequest.Merge(m, src) +func (x *InitRequest) Reset() { + *x = InitRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *InitRequest) XXX_Size() int { - return xxx_messageInfo_InitRequest.Size(m) + +func (x *InitRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InitRequest) XXX_DiscardUnknown() { - xxx_messageInfo_InitRequest.DiscardUnknown(m) + +func (*InitRequest) ProtoMessage() {} + +func (x *InitRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_InitRequest proto.InternalMessageInfo +// Deprecated: Use InitRequest.ProtoReflect.Descriptor instead. +func (*InitRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{1} +} -func (m *InitRequest) GetConfig() []byte { - if m != nil { - return m.Config +func (x *InitRequest) GetConfig() []byte { + if x != nil { + return x.Config } return nil } -func (m *InitRequest) GetVerifyConnection() bool { - if m != nil { - return m.VerifyConnection +func (x *InitRequest) GetVerifyConnection() bool { + if x != nil { + return x.VerifyConnection } return false } type CreateUserRequest struct { - Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` - UsernameConfig *UsernameConfig `protobuf:"bytes,2,opt,name=username_config,json=usernameConfig,proto3" json:"username_config,omitempty"` - Expiration *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *CreateUserRequest) Reset() { *m = CreateUserRequest{} } -func (m *CreateUserRequest) String() string { return proto.CompactTextString(m) } -func (*CreateUserRequest) ProtoMessage() {} -func (*CreateUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{2} + Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` + UsernameConfig *UsernameConfig `protobuf:"bytes,2,opt,name=username_config,json=usernameConfig,proto3" json:"username_config,omitempty"` + Expiration *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration,omitempty"` } -func (m *CreateUserRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateUserRequest.Unmarshal(m, b) -} -func (m *CreateUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateUserRequest.Marshal(b, m, deterministic) -} -func (m *CreateUserRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateUserRequest.Merge(m, src) +func (x *CreateUserRequest) Reset() { + *x = CreateUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CreateUserRequest) XXX_Size() int { - return xxx_messageInfo_CreateUserRequest.Size(m) + +func (x *CreateUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CreateUserRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CreateUserRequest.DiscardUnknown(m) + +func (*CreateUserRequest) ProtoMessage() {} + +func (x *CreateUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_CreateUserRequest proto.InternalMessageInfo +// Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead. +func (*CreateUserRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{2} +} -func (m *CreateUserRequest) GetStatements() *Statements { - if m != nil { - return m.Statements +func (x *CreateUserRequest) GetStatements() *Statements { + if x != nil { + return x.Statements } return nil } -func (m *CreateUserRequest) GetUsernameConfig() *UsernameConfig { - if m != nil { - return m.UsernameConfig +func (x *CreateUserRequest) GetUsernameConfig() *UsernameConfig { + if x != nil { + return x.UsernameConfig } return nil } -func (m *CreateUserRequest) GetExpiration() *timestamp.Timestamp { - if m != nil { - return m.Expiration +func (x *CreateUserRequest) GetExpiration() *timestamp.Timestamp { + if x != nil { + return x.Expiration } return nil } type RenewUserRequest struct { - Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - Expiration *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *RenewUserRequest) Reset() { *m = RenewUserRequest{} } -func (m *RenewUserRequest) String() string { return proto.CompactTextString(m) } -func (*RenewUserRequest) ProtoMessage() {} -func (*RenewUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{3} + Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Expiration *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expiration,proto3" json:"expiration,omitempty"` } -func (m *RenewUserRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RenewUserRequest.Unmarshal(m, b) -} -func (m *RenewUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RenewUserRequest.Marshal(b, m, deterministic) -} -func (m *RenewUserRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RenewUserRequest.Merge(m, src) +func (x *RenewUserRequest) Reset() { + *x = RenewUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RenewUserRequest) XXX_Size() int { - return xxx_messageInfo_RenewUserRequest.Size(m) + +func (x *RenewUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RenewUserRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RenewUserRequest.DiscardUnknown(m) + +func (*RenewUserRequest) ProtoMessage() {} + +func (x *RenewUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RenewUserRequest proto.InternalMessageInfo +// Deprecated: Use RenewUserRequest.ProtoReflect.Descriptor instead. +func (*RenewUserRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{3} +} -func (m *RenewUserRequest) GetStatements() *Statements { - if m != nil { - return m.Statements +func (x *RenewUserRequest) GetStatements() *Statements { + if x != nil { + return x.Statements } return nil } -func (m *RenewUserRequest) GetUsername() string { - if m != nil { - return m.Username +func (x *RenewUserRequest) GetUsername() string { + if x != nil { + return x.Username } return "" } -func (m *RenewUserRequest) GetExpiration() *timestamp.Timestamp { - if m != nil { - return m.Expiration +func (x *RenewUserRequest) GetExpiration() *timestamp.Timestamp { + if x != nil { + return x.Expiration } return nil } type RevokeUserRequest struct { - Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *RevokeUserRequest) Reset() { *m = RevokeUserRequest{} } -func (m *RevokeUserRequest) String() string { return proto.CompactTextString(m) } -func (*RevokeUserRequest) ProtoMessage() {} -func (*RevokeUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{4} + Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` } -func (m *RevokeUserRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RevokeUserRequest.Unmarshal(m, b) -} -func (m *RevokeUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RevokeUserRequest.Marshal(b, m, deterministic) -} -func (m *RevokeUserRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RevokeUserRequest.Merge(m, src) +func (x *RevokeUserRequest) Reset() { + *x = RevokeUserRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RevokeUserRequest) XXX_Size() int { - return xxx_messageInfo_RevokeUserRequest.Size(m) + +func (x *RevokeUserRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RevokeUserRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RevokeUserRequest.DiscardUnknown(m) + +func (*RevokeUserRequest) ProtoMessage() {} + +func (x *RevokeUserRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RevokeUserRequest proto.InternalMessageInfo +// Deprecated: Use RevokeUserRequest.ProtoReflect.Descriptor instead. +func (*RevokeUserRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{4} +} -func (m *RevokeUserRequest) GetStatements() *Statements { - if m != nil { - return m.Statements +func (x *RevokeUserRequest) GetStatements() *Statements { + if x != nil { + return x.Statements } return nil } -func (m *RevokeUserRequest) GetUsername() string { - if m != nil { - return m.Username +func (x *RevokeUserRequest) GetUsername() string { + if x != nil { + return x.Username } return "" } type RotateRootCredentialsRequest struct { - Statements []string `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *RotateRootCredentialsRequest) Reset() { *m = RotateRootCredentialsRequest{} } -func (m *RotateRootCredentialsRequest) String() string { return proto.CompactTextString(m) } -func (*RotateRootCredentialsRequest) ProtoMessage() {} -func (*RotateRootCredentialsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{5} + Statements []string `protobuf:"bytes,1,rep,name=statements,proto3" json:"statements,omitempty"` } -func (m *RotateRootCredentialsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RotateRootCredentialsRequest.Unmarshal(m, b) -} -func (m *RotateRootCredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RotateRootCredentialsRequest.Marshal(b, m, deterministic) -} -func (m *RotateRootCredentialsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RotateRootCredentialsRequest.Merge(m, src) +func (x *RotateRootCredentialsRequest) Reset() { + *x = RotateRootCredentialsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RotateRootCredentialsRequest) XXX_Size() int { - return xxx_messageInfo_RotateRootCredentialsRequest.Size(m) + +func (x *RotateRootCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RotateRootCredentialsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RotateRootCredentialsRequest.DiscardUnknown(m) + +func (*RotateRootCredentialsRequest) ProtoMessage() {} + +func (x *RotateRootCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RotateRootCredentialsRequest proto.InternalMessageInfo +// Deprecated: Use RotateRootCredentialsRequest.ProtoReflect.Descriptor instead. +func (*RotateRootCredentialsRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{5} +} -func (m *RotateRootCredentialsRequest) GetStatements() []string { - if m != nil { - return m.Statements +func (x *RotateRootCredentialsRequest) GetStatements() []string { + if x != nil { + return x.Statements } return nil } type Statements struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // DEPRECATED, will be removed in 0.12 - CreationStatements string `protobuf:"bytes,1,opt,name=creation_statements,json=creationStatements,proto3" json:"creation_statements,omitempty"` // Deprecated: Do not use. + // + // Deprecated: Do not use. + CreationStatements string `protobuf:"bytes,1,opt,name=creation_statements,json=creationStatements,proto3" json:"creation_statements,omitempty"` // DEPRECATED, will be removed in 0.12 - RevocationStatements string `protobuf:"bytes,2,opt,name=revocation_statements,json=revocationStatements,proto3" json:"revocation_statements,omitempty"` // Deprecated: Do not use. + // + // Deprecated: Do not use. + RevocationStatements string `protobuf:"bytes,2,opt,name=revocation_statements,json=revocationStatements,proto3" json:"revocation_statements,omitempty"` // DEPRECATED, will be removed in 0.12 - RollbackStatements string `protobuf:"bytes,3,opt,name=rollback_statements,json=rollbackStatements,proto3" json:"rollback_statements,omitempty"` // Deprecated: Do not use. + // + // Deprecated: Do not use. + RollbackStatements string `protobuf:"bytes,3,opt,name=rollback_statements,json=rollbackStatements,proto3" json:"rollback_statements,omitempty"` // DEPRECATED, will be removed in 0.12 - RenewStatements string `protobuf:"bytes,4,opt,name=renew_statements,json=renewStatements,proto3" json:"renew_statements,omitempty"` // Deprecated: Do not use. - Creation []string `protobuf:"bytes,5,rep,name=creation,proto3" json:"creation,omitempty"` - Revocation []string `protobuf:"bytes,6,rep,name=revocation,proto3" json:"revocation,omitempty"` - Rollback []string `protobuf:"bytes,7,rep,name=rollback,proto3" json:"rollback,omitempty"` - Renewal []string `protobuf:"bytes,8,rep,name=renewal,proto3" json:"renewal,omitempty"` - Rotation []string `protobuf:"bytes,9,rep,name=rotation,proto3" json:"rotation,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Statements) Reset() { *m = Statements{} } -func (m *Statements) String() string { return proto.CompactTextString(m) } -func (*Statements) ProtoMessage() {} -func (*Statements) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{6} + // + // Deprecated: Do not use. + RenewStatements string `protobuf:"bytes,4,opt,name=renew_statements,json=renewStatements,proto3" json:"renew_statements,omitempty"` + Creation []string `protobuf:"bytes,5,rep,name=creation,proto3" json:"creation,omitempty"` + Revocation []string `protobuf:"bytes,6,rep,name=revocation,proto3" json:"revocation,omitempty"` + Rollback []string `protobuf:"bytes,7,rep,name=rollback,proto3" json:"rollback,omitempty"` + Renewal []string `protobuf:"bytes,8,rep,name=renewal,proto3" json:"renewal,omitempty"` + Rotation []string `protobuf:"bytes,9,rep,name=rotation,proto3" json:"rotation,omitempty"` } -func (m *Statements) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Statements.Unmarshal(m, b) -} -func (m *Statements) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Statements.Marshal(b, m, deterministic) -} -func (m *Statements) XXX_Merge(src proto.Message) { - xxx_messageInfo_Statements.Merge(m, src) +func (x *Statements) Reset() { + *x = Statements{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Statements) XXX_Size() int { - return xxx_messageInfo_Statements.Size(m) + +func (x *Statements) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Statements) XXX_DiscardUnknown() { - xxx_messageInfo_Statements.DiscardUnknown(m) + +func (*Statements) ProtoMessage() {} + +func (x *Statements) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Statements proto.InternalMessageInfo +// Deprecated: Use Statements.ProtoReflect.Descriptor instead. +func (*Statements) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{6} +} // Deprecated: Do not use. -func (m *Statements) GetCreationStatements() string { - if m != nil { - return m.CreationStatements +func (x *Statements) GetCreationStatements() string { + if x != nil { + return x.CreationStatements } return "" } // Deprecated: Do not use. -func (m *Statements) GetRevocationStatements() string { - if m != nil { - return m.RevocationStatements +func (x *Statements) GetRevocationStatements() string { + if x != nil { + return x.RevocationStatements } return "" } // Deprecated: Do not use. -func (m *Statements) GetRollbackStatements() string { - if m != nil { - return m.RollbackStatements +func (x *Statements) GetRollbackStatements() string { + if x != nil { + return x.RollbackStatements } return "" } // Deprecated: Do not use. -func (m *Statements) GetRenewStatements() string { - if m != nil { - return m.RenewStatements +func (x *Statements) GetRenewStatements() string { + if x != nil { + return x.RenewStatements } return "" } -func (m *Statements) GetCreation() []string { - if m != nil { - return m.Creation +func (x *Statements) GetCreation() []string { + if x != nil { + return x.Creation } return nil } -func (m *Statements) GetRevocation() []string { - if m != nil { - return m.Revocation +func (x *Statements) GetRevocation() []string { + if x != nil { + return x.Revocation } return nil } -func (m *Statements) GetRollback() []string { - if m != nil { - return m.Rollback +func (x *Statements) GetRollback() []string { + if x != nil { + return x.Rollback } return nil } -func (m *Statements) GetRenewal() []string { - if m != nil { - return m.Renewal +func (x *Statements) GetRenewal() []string { + if x != nil { + return x.Renewal } return nil } -func (m *Statements) GetRotation() []string { - if m != nil { - return m.Rotation +func (x *Statements) GetRotation() []string { + if x != nil { + return x.Rotation } return nil } type UsernameConfig struct { - DisplayName string `protobuf:"bytes,1,opt,name=DisplayName,proto3" json:"DisplayName,omitempty"` - RoleName string `protobuf:"bytes,2,opt,name=RoleName,proto3" json:"RoleName,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *UsernameConfig) Reset() { *m = UsernameConfig{} } -func (m *UsernameConfig) String() string { return proto.CompactTextString(m) } -func (*UsernameConfig) ProtoMessage() {} -func (*UsernameConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{7} + DisplayName string `protobuf:"bytes,1,opt,name=DisplayName,proto3" json:"DisplayName,omitempty"` + RoleName string `protobuf:"bytes,2,opt,name=RoleName,proto3" json:"RoleName,omitempty"` } -func (m *UsernameConfig) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UsernameConfig.Unmarshal(m, b) -} -func (m *UsernameConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UsernameConfig.Marshal(b, m, deterministic) -} -func (m *UsernameConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_UsernameConfig.Merge(m, src) +func (x *UsernameConfig) Reset() { + *x = UsernameConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *UsernameConfig) XXX_Size() int { - return xxx_messageInfo_UsernameConfig.Size(m) + +func (x *UsernameConfig) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UsernameConfig) XXX_DiscardUnknown() { - xxx_messageInfo_UsernameConfig.DiscardUnknown(m) + +func (*UsernameConfig) ProtoMessage() {} + +func (x *UsernameConfig) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_UsernameConfig proto.InternalMessageInfo +// Deprecated: Use UsernameConfig.ProtoReflect.Descriptor instead. +func (*UsernameConfig) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{7} +} -func (m *UsernameConfig) GetDisplayName() string { - if m != nil { - return m.DisplayName +func (x *UsernameConfig) GetDisplayName() string { + if x != nil { + return x.DisplayName } return "" } -func (m *UsernameConfig) GetRoleName() string { - if m != nil { - return m.RoleName +func (x *UsernameConfig) GetRoleName() string { + if x != nil { + return x.RoleName } return "" } type InitResponse struct { - Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *InitResponse) Reset() { *m = InitResponse{} } -func (m *InitResponse) String() string { return proto.CompactTextString(m) } -func (*InitResponse) ProtoMessage() {} -func (*InitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{8} + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` } -func (m *InitResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InitResponse.Unmarshal(m, b) -} -func (m *InitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InitResponse.Marshal(b, m, deterministic) -} -func (m *InitResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_InitResponse.Merge(m, src) +func (x *InitResponse) Reset() { + *x = InitResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *InitResponse) XXX_Size() int { - return xxx_messageInfo_InitResponse.Size(m) + +func (x *InitResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InitResponse) XXX_DiscardUnknown() { - xxx_messageInfo_InitResponse.DiscardUnknown(m) + +func (*InitResponse) ProtoMessage() {} + +func (x *InitResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_InitResponse proto.InternalMessageInfo +// Deprecated: Use InitResponse.ProtoReflect.Descriptor instead. +func (*InitResponse) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{8} +} -func (m *InitResponse) GetConfig() []byte { - if m != nil { - return m.Config +func (x *InitResponse) GetConfig() []byte { + if x != nil { + return x.Config } return nil } type CreateUserResponse struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *CreateUserResponse) Reset() { *m = CreateUserResponse{} } -func (m *CreateUserResponse) String() string { return proto.CompactTextString(m) } -func (*CreateUserResponse) ProtoMessage() {} -func (*CreateUserResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{9} + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` } -func (m *CreateUserResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CreateUserResponse.Unmarshal(m, b) -} -func (m *CreateUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CreateUserResponse.Marshal(b, m, deterministic) -} -func (m *CreateUserResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_CreateUserResponse.Merge(m, src) +func (x *CreateUserResponse) Reset() { + *x = CreateUserResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CreateUserResponse) XXX_Size() int { - return xxx_messageInfo_CreateUserResponse.Size(m) + +func (x *CreateUserResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CreateUserResponse) XXX_DiscardUnknown() { - xxx_messageInfo_CreateUserResponse.DiscardUnknown(m) + +func (*CreateUserResponse) ProtoMessage() {} + +func (x *CreateUserResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_CreateUserResponse proto.InternalMessageInfo +// Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead. +func (*CreateUserResponse) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{9} +} -func (m *CreateUserResponse) GetUsername() string { - if m != nil { - return m.Username +func (x *CreateUserResponse) GetUsername() string { + if x != nil { + return x.Username } return "" } -func (m *CreateUserResponse) GetPassword() string { - if m != nil { - return m.Password +func (x *CreateUserResponse) GetPassword() string { + if x != nil { + return x.Password } return "" } type TypeResponse struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TypeResponse) Reset() { *m = TypeResponse{} } -func (m *TypeResponse) String() string { return proto.CompactTextString(m) } -func (*TypeResponse) ProtoMessage() {} -func (*TypeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{10} + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` } -func (m *TypeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TypeResponse.Unmarshal(m, b) -} -func (m *TypeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TypeResponse.Marshal(b, m, deterministic) -} -func (m *TypeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypeResponse.Merge(m, src) +func (x *TypeResponse) Reset() { + *x = TypeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TypeResponse) XXX_Size() int { - return xxx_messageInfo_TypeResponse.Size(m) + +func (x *TypeResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TypeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TypeResponse.DiscardUnknown(m) + +func (*TypeResponse) ProtoMessage() {} + +func (x *TypeResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TypeResponse proto.InternalMessageInfo +// Deprecated: Use TypeResponse.ProtoReflect.Descriptor instead. +func (*TypeResponse) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{10} +} -func (m *TypeResponse) GetType() string { - if m != nil { - return m.Type +func (x *TypeResponse) GetType() string { + if x != nil { + return x.Type } return "" } type RotateRootCredentialsResponse struct { - Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *RotateRootCredentialsResponse) Reset() { *m = RotateRootCredentialsResponse{} } -func (m *RotateRootCredentialsResponse) String() string { return proto.CompactTextString(m) } -func (*RotateRootCredentialsResponse) ProtoMessage() {} -func (*RotateRootCredentialsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{11} + Config []byte `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` } -func (m *RotateRootCredentialsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RotateRootCredentialsResponse.Unmarshal(m, b) -} -func (m *RotateRootCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RotateRootCredentialsResponse.Marshal(b, m, deterministic) -} -func (m *RotateRootCredentialsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RotateRootCredentialsResponse.Merge(m, src) +func (x *RotateRootCredentialsResponse) Reset() { + *x = RotateRootCredentialsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RotateRootCredentialsResponse) XXX_Size() int { - return xxx_messageInfo_RotateRootCredentialsResponse.Size(m) + +func (x *RotateRootCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RotateRootCredentialsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RotateRootCredentialsResponse.DiscardUnknown(m) + +func (*RotateRootCredentialsResponse) ProtoMessage() {} + +func (x *RotateRootCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RotateRootCredentialsResponse proto.InternalMessageInfo +// Deprecated: Use RotateRootCredentialsResponse.ProtoReflect.Descriptor instead. +func (*RotateRootCredentialsResponse) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{11} +} -func (m *RotateRootCredentialsResponse) GetConfig() []byte { - if m != nil { - return m.Config +func (x *RotateRootCredentialsResponse) GetConfig() []byte { + if x != nil { + return x.Config } return nil } type Empty struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{12} +func (x *Empty) Reset() { + *x = Empty{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Empty) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Empty.Unmarshal(m, b) -} -func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Empty.Marshal(b, m, deterministic) -} -func (m *Empty) XXX_Merge(src proto.Message) { - xxx_messageInfo_Empty.Merge(m, src) -} -func (m *Empty) XXX_Size() int { - return xxx_messageInfo_Empty.Size(m) -} -func (m *Empty) XXX_DiscardUnknown() { - xxx_messageInfo_Empty.DiscardUnknown(m) +func (x *Empty) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_Empty proto.InternalMessageInfo +func (*Empty) ProtoMessage() {} -type GenerateCredentialsResponse struct { - Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *GenerateCredentialsResponse) Reset() { *m = GenerateCredentialsResponse{} } -func (m *GenerateCredentialsResponse) String() string { return proto.CompactTextString(m) } -func (*GenerateCredentialsResponse) ProtoMessage() {} -func (*GenerateCredentialsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{13} +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{12} } -func (m *GenerateCredentialsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GenerateCredentialsResponse.Unmarshal(m, b) -} -func (m *GenerateCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GenerateCredentialsResponse.Marshal(b, m, deterministic) +type GenerateCredentialsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` } -func (m *GenerateCredentialsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenerateCredentialsResponse.Merge(m, src) + +func (x *GenerateCredentialsResponse) Reset() { + *x = GenerateCredentialsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GenerateCredentialsResponse) XXX_Size() int { - return xxx_messageInfo_GenerateCredentialsResponse.Size(m) + +func (x *GenerateCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GenerateCredentialsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GenerateCredentialsResponse.DiscardUnknown(m) + +func (*GenerateCredentialsResponse) ProtoMessage() {} + +func (x *GenerateCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GenerateCredentialsResponse proto.InternalMessageInfo +// Deprecated: Use GenerateCredentialsResponse.ProtoReflect.Descriptor instead. +func (*GenerateCredentialsResponse) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{13} +} -func (m *GenerateCredentialsResponse) GetPassword() string { - if m != nil { - return m.Password +func (x *GenerateCredentialsResponse) GetPassword() string { + if x != nil { + return x.Password } return "" } type StaticUserConfig struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - Create bool `protobuf:"varint,3,opt,name=create,proto3" json:"create,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StaticUserConfig) Reset() { *m = StaticUserConfig{} } -func (m *StaticUserConfig) String() string { return proto.CompactTextString(m) } -func (*StaticUserConfig) ProtoMessage() {} -func (*StaticUserConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{14} + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + Create bool `protobuf:"varint,3,opt,name=create,proto3" json:"create,omitempty"` } -func (m *StaticUserConfig) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StaticUserConfig.Unmarshal(m, b) -} -func (m *StaticUserConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StaticUserConfig.Marshal(b, m, deterministic) -} -func (m *StaticUserConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_StaticUserConfig.Merge(m, src) +func (x *StaticUserConfig) Reset() { + *x = StaticUserConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StaticUserConfig) XXX_Size() int { - return xxx_messageInfo_StaticUserConfig.Size(m) + +func (x *StaticUserConfig) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StaticUserConfig) XXX_DiscardUnknown() { - xxx_messageInfo_StaticUserConfig.DiscardUnknown(m) + +func (*StaticUserConfig) ProtoMessage() {} + +func (x *StaticUserConfig) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StaticUserConfig proto.InternalMessageInfo +// Deprecated: Use StaticUserConfig.ProtoReflect.Descriptor instead. +func (*StaticUserConfig) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{14} +} -func (m *StaticUserConfig) GetUsername() string { - if m != nil { - return m.Username +func (x *StaticUserConfig) GetUsername() string { + if x != nil { + return x.Username } return "" } -func (m *StaticUserConfig) GetPassword() string { - if m != nil { - return m.Password +func (x *StaticUserConfig) GetPassword() string { + if x != nil { + return x.Password } return "" } -func (m *StaticUserConfig) GetCreate() bool { - if m != nil { - return m.Create +func (x *StaticUserConfig) GetCreate() bool { + if x != nil { + return x.Create } return false } type SetCredentialsRequest struct { - Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` - StaticUserConfig *StaticUserConfig `protobuf:"bytes,2,opt,name=static_user_config,json=staticUserConfig,proto3" json:"static_user_config,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SetCredentialsRequest) Reset() { *m = SetCredentialsRequest{} } -func (m *SetCredentialsRequest) String() string { return proto.CompactTextString(m) } -func (*SetCredentialsRequest) ProtoMessage() {} -func (*SetCredentialsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{15} + Statements *Statements `protobuf:"bytes,1,opt,name=statements,proto3" json:"statements,omitempty"` + StaticUserConfig *StaticUserConfig `protobuf:"bytes,2,opt,name=static_user_config,json=staticUserConfig,proto3" json:"static_user_config,omitempty"` } -func (m *SetCredentialsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetCredentialsRequest.Unmarshal(m, b) -} -func (m *SetCredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetCredentialsRequest.Marshal(b, m, deterministic) -} -func (m *SetCredentialsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetCredentialsRequest.Merge(m, src) +func (x *SetCredentialsRequest) Reset() { + *x = SetCredentialsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SetCredentialsRequest) XXX_Size() int { - return xxx_messageInfo_SetCredentialsRequest.Size(m) + +func (x *SetCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetCredentialsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SetCredentialsRequest.DiscardUnknown(m) + +func (*SetCredentialsRequest) ProtoMessage() {} + +func (x *SetCredentialsRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SetCredentialsRequest proto.InternalMessageInfo +// Deprecated: Use SetCredentialsRequest.ProtoReflect.Descriptor instead. +func (*SetCredentialsRequest) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{15} +} -func (m *SetCredentialsRequest) GetStatements() *Statements { - if m != nil { - return m.Statements +func (x *SetCredentialsRequest) GetStatements() *Statements { + if x != nil { + return x.Statements } return nil } -func (m *SetCredentialsRequest) GetStaticUserConfig() *StaticUserConfig { - if m != nil { - return m.StaticUserConfig +func (x *SetCredentialsRequest) GetStaticUserConfig() *StaticUserConfig { + if x != nil { + return x.StaticUserConfig } return nil } type SetCredentialsResponse struct { - Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` - Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SetCredentialsResponse) Reset() { *m = SetCredentialsResponse{} } -func (m *SetCredentialsResponse) String() string { return proto.CompactTextString(m) } -func (*SetCredentialsResponse) ProtoMessage() {} -func (*SetCredentialsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cfa445f4444c6876, []int{16} + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` } -func (m *SetCredentialsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetCredentialsResponse.Unmarshal(m, b) -} -func (m *SetCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetCredentialsResponse.Marshal(b, m, deterministic) -} -func (m *SetCredentialsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetCredentialsResponse.Merge(m, src) +func (x *SetCredentialsResponse) Reset() { + *x = SetCredentialsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SetCredentialsResponse) XXX_Size() int { - return xxx_messageInfo_SetCredentialsResponse.Size(m) + +func (x *SetCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetCredentialsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SetCredentialsResponse.DiscardUnknown(m) + +func (*SetCredentialsResponse) ProtoMessage() {} + +func (x *SetCredentialsResponse) ProtoReflect() protoreflect.Message { + mi := &file_sdk_database_dbplugin_database_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SetCredentialsResponse proto.InternalMessageInfo +// Deprecated: Use SetCredentialsResponse.ProtoReflect.Descriptor instead. +func (*SetCredentialsResponse) Descriptor() ([]byte, []int) { + return file_sdk_database_dbplugin_database_proto_rawDescGZIP(), []int{16} +} -func (m *SetCredentialsResponse) GetUsername() string { - if m != nil { - return m.Username +func (x *SetCredentialsResponse) GetUsername() string { + if x != nil { + return x.Username } return "" } -func (m *SetCredentialsResponse) GetPassword() string { - if m != nil { - return m.Password +func (x *SetCredentialsResponse) GetPassword() string { + if x != nil { + return x.Password } return "" } -func init() { - proto.RegisterType((*InitializeRequest)(nil), "dbplugin.InitializeRequest") - proto.RegisterType((*InitRequest)(nil), "dbplugin.InitRequest") - proto.RegisterType((*CreateUserRequest)(nil), "dbplugin.CreateUserRequest") - proto.RegisterType((*RenewUserRequest)(nil), "dbplugin.RenewUserRequest") - proto.RegisterType((*RevokeUserRequest)(nil), "dbplugin.RevokeUserRequest") - proto.RegisterType((*RotateRootCredentialsRequest)(nil), "dbplugin.RotateRootCredentialsRequest") - proto.RegisterType((*Statements)(nil), "dbplugin.Statements") - proto.RegisterType((*UsernameConfig)(nil), "dbplugin.UsernameConfig") - proto.RegisterType((*InitResponse)(nil), "dbplugin.InitResponse") - proto.RegisterType((*CreateUserResponse)(nil), "dbplugin.CreateUserResponse") - proto.RegisterType((*TypeResponse)(nil), "dbplugin.TypeResponse") - proto.RegisterType((*RotateRootCredentialsResponse)(nil), "dbplugin.RotateRootCredentialsResponse") - proto.RegisterType((*Empty)(nil), "dbplugin.Empty") - proto.RegisterType((*GenerateCredentialsResponse)(nil), "dbplugin.GenerateCredentialsResponse") - proto.RegisterType((*StaticUserConfig)(nil), "dbplugin.StaticUserConfig") - proto.RegisterType((*SetCredentialsRequest)(nil), "dbplugin.SetCredentialsRequest") - proto.RegisterType((*SetCredentialsResponse)(nil), "dbplugin.SetCredentialsResponse") -} - -func init() { - proto.RegisterFile("sdk/database/dbplugin/database.proto", fileDescriptor_cfa445f4444c6876) -} - -var fileDescriptor_cfa445f4444c6876 = []byte{ - // 839 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x8e, 0xdb, 0x44, - 0x14, 0x96, 0xf3, 0xb3, 0x9b, 0x9c, 0x5d, 0xed, 0x26, 0xd3, 0x66, 0x65, 0xb9, 0x85, 0x46, 0x23, - 0x28, 0x8b, 0x10, 0x31, 0xda, 0x82, 0x0a, 0xbd, 0x00, 0xd1, 0x14, 0x15, 0x24, 0x58, 0xa1, 0x49, - 0x7b, 0x83, 0x90, 0xa2, 0x89, 0x33, 0x9b, 0x58, 0xeb, 0x78, 0x8c, 0x67, 0x92, 0x12, 0x9e, 0x80, - 0x37, 0xe0, 0x96, 0x7b, 0x5e, 0x84, 0x87, 0xe1, 0x21, 0x90, 0xc7, 0x1e, 0x7b, 0xfc, 0xb3, 0xad, - 0xd4, 0x85, 0x3b, 0x9f, 0x39, 0xe7, 0x3b, 0xf3, 0x9d, 0x5f, 0x0f, 0xbc, 0x27, 0x96, 0xd7, 0xee, - 0x92, 0x4a, 0xba, 0xa0, 0x82, 0xb9, 0xcb, 0x45, 0x14, 0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, 0xff, 0xf7, - 0xf5, 0x87, 0x73, 0x28, 0x0a, 0x00, 0x00, +var File_sdk_database_dbplugin_database_proto protoreflect.FileDescriptor + +var file_sdk_database_dbplugin_database_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x73, 0x64, 0x6b, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x64, + 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x5c, 0x0a, 0x11, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, + 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x02, 0x18, 0x01, 0x22, + 0x52, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xc8, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0x41, 0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x3a, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa0, + 0x01, 0x0a, 0x10, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x22, 0x65, 0x0a, 0x11, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x62, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x1c, 0x52, 0x6f, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xec, 0x02, 0x0a, 0x0a, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x15, + 0x72, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, + 0x14, 0x72, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x13, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2d, 0x0a, 0x10, 0x72, 0x65, + 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x76, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x76, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x72, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x72, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4e, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x44, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x52, + 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x52, + 0x6f, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x26, 0x0a, 0x0c, 0x49, 0x6e, 0x69, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, + 0x4c, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x22, 0x0a, + 0x0c, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x37, 0x0a, 0x1d, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x39, 0x0a, 0x1b, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x62, + 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x0a, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x50, 0x0a, 0x16, + 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0xab, + 0x05, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0f, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x64, 0x62, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x55, 0x73, + 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, + 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, + 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, + 0x3a, 0x0a, 0x0a, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1b, 0x2e, + 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x64, 0x62, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x68, 0x0a, 0x15, 0x52, + 0x6f, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x12, 0x26, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x64, + 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, + 0x6f, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x15, 0x2e, + 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, + 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x12, 0x0f, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0f, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x53, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x1f, 0x2e, 0x64, 0x62, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x62, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x13, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x12, 0x0f, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x25, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, + 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x49, + 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x62, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x03, 0x88, 0x02, 0x01, 0x42, 0x32, 0x5a, 0x30, + 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, 0x64, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x64, 0x62, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sdk_database_dbplugin_database_proto_rawDescOnce sync.Once + file_sdk_database_dbplugin_database_proto_rawDescData = file_sdk_database_dbplugin_database_proto_rawDesc +) + +func file_sdk_database_dbplugin_database_proto_rawDescGZIP() []byte { + file_sdk_database_dbplugin_database_proto_rawDescOnce.Do(func() { + file_sdk_database_dbplugin_database_proto_rawDescData = protoimpl.X.CompressGZIP(file_sdk_database_dbplugin_database_proto_rawDescData) + }) + return file_sdk_database_dbplugin_database_proto_rawDescData +} + +var file_sdk_database_dbplugin_database_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_sdk_database_dbplugin_database_proto_goTypes = []interface{}{ + (*InitializeRequest)(nil), // 0: dbplugin.InitializeRequest + (*InitRequest)(nil), // 1: dbplugin.InitRequest + (*CreateUserRequest)(nil), // 2: dbplugin.CreateUserRequest + (*RenewUserRequest)(nil), // 3: dbplugin.RenewUserRequest + (*RevokeUserRequest)(nil), // 4: dbplugin.RevokeUserRequest + (*RotateRootCredentialsRequest)(nil), // 5: dbplugin.RotateRootCredentialsRequest + (*Statements)(nil), // 6: dbplugin.Statements + (*UsernameConfig)(nil), // 7: dbplugin.UsernameConfig + (*InitResponse)(nil), // 8: dbplugin.InitResponse + (*CreateUserResponse)(nil), // 9: dbplugin.CreateUserResponse + (*TypeResponse)(nil), // 10: dbplugin.TypeResponse + (*RotateRootCredentialsResponse)(nil), // 11: dbplugin.RotateRootCredentialsResponse + (*Empty)(nil), // 12: dbplugin.Empty + (*GenerateCredentialsResponse)(nil), // 13: dbplugin.GenerateCredentialsResponse + (*StaticUserConfig)(nil), // 14: dbplugin.StaticUserConfig + (*SetCredentialsRequest)(nil), // 15: dbplugin.SetCredentialsRequest + (*SetCredentialsResponse)(nil), // 16: dbplugin.SetCredentialsResponse + (*timestamp.Timestamp)(nil), // 17: google.protobuf.Timestamp +} +var file_sdk_database_dbplugin_database_proto_depIdxs = []int32{ + 6, // 0: dbplugin.CreateUserRequest.statements:type_name -> dbplugin.Statements + 7, // 1: dbplugin.CreateUserRequest.username_config:type_name -> dbplugin.UsernameConfig + 17, // 2: dbplugin.CreateUserRequest.expiration:type_name -> google.protobuf.Timestamp + 6, // 3: dbplugin.RenewUserRequest.statements:type_name -> dbplugin.Statements + 17, // 4: dbplugin.RenewUserRequest.expiration:type_name -> google.protobuf.Timestamp + 6, // 5: dbplugin.RevokeUserRequest.statements:type_name -> dbplugin.Statements + 6, // 6: dbplugin.SetCredentialsRequest.statements:type_name -> dbplugin.Statements + 14, // 7: dbplugin.SetCredentialsRequest.static_user_config:type_name -> dbplugin.StaticUserConfig + 12, // 8: dbplugin.Database.Type:input_type -> dbplugin.Empty + 2, // 9: dbplugin.Database.CreateUser:input_type -> dbplugin.CreateUserRequest + 3, // 10: dbplugin.Database.RenewUser:input_type -> dbplugin.RenewUserRequest + 4, // 11: dbplugin.Database.RevokeUser:input_type -> dbplugin.RevokeUserRequest + 5, // 12: dbplugin.Database.RotateRootCredentials:input_type -> dbplugin.RotateRootCredentialsRequest + 1, // 13: dbplugin.Database.Init:input_type -> dbplugin.InitRequest + 12, // 14: dbplugin.Database.Close:input_type -> dbplugin.Empty + 15, // 15: dbplugin.Database.SetCredentials:input_type -> dbplugin.SetCredentialsRequest + 12, // 16: dbplugin.Database.GenerateCredentials:input_type -> dbplugin.Empty + 0, // 17: dbplugin.Database.Initialize:input_type -> dbplugin.InitializeRequest + 10, // 18: dbplugin.Database.Type:output_type -> dbplugin.TypeResponse + 9, // 19: dbplugin.Database.CreateUser:output_type -> dbplugin.CreateUserResponse + 12, // 20: dbplugin.Database.RenewUser:output_type -> dbplugin.Empty + 12, // 21: dbplugin.Database.RevokeUser:output_type -> dbplugin.Empty + 11, // 22: dbplugin.Database.RotateRootCredentials:output_type -> dbplugin.RotateRootCredentialsResponse + 8, // 23: dbplugin.Database.Init:output_type -> dbplugin.InitResponse + 12, // 24: dbplugin.Database.Close:output_type -> dbplugin.Empty + 16, // 25: dbplugin.Database.SetCredentials:output_type -> dbplugin.SetCredentialsResponse + 13, // 26: dbplugin.Database.GenerateCredentials:output_type -> dbplugin.GenerateCredentialsResponse + 12, // 27: dbplugin.Database.Initialize:output_type -> dbplugin.Empty + 18, // [18:28] is the sub-list for method output_type + 8, // [8:18] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_sdk_database_dbplugin_database_proto_init() } +func file_sdk_database_dbplugin_database_proto_init() { + if File_sdk_database_dbplugin_database_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sdk_database_dbplugin_database_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitializeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RenewUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RevokeUserRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RotateRootCredentialsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Statements); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UsernameConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateUserResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RotateRootCredentialsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GenerateCredentialsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StaticUserConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetCredentialsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_database_dbplugin_database_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetCredentialsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sdk_database_dbplugin_database_proto_rawDesc, + NumEnums: 0, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_sdk_database_dbplugin_database_proto_goTypes, + DependencyIndexes: file_sdk_database_dbplugin_database_proto_depIdxs, + MessageInfos: file_sdk_database_dbplugin_database_proto_msgTypes, + }.Build() + File_sdk_database_dbplugin_database_proto = out.File + file_sdk_database_dbplugin_database_proto_rawDesc = nil + file_sdk_database_dbplugin_database_proto_goTypes = nil + file_sdk_database_dbplugin_database_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // DatabaseClient is the client API for Database service. // @@ -959,14 +1494,15 @@ type DatabaseClient interface { Close(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) SetCredentials(ctx context.Context, in *SetCredentialsRequest, opts ...grpc.CallOption) (*SetCredentialsResponse, error) GenerateCredentials(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GenerateCredentialsResponse, error) + // Deprecated: Do not use. Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*Empty, error) } type databaseClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewDatabaseClient(cc *grpc.ClientConn) DatabaseClient { +func NewDatabaseClient(cc grpc.ClientConnInterface) DatabaseClient { return &databaseClient{cc} } @@ -1072,6 +1608,7 @@ type DatabaseServer interface { Close(context.Context, *Empty) (*Empty, error) SetCredentials(context.Context, *SetCredentialsRequest) (*SetCredentialsResponse, error) GenerateCredentials(context.Context, *Empty) (*GenerateCredentialsResponse, error) + // Deprecated: Do not use. Initialize(context.Context, *InitializeRequest) (*Empty, error) } @@ -1079,34 +1616,34 @@ type DatabaseServer interface { type UnimplementedDatabaseServer struct { } -func (*UnimplementedDatabaseServer) Type(ctx context.Context, req *Empty) (*TypeResponse, error) { +func (*UnimplementedDatabaseServer) Type(context.Context, *Empty) (*TypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Type not implemented") } -func (*UnimplementedDatabaseServer) CreateUser(ctx context.Context, req *CreateUserRequest) (*CreateUserResponse, error) { +func (*UnimplementedDatabaseServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented") } -func (*UnimplementedDatabaseServer) RenewUser(ctx context.Context, req *RenewUserRequest) (*Empty, error) { +func (*UnimplementedDatabaseServer) RenewUser(context.Context, *RenewUserRequest) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method RenewUser not implemented") } -func (*UnimplementedDatabaseServer) RevokeUser(ctx context.Context, req *RevokeUserRequest) (*Empty, error) { +func (*UnimplementedDatabaseServer) RevokeUser(context.Context, *RevokeUserRequest) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method RevokeUser not implemented") } -func (*UnimplementedDatabaseServer) RotateRootCredentials(ctx context.Context, req *RotateRootCredentialsRequest) (*RotateRootCredentialsResponse, error) { +func (*UnimplementedDatabaseServer) RotateRootCredentials(context.Context, *RotateRootCredentialsRequest) (*RotateRootCredentialsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RotateRootCredentials not implemented") } -func (*UnimplementedDatabaseServer) Init(ctx context.Context, req *InitRequest) (*InitResponse, error) { +func (*UnimplementedDatabaseServer) Init(context.Context, *InitRequest) (*InitResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Init not implemented") } -func (*UnimplementedDatabaseServer) Close(ctx context.Context, req *Empty) (*Empty, error) { +func (*UnimplementedDatabaseServer) Close(context.Context, *Empty) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Close not implemented") } -func (*UnimplementedDatabaseServer) SetCredentials(ctx context.Context, req *SetCredentialsRequest) (*SetCredentialsResponse, error) { +func (*UnimplementedDatabaseServer) SetCredentials(context.Context, *SetCredentialsRequest) (*SetCredentialsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetCredentials not implemented") } -func (*UnimplementedDatabaseServer) GenerateCredentials(ctx context.Context, req *Empty) (*GenerateCredentialsResponse, error) { +func (*UnimplementedDatabaseServer) GenerateCredentials(context.Context, *Empty) (*GenerateCredentialsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GenerateCredentials not implemented") } -func (*UnimplementedDatabaseServer) Initialize(ctx context.Context, req *InitializeRequest) (*Empty, error) { +func (*UnimplementedDatabaseServer) Initialize(context.Context, *InitializeRequest) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented") } diff --git a/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.pb.go b/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.pb.go index bd1b2c765b7d..50e815674855 100644 --- a/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.pb.go +++ b/vendor/github.com/hashicorp/vault/sdk/plugin/pb/backend.pb.go @@ -1,102 +1,126 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.22.0 +// protoc v3.11.4 // source: sdk/plugin/pb/backend.proto package pb import ( context "context" - fmt "fmt" proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" logical "github.com/hashicorp/vault/sdk/logical" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 type Empty struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{0} +func (x *Empty) Reset() { + *x = Empty{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Empty) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Empty.Unmarshal(m, b) -} -func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Empty.Marshal(b, m, deterministic) -} -func (m *Empty) XXX_Merge(src proto.Message) { - xxx_messageInfo_Empty.Merge(m, src) -} -func (m *Empty) XXX_Size() int { - return xxx_messageInfo_Empty.Size(m) -} -func (m *Empty) XXX_DiscardUnknown() { - xxx_messageInfo_Empty.DiscardUnknown(m) +func (x *Empty) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_Empty proto.InternalMessageInfo +func (*Empty) ProtoMessage() {} -type Header struct { - Header []string `sentinel:"" protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *Header) Reset() { *m = Header{} } -func (m *Header) String() string { return proto.CompactTextString(m) } -func (*Header) ProtoMessage() {} -func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{1} +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{0} } -func (m *Header) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Header.Unmarshal(m, b) -} -func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Header.Marshal(b, m, deterministic) +type Header struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Header []string `sentinel:"" protobuf:"bytes,1,rep,name=header,proto3" json:"header,omitempty"` } -func (m *Header) XXX_Merge(src proto.Message) { - xxx_messageInfo_Header.Merge(m, src) + +func (x *Header) Reset() { + *x = Header{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Header) XXX_Size() int { - return xxx_messageInfo_Header.Size(m) + +func (x *Header) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Header) XXX_DiscardUnknown() { - xxx_messageInfo_Header.DiscardUnknown(m) + +func (*Header) ProtoMessage() {} + +func (x *Header) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Header proto.InternalMessageInfo +// Deprecated: Use Header.ProtoReflect.Descriptor instead. +func (*Header) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{1} +} -func (m *Header) GetHeader() []string { - if m != nil { - return m.Header +func (x *Header) GetHeader() []string { + if x != nil { + return x.Header } return nil } type ProtoError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Error type can be one of: // ErrTypeUnknown uint32 = iota // ErrTypeUserError @@ -108,62 +132,70 @@ type ProtoError struct { // ErrTypeInvalidRequest // ErrTypePermissionDenied // ErrTypeMultiAuthzPending - ErrType uint32 `sentinel:"" protobuf:"varint,1,opt,name=err_type,json=errType,proto3" json:"err_type,omitempty"` - ErrMsg string `sentinel:"" protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"` - ErrCode int64 `sentinel:"" protobuf:"varint,3,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ErrType uint32 `sentinel:"" protobuf:"varint,1,opt,name=err_type,json=errType,proto3" json:"err_type,omitempty"` + ErrMsg string `sentinel:"" protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"` + ErrCode int64 `sentinel:"" protobuf:"varint,3,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"` } -func (m *ProtoError) Reset() { *m = ProtoError{} } -func (m *ProtoError) String() string { return proto.CompactTextString(m) } -func (*ProtoError) ProtoMessage() {} -func (*ProtoError) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{2} +func (x *ProtoError) Reset() { + *x = ProtoError{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ProtoError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ProtoError.Unmarshal(m, b) -} -func (m *ProtoError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ProtoError.Marshal(b, m, deterministic) +func (x *ProtoError) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ProtoError) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProtoError.Merge(m, src) -} -func (m *ProtoError) XXX_Size() int { - return xxx_messageInfo_ProtoError.Size(m) -} -func (m *ProtoError) XXX_DiscardUnknown() { - xxx_messageInfo_ProtoError.DiscardUnknown(m) + +func (*ProtoError) ProtoMessage() {} + +func (x *ProtoError) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ProtoError proto.InternalMessageInfo +// Deprecated: Use ProtoError.ProtoReflect.Descriptor instead. +func (*ProtoError) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{2} +} -func (m *ProtoError) GetErrType() uint32 { - if m != nil { - return m.ErrType +func (x *ProtoError) GetErrType() uint32 { + if x != nil { + return x.ErrType } return 0 } -func (m *ProtoError) GetErrMsg() string { - if m != nil { - return m.ErrMsg +func (x *ProtoError) GetErrMsg() string { + if x != nil { + return x.ErrMsg } return "" } -func (m *ProtoError) GetErrCode() int64 { - if m != nil { - return m.ErrCode +func (x *ProtoError) GetErrCode() int64 { + if x != nil { + return x.ErrCode } return 0 } // Paths is the structure of special paths that is used for SpecialPaths. type Paths struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Root are the paths that require a root token to access Root []string `sentinel:"" protobuf:"bytes,1,rep,name=root,proto3" json:"root,omitempty"` // Unauthenticated are the paths that can be accessed without any auth. @@ -174,66 +206,74 @@ type Paths struct { // SealWrapStorage are storage paths that, when using a capable seal, // should be seal wrapped with extra encryption. It is exact matching // unless it ends with '/' in which case it will be treated as a prefix. - SealWrapStorage []string `sentinel:"" protobuf:"bytes,4,rep,name=seal_wrap_storage,json=sealWrapStorage,proto3" json:"seal_wrap_storage,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SealWrapStorage []string `sentinel:"" protobuf:"bytes,4,rep,name=seal_wrap_storage,json=sealWrapStorage,proto3" json:"seal_wrap_storage,omitempty"` } -func (m *Paths) Reset() { *m = Paths{} } -func (m *Paths) String() string { return proto.CompactTextString(m) } -func (*Paths) ProtoMessage() {} -func (*Paths) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{3} +func (x *Paths) Reset() { + *x = Paths{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Paths) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Paths.Unmarshal(m, b) -} -func (m *Paths) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Paths.Marshal(b, m, deterministic) -} -func (m *Paths) XXX_Merge(src proto.Message) { - xxx_messageInfo_Paths.Merge(m, src) +func (x *Paths) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Paths) XXX_Size() int { - return xxx_messageInfo_Paths.Size(m) -} -func (m *Paths) XXX_DiscardUnknown() { - xxx_messageInfo_Paths.DiscardUnknown(m) + +func (*Paths) ProtoMessage() {} + +func (x *Paths) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Paths proto.InternalMessageInfo +// Deprecated: Use Paths.ProtoReflect.Descriptor instead. +func (*Paths) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{3} +} -func (m *Paths) GetRoot() []string { - if m != nil { - return m.Root +func (x *Paths) GetRoot() []string { + if x != nil { + return x.Root } return nil } -func (m *Paths) GetUnauthenticated() []string { - if m != nil { - return m.Unauthenticated +func (x *Paths) GetUnauthenticated() []string { + if x != nil { + return x.Unauthenticated } return nil } -func (m *Paths) GetLocalStorage() []string { - if m != nil { - return m.LocalStorage +func (x *Paths) GetLocalStorage() []string { + if x != nil { + return x.LocalStorage } return nil } -func (m *Paths) GetSealWrapStorage() []string { - if m != nil { - return m.SealWrapStorage +func (x *Paths) GetSealWrapStorage() []string { + if x != nil { + return x.SealWrapStorage } return nil } type Request struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // ID is the uuid associated with each request ID string `sentinel:"" protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // If set, the name given to the replication secondary where this request @@ -299,178 +339,186 @@ type Request struct { // Connection will be non-nil only for credential providers to // inspect the connection information and potentially use it for // authentication/protection. - Connection *Connection `sentinel:"" protobuf:"bytes,20,opt,name=connection,proto3" json:"connection,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Connection *Connection `sentinel:"" protobuf:"bytes,20,opt,name=connection,proto3" json:"connection,omitempty"` } -func (m *Request) Reset() { *m = Request{} } -func (m *Request) String() string { return proto.CompactTextString(m) } -func (*Request) ProtoMessage() {} -func (*Request) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{4} +func (x *Request) Reset() { + *x = Request{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Request) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Request.Unmarshal(m, b) -} -func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Request.Marshal(b, m, deterministic) -} -func (m *Request) XXX_Merge(src proto.Message) { - xxx_messageInfo_Request.Merge(m, src) -} -func (m *Request) XXX_Size() int { - return xxx_messageInfo_Request.Size(m) +func (x *Request) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Request) XXX_DiscardUnknown() { - xxx_messageInfo_Request.DiscardUnknown(m) + +func (*Request) ProtoMessage() {} + +func (x *Request) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Request proto.InternalMessageInfo +// Deprecated: Use Request.ProtoReflect.Descriptor instead. +func (*Request) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{4} +} -func (m *Request) GetID() string { - if m != nil { - return m.ID +func (x *Request) GetID() string { + if x != nil { + return x.ID } return "" } -func (m *Request) GetReplicationCluster() string { - if m != nil { - return m.ReplicationCluster +func (x *Request) GetReplicationCluster() string { + if x != nil { + return x.ReplicationCluster } return "" } -func (m *Request) GetOperation() string { - if m != nil { - return m.Operation +func (x *Request) GetOperation() string { + if x != nil { + return x.Operation } return "" } -func (m *Request) GetPath() string { - if m != nil { - return m.Path +func (x *Request) GetPath() string { + if x != nil { + return x.Path } return "" } -func (m *Request) GetData() string { - if m != nil { - return m.Data +func (x *Request) GetData() string { + if x != nil { + return x.Data } return "" } -func (m *Request) GetSecret() *Secret { - if m != nil { - return m.Secret +func (x *Request) GetSecret() *Secret { + if x != nil { + return x.Secret } return nil } -func (m *Request) GetAuth() *Auth { - if m != nil { - return m.Auth +func (x *Request) GetAuth() *Auth { + if x != nil { + return x.Auth } return nil } -func (m *Request) GetHeaders() map[string]*Header { - if m != nil { - return m.Headers +func (x *Request) GetHeaders() map[string]*Header { + if x != nil { + return x.Headers } return nil } -func (m *Request) GetClientToken() string { - if m != nil { - return m.ClientToken +func (x *Request) GetClientToken() string { + if x != nil { + return x.ClientToken } return "" } -func (m *Request) GetClientTokenAccessor() string { - if m != nil { - return m.ClientTokenAccessor +func (x *Request) GetClientTokenAccessor() string { + if x != nil { + return x.ClientTokenAccessor } return "" } -func (m *Request) GetDisplayName() string { - if m != nil { - return m.DisplayName +func (x *Request) GetDisplayName() string { + if x != nil { + return x.DisplayName } return "" } -func (m *Request) GetMountPoint() string { - if m != nil { - return m.MountPoint +func (x *Request) GetMountPoint() string { + if x != nil { + return x.MountPoint } return "" } -func (m *Request) GetMountType() string { - if m != nil { - return m.MountType +func (x *Request) GetMountType() string { + if x != nil { + return x.MountType } return "" } -func (m *Request) GetMountAccessor() string { - if m != nil { - return m.MountAccessor +func (x *Request) GetMountAccessor() string { + if x != nil { + return x.MountAccessor } return "" } -func (m *Request) GetWrapInfo() *RequestWrapInfo { - if m != nil { - return m.WrapInfo +func (x *Request) GetWrapInfo() *RequestWrapInfo { + if x != nil { + return x.WrapInfo } return nil } -func (m *Request) GetClientTokenRemainingUses() int64 { - if m != nil { - return m.ClientTokenRemainingUses +func (x *Request) GetClientTokenRemainingUses() int64 { + if x != nil { + return x.ClientTokenRemainingUses } return 0 } -func (m *Request) GetEntityID() string { - if m != nil { - return m.EntityID +func (x *Request) GetEntityID() string { + if x != nil { + return x.EntityID } return "" } -func (m *Request) GetPolicyOverride() bool { - if m != nil { - return m.PolicyOverride +func (x *Request) GetPolicyOverride() bool { + if x != nil { + return x.PolicyOverride } return false } -func (m *Request) GetUnauthenticated() bool { - if m != nil { - return m.Unauthenticated +func (x *Request) GetUnauthenticated() bool { + if x != nil { + return x.Unauthenticated } return false } -func (m *Request) GetConnection() *Connection { - if m != nil { - return m.Connection +func (x *Request) GetConnection() *Connection { + if x != nil { + return x.Connection } return nil } type Auth struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + LeaseOptions *LeaseOptions `sentinel:"" protobuf:"bytes,1,opt,name=lease_options,json=leaseOptions,proto3" json:"lease_options,omitempty"` // InternalData is a JSON object that is stored with the auth struct. // This will be sent back during a Renew/Revoke for storing internal data @@ -530,410 +578,434 @@ type Auth struct { // TokenType is the type of token being requested TokenType uint32 `sentinel:"" protobuf:"varint,17,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` // Whether the default policy should be added automatically by core - NoDefaultPolicy bool `sentinel:"" protobuf:"varint,18,opt,name=no_default_policy,json=noDefaultPolicy,proto3" json:"no_default_policy,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NoDefaultPolicy bool `sentinel:"" protobuf:"varint,18,opt,name=no_default_policy,json=noDefaultPolicy,proto3" json:"no_default_policy,omitempty"` } -func (m *Auth) Reset() { *m = Auth{} } -func (m *Auth) String() string { return proto.CompactTextString(m) } -func (*Auth) ProtoMessage() {} -func (*Auth) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{5} +func (x *Auth) Reset() { + *x = Auth{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Auth) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Auth.Unmarshal(m, b) +func (x *Auth) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Auth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Auth.Marshal(b, m, deterministic) -} -func (m *Auth) XXX_Merge(src proto.Message) { - xxx_messageInfo_Auth.Merge(m, src) -} -func (m *Auth) XXX_Size() int { - return xxx_messageInfo_Auth.Size(m) -} -func (m *Auth) XXX_DiscardUnknown() { - xxx_messageInfo_Auth.DiscardUnknown(m) + +func (*Auth) ProtoMessage() {} + +func (x *Auth) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Auth proto.InternalMessageInfo +// Deprecated: Use Auth.ProtoReflect.Descriptor instead. +func (*Auth) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{5} +} -func (m *Auth) GetLeaseOptions() *LeaseOptions { - if m != nil { - return m.LeaseOptions +func (x *Auth) GetLeaseOptions() *LeaseOptions { + if x != nil { + return x.LeaseOptions } return nil } -func (m *Auth) GetInternalData() string { - if m != nil { - return m.InternalData +func (x *Auth) GetInternalData() string { + if x != nil { + return x.InternalData } return "" } -func (m *Auth) GetDisplayName() string { - if m != nil { - return m.DisplayName +func (x *Auth) GetDisplayName() string { + if x != nil { + return x.DisplayName } return "" } -func (m *Auth) GetPolicies() []string { - if m != nil { - return m.Policies +func (x *Auth) GetPolicies() []string { + if x != nil { + return x.Policies } return nil } -func (m *Auth) GetMetadata() map[string]string { - if m != nil { - return m.Metadata +func (x *Auth) GetMetadata() map[string]string { + if x != nil { + return x.Metadata } return nil } -func (m *Auth) GetClientToken() string { - if m != nil { - return m.ClientToken +func (x *Auth) GetClientToken() string { + if x != nil { + return x.ClientToken } return "" } -func (m *Auth) GetAccessor() string { - if m != nil { - return m.Accessor +func (x *Auth) GetAccessor() string { + if x != nil { + return x.Accessor } return "" } -func (m *Auth) GetPeriod() int64 { - if m != nil { - return m.Period +func (x *Auth) GetPeriod() int64 { + if x != nil { + return x.Period } return 0 } -func (m *Auth) GetNumUses() int64 { - if m != nil { - return m.NumUses +func (x *Auth) GetNumUses() int64 { + if x != nil { + return x.NumUses } return 0 } -func (m *Auth) GetEntityID() string { - if m != nil { - return m.EntityID +func (x *Auth) GetEntityID() string { + if x != nil { + return x.EntityID } return "" } -func (m *Auth) GetAlias() *logical.Alias { - if m != nil { - return m.Alias +func (x *Auth) GetAlias() *logical.Alias { + if x != nil { + return x.Alias } return nil } -func (m *Auth) GetGroupAliases() []*logical.Alias { - if m != nil { - return m.GroupAliases +func (x *Auth) GetGroupAliases() []*logical.Alias { + if x != nil { + return x.GroupAliases } return nil } -func (m *Auth) GetBoundCIDRs() []string { - if m != nil { - return m.BoundCIDRs +func (x *Auth) GetBoundCIDRs() []string { + if x != nil { + return x.BoundCIDRs } return nil } -func (m *Auth) GetTokenPolicies() []string { - if m != nil { - return m.TokenPolicies +func (x *Auth) GetTokenPolicies() []string { + if x != nil { + return x.TokenPolicies } return nil } -func (m *Auth) GetIdentityPolicies() []string { - if m != nil { - return m.IdentityPolicies +func (x *Auth) GetIdentityPolicies() []string { + if x != nil { + return x.IdentityPolicies } return nil } -func (m *Auth) GetExplicitMaxTTL() int64 { - if m != nil { - return m.ExplicitMaxTTL +func (x *Auth) GetExplicitMaxTTL() int64 { + if x != nil { + return x.ExplicitMaxTTL } return 0 } -func (m *Auth) GetTokenType() uint32 { - if m != nil { - return m.TokenType +func (x *Auth) GetTokenType() uint32 { + if x != nil { + return x.TokenType } return 0 } -func (m *Auth) GetNoDefaultPolicy() bool { - if m != nil { - return m.NoDefaultPolicy +func (x *Auth) GetNoDefaultPolicy() bool { + if x != nil { + return x.NoDefaultPolicy } return false } type TokenEntry struct { - ID string `sentinel:"" protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Accessor string `sentinel:"" protobuf:"bytes,2,opt,name=accessor,proto3" json:"accessor,omitempty"` - Parent string `sentinel:"" protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"` - Policies []string `sentinel:"" protobuf:"bytes,4,rep,name=policies,proto3" json:"policies,omitempty"` - Path string `sentinel:"" protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` - Meta map[string]string `sentinel:"" protobuf:"bytes,6,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - DisplayName string `sentinel:"" protobuf:"bytes,7,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - NumUses int64 `sentinel:"" protobuf:"varint,8,opt,name=num_uses,json=numUses,proto3" json:"num_uses,omitempty"` - CreationTime int64 `sentinel:"" protobuf:"varint,9,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` - TTL int64 `sentinel:"" protobuf:"varint,10,opt,name=ttl,proto3" json:"ttl,omitempty"` - ExplicitMaxTTL int64 `sentinel:"" protobuf:"varint,11,opt,name=explicit_max_ttl,json=explicitMaxTtl,proto3" json:"explicit_max_ttl,omitempty"` - Role string `sentinel:"" protobuf:"bytes,12,opt,name=role,proto3" json:"role,omitempty"` - Period int64 `sentinel:"" protobuf:"varint,13,opt,name=period,proto3" json:"period,omitempty"` - EntityID string `sentinel:"" protobuf:"bytes,14,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` - BoundCIDRs []string `sentinel:"" protobuf:"bytes,15,rep,name=bound_cidrs,json=boundCidrs,proto3" json:"bound_cidrs,omitempty"` - NamespaceID string `sentinel:"" protobuf:"bytes,16,opt,name=namespace_id,json=namespaceID,proto3" json:"namespace_id,omitempty"` - CubbyholeID string `sentinel:"" protobuf:"bytes,17,opt,name=cubbyhole_id,json=cubbyholeId,proto3" json:"cubbyhole_id,omitempty"` - Type uint32 `sentinel:"" protobuf:"varint,18,opt,name=type,proto3" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TokenEntry) Reset() { *m = TokenEntry{} } -func (m *TokenEntry) String() string { return proto.CompactTextString(m) } -func (*TokenEntry) ProtoMessage() {} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ID string `sentinel:"" protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Accessor string `sentinel:"" protobuf:"bytes,2,opt,name=accessor,proto3" json:"accessor,omitempty"` + Parent string `sentinel:"" protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"` + Policies []string `sentinel:"" protobuf:"bytes,4,rep,name=policies,proto3" json:"policies,omitempty"` + Path string `sentinel:"" protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` + Meta map[string]string `sentinel:"" protobuf:"bytes,6,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + DisplayName string `sentinel:"" protobuf:"bytes,7,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + NumUses int64 `sentinel:"" protobuf:"varint,8,opt,name=num_uses,json=numUses,proto3" json:"num_uses,omitempty"` + CreationTime int64 `sentinel:"" protobuf:"varint,9,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` + TTL int64 `sentinel:"" protobuf:"varint,10,opt,name=ttl,proto3" json:"ttl,omitempty"` + ExplicitMaxTTL int64 `sentinel:"" protobuf:"varint,11,opt,name=explicit_max_ttl,json=explicitMaxTtl,proto3" json:"explicit_max_ttl,omitempty"` + Role string `sentinel:"" protobuf:"bytes,12,opt,name=role,proto3" json:"role,omitempty"` + Period int64 `sentinel:"" protobuf:"varint,13,opt,name=period,proto3" json:"period,omitempty"` + EntityID string `sentinel:"" protobuf:"bytes,14,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` + BoundCIDRs []string `sentinel:"" protobuf:"bytes,15,rep,name=bound_cidrs,json=boundCidrs,proto3" json:"bound_cidrs,omitempty"` + NamespaceID string `sentinel:"" protobuf:"bytes,16,opt,name=namespace_id,json=namespaceID,proto3" json:"namespace_id,omitempty"` + CubbyholeID string `sentinel:"" protobuf:"bytes,17,opt,name=cubbyhole_id,json=cubbyholeId,proto3" json:"cubbyhole_id,omitempty"` + Type uint32 `sentinel:"" protobuf:"varint,18,opt,name=type,proto3" json:"type,omitempty"` +} + +func (x *TokenEntry) Reset() { + *x = TokenEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TokenEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TokenEntry) ProtoMessage() {} + +func (x *TokenEntry) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TokenEntry.ProtoReflect.Descriptor instead. func (*TokenEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{6} -} - -func (m *TokenEntry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TokenEntry.Unmarshal(m, b) -} -func (m *TokenEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TokenEntry.Marshal(b, m, deterministic) -} -func (m *TokenEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenEntry.Merge(m, src) -} -func (m *TokenEntry) XXX_Size() int { - return xxx_messageInfo_TokenEntry.Size(m) -} -func (m *TokenEntry) XXX_DiscardUnknown() { - xxx_messageInfo_TokenEntry.DiscardUnknown(m) + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{6} } -var xxx_messageInfo_TokenEntry proto.InternalMessageInfo - -func (m *TokenEntry) GetID() string { - if m != nil { - return m.ID +func (x *TokenEntry) GetID() string { + if x != nil { + return x.ID } return "" } -func (m *TokenEntry) GetAccessor() string { - if m != nil { - return m.Accessor +func (x *TokenEntry) GetAccessor() string { + if x != nil { + return x.Accessor } return "" } -func (m *TokenEntry) GetParent() string { - if m != nil { - return m.Parent +func (x *TokenEntry) GetParent() string { + if x != nil { + return x.Parent } return "" } -func (m *TokenEntry) GetPolicies() []string { - if m != nil { - return m.Policies +func (x *TokenEntry) GetPolicies() []string { + if x != nil { + return x.Policies } return nil } -func (m *TokenEntry) GetPath() string { - if m != nil { - return m.Path +func (x *TokenEntry) GetPath() string { + if x != nil { + return x.Path } return "" } -func (m *TokenEntry) GetMeta() map[string]string { - if m != nil { - return m.Meta +func (x *TokenEntry) GetMeta() map[string]string { + if x != nil { + return x.Meta } return nil } -func (m *TokenEntry) GetDisplayName() string { - if m != nil { - return m.DisplayName +func (x *TokenEntry) GetDisplayName() string { + if x != nil { + return x.DisplayName } return "" } -func (m *TokenEntry) GetNumUses() int64 { - if m != nil { - return m.NumUses +func (x *TokenEntry) GetNumUses() int64 { + if x != nil { + return x.NumUses } return 0 } -func (m *TokenEntry) GetCreationTime() int64 { - if m != nil { - return m.CreationTime +func (x *TokenEntry) GetCreationTime() int64 { + if x != nil { + return x.CreationTime } return 0 } -func (m *TokenEntry) GetTTL() int64 { - if m != nil { - return m.TTL +func (x *TokenEntry) GetTTL() int64 { + if x != nil { + return x.TTL } return 0 } -func (m *TokenEntry) GetExplicitMaxTTL() int64 { - if m != nil { - return m.ExplicitMaxTTL +func (x *TokenEntry) GetExplicitMaxTTL() int64 { + if x != nil { + return x.ExplicitMaxTTL } return 0 } -func (m *TokenEntry) GetRole() string { - if m != nil { - return m.Role +func (x *TokenEntry) GetRole() string { + if x != nil { + return x.Role } return "" } -func (m *TokenEntry) GetPeriod() int64 { - if m != nil { - return m.Period +func (x *TokenEntry) GetPeriod() int64 { + if x != nil { + return x.Period } return 0 } -func (m *TokenEntry) GetEntityID() string { - if m != nil { - return m.EntityID +func (x *TokenEntry) GetEntityID() string { + if x != nil { + return x.EntityID } return "" } -func (m *TokenEntry) GetBoundCIDRs() []string { - if m != nil { - return m.BoundCIDRs +func (x *TokenEntry) GetBoundCIDRs() []string { + if x != nil { + return x.BoundCIDRs } return nil } -func (m *TokenEntry) GetNamespaceID() string { - if m != nil { - return m.NamespaceID +func (x *TokenEntry) GetNamespaceID() string { + if x != nil { + return x.NamespaceID } return "" } -func (m *TokenEntry) GetCubbyholeID() string { - if m != nil { - return m.CubbyholeID +func (x *TokenEntry) GetCubbyholeID() string { + if x != nil { + return x.CubbyholeID } return "" } -func (m *TokenEntry) GetType() uint32 { - if m != nil { - return m.Type +func (x *TokenEntry) GetType() uint32 { + if x != nil { + return x.Type } return 0 } type LeaseOptions struct { - TTL int64 `sentinel:"" protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` - Renewable bool `sentinel:"" protobuf:"varint,2,opt,name=renewable,proto3" json:"renewable,omitempty"` - Increment int64 `sentinel:"" protobuf:"varint,3,opt,name=increment,proto3" json:"increment,omitempty"` - IssueTime *timestamp.Timestamp `sentinel:"" protobuf:"bytes,4,opt,name=issue_time,json=issueTime,proto3" json:"issue_time,omitempty"` - MaxTTL int64 `sentinel:"" protobuf:"varint,5,opt,name=MaxTTL,proto3" json:"MaxTTL,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LeaseOptions) Reset() { *m = LeaseOptions{} } -func (m *LeaseOptions) String() string { return proto.CompactTextString(m) } -func (*LeaseOptions) ProtoMessage() {} -func (*LeaseOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{7} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *LeaseOptions) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LeaseOptions.Unmarshal(m, b) -} -func (m *LeaseOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LeaseOptions.Marshal(b, m, deterministic) + TTL int64 `sentinel:"" protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` + Renewable bool `sentinel:"" protobuf:"varint,2,opt,name=renewable,proto3" json:"renewable,omitempty"` + Increment int64 `sentinel:"" protobuf:"varint,3,opt,name=increment,proto3" json:"increment,omitempty"` + IssueTime *timestamp.Timestamp `sentinel:"" protobuf:"bytes,4,opt,name=issue_time,json=issueTime,proto3" json:"issue_time,omitempty"` + MaxTTL int64 `sentinel:"" protobuf:"varint,5,opt,name=MaxTTL,proto3" json:"MaxTTL,omitempty"` } -func (m *LeaseOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_LeaseOptions.Merge(m, src) + +func (x *LeaseOptions) Reset() { + *x = LeaseOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *LeaseOptions) XXX_Size() int { - return xxx_messageInfo_LeaseOptions.Size(m) + +func (x *LeaseOptions) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LeaseOptions) XXX_DiscardUnknown() { - xxx_messageInfo_LeaseOptions.DiscardUnknown(m) + +func (*LeaseOptions) ProtoMessage() {} + +func (x *LeaseOptions) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_LeaseOptions proto.InternalMessageInfo +// Deprecated: Use LeaseOptions.ProtoReflect.Descriptor instead. +func (*LeaseOptions) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{7} +} -func (m *LeaseOptions) GetTTL() int64 { - if m != nil { - return m.TTL +func (x *LeaseOptions) GetTTL() int64 { + if x != nil { + return x.TTL } return 0 } -func (m *LeaseOptions) GetRenewable() bool { - if m != nil { - return m.Renewable +func (x *LeaseOptions) GetRenewable() bool { + if x != nil { + return x.Renewable } return false } -func (m *LeaseOptions) GetIncrement() int64 { - if m != nil { - return m.Increment +func (x *LeaseOptions) GetIncrement() int64 { + if x != nil { + return x.Increment } return 0 } -func (m *LeaseOptions) GetIssueTime() *timestamp.Timestamp { - if m != nil { - return m.IssueTime +func (x *LeaseOptions) GetIssueTime() *timestamp.Timestamp { + if x != nil { + return x.IssueTime } return nil } -func (m *LeaseOptions) GetMaxTTL() int64 { - if m != nil { - return m.MaxTTL +func (x *LeaseOptions) GetMaxTTL() int64 { + if x != nil { + return x.MaxTTL } return 0 } type Secret struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + LeaseOptions *LeaseOptions `sentinel:"" protobuf:"bytes,1,opt,name=lease_options,json=leaseOptions,proto3" json:"lease_options,omitempty"` // InternalData is a JSON object that is stored with the secret. // This will be sent back during a Renew/Revoke for storing internal data @@ -942,59 +1014,67 @@ type Secret struct { // LeaseID is the ID returned to the user to manage this secret. // This is generated by Vault core. Any set value will be ignored. // For requests, this will always be blank. - LeaseID string `sentinel:"" protobuf:"bytes,3,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + LeaseID string `sentinel:"" protobuf:"bytes,3,opt,name=lease_id,json=leaseId,proto3" json:"lease_id,omitempty"` } -func (m *Secret) Reset() { *m = Secret{} } -func (m *Secret) String() string { return proto.CompactTextString(m) } -func (*Secret) ProtoMessage() {} -func (*Secret) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{8} +func (x *Secret) Reset() { + *x = Secret{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Secret) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Secret.Unmarshal(m, b) -} -func (m *Secret) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Secret.Marshal(b, m, deterministic) -} -func (m *Secret) XXX_Merge(src proto.Message) { - xxx_messageInfo_Secret.Merge(m, src) -} -func (m *Secret) XXX_Size() int { - return xxx_messageInfo_Secret.Size(m) +func (x *Secret) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Secret) XXX_DiscardUnknown() { - xxx_messageInfo_Secret.DiscardUnknown(m) + +func (*Secret) ProtoMessage() {} + +func (x *Secret) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Secret proto.InternalMessageInfo +// Deprecated: Use Secret.ProtoReflect.Descriptor instead. +func (*Secret) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{8} +} -func (m *Secret) GetLeaseOptions() *LeaseOptions { - if m != nil { - return m.LeaseOptions +func (x *Secret) GetLeaseOptions() *LeaseOptions { + if x != nil { + return x.LeaseOptions } return nil } -func (m *Secret) GetInternalData() string { - if m != nil { - return m.InternalData +func (x *Secret) GetInternalData() string { + if x != nil { + return x.InternalData } return "" } -func (m *Secret) GetLeaseID() string { - if m != nil { - return m.LeaseID +func (x *Secret) GetLeaseID() string { + if x != nil { + return x.LeaseID } return "" } type Response struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Secret, if not nil, denotes that this response represents a secret. Secret *Secret `sentinel:"" protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"` // Auth, if not nil, contains the authentication information for @@ -1018,87 +1098,95 @@ type Response struct { // Headers will contain the http headers from the response. This value will // be used in the audit broker to ensure we are auditing only the allowed // headers. - Headers map[string]*Header `sentinel:"" protobuf:"bytes,7,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Headers map[string]*Header `sentinel:"" protobuf:"bytes,7,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *Response) Reset() { *m = Response{} } -func (m *Response) String() string { return proto.CompactTextString(m) } -func (*Response) ProtoMessage() {} -func (*Response) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{9} +func (x *Response) Reset() { + *x = Response{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Response) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Response.Unmarshal(m, b) +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Response.Marshal(b, m, deterministic) -} -func (m *Response) XXX_Merge(src proto.Message) { - xxx_messageInfo_Response.Merge(m, src) -} -func (m *Response) XXX_Size() int { - return xxx_messageInfo_Response.Size(m) -} -func (m *Response) XXX_DiscardUnknown() { - xxx_messageInfo_Response.DiscardUnknown(m) + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Response proto.InternalMessageInfo +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{9} +} -func (m *Response) GetSecret() *Secret { - if m != nil { - return m.Secret +func (x *Response) GetSecret() *Secret { + if x != nil { + return x.Secret } return nil } -func (m *Response) GetAuth() *Auth { - if m != nil { - return m.Auth +func (x *Response) GetAuth() *Auth { + if x != nil { + return x.Auth } return nil } -func (m *Response) GetData() string { - if m != nil { - return m.Data +func (x *Response) GetData() string { + if x != nil { + return x.Data } return "" } -func (m *Response) GetRedirect() string { - if m != nil { - return m.Redirect +func (x *Response) GetRedirect() string { + if x != nil { + return x.Redirect } return "" } -func (m *Response) GetWarnings() []string { - if m != nil { - return m.Warnings +func (x *Response) GetWarnings() []string { + if x != nil { + return x.Warnings } return nil } -func (m *Response) GetWrapInfo() *ResponseWrapInfo { - if m != nil { - return m.WrapInfo +func (x *Response) GetWrapInfo() *ResponseWrapInfo { + if x != nil { + return x.WrapInfo } return nil } -func (m *Response) GetHeaders() map[string]*Header { - if m != nil { - return m.Headers +func (x *Response) GetHeaders() map[string]*Header { + if x != nil { + return x.Headers } return nil } type ResponseWrapInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Setting to non-zero specifies that the response should be wrapped. // Specifies the desired TTL of the wrapping token. TTL int64 `sentinel:"" protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` @@ -1121,101 +1209,109 @@ type ResponseWrapInfo struct { // the wrapped response. CreationPath string `sentinel:"" protobuf:"bytes,8,opt,name=creation_path,json=creationPath,proto3" json:"creation_path,omitempty"` // Controls seal wrapping behavior downstream for specific use cases - SealWrap bool `sentinel:"" protobuf:"varint,9,opt,name=seal_wrap,json=sealWrap,proto3" json:"seal_wrap,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SealWrap bool `sentinel:"" protobuf:"varint,9,opt,name=seal_wrap,json=sealWrap,proto3" json:"seal_wrap,omitempty"` } -func (m *ResponseWrapInfo) Reset() { *m = ResponseWrapInfo{} } -func (m *ResponseWrapInfo) String() string { return proto.CompactTextString(m) } -func (*ResponseWrapInfo) ProtoMessage() {} -func (*ResponseWrapInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{10} +func (x *ResponseWrapInfo) Reset() { + *x = ResponseWrapInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ResponseWrapInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResponseWrapInfo.Unmarshal(m, b) -} -func (m *ResponseWrapInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResponseWrapInfo.Marshal(b, m, deterministic) +func (x *ResponseWrapInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ResponseWrapInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseWrapInfo.Merge(m, src) -} -func (m *ResponseWrapInfo) XXX_Size() int { - return xxx_messageInfo_ResponseWrapInfo.Size(m) -} -func (m *ResponseWrapInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseWrapInfo.DiscardUnknown(m) + +func (*ResponseWrapInfo) ProtoMessage() {} + +func (x *ResponseWrapInfo) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ResponseWrapInfo proto.InternalMessageInfo +// Deprecated: Use ResponseWrapInfo.ProtoReflect.Descriptor instead. +func (*ResponseWrapInfo) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{10} +} -func (m *ResponseWrapInfo) GetTTL() int64 { - if m != nil { - return m.TTL +func (x *ResponseWrapInfo) GetTTL() int64 { + if x != nil { + return x.TTL } return 0 } -func (m *ResponseWrapInfo) GetToken() string { - if m != nil { - return m.Token +func (x *ResponseWrapInfo) GetToken() string { + if x != nil { + return x.Token } return "" } -func (m *ResponseWrapInfo) GetAccessor() string { - if m != nil { - return m.Accessor +func (x *ResponseWrapInfo) GetAccessor() string { + if x != nil { + return x.Accessor } return "" } -func (m *ResponseWrapInfo) GetCreationTime() *timestamp.Timestamp { - if m != nil { - return m.CreationTime +func (x *ResponseWrapInfo) GetCreationTime() *timestamp.Timestamp { + if x != nil { + return x.CreationTime } return nil } -func (m *ResponseWrapInfo) GetWrappedAccessor() string { - if m != nil { - return m.WrappedAccessor +func (x *ResponseWrapInfo) GetWrappedAccessor() string { + if x != nil { + return x.WrappedAccessor } return "" } -func (m *ResponseWrapInfo) GetWrappedEntityID() string { - if m != nil { - return m.WrappedEntityID +func (x *ResponseWrapInfo) GetWrappedEntityID() string { + if x != nil { + return x.WrappedEntityID } return "" } -func (m *ResponseWrapInfo) GetFormat() string { - if m != nil { - return m.Format +func (x *ResponseWrapInfo) GetFormat() string { + if x != nil { + return x.Format } return "" } -func (m *ResponseWrapInfo) GetCreationPath() string { - if m != nil { - return m.CreationPath +func (x *ResponseWrapInfo) GetCreationPath() string { + if x != nil { + return x.CreationPath } return "" } -func (m *ResponseWrapInfo) GetSealWrap() bool { - if m != nil { - return m.SealWrap +func (x *ResponseWrapInfo) GetSealWrap() bool { + if x != nil { + return x.SealWrap } return false } type RequestWrapInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Setting to non-zero specifies that the response should be wrapped. // Specifies the desired TTL of the wrapping token. TTL int64 `sentinel:"" protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` @@ -1224,1794 +1320,3062 @@ type RequestWrapInfo struct { Format string `sentinel:"" protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"` // A flag to conforming backends that data for a given request should be // seal wrapped - SealWrap bool `sentinel:"" protobuf:"varint,3,opt,name=seal_wrap,json=sealWrap,proto3" json:"seal_wrap,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + SealWrap bool `sentinel:"" protobuf:"varint,3,opt,name=seal_wrap,json=sealWrap,proto3" json:"seal_wrap,omitempty"` } -func (m *RequestWrapInfo) Reset() { *m = RequestWrapInfo{} } -func (m *RequestWrapInfo) String() string { return proto.CompactTextString(m) } -func (*RequestWrapInfo) ProtoMessage() {} -func (*RequestWrapInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{11} +func (x *RequestWrapInfo) Reset() { + *x = RequestWrapInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RequestWrapInfo) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RequestWrapInfo.Unmarshal(m, b) -} -func (m *RequestWrapInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RequestWrapInfo.Marshal(b, m, deterministic) -} -func (m *RequestWrapInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestWrapInfo.Merge(m, src) +func (x *RequestWrapInfo) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RequestWrapInfo) XXX_Size() int { - return xxx_messageInfo_RequestWrapInfo.Size(m) -} -func (m *RequestWrapInfo) XXX_DiscardUnknown() { - xxx_messageInfo_RequestWrapInfo.DiscardUnknown(m) + +func (*RequestWrapInfo) ProtoMessage() {} + +func (x *RequestWrapInfo) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RequestWrapInfo proto.InternalMessageInfo +// Deprecated: Use RequestWrapInfo.ProtoReflect.Descriptor instead. +func (*RequestWrapInfo) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{11} +} -func (m *RequestWrapInfo) GetTTL() int64 { - if m != nil { - return m.TTL +func (x *RequestWrapInfo) GetTTL() int64 { + if x != nil { + return x.TTL } return 0 } -func (m *RequestWrapInfo) GetFormat() string { - if m != nil { - return m.Format +func (x *RequestWrapInfo) GetFormat() string { + if x != nil { + return x.Format } return "" } -func (m *RequestWrapInfo) GetSealWrap() bool { - if m != nil { - return m.SealWrap +func (x *RequestWrapInfo) GetSealWrap() bool { + if x != nil { + return x.SealWrap } return false } // HandleRequestArgs is the args for HandleRequest method. type HandleRequestArgs struct { - StorageID uint32 `sentinel:"" protobuf:"varint,1,opt,name=storage_id,json=storageId,proto3" json:"storage_id,omitempty"` - Request *Request `sentinel:"" protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *HandleRequestArgs) Reset() { *m = HandleRequestArgs{} } -func (m *HandleRequestArgs) String() string { return proto.CompactTextString(m) } -func (*HandleRequestArgs) ProtoMessage() {} -func (*HandleRequestArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{12} + StorageID uint32 `sentinel:"" protobuf:"varint,1,opt,name=storage_id,json=storageId,proto3" json:"storage_id,omitempty"` + Request *Request `sentinel:"" protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` } -func (m *HandleRequestArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HandleRequestArgs.Unmarshal(m, b) -} -func (m *HandleRequestArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HandleRequestArgs.Marshal(b, m, deterministic) -} -func (m *HandleRequestArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandleRequestArgs.Merge(m, src) +func (x *HandleRequestArgs) Reset() { + *x = HandleRequestArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *HandleRequestArgs) XXX_Size() int { - return xxx_messageInfo_HandleRequestArgs.Size(m) + +func (x *HandleRequestArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HandleRequestArgs) XXX_DiscardUnknown() { - xxx_messageInfo_HandleRequestArgs.DiscardUnknown(m) + +func (*HandleRequestArgs) ProtoMessage() {} + +func (x *HandleRequestArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HandleRequestArgs proto.InternalMessageInfo +// Deprecated: Use HandleRequestArgs.ProtoReflect.Descriptor instead. +func (*HandleRequestArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{12} +} -func (m *HandleRequestArgs) GetStorageID() uint32 { - if m != nil { - return m.StorageID +func (x *HandleRequestArgs) GetStorageID() uint32 { + if x != nil { + return x.StorageID } return 0 } -func (m *HandleRequestArgs) GetRequest() *Request { - if m != nil { - return m.Request +func (x *HandleRequestArgs) GetRequest() *Request { + if x != nil { + return x.Request } return nil } // HandleRequestReply is the reply for HandleRequest method. type HandleRequestReply struct { - Response *Response `sentinel:"" protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` - Err *ProtoError `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *HandleRequestReply) Reset() { *m = HandleRequestReply{} } -func (m *HandleRequestReply) String() string { return proto.CompactTextString(m) } -func (*HandleRequestReply) ProtoMessage() {} -func (*HandleRequestReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{13} + Response *Response `sentinel:"" protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + Err *ProtoError `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *HandleRequestReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HandleRequestReply.Unmarshal(m, b) -} -func (m *HandleRequestReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HandleRequestReply.Marshal(b, m, deterministic) -} -func (m *HandleRequestReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandleRequestReply.Merge(m, src) +func (x *HandleRequestReply) Reset() { + *x = HandleRequestReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *HandleRequestReply) XXX_Size() int { - return xxx_messageInfo_HandleRequestReply.Size(m) + +func (x *HandleRequestReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HandleRequestReply) XXX_DiscardUnknown() { - xxx_messageInfo_HandleRequestReply.DiscardUnknown(m) + +func (*HandleRequestReply) ProtoMessage() {} + +func (x *HandleRequestReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HandleRequestReply proto.InternalMessageInfo +// Deprecated: Use HandleRequestReply.ProtoReflect.Descriptor instead. +func (*HandleRequestReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{13} +} -func (m *HandleRequestReply) GetResponse() *Response { - if m != nil { - return m.Response +func (x *HandleRequestReply) GetResponse() *Response { + if x != nil { + return x.Response } return nil } -func (m *HandleRequestReply) GetErr() *ProtoError { - if m != nil { - return m.Err +func (x *HandleRequestReply) GetErr() *ProtoError { + if x != nil { + return x.Err } return nil } // InitializeArgs is the args for Initialize method. type InitializeArgs struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *InitializeArgs) Reset() { *m = InitializeArgs{} } -func (m *InitializeArgs) String() string { return proto.CompactTextString(m) } -func (*InitializeArgs) ProtoMessage() {} -func (*InitializeArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{14} +func (x *InitializeArgs) Reset() { + *x = InitializeArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *InitializeArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InitializeArgs.Unmarshal(m, b) -} -func (m *InitializeArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InitializeArgs.Marshal(b, m, deterministic) -} -func (m *InitializeArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_InitializeArgs.Merge(m, src) +func (x *InitializeArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InitializeArgs) XXX_Size() int { - return xxx_messageInfo_InitializeArgs.Size(m) -} -func (m *InitializeArgs) XXX_DiscardUnknown() { - xxx_messageInfo_InitializeArgs.DiscardUnknown(m) + +func (*InitializeArgs) ProtoMessage() {} + +func (x *InitializeArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_InitializeArgs proto.InternalMessageInfo +// Deprecated: Use InitializeArgs.ProtoReflect.Descriptor instead. +func (*InitializeArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{14} +} // InitializeReply is the reply for Initialize method. type InitializeReply struct { - Err *ProtoError `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *InitializeReply) Reset() { *m = InitializeReply{} } -func (m *InitializeReply) String() string { return proto.CompactTextString(m) } -func (*InitializeReply) ProtoMessage() {} -func (*InitializeReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{15} + Err *ProtoError `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` } -func (m *InitializeReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InitializeReply.Unmarshal(m, b) -} -func (m *InitializeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InitializeReply.Marshal(b, m, deterministic) -} -func (m *InitializeReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_InitializeReply.Merge(m, src) +func (x *InitializeReply) Reset() { + *x = InitializeReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *InitializeReply) XXX_Size() int { - return xxx_messageInfo_InitializeReply.Size(m) + +func (x *InitializeReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InitializeReply) XXX_DiscardUnknown() { - xxx_messageInfo_InitializeReply.DiscardUnknown(m) + +func (*InitializeReply) ProtoMessage() {} + +func (x *InitializeReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_InitializeReply proto.InternalMessageInfo +// Deprecated: Use InitializeReply.ProtoReflect.Descriptor instead. +func (*InitializeReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{15} +} -func (m *InitializeReply) GetErr() *ProtoError { - if m != nil { - return m.Err +func (x *InitializeReply) GetErr() *ProtoError { + if x != nil { + return x.Err } return nil } // SpecialPathsReply is the reply for SpecialPaths method. type SpecialPathsReply struct { - Paths *Paths `sentinel:"" protobuf:"bytes,1,opt,name=paths,proto3" json:"paths,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SpecialPathsReply) Reset() { *m = SpecialPathsReply{} } -func (m *SpecialPathsReply) String() string { return proto.CompactTextString(m) } -func (*SpecialPathsReply) ProtoMessage() {} -func (*SpecialPathsReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{16} + Paths *Paths `sentinel:"" protobuf:"bytes,1,opt,name=paths,proto3" json:"paths,omitempty"` } -func (m *SpecialPathsReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SpecialPathsReply.Unmarshal(m, b) -} -func (m *SpecialPathsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SpecialPathsReply.Marshal(b, m, deterministic) -} -func (m *SpecialPathsReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_SpecialPathsReply.Merge(m, src) +func (x *SpecialPathsReply) Reset() { + *x = SpecialPathsReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SpecialPathsReply) XXX_Size() int { - return xxx_messageInfo_SpecialPathsReply.Size(m) + +func (x *SpecialPathsReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SpecialPathsReply) XXX_DiscardUnknown() { - xxx_messageInfo_SpecialPathsReply.DiscardUnknown(m) + +func (*SpecialPathsReply) ProtoMessage() {} + +func (x *SpecialPathsReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SpecialPathsReply proto.InternalMessageInfo +// Deprecated: Use SpecialPathsReply.ProtoReflect.Descriptor instead. +func (*SpecialPathsReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{16} +} -func (m *SpecialPathsReply) GetPaths() *Paths { - if m != nil { - return m.Paths +func (x *SpecialPathsReply) GetPaths() *Paths { + if x != nil { + return x.Paths } return nil } // HandleExistenceCheckArgs is the args for HandleExistenceCheck method. type HandleExistenceCheckArgs struct { - StorageID uint32 `sentinel:"" protobuf:"varint,1,opt,name=storage_id,json=storageId,proto3" json:"storage_id,omitempty"` - Request *Request `sentinel:"" protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *HandleExistenceCheckArgs) Reset() { *m = HandleExistenceCheckArgs{} } -func (m *HandleExistenceCheckArgs) String() string { return proto.CompactTextString(m) } -func (*HandleExistenceCheckArgs) ProtoMessage() {} -func (*HandleExistenceCheckArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{17} + StorageID uint32 `sentinel:"" protobuf:"varint,1,opt,name=storage_id,json=storageId,proto3" json:"storage_id,omitempty"` + Request *Request `sentinel:"" protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` } -func (m *HandleExistenceCheckArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HandleExistenceCheckArgs.Unmarshal(m, b) -} -func (m *HandleExistenceCheckArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HandleExistenceCheckArgs.Marshal(b, m, deterministic) -} -func (m *HandleExistenceCheckArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandleExistenceCheckArgs.Merge(m, src) +func (x *HandleExistenceCheckArgs) Reset() { + *x = HandleExistenceCheckArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *HandleExistenceCheckArgs) XXX_Size() int { - return xxx_messageInfo_HandleExistenceCheckArgs.Size(m) + +func (x *HandleExistenceCheckArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HandleExistenceCheckArgs) XXX_DiscardUnknown() { - xxx_messageInfo_HandleExistenceCheckArgs.DiscardUnknown(m) + +func (*HandleExistenceCheckArgs) ProtoMessage() {} + +func (x *HandleExistenceCheckArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HandleExistenceCheckArgs proto.InternalMessageInfo +// Deprecated: Use HandleExistenceCheckArgs.ProtoReflect.Descriptor instead. +func (*HandleExistenceCheckArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{17} +} -func (m *HandleExistenceCheckArgs) GetStorageID() uint32 { - if m != nil { - return m.StorageID +func (x *HandleExistenceCheckArgs) GetStorageID() uint32 { + if x != nil { + return x.StorageID } return 0 } -func (m *HandleExistenceCheckArgs) GetRequest() *Request { - if m != nil { - return m.Request +func (x *HandleExistenceCheckArgs) GetRequest() *Request { + if x != nil { + return x.Request } return nil } // HandleExistenceCheckReply is the reply for HandleExistenceCheck method. type HandleExistenceCheckReply struct { - CheckFound bool `sentinel:"" protobuf:"varint,1,opt,name=check_found,json=checkFound,proto3" json:"check_found,omitempty"` - Exists bool `sentinel:"" protobuf:"varint,2,opt,name=exists,proto3" json:"exists,omitempty"` - Err *ProtoError `sentinel:"" protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *HandleExistenceCheckReply) Reset() { *m = HandleExistenceCheckReply{} } -func (m *HandleExistenceCheckReply) String() string { return proto.CompactTextString(m) } -func (*HandleExistenceCheckReply) ProtoMessage() {} -func (*HandleExistenceCheckReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{18} + CheckFound bool `sentinel:"" protobuf:"varint,1,opt,name=check_found,json=checkFound,proto3" json:"check_found,omitempty"` + Exists bool `sentinel:"" protobuf:"varint,2,opt,name=exists,proto3" json:"exists,omitempty"` + Err *ProtoError `sentinel:"" protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"` } -func (m *HandleExistenceCheckReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HandleExistenceCheckReply.Unmarshal(m, b) -} -func (m *HandleExistenceCheckReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HandleExistenceCheckReply.Marshal(b, m, deterministic) -} -func (m *HandleExistenceCheckReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_HandleExistenceCheckReply.Merge(m, src) +func (x *HandleExistenceCheckReply) Reset() { + *x = HandleExistenceCheckReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *HandleExistenceCheckReply) XXX_Size() int { - return xxx_messageInfo_HandleExistenceCheckReply.Size(m) + +func (x *HandleExistenceCheckReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HandleExistenceCheckReply) XXX_DiscardUnknown() { - xxx_messageInfo_HandleExistenceCheckReply.DiscardUnknown(m) + +func (*HandleExistenceCheckReply) ProtoMessage() {} + +func (x *HandleExistenceCheckReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HandleExistenceCheckReply proto.InternalMessageInfo +// Deprecated: Use HandleExistenceCheckReply.ProtoReflect.Descriptor instead. +func (*HandleExistenceCheckReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{18} +} -func (m *HandleExistenceCheckReply) GetCheckFound() bool { - if m != nil { - return m.CheckFound +func (x *HandleExistenceCheckReply) GetCheckFound() bool { + if x != nil { + return x.CheckFound } return false } -func (m *HandleExistenceCheckReply) GetExists() bool { - if m != nil { - return m.Exists +func (x *HandleExistenceCheckReply) GetExists() bool { + if x != nil { + return x.Exists } return false } -func (m *HandleExistenceCheckReply) GetErr() *ProtoError { - if m != nil { - return m.Err +func (x *HandleExistenceCheckReply) GetErr() *ProtoError { + if x != nil { + return x.Err } return nil } // SetupArgs is the args for Setup method. type SetupArgs struct { - BrokerID uint32 `sentinel:"" protobuf:"varint,1,opt,name=broker_id,json=brokerId,proto3" json:"broker_id,omitempty"` - Config map[string]string `sentinel:"" protobuf:"bytes,2,rep,name=Config,proto3" json:"Config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - BackendUUID string `sentinel:"" protobuf:"bytes,3,opt,name=backendUUID,proto3" json:"backendUUID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SetupArgs) Reset() { *m = SetupArgs{} } -func (m *SetupArgs) String() string { return proto.CompactTextString(m) } -func (*SetupArgs) ProtoMessage() {} -func (*SetupArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{19} + BrokerID uint32 `sentinel:"" protobuf:"varint,1,opt,name=broker_id,json=brokerId,proto3" json:"broker_id,omitempty"` + Config map[string]string `sentinel:"" protobuf:"bytes,2,rep,name=Config,proto3" json:"Config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + BackendUUID string `sentinel:"" protobuf:"bytes,3,opt,name=backendUUID,proto3" json:"backendUUID,omitempty"` } -func (m *SetupArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetupArgs.Unmarshal(m, b) -} -func (m *SetupArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetupArgs.Marshal(b, m, deterministic) -} -func (m *SetupArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetupArgs.Merge(m, src) +func (x *SetupArgs) Reset() { + *x = SetupArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SetupArgs) XXX_Size() int { - return xxx_messageInfo_SetupArgs.Size(m) + +func (x *SetupArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetupArgs) XXX_DiscardUnknown() { - xxx_messageInfo_SetupArgs.DiscardUnknown(m) + +func (*SetupArgs) ProtoMessage() {} + +func (x *SetupArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SetupArgs proto.InternalMessageInfo +// Deprecated: Use SetupArgs.ProtoReflect.Descriptor instead. +func (*SetupArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{19} +} -func (m *SetupArgs) GetBrokerID() uint32 { - if m != nil { - return m.BrokerID +func (x *SetupArgs) GetBrokerID() uint32 { + if x != nil { + return x.BrokerID } return 0 } -func (m *SetupArgs) GetConfig() map[string]string { - if m != nil { - return m.Config +func (x *SetupArgs) GetConfig() map[string]string { + if x != nil { + return x.Config } return nil } -func (m *SetupArgs) GetBackendUUID() string { - if m != nil { - return m.BackendUUID +func (x *SetupArgs) GetBackendUUID() string { + if x != nil { + return x.BackendUUID } return "" } // SetupReply is the reply for Setup method. type SetupReply struct { - Err string `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *SetupReply) Reset() { *m = SetupReply{} } -func (m *SetupReply) String() string { return proto.CompactTextString(m) } -func (*SetupReply) ProtoMessage() {} -func (*SetupReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{20} + Err string `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` } -func (m *SetupReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetupReply.Unmarshal(m, b) -} -func (m *SetupReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetupReply.Marshal(b, m, deterministic) -} -func (m *SetupReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetupReply.Merge(m, src) +func (x *SetupReply) Reset() { + *x = SetupReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SetupReply) XXX_Size() int { - return xxx_messageInfo_SetupReply.Size(m) + +func (x *SetupReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SetupReply) XXX_DiscardUnknown() { - xxx_messageInfo_SetupReply.DiscardUnknown(m) + +func (*SetupReply) ProtoMessage() {} + +func (x *SetupReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SetupReply proto.InternalMessageInfo +// Deprecated: Use SetupReply.ProtoReflect.Descriptor instead. +func (*SetupReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{20} +} -func (m *SetupReply) GetErr() string { - if m != nil { - return m.Err +func (x *SetupReply) GetErr() string { + if x != nil { + return x.Err } return "" } // TypeReply is the reply for the Type method. type TypeReply struct { - Type uint32 `sentinel:"" protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TypeReply) Reset() { *m = TypeReply{} } -func (m *TypeReply) String() string { return proto.CompactTextString(m) } -func (*TypeReply) ProtoMessage() {} -func (*TypeReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{21} + Type uint32 `sentinel:"" protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` } -func (m *TypeReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TypeReply.Unmarshal(m, b) -} -func (m *TypeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TypeReply.Marshal(b, m, deterministic) -} -func (m *TypeReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_TypeReply.Merge(m, src) +func (x *TypeReply) Reset() { + *x = TypeReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TypeReply) XXX_Size() int { - return xxx_messageInfo_TypeReply.Size(m) + +func (x *TypeReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TypeReply) XXX_DiscardUnknown() { - xxx_messageInfo_TypeReply.DiscardUnknown(m) + +func (*TypeReply) ProtoMessage() {} + +func (x *TypeReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TypeReply proto.InternalMessageInfo +// Deprecated: Use TypeReply.ProtoReflect.Descriptor instead. +func (*TypeReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{21} +} -func (m *TypeReply) GetType() uint32 { - if m != nil { - return m.Type +func (x *TypeReply) GetType() uint32 { + if x != nil { + return x.Type } return 0 } type InvalidateKeyArgs struct { - Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *InvalidateKeyArgs) Reset() { *m = InvalidateKeyArgs{} } -func (m *InvalidateKeyArgs) String() string { return proto.CompactTextString(m) } -func (*InvalidateKeyArgs) ProtoMessage() {} -func (*InvalidateKeyArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{22} + Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } -func (m *InvalidateKeyArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InvalidateKeyArgs.Unmarshal(m, b) -} -func (m *InvalidateKeyArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InvalidateKeyArgs.Marshal(b, m, deterministic) -} -func (m *InvalidateKeyArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_InvalidateKeyArgs.Merge(m, src) +func (x *InvalidateKeyArgs) Reset() { + *x = InvalidateKeyArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *InvalidateKeyArgs) XXX_Size() int { - return xxx_messageInfo_InvalidateKeyArgs.Size(m) + +func (x *InvalidateKeyArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InvalidateKeyArgs) XXX_DiscardUnknown() { - xxx_messageInfo_InvalidateKeyArgs.DiscardUnknown(m) + +func (*InvalidateKeyArgs) ProtoMessage() {} + +func (x *InvalidateKeyArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_InvalidateKeyArgs proto.InternalMessageInfo +// Deprecated: Use InvalidateKeyArgs.ProtoReflect.Descriptor instead. +func (*InvalidateKeyArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{22} +} -func (m *InvalidateKeyArgs) GetKey() string { - if m != nil { - return m.Key +func (x *InvalidateKeyArgs) GetKey() string { + if x != nil { + return x.Key } return "" } type StorageEntry struct { - Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `sentinel:"" protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - SealWrap bool `sentinel:"" protobuf:"varint,3,opt,name=seal_wrap,json=sealWrap,proto3" json:"seal_wrap,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `sentinel:"" protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + SealWrap bool `sentinel:"" protobuf:"varint,3,opt,name=seal_wrap,json=sealWrap,proto3" json:"seal_wrap,omitempty"` } -func (m *StorageEntry) Reset() { *m = StorageEntry{} } -func (m *StorageEntry) String() string { return proto.CompactTextString(m) } -func (*StorageEntry) ProtoMessage() {} -func (*StorageEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{23} +func (x *StorageEntry) Reset() { + *x = StorageEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageEntry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageEntry.Unmarshal(m, b) +func (x *StorageEntry) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageEntry.Marshal(b, m, deterministic) -} -func (m *StorageEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageEntry.Merge(m, src) -} -func (m *StorageEntry) XXX_Size() int { - return xxx_messageInfo_StorageEntry.Size(m) -} -func (m *StorageEntry) XXX_DiscardUnknown() { - xxx_messageInfo_StorageEntry.DiscardUnknown(m) + +func (*StorageEntry) ProtoMessage() {} + +func (x *StorageEntry) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageEntry proto.InternalMessageInfo +// Deprecated: Use StorageEntry.ProtoReflect.Descriptor instead. +func (*StorageEntry) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{23} +} -func (m *StorageEntry) GetKey() string { - if m != nil { - return m.Key +func (x *StorageEntry) GetKey() string { + if x != nil { + return x.Key } return "" } -func (m *StorageEntry) GetValue() []byte { - if m != nil { - return m.Value +func (x *StorageEntry) GetValue() []byte { + if x != nil { + return x.Value } return nil } -func (m *StorageEntry) GetSealWrap() bool { - if m != nil { - return m.SealWrap +func (x *StorageEntry) GetSealWrap() bool { + if x != nil { + return x.SealWrap } return false } type StorageListArgs struct { - Prefix string `sentinel:"" protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StorageListArgs) Reset() { *m = StorageListArgs{} } -func (m *StorageListArgs) String() string { return proto.CompactTextString(m) } -func (*StorageListArgs) ProtoMessage() {} -func (*StorageListArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{24} + Prefix string `sentinel:"" protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` } -func (m *StorageListArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageListArgs.Unmarshal(m, b) -} -func (m *StorageListArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageListArgs.Marshal(b, m, deterministic) -} -func (m *StorageListArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageListArgs.Merge(m, src) +func (x *StorageListArgs) Reset() { + *x = StorageListArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageListArgs) XXX_Size() int { - return xxx_messageInfo_StorageListArgs.Size(m) + +func (x *StorageListArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageListArgs) XXX_DiscardUnknown() { - xxx_messageInfo_StorageListArgs.DiscardUnknown(m) + +func (*StorageListArgs) ProtoMessage() {} + +func (x *StorageListArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageListArgs proto.InternalMessageInfo +// Deprecated: Use StorageListArgs.ProtoReflect.Descriptor instead. +func (*StorageListArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{24} +} -func (m *StorageListArgs) GetPrefix() string { - if m != nil { - return m.Prefix +func (x *StorageListArgs) GetPrefix() string { + if x != nil { + return x.Prefix } return "" } type StorageListReply struct { - Keys []string `sentinel:"" protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` - Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StorageListReply) Reset() { *m = StorageListReply{} } -func (m *StorageListReply) String() string { return proto.CompactTextString(m) } -func (*StorageListReply) ProtoMessage() {} -func (*StorageListReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{25} + Keys []string `sentinel:"" protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` + Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *StorageListReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageListReply.Unmarshal(m, b) -} -func (m *StorageListReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageListReply.Marshal(b, m, deterministic) -} -func (m *StorageListReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageListReply.Merge(m, src) +func (x *StorageListReply) Reset() { + *x = StorageListReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageListReply) XXX_Size() int { - return xxx_messageInfo_StorageListReply.Size(m) + +func (x *StorageListReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageListReply) XXX_DiscardUnknown() { - xxx_messageInfo_StorageListReply.DiscardUnknown(m) + +func (*StorageListReply) ProtoMessage() {} + +func (x *StorageListReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageListReply proto.InternalMessageInfo +// Deprecated: Use StorageListReply.ProtoReflect.Descriptor instead. +func (*StorageListReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{25} +} -func (m *StorageListReply) GetKeys() []string { - if m != nil { - return m.Keys +func (x *StorageListReply) GetKeys() []string { + if x != nil { + return x.Keys } return nil } -func (m *StorageListReply) GetErr() string { - if m != nil { - return m.Err +func (x *StorageListReply) GetErr() string { + if x != nil { + return x.Err } return "" } type StorageGetArgs struct { - Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StorageGetArgs) Reset() { *m = StorageGetArgs{} } -func (m *StorageGetArgs) String() string { return proto.CompactTextString(m) } -func (*StorageGetArgs) ProtoMessage() {} -func (*StorageGetArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{26} + Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } -func (m *StorageGetArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageGetArgs.Unmarshal(m, b) -} -func (m *StorageGetArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageGetArgs.Marshal(b, m, deterministic) -} -func (m *StorageGetArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageGetArgs.Merge(m, src) +func (x *StorageGetArgs) Reset() { + *x = StorageGetArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageGetArgs) XXX_Size() int { - return xxx_messageInfo_StorageGetArgs.Size(m) + +func (x *StorageGetArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageGetArgs) XXX_DiscardUnknown() { - xxx_messageInfo_StorageGetArgs.DiscardUnknown(m) + +func (*StorageGetArgs) ProtoMessage() {} + +func (x *StorageGetArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageGetArgs proto.InternalMessageInfo +// Deprecated: Use StorageGetArgs.ProtoReflect.Descriptor instead. +func (*StorageGetArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{26} +} -func (m *StorageGetArgs) GetKey() string { - if m != nil { - return m.Key +func (x *StorageGetArgs) GetKey() string { + if x != nil { + return x.Key } return "" } type StorageGetReply struct { - Entry *StorageEntry `sentinel:"" protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` - Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StorageGetReply) Reset() { *m = StorageGetReply{} } -func (m *StorageGetReply) String() string { return proto.CompactTextString(m) } -func (*StorageGetReply) ProtoMessage() {} -func (*StorageGetReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{27} + Entry *StorageEntry `sentinel:"" protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` + Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *StorageGetReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageGetReply.Unmarshal(m, b) -} -func (m *StorageGetReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageGetReply.Marshal(b, m, deterministic) -} -func (m *StorageGetReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageGetReply.Merge(m, src) +func (x *StorageGetReply) Reset() { + *x = StorageGetReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageGetReply) XXX_Size() int { - return xxx_messageInfo_StorageGetReply.Size(m) + +func (x *StorageGetReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageGetReply) XXX_DiscardUnknown() { - xxx_messageInfo_StorageGetReply.DiscardUnknown(m) + +func (*StorageGetReply) ProtoMessage() {} + +func (x *StorageGetReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageGetReply proto.InternalMessageInfo +// Deprecated: Use StorageGetReply.ProtoReflect.Descriptor instead. +func (*StorageGetReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{27} +} -func (m *StorageGetReply) GetEntry() *StorageEntry { - if m != nil { - return m.Entry +func (x *StorageGetReply) GetEntry() *StorageEntry { + if x != nil { + return x.Entry } return nil } -func (m *StorageGetReply) GetErr() string { - if m != nil { - return m.Err +func (x *StorageGetReply) GetErr() string { + if x != nil { + return x.Err } return "" } type StoragePutArgs struct { - Entry *StorageEntry `sentinel:"" protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StoragePutArgs) Reset() { *m = StoragePutArgs{} } -func (m *StoragePutArgs) String() string { return proto.CompactTextString(m) } -func (*StoragePutArgs) ProtoMessage() {} -func (*StoragePutArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{28} + Entry *StorageEntry `sentinel:"" protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` } -func (m *StoragePutArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StoragePutArgs.Unmarshal(m, b) -} -func (m *StoragePutArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StoragePutArgs.Marshal(b, m, deterministic) -} -func (m *StoragePutArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoragePutArgs.Merge(m, src) +func (x *StoragePutArgs) Reset() { + *x = StoragePutArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StoragePutArgs) XXX_Size() int { - return xxx_messageInfo_StoragePutArgs.Size(m) + +func (x *StoragePutArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StoragePutArgs) XXX_DiscardUnknown() { - xxx_messageInfo_StoragePutArgs.DiscardUnknown(m) + +func (*StoragePutArgs) ProtoMessage() {} + +func (x *StoragePutArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StoragePutArgs proto.InternalMessageInfo +// Deprecated: Use StoragePutArgs.ProtoReflect.Descriptor instead. +func (*StoragePutArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{28} +} -func (m *StoragePutArgs) GetEntry() *StorageEntry { - if m != nil { - return m.Entry +func (x *StoragePutArgs) GetEntry() *StorageEntry { + if x != nil { + return x.Entry } return nil } type StoragePutReply struct { - Err string `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StoragePutReply) Reset() { *m = StoragePutReply{} } -func (m *StoragePutReply) String() string { return proto.CompactTextString(m) } -func (*StoragePutReply) ProtoMessage() {} -func (*StoragePutReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{29} + Err string `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` } -func (m *StoragePutReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StoragePutReply.Unmarshal(m, b) -} -func (m *StoragePutReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StoragePutReply.Marshal(b, m, deterministic) -} -func (m *StoragePutReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoragePutReply.Merge(m, src) +func (x *StoragePutReply) Reset() { + *x = StoragePutReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StoragePutReply) XXX_Size() int { - return xxx_messageInfo_StoragePutReply.Size(m) + +func (x *StoragePutReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StoragePutReply) XXX_DiscardUnknown() { - xxx_messageInfo_StoragePutReply.DiscardUnknown(m) + +func (*StoragePutReply) ProtoMessage() {} + +func (x *StoragePutReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StoragePutReply proto.InternalMessageInfo +// Deprecated: Use StoragePutReply.ProtoReflect.Descriptor instead. +func (*StoragePutReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{29} +} -func (m *StoragePutReply) GetErr() string { - if m != nil { - return m.Err +func (x *StoragePutReply) GetErr() string { + if x != nil { + return x.Err } return "" } type StorageDeleteArgs struct { - Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StorageDeleteArgs) Reset() { *m = StorageDeleteArgs{} } -func (m *StorageDeleteArgs) String() string { return proto.CompactTextString(m) } -func (*StorageDeleteArgs) ProtoMessage() {} -func (*StorageDeleteArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{30} + Key string `sentinel:"" protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` } -func (m *StorageDeleteArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageDeleteArgs.Unmarshal(m, b) -} -func (m *StorageDeleteArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageDeleteArgs.Marshal(b, m, deterministic) -} -func (m *StorageDeleteArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageDeleteArgs.Merge(m, src) +func (x *StorageDeleteArgs) Reset() { + *x = StorageDeleteArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageDeleteArgs) XXX_Size() int { - return xxx_messageInfo_StorageDeleteArgs.Size(m) + +func (x *StorageDeleteArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageDeleteArgs) XXX_DiscardUnknown() { - xxx_messageInfo_StorageDeleteArgs.DiscardUnknown(m) + +func (*StorageDeleteArgs) ProtoMessage() {} + +func (x *StorageDeleteArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageDeleteArgs proto.InternalMessageInfo +// Deprecated: Use StorageDeleteArgs.ProtoReflect.Descriptor instead. +func (*StorageDeleteArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{30} +} -func (m *StorageDeleteArgs) GetKey() string { - if m != nil { - return m.Key +func (x *StorageDeleteArgs) GetKey() string { + if x != nil { + return x.Key } return "" } type StorageDeleteReply struct { - Err string `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *StorageDeleteReply) Reset() { *m = StorageDeleteReply{} } -func (m *StorageDeleteReply) String() string { return proto.CompactTextString(m) } -func (*StorageDeleteReply) ProtoMessage() {} -func (*StorageDeleteReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{31} + Err string `sentinel:"" protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` } -func (m *StorageDeleteReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StorageDeleteReply.Unmarshal(m, b) -} -func (m *StorageDeleteReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StorageDeleteReply.Marshal(b, m, deterministic) -} -func (m *StorageDeleteReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_StorageDeleteReply.Merge(m, src) +func (x *StorageDeleteReply) Reset() { + *x = StorageDeleteReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StorageDeleteReply) XXX_Size() int { - return xxx_messageInfo_StorageDeleteReply.Size(m) + +func (x *StorageDeleteReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StorageDeleteReply) XXX_DiscardUnknown() { - xxx_messageInfo_StorageDeleteReply.DiscardUnknown(m) + +func (*StorageDeleteReply) ProtoMessage() {} + +func (x *StorageDeleteReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StorageDeleteReply proto.InternalMessageInfo +// Deprecated: Use StorageDeleteReply.ProtoReflect.Descriptor instead. +func (*StorageDeleteReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{31} +} -func (m *StorageDeleteReply) GetErr() string { - if m != nil { - return m.Err +func (x *StorageDeleteReply) GetErr() string { + if x != nil { + return x.Err } return "" } type TTLReply struct { - TTL int64 `sentinel:"" protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TTLReply) Reset() { *m = TTLReply{} } -func (m *TTLReply) String() string { return proto.CompactTextString(m) } -func (*TTLReply) ProtoMessage() {} -func (*TTLReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{32} + TTL int64 `sentinel:"" protobuf:"varint,1,opt,name=TTL,proto3" json:"TTL,omitempty"` } -func (m *TTLReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TTLReply.Unmarshal(m, b) -} -func (m *TTLReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TTLReply.Marshal(b, m, deterministic) -} -func (m *TTLReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_TTLReply.Merge(m, src) +func (x *TTLReply) Reset() { + *x = TTLReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TTLReply) XXX_Size() int { - return xxx_messageInfo_TTLReply.Size(m) + +func (x *TTLReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TTLReply) XXX_DiscardUnknown() { - xxx_messageInfo_TTLReply.DiscardUnknown(m) + +func (*TTLReply) ProtoMessage() {} + +func (x *TTLReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TTLReply proto.InternalMessageInfo +// Deprecated: Use TTLReply.ProtoReflect.Descriptor instead. +func (*TTLReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{32} +} -func (m *TTLReply) GetTTL() int64 { - if m != nil { - return m.TTL +func (x *TTLReply) GetTTL() int64 { + if x != nil { + return x.TTL } return 0 } type TaintedReply struct { - Tainted bool `sentinel:"" protobuf:"varint,1,opt,name=tainted,proto3" json:"tainted,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *TaintedReply) Reset() { *m = TaintedReply{} } -func (m *TaintedReply) String() string { return proto.CompactTextString(m) } -func (*TaintedReply) ProtoMessage() {} -func (*TaintedReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{33} + Tainted bool `sentinel:"" protobuf:"varint,1,opt,name=tainted,proto3" json:"tainted,omitempty"` } -func (m *TaintedReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TaintedReply.Unmarshal(m, b) -} -func (m *TaintedReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TaintedReply.Marshal(b, m, deterministic) -} -func (m *TaintedReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_TaintedReply.Merge(m, src) +func (x *TaintedReply) Reset() { + *x = TaintedReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TaintedReply) XXX_Size() int { - return xxx_messageInfo_TaintedReply.Size(m) + +func (x *TaintedReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TaintedReply) XXX_DiscardUnknown() { - xxx_messageInfo_TaintedReply.DiscardUnknown(m) + +func (*TaintedReply) ProtoMessage() {} + +func (x *TaintedReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TaintedReply proto.InternalMessageInfo +// Deprecated: Use TaintedReply.ProtoReflect.Descriptor instead. +func (*TaintedReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{33} +} -func (m *TaintedReply) GetTainted() bool { - if m != nil { - return m.Tainted +func (x *TaintedReply) GetTainted() bool { + if x != nil { + return x.Tainted } return false } type CachingDisabledReply struct { - Disabled bool `sentinel:"" protobuf:"varint,1,opt,name=disabled,proto3" json:"disabled,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *CachingDisabledReply) Reset() { *m = CachingDisabledReply{} } -func (m *CachingDisabledReply) String() string { return proto.CompactTextString(m) } -func (*CachingDisabledReply) ProtoMessage() {} -func (*CachingDisabledReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{34} + Disabled bool `sentinel:"" protobuf:"varint,1,opt,name=disabled,proto3" json:"disabled,omitempty"` } -func (m *CachingDisabledReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CachingDisabledReply.Unmarshal(m, b) -} -func (m *CachingDisabledReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CachingDisabledReply.Marshal(b, m, deterministic) -} -func (m *CachingDisabledReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_CachingDisabledReply.Merge(m, src) +func (x *CachingDisabledReply) Reset() { + *x = CachingDisabledReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CachingDisabledReply) XXX_Size() int { - return xxx_messageInfo_CachingDisabledReply.Size(m) + +func (x *CachingDisabledReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CachingDisabledReply) XXX_DiscardUnknown() { - xxx_messageInfo_CachingDisabledReply.DiscardUnknown(m) + +func (*CachingDisabledReply) ProtoMessage() {} + +func (x *CachingDisabledReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[34] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_CachingDisabledReply proto.InternalMessageInfo +// Deprecated: Use CachingDisabledReply.ProtoReflect.Descriptor instead. +func (*CachingDisabledReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{34} +} -func (m *CachingDisabledReply) GetDisabled() bool { - if m != nil { - return m.Disabled +func (x *CachingDisabledReply) GetDisabled() bool { + if x != nil { + return x.Disabled } return false } type ReplicationStateReply struct { - State int32 `sentinel:"" protobuf:"varint,1,opt,name=state,proto3" json:"state,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ReplicationStateReply) Reset() { *m = ReplicationStateReply{} } -func (m *ReplicationStateReply) String() string { return proto.CompactTextString(m) } -func (*ReplicationStateReply) ProtoMessage() {} -func (*ReplicationStateReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{35} + State int32 `sentinel:"" protobuf:"varint,1,opt,name=state,proto3" json:"state,omitempty"` } -func (m *ReplicationStateReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ReplicationStateReply.Unmarshal(m, b) -} -func (m *ReplicationStateReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ReplicationStateReply.Marshal(b, m, deterministic) -} -func (m *ReplicationStateReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReplicationStateReply.Merge(m, src) +func (x *ReplicationStateReply) Reset() { + *x = ReplicationStateReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ReplicationStateReply) XXX_Size() int { - return xxx_messageInfo_ReplicationStateReply.Size(m) + +func (x *ReplicationStateReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ReplicationStateReply) XXX_DiscardUnknown() { - xxx_messageInfo_ReplicationStateReply.DiscardUnknown(m) + +func (*ReplicationStateReply) ProtoMessage() {} + +func (x *ReplicationStateReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[35] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ReplicationStateReply proto.InternalMessageInfo +// Deprecated: Use ReplicationStateReply.ProtoReflect.Descriptor instead. +func (*ReplicationStateReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{35} +} -func (m *ReplicationStateReply) GetState() int32 { - if m != nil { - return m.State +func (x *ReplicationStateReply) GetState() int32 { + if x != nil { + return x.State } return 0 } type ResponseWrapDataArgs struct { - Data string `sentinel:"" protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - TTL int64 `sentinel:"" protobuf:"varint,2,opt,name=TTL,proto3" json:"TTL,omitempty"` - JWT bool `sentinel:"" protobuf:"varint,3,opt,name=JWT,proto3" json:"JWT,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ResponseWrapDataArgs) Reset() { *m = ResponseWrapDataArgs{} } -func (m *ResponseWrapDataArgs) String() string { return proto.CompactTextString(m) } -func (*ResponseWrapDataArgs) ProtoMessage() {} -func (*ResponseWrapDataArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{36} + Data string `sentinel:"" protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + TTL int64 `sentinel:"" protobuf:"varint,2,opt,name=TTL,proto3" json:"TTL,omitempty"` + JWT bool `sentinel:"" protobuf:"varint,3,opt,name=JWT,proto3" json:"JWT,omitempty"` } -func (m *ResponseWrapDataArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResponseWrapDataArgs.Unmarshal(m, b) -} -func (m *ResponseWrapDataArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResponseWrapDataArgs.Marshal(b, m, deterministic) -} -func (m *ResponseWrapDataArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseWrapDataArgs.Merge(m, src) +func (x *ResponseWrapDataArgs) Reset() { + *x = ResponseWrapDataArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ResponseWrapDataArgs) XXX_Size() int { - return xxx_messageInfo_ResponseWrapDataArgs.Size(m) + +func (x *ResponseWrapDataArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ResponseWrapDataArgs) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseWrapDataArgs.DiscardUnknown(m) + +func (*ResponseWrapDataArgs) ProtoMessage() {} + +func (x *ResponseWrapDataArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ResponseWrapDataArgs proto.InternalMessageInfo +// Deprecated: Use ResponseWrapDataArgs.ProtoReflect.Descriptor instead. +func (*ResponseWrapDataArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{36} +} -func (m *ResponseWrapDataArgs) GetData() string { - if m != nil { - return m.Data +func (x *ResponseWrapDataArgs) GetData() string { + if x != nil { + return x.Data } return "" } -func (m *ResponseWrapDataArgs) GetTTL() int64 { - if m != nil { - return m.TTL +func (x *ResponseWrapDataArgs) GetTTL() int64 { + if x != nil { + return x.TTL } return 0 } -func (m *ResponseWrapDataArgs) GetJWT() bool { - if m != nil { - return m.JWT +func (x *ResponseWrapDataArgs) GetJWT() bool { + if x != nil { + return x.JWT } return false } type ResponseWrapDataReply struct { - WrapInfo *ResponseWrapInfo `sentinel:"" protobuf:"bytes,1,opt,name=wrap_info,json=wrapInfo,proto3" json:"wrap_info,omitempty"` - Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *ResponseWrapDataReply) Reset() { *m = ResponseWrapDataReply{} } -func (m *ResponseWrapDataReply) String() string { return proto.CompactTextString(m) } -func (*ResponseWrapDataReply) ProtoMessage() {} -func (*ResponseWrapDataReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{37} + WrapInfo *ResponseWrapInfo `sentinel:"" protobuf:"bytes,1,opt,name=wrap_info,json=wrapInfo,proto3" json:"wrap_info,omitempty"` + Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *ResponseWrapDataReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResponseWrapDataReply.Unmarshal(m, b) -} -func (m *ResponseWrapDataReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResponseWrapDataReply.Marshal(b, m, deterministic) -} -func (m *ResponseWrapDataReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseWrapDataReply.Merge(m, src) +func (x *ResponseWrapDataReply) Reset() { + *x = ResponseWrapDataReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ResponseWrapDataReply) XXX_Size() int { - return xxx_messageInfo_ResponseWrapDataReply.Size(m) + +func (x *ResponseWrapDataReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ResponseWrapDataReply) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseWrapDataReply.DiscardUnknown(m) + +func (*ResponseWrapDataReply) ProtoMessage() {} + +func (x *ResponseWrapDataReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ResponseWrapDataReply proto.InternalMessageInfo +// Deprecated: Use ResponseWrapDataReply.ProtoReflect.Descriptor instead. +func (*ResponseWrapDataReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{37} +} -func (m *ResponseWrapDataReply) GetWrapInfo() *ResponseWrapInfo { - if m != nil { - return m.WrapInfo +func (x *ResponseWrapDataReply) GetWrapInfo() *ResponseWrapInfo { + if x != nil { + return x.WrapInfo } return nil } -func (m *ResponseWrapDataReply) GetErr() string { - if m != nil { - return m.Err +func (x *ResponseWrapDataReply) GetErr() string { + if x != nil { + return x.Err } return "" } type MlockEnabledReply struct { - Enabled bool `sentinel:"" protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *MlockEnabledReply) Reset() { *m = MlockEnabledReply{} } -func (m *MlockEnabledReply) String() string { return proto.CompactTextString(m) } -func (*MlockEnabledReply) ProtoMessage() {} -func (*MlockEnabledReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{38} + Enabled bool `sentinel:"" protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` } -func (m *MlockEnabledReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MlockEnabledReply.Unmarshal(m, b) -} -func (m *MlockEnabledReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MlockEnabledReply.Marshal(b, m, deterministic) -} -func (m *MlockEnabledReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_MlockEnabledReply.Merge(m, src) +func (x *MlockEnabledReply) Reset() { + *x = MlockEnabledReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *MlockEnabledReply) XXX_Size() int { - return xxx_messageInfo_MlockEnabledReply.Size(m) + +func (x *MlockEnabledReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *MlockEnabledReply) XXX_DiscardUnknown() { - xxx_messageInfo_MlockEnabledReply.DiscardUnknown(m) + +func (*MlockEnabledReply) ProtoMessage() {} + +func (x *MlockEnabledReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[38] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_MlockEnabledReply proto.InternalMessageInfo +// Deprecated: Use MlockEnabledReply.ProtoReflect.Descriptor instead. +func (*MlockEnabledReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{38} +} -func (m *MlockEnabledReply) GetEnabled() bool { - if m != nil { - return m.Enabled +func (x *MlockEnabledReply) GetEnabled() bool { + if x != nil { + return x.Enabled } return false } type LocalMountReply struct { - Local bool `sentinel:"" protobuf:"varint,1,opt,name=local,proto3" json:"local,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *LocalMountReply) Reset() { *m = LocalMountReply{} } -func (m *LocalMountReply) String() string { return proto.CompactTextString(m) } -func (*LocalMountReply) ProtoMessage() {} -func (*LocalMountReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{39} + Local bool `sentinel:"" protobuf:"varint,1,opt,name=local,proto3" json:"local,omitempty"` } -func (m *LocalMountReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LocalMountReply.Unmarshal(m, b) -} -func (m *LocalMountReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LocalMountReply.Marshal(b, m, deterministic) -} -func (m *LocalMountReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_LocalMountReply.Merge(m, src) +func (x *LocalMountReply) Reset() { + *x = LocalMountReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *LocalMountReply) XXX_Size() int { - return xxx_messageInfo_LocalMountReply.Size(m) + +func (x *LocalMountReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LocalMountReply) XXX_DiscardUnknown() { - xxx_messageInfo_LocalMountReply.DiscardUnknown(m) + +func (*LocalMountReply) ProtoMessage() {} + +func (x *LocalMountReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[39] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_LocalMountReply proto.InternalMessageInfo +// Deprecated: Use LocalMountReply.ProtoReflect.Descriptor instead. +func (*LocalMountReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{39} +} -func (m *LocalMountReply) GetLocal() bool { - if m != nil { - return m.Local +func (x *LocalMountReply) GetLocal() bool { + if x != nil { + return x.Local } return false } type EntityInfoArgs struct { - EntityID string `sentinel:"" protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *EntityInfoArgs) Reset() { *m = EntityInfoArgs{} } -func (m *EntityInfoArgs) String() string { return proto.CompactTextString(m) } -func (*EntityInfoArgs) ProtoMessage() {} -func (*EntityInfoArgs) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{40} + EntityID string `sentinel:"" protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` } -func (m *EntityInfoArgs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EntityInfoArgs.Unmarshal(m, b) -} -func (m *EntityInfoArgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EntityInfoArgs.Marshal(b, m, deterministic) -} -func (m *EntityInfoArgs) XXX_Merge(src proto.Message) { - xxx_messageInfo_EntityInfoArgs.Merge(m, src) +func (x *EntityInfoArgs) Reset() { + *x = EntityInfoArgs{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *EntityInfoArgs) XXX_Size() int { - return xxx_messageInfo_EntityInfoArgs.Size(m) + +func (x *EntityInfoArgs) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *EntityInfoArgs) XXX_DiscardUnknown() { - xxx_messageInfo_EntityInfoArgs.DiscardUnknown(m) + +func (*EntityInfoArgs) ProtoMessage() {} + +func (x *EntityInfoArgs) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[40] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_EntityInfoArgs proto.InternalMessageInfo +// Deprecated: Use EntityInfoArgs.ProtoReflect.Descriptor instead. +func (*EntityInfoArgs) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{40} +} -func (m *EntityInfoArgs) GetEntityID() string { - if m != nil { - return m.EntityID +func (x *EntityInfoArgs) GetEntityID() string { + if x != nil { + return x.EntityID } return "" } type EntityInfoReply struct { - Entity *logical.Entity `sentinel:"" protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` - Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *EntityInfoReply) Reset() { *m = EntityInfoReply{} } -func (m *EntityInfoReply) String() string { return proto.CompactTextString(m) } -func (*EntityInfoReply) ProtoMessage() {} -func (*EntityInfoReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{41} + Entity *logical.Entity `sentinel:"" protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"` + Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *EntityInfoReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EntityInfoReply.Unmarshal(m, b) -} -func (m *EntityInfoReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EntityInfoReply.Marshal(b, m, deterministic) -} -func (m *EntityInfoReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_EntityInfoReply.Merge(m, src) +func (x *EntityInfoReply) Reset() { + *x = EntityInfoReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *EntityInfoReply) XXX_Size() int { - return xxx_messageInfo_EntityInfoReply.Size(m) + +func (x *EntityInfoReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *EntityInfoReply) XXX_DiscardUnknown() { - xxx_messageInfo_EntityInfoReply.DiscardUnknown(m) + +func (*EntityInfoReply) ProtoMessage() {} + +func (x *EntityInfoReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_EntityInfoReply proto.InternalMessageInfo +// Deprecated: Use EntityInfoReply.ProtoReflect.Descriptor instead. +func (*EntityInfoReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{41} +} -func (m *EntityInfoReply) GetEntity() *logical.Entity { - if m != nil { - return m.Entity +func (x *EntityInfoReply) GetEntity() *logical.Entity { + if x != nil { + return x.Entity } return nil } -func (m *EntityInfoReply) GetErr() string { - if m != nil { - return m.Err +func (x *EntityInfoReply) GetErr() string { + if x != nil { + return x.Err } return "" } type GroupsForEntityReply struct { - Groups []*logical.Group `sentinel:"" protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` - Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GroupsForEntityReply) Reset() { *m = GroupsForEntityReply{} } -func (m *GroupsForEntityReply) String() string { return proto.CompactTextString(m) } -func (*GroupsForEntityReply) ProtoMessage() {} -func (*GroupsForEntityReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{42} + Groups []*logical.Group `sentinel:"" protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` + Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *GroupsForEntityReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GroupsForEntityReply.Unmarshal(m, b) -} -func (m *GroupsForEntityReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GroupsForEntityReply.Marshal(b, m, deterministic) -} -func (m *GroupsForEntityReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupsForEntityReply.Merge(m, src) +func (x *GroupsForEntityReply) Reset() { + *x = GroupsForEntityReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GroupsForEntityReply) XXX_Size() int { - return xxx_messageInfo_GroupsForEntityReply.Size(m) + +func (x *GroupsForEntityReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GroupsForEntityReply) XXX_DiscardUnknown() { - xxx_messageInfo_GroupsForEntityReply.DiscardUnknown(m) + +func (*GroupsForEntityReply) ProtoMessage() {} + +func (x *GroupsForEntityReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GroupsForEntityReply proto.InternalMessageInfo +// Deprecated: Use GroupsForEntityReply.ProtoReflect.Descriptor instead. +func (*GroupsForEntityReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{42} +} -func (m *GroupsForEntityReply) GetGroups() []*logical.Group { - if m != nil { - return m.Groups +func (x *GroupsForEntityReply) GetGroups() []*logical.Group { + if x != nil { + return x.Groups } return nil } -func (m *GroupsForEntityReply) GetErr() string { - if m != nil { - return m.Err +func (x *GroupsForEntityReply) GetErr() string { + if x != nil { + return x.Err } return "" } type PluginEnvReply struct { - PluginEnvironment *logical.PluginEnvironment `sentinel:"" protobuf:"bytes,1,opt,name=plugin_environment,json=pluginEnvironment,proto3" json:"plugin_environment,omitempty"` - Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *PluginEnvReply) Reset() { *m = PluginEnvReply{} } -func (m *PluginEnvReply) String() string { return proto.CompactTextString(m) } -func (*PluginEnvReply) ProtoMessage() {} -func (*PluginEnvReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{43} + PluginEnvironment *logical.PluginEnvironment `sentinel:"" protobuf:"bytes,1,opt,name=plugin_environment,json=pluginEnvironment,proto3" json:"plugin_environment,omitempty"` + Err string `sentinel:"" protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` } -func (m *PluginEnvReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PluginEnvReply.Unmarshal(m, b) -} -func (m *PluginEnvReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PluginEnvReply.Marshal(b, m, deterministic) -} -func (m *PluginEnvReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_PluginEnvReply.Merge(m, src) +func (x *PluginEnvReply) Reset() { + *x = PluginEnvReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *PluginEnvReply) XXX_Size() int { - return xxx_messageInfo_PluginEnvReply.Size(m) + +func (x *PluginEnvReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *PluginEnvReply) XXX_DiscardUnknown() { - xxx_messageInfo_PluginEnvReply.DiscardUnknown(m) + +func (*PluginEnvReply) ProtoMessage() {} + +func (x *PluginEnvReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_PluginEnvReply proto.InternalMessageInfo +// Deprecated: Use PluginEnvReply.ProtoReflect.Descriptor instead. +func (*PluginEnvReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{43} +} -func (m *PluginEnvReply) GetPluginEnvironment() *logical.PluginEnvironment { - if m != nil { - return m.PluginEnvironment +func (x *PluginEnvReply) GetPluginEnvironment() *logical.PluginEnvironment { + if x != nil { + return x.PluginEnvironment } return nil } -func (m *PluginEnvReply) GetErr() string { - if m != nil { - return m.Err +func (x *PluginEnvReply) GetErr() string { + if x != nil { + return x.Err } return "" } type GeneratePasswordFromPolicyRequest struct { - PolicyName string `sentinel:"" protobuf:"bytes,1,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GeneratePasswordFromPolicyRequest) Reset() { *m = GeneratePasswordFromPolicyRequest{} } -func (m *GeneratePasswordFromPolicyRequest) String() string { return proto.CompactTextString(m) } -func (*GeneratePasswordFromPolicyRequest) ProtoMessage() {} -func (*GeneratePasswordFromPolicyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{44} + PolicyName string `sentinel:"" protobuf:"bytes,1,opt,name=policy_name,json=policyName,proto3" json:"policy_name,omitempty"` } -func (m *GeneratePasswordFromPolicyRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GeneratePasswordFromPolicyRequest.Unmarshal(m, b) -} -func (m *GeneratePasswordFromPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GeneratePasswordFromPolicyRequest.Marshal(b, m, deterministic) -} -func (m *GeneratePasswordFromPolicyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GeneratePasswordFromPolicyRequest.Merge(m, src) +func (x *GeneratePasswordFromPolicyRequest) Reset() { + *x = GeneratePasswordFromPolicyRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GeneratePasswordFromPolicyRequest) XXX_Size() int { - return xxx_messageInfo_GeneratePasswordFromPolicyRequest.Size(m) + +func (x *GeneratePasswordFromPolicyRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GeneratePasswordFromPolicyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GeneratePasswordFromPolicyRequest.DiscardUnknown(m) + +func (*GeneratePasswordFromPolicyRequest) ProtoMessage() {} + +func (x *GeneratePasswordFromPolicyRequest) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GeneratePasswordFromPolicyRequest proto.InternalMessageInfo +// Deprecated: Use GeneratePasswordFromPolicyRequest.ProtoReflect.Descriptor instead. +func (*GeneratePasswordFromPolicyRequest) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{44} +} -func (m *GeneratePasswordFromPolicyRequest) GetPolicyName() string { - if m != nil { - return m.PolicyName +func (x *GeneratePasswordFromPolicyRequest) GetPolicyName() string { + if x != nil { + return x.PolicyName } return "" } type GeneratePasswordFromPolicyReply struct { - Password string `sentinel:"" protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GeneratePasswordFromPolicyReply) Reset() { *m = GeneratePasswordFromPolicyReply{} } -func (m *GeneratePasswordFromPolicyReply) String() string { return proto.CompactTextString(m) } -func (*GeneratePasswordFromPolicyReply) ProtoMessage() {} -func (*GeneratePasswordFromPolicyReply) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{45} + Password string `sentinel:"" protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` } -func (m *GeneratePasswordFromPolicyReply) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GeneratePasswordFromPolicyReply.Unmarshal(m, b) -} -func (m *GeneratePasswordFromPolicyReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GeneratePasswordFromPolicyReply.Marshal(b, m, deterministic) -} -func (m *GeneratePasswordFromPolicyReply) XXX_Merge(src proto.Message) { - xxx_messageInfo_GeneratePasswordFromPolicyReply.Merge(m, src) +func (x *GeneratePasswordFromPolicyReply) Reset() { + *x = GeneratePasswordFromPolicyReply{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GeneratePasswordFromPolicyReply) XXX_Size() int { - return xxx_messageInfo_GeneratePasswordFromPolicyReply.Size(m) + +func (x *GeneratePasswordFromPolicyReply) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GeneratePasswordFromPolicyReply) XXX_DiscardUnknown() { - xxx_messageInfo_GeneratePasswordFromPolicyReply.DiscardUnknown(m) + +func (*GeneratePasswordFromPolicyReply) ProtoMessage() {} + +func (x *GeneratePasswordFromPolicyReply) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GeneratePasswordFromPolicyReply proto.InternalMessageInfo +// Deprecated: Use GeneratePasswordFromPolicyReply.ProtoReflect.Descriptor instead. +func (*GeneratePasswordFromPolicyReply) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{45} +} -func (m *GeneratePasswordFromPolicyReply) GetPassword() string { - if m != nil { - return m.Password +func (x *GeneratePasswordFromPolicyReply) GetPassword() string { + if x != nil { + return x.Password } return "" } type Connection struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // RemoteAddr is the network address that sent the request. - RemoteAddr string `sentinel:"" protobuf:"bytes,1,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + RemoteAddr string `sentinel:"" protobuf:"bytes,1,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` } -func (m *Connection) Reset() { *m = Connection{} } -func (m *Connection) String() string { return proto.CompactTextString(m) } -func (*Connection) ProtoMessage() {} -func (*Connection) Descriptor() ([]byte, []int) { - return fileDescriptor_4dbf1dfe0c11846b, []int{46} +func (x *Connection) Reset() { + *x = Connection{} + if protoimpl.UnsafeEnabled { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Connection) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Connection.Unmarshal(m, b) -} -func (m *Connection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Connection.Marshal(b, m, deterministic) -} -func (m *Connection) XXX_Merge(src proto.Message) { - xxx_messageInfo_Connection.Merge(m, src) -} -func (m *Connection) XXX_Size() int { - return xxx_messageInfo_Connection.Size(m) +func (x *Connection) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Connection) XXX_DiscardUnknown() { - xxx_messageInfo_Connection.DiscardUnknown(m) + +func (*Connection) ProtoMessage() {} + +func (x *Connection) ProtoReflect() protoreflect.Message { + mi := &file_sdk_plugin_pb_backend_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Connection proto.InternalMessageInfo +// Deprecated: Use Connection.ProtoReflect.Descriptor instead. +func (*Connection) Descriptor() ([]byte, []int) { + return file_sdk_plugin_pb_backend_proto_rawDescGZIP(), []int{46} +} -func (m *Connection) GetRemoteAddr() string { - if m != nil { - return m.RemoteAddr +func (x *Connection) GetRemoteAddr() string { + if x != nil { + return x.RemoteAddr } return "" } -func init() { - proto.RegisterType((*Empty)(nil), "pb.Empty") - proto.RegisterType((*Header)(nil), "pb.Header") - proto.RegisterType((*ProtoError)(nil), "pb.ProtoError") - proto.RegisterType((*Paths)(nil), "pb.Paths") - proto.RegisterType((*Request)(nil), "pb.Request") - proto.RegisterMapType((map[string]*Header)(nil), "pb.Request.HeadersEntry") - proto.RegisterType((*Auth)(nil), "pb.Auth") - proto.RegisterMapType((map[string]string)(nil), "pb.Auth.MetadataEntry") - proto.RegisterType((*TokenEntry)(nil), "pb.TokenEntry") - proto.RegisterMapType((map[string]string)(nil), "pb.TokenEntry.MetaEntry") - proto.RegisterType((*LeaseOptions)(nil), "pb.LeaseOptions") - proto.RegisterType((*Secret)(nil), "pb.Secret") - proto.RegisterType((*Response)(nil), "pb.Response") - proto.RegisterMapType((map[string]*Header)(nil), "pb.Response.HeadersEntry") - proto.RegisterType((*ResponseWrapInfo)(nil), "pb.ResponseWrapInfo") - proto.RegisterType((*RequestWrapInfo)(nil), "pb.RequestWrapInfo") - proto.RegisterType((*HandleRequestArgs)(nil), "pb.HandleRequestArgs") - proto.RegisterType((*HandleRequestReply)(nil), "pb.HandleRequestReply") - proto.RegisterType((*InitializeArgs)(nil), "pb.InitializeArgs") - proto.RegisterType((*InitializeReply)(nil), "pb.InitializeReply") - proto.RegisterType((*SpecialPathsReply)(nil), "pb.SpecialPathsReply") - proto.RegisterType((*HandleExistenceCheckArgs)(nil), "pb.HandleExistenceCheckArgs") - proto.RegisterType((*HandleExistenceCheckReply)(nil), "pb.HandleExistenceCheckReply") - proto.RegisterType((*SetupArgs)(nil), "pb.SetupArgs") - proto.RegisterMapType((map[string]string)(nil), "pb.SetupArgs.ConfigEntry") - proto.RegisterType((*SetupReply)(nil), "pb.SetupReply") - proto.RegisterType((*TypeReply)(nil), "pb.TypeReply") - proto.RegisterType((*InvalidateKeyArgs)(nil), "pb.InvalidateKeyArgs") - proto.RegisterType((*StorageEntry)(nil), "pb.StorageEntry") - proto.RegisterType((*StorageListArgs)(nil), "pb.StorageListArgs") - proto.RegisterType((*StorageListReply)(nil), "pb.StorageListReply") - proto.RegisterType((*StorageGetArgs)(nil), "pb.StorageGetArgs") - proto.RegisterType((*StorageGetReply)(nil), "pb.StorageGetReply") - proto.RegisterType((*StoragePutArgs)(nil), "pb.StoragePutArgs") - proto.RegisterType((*StoragePutReply)(nil), "pb.StoragePutReply") - proto.RegisterType((*StorageDeleteArgs)(nil), "pb.StorageDeleteArgs") - proto.RegisterType((*StorageDeleteReply)(nil), "pb.StorageDeleteReply") - proto.RegisterType((*TTLReply)(nil), "pb.TTLReply") - proto.RegisterType((*TaintedReply)(nil), "pb.TaintedReply") - proto.RegisterType((*CachingDisabledReply)(nil), "pb.CachingDisabledReply") - proto.RegisterType((*ReplicationStateReply)(nil), "pb.ReplicationStateReply") - proto.RegisterType((*ResponseWrapDataArgs)(nil), "pb.ResponseWrapDataArgs") - proto.RegisterType((*ResponseWrapDataReply)(nil), "pb.ResponseWrapDataReply") - proto.RegisterType((*MlockEnabledReply)(nil), "pb.MlockEnabledReply") - proto.RegisterType((*LocalMountReply)(nil), "pb.LocalMountReply") - proto.RegisterType((*EntityInfoArgs)(nil), "pb.EntityInfoArgs") - proto.RegisterType((*EntityInfoReply)(nil), "pb.EntityInfoReply") - proto.RegisterType((*GroupsForEntityReply)(nil), "pb.GroupsForEntityReply") - proto.RegisterType((*PluginEnvReply)(nil), "pb.PluginEnvReply") - proto.RegisterType((*GeneratePasswordFromPolicyRequest)(nil), "pb.GeneratePasswordFromPolicyRequest") - proto.RegisterType((*GeneratePasswordFromPolicyReply)(nil), "pb.GeneratePasswordFromPolicyReply") - proto.RegisterType((*Connection)(nil), "pb.Connection") -} - -func init() { proto.RegisterFile("sdk/plugin/pb/backend.proto", fileDescriptor_4dbf1dfe0c11846b) } - -var fileDescriptor_4dbf1dfe0c11846b = []byte{ - // 2616 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0xcd, 0x72, 0x1b, 0xc7, - 0x11, 0x2e, 0x00, 0xc4, 0x5f, 0xe3, 0x7f, 0x44, 0x2b, 0x2b, 0x48, 0x8e, 0xe8, 0x55, 0x24, 0xd3, - 0x8a, 0x05, 0x5a, 0x54, 0x1c, 0xcb, 0x49, 0x39, 0x2e, 0x99, 0xa2, 0x64, 0xc6, 0x94, 0xcd, 0x5a, - 0xc2, 0x71, 0xfe, 0xaa, 0xe0, 0xc1, 0xee, 0x10, 0xd8, 0xe2, 0x62, 0x77, 0x33, 0x3b, 0x4b, 0x11, - 0xb9, 0xe4, 0x2d, 0xf2, 0x06, 0x39, 0xa7, 0x72, 0xcb, 0x2d, 0x57, 0x57, 0xee, 0x79, 0x85, 0x3c, - 0x47, 0x6a, 0x7a, 0x66, 0xff, 0x00, 0x50, 0x92, 0xab, 0x9c, 0xdb, 0x4e, 0x77, 0x4f, 0xf7, 0x4c, - 0x4f, 0x77, 0x7f, 0x3d, 0xb3, 0x70, 0x33, 0x72, 0xce, 0xf7, 0x42, 0x2f, 0x9e, 0xb9, 0xfe, 0x5e, - 0x38, 0xdd, 0x9b, 0x52, 0xfb, 0x9c, 0xf9, 0xce, 0x28, 0xe4, 0x81, 0x08, 0x48, 0x39, 0x9c, 0x0e, - 0x6f, 0xcf, 0x82, 0x60, 0xe6, 0xb1, 0x3d, 0xa4, 0x4c, 0xe3, 0xb3, 0x3d, 0xe1, 0x2e, 0x58, 0x24, - 0xe8, 0x22, 0x54, 0x42, 0xc3, 0xa1, 0xd4, 0xe0, 0x05, 0x33, 0xd7, 0xa6, 0xde, 0x9e, 0xeb, 0x30, - 0x5f, 0xb8, 0x62, 0xa9, 0x79, 0x46, 0x9e, 0xa7, 0xac, 0x28, 0x8e, 0x59, 0x87, 0xea, 0xe1, 0x22, - 0x14, 0x4b, 0x73, 0x07, 0x6a, 0x9f, 0x33, 0xea, 0x30, 0x4e, 0xae, 0x43, 0x6d, 0x8e, 0x5f, 0x46, - 0x69, 0xa7, 0xb2, 0xdb, 0xb4, 0xf4, 0xc8, 0xfc, 0x03, 0xc0, 0x89, 0x9c, 0x73, 0xc8, 0x79, 0xc0, - 0xc9, 0x0d, 0x68, 0x30, 0xce, 0x27, 0x62, 0x19, 0x32, 0xa3, 0xb4, 0x53, 0xda, 0xed, 0x58, 0x75, - 0xc6, 0xf9, 0x78, 0x19, 0x32, 0xf2, 0x23, 0x90, 0x9f, 0x93, 0x45, 0x34, 0x33, 0xca, 0x3b, 0x25, - 0xa9, 0x81, 0x71, 0xfe, 0x22, 0x9a, 0x25, 0x73, 0xec, 0xc0, 0x61, 0x46, 0x65, 0xa7, 0xb4, 0x5b, - 0xc1, 0x39, 0x07, 0x81, 0xc3, 0xcc, 0xbf, 0x96, 0xa0, 0x7a, 0x42, 0xc5, 0x3c, 0x22, 0x04, 0xb6, - 0x78, 0x10, 0x08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2, 0xf8, 0x74, 0xb3, 0x11, 0x85, - 0x1e, 0xcb, 0x9b, 0x59, 0x11, 0x69, 0xf2, 0x13, 0xf5, 0x2d, 0x71, 0x13, 0x14, 0x3d, 0x2f, 0xde, - 0xe9, 0xf0, 0x3a, 0x6d, 0xac, 0x82, 0x41, 0x02, 0x45, 0xc3, 0x1b, 0x9b, 0x38, 0x69, 0xe6, 0xe5, - 0xf1, 0x60, 0x2d, 0xf3, 0xd6, 0xc1, 0xe2, 0x7d, 0x80, 0x0c, 0x12, 0xf2, 0xf2, 0x78, 0xbc, 0xab, - 0x68, 0xf1, 0x21, 0x40, 0x56, 0xe8, 0x55, 0x54, 0x14, 0x71, 0x42, 0x4d, 0x5b, 0x05, 0x83, 0xfb, - 0xd0, 0x4c, 0x4b, 0x69, 0xde, 0x06, 0x2a, 0x58, 0xa9, 0xcc, 0x9f, 0x42, 0x6f, 0xa5, 0xfa, 0x6f, - 0xb4, 0x83, 0xee, 0xd9, 0x08, 0x13, 0x73, 0x18, 0x5e, 0x5d, 0x37, 0xc9, 0x5d, 0x9c, 0xf7, 0xba, - 0xea, 0x3c, 0xbc, 0xf3, 0x3a, 0xb1, 0xd0, 0x5b, 0x7e, 0x76, 0xff, 0xf7, 0xbb, 0x33, 0x57, 0xcc, - 0xe3, 0xe9, 0xc8, 0x0e, 0x16, 0x7b, 0x73, 0x1a, 0xcd, 0x5d, 0x3b, 0xe0, 0xe1, 0xde, 0x85, 0x8c, - 0xdb, 0xbd, 0xc2, 0x7f, 0xc3, 0x69, 0x0d, 0xef, 0xcf, 0x8f, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, - 0x2e, 0xfe, 0x10, 0x49, 0x4f, 0x1c, 0x00, 0x00, +var File_sdk_plugin_pb_backend_proto protoreflect.FileDescriptor + +var file_sdk_plugin_pb_backend_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x62, 0x2f, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, + 0x62, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1a, 0x73, 0x64, 0x6b, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2f, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 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, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x20, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x22, 0x5b, 0x0a, 0x0a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x07, 0x65, 0x72, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, + 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, + 0x72, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f, 0x64, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64, 0x65, + 0x22, 0x96, 0x01, 0x0a, 0x05, 0x50, 0x61, 0x74, 0x68, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, + 0x6f, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x12, 0x28, + 0x0a, 0x0f, 0x75, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x75, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, + 0x6c, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x2a, 0x0a, + 0x11, 0x73, 0x65, 0x61, 0x6c, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x5f, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x61, 0x6c, 0x57, 0x72, + 0x61, 0x70, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x22, 0xbf, 0x06, 0x0a, 0x07, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x12, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x22, 0x0a, 0x06, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, + 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, + 0x1c, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, + 0x70, 0x62, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x12, 0x32, 0x0a, + 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x13, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x12, 0x30, 0x0a, 0x09, 0x77, 0x72, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x57, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x77, 0x72, 0x61, 0x70, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x1b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x75, + 0x73, 0x65, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x55, + 0x73, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, + 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x75, 0x6e, 0x61, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x13, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0f, 0x75, 0x6e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x1a, 0x46, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe6, 0x05, 0x0a, 0x04, + 0x41, 0x75, 0x74, 0x68, 0x12, 0x35, 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, + 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x6c, + 0x65, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, + 0x32, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x75, + 0x6d, 0x5f, 0x75, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6e, 0x75, + 0x6d, 0x55, 0x73, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, + 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x49, 0x64, 0x12, 0x24, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x33, 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, + 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x1f, 0x0a, + 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x69, 0x64, 0x72, 0x73, 0x12, 0x25, + 0x0a, 0x0e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, + 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x6d, + 0x61, 0x78, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x65, 0x78, + 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4d, 0x61, 0x78, 0x54, 0x74, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6e, + 0x6f, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6e, 0x6f, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xca, 0x04, 0x0a, 0x0a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, + 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x69, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x04, 0x6d, 0x65, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x5f, + 0x75, 0x73, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6e, 0x75, 0x6d, 0x55, + 0x73, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x28, 0x0a, 0x10, 0x65, 0x78, + 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x74, 0x6c, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x4d, 0x61, + 0x78, 0x54, 0x74, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x1f, 0x0a, + 0x0b, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x63, 0x69, 0x64, 0x72, 0x73, 0x18, 0x0f, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x69, 0x64, 0x72, 0x73, 0x12, 0x21, + 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x75, 0x62, 0x62, 0x79, 0x68, 0x6f, 0x6c, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x62, 0x62, 0x79, 0x68, 0x6f, + 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x4d, 0x65, 0x74, 0x61, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0xaf, 0x01, 0x0a, 0x0c, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x54, 0x4c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x54, 0x54, 0x4c, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x61, 0x62, 0x6c, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x12, 0x39, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x69, 0x73, 0x73, 0x75, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x4d, + 0x61, 0x78, 0x54, 0x54, 0x4c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x4d, 0x61, 0x78, + 0x54, 0x54, 0x4c, 0x22, 0x7f, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x35, 0x0a, + 0x0d, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x65, 0x61, + 0x73, 0x65, 0x49, 0x64, 0x22, 0xc8, 0x02, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x22, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x06, 0x73, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, 0x61, + 0x75, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x64, 0x69, 0x72, + 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0x31, 0x0a, 0x09, 0x77, 0x72, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x57, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x77, 0x72, 0x61, 0x70, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x33, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x46, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0xc8, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x57, 0x72, 0x61, 0x70, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x54, 0x54, 0x4c, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x03, 0x54, 0x54, 0x4c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x77, 0x72, 0x61, + 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x6f, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f, + 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x64, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1b, 0x0a, + 0x09, 0x73, 0x65, 0x61, 0x6c, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x73, 0x65, 0x61, 0x6c, 0x57, 0x72, 0x61, 0x70, 0x22, 0x58, 0x0a, 0x0f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x57, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, + 0x03, 0x54, 0x54, 0x4c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x54, 0x54, 0x4c, 0x12, + 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x6c, 0x5f, + 0x77, 0x72, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x61, 0x6c, + 0x57, 0x72, 0x61, 0x70, 0x22, 0x59, 0x0a, 0x11, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x60, 0x0a, 0x12, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x28, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x20, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, + 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, + 0x72, 0x22, 0x10, 0x0a, 0x0e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x41, + 0x72, 0x67, 0x73, 0x22, 0x33, 0x0a, 0x0f, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, + 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x34, 0x0a, 0x11, 0x53, 0x70, 0x65, 0x63, + 0x69, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1f, 0x0a, + 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, + 0x62, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x73, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, 0x60, + 0x0a, 0x18, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, + 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x72, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, + 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x62, 0x2e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x76, 0x0a, 0x19, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1f, 0x0a, + 0x0b, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x16, + 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x20, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0xb8, 0x01, 0x0a, 0x09, 0x53, 0x65, 0x74, + 0x75, 0x70, 0x41, 0x72, 0x67, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x62, 0x72, 0x6f, 0x6b, 0x65, + 0x72, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x75, 0x70, 0x41, 0x72, + 0x67, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, + 0x64, 0x55, 0x55, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x61, 0x63, + 0x6b, 0x65, 0x6e, 0x64, 0x55, 0x55, 0x49, 0x44, 0x1a, 0x39, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x1e, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x75, 0x70, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x65, 0x72, 0x72, 0x22, 0x1f, 0x0a, 0x09, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x22, 0x25, 0x0a, 0x11, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x72, 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x53, 0x0a, 0x0c, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x61, 0x6c, 0x5f, 0x77, 0x72, 0x61, 0x70, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x61, 0x6c, 0x57, 0x72, 0x61, 0x70, + 0x22, 0x29, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x72, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x38, 0x0a, 0x10, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, + 0x65, 0x79, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x22, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x47, 0x65, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x4b, 0x0a, 0x0f, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x26, 0x0a, 0x05, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, + 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x38, 0x0a, 0x0e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x50, 0x75, 0x74, 0x41, 0x72, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x22, 0x23, 0x0a, 0x0f, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x75, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x25, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x26, 0x0a, 0x12, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x65, 0x72, 0x72, 0x22, 0x1c, 0x0a, 0x08, 0x54, 0x54, 0x4c, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x54, 0x54, 0x4c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x54, + 0x54, 0x4c, 0x22, 0x28, 0x0a, 0x0c, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x74, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x22, 0x32, 0x0a, 0x14, + 0x43, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x22, 0x2d, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, + 0x4e, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x57, 0x72, 0x61, 0x70, 0x44, + 0x61, 0x74, 0x61, 0x41, 0x72, 0x67, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x54, + 0x54, 0x4c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x54, 0x54, 0x4c, 0x12, 0x10, 0x0a, + 0x03, 0x4a, 0x57, 0x54, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x4a, 0x57, 0x54, 0x22, + 0x5c, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x57, 0x72, 0x61, 0x70, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x09, 0x77, 0x72, 0x61, 0x70, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x62, + 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x57, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x08, 0x77, 0x72, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x65, + 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x2d, 0x0a, + 0x11, 0x4d, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x27, 0x0a, 0x0f, + 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, + 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x22, 0x2d, 0x0a, 0x0e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, + 0x6e, 0x66, 0x6f, 0x41, 0x72, 0x67, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x0f, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x27, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, + 0x6c, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, + 0x72, 0x72, 0x22, 0x50, 0x0a, 0x14, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x26, 0x0a, 0x06, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x6f, 0x67, + 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x65, 0x72, 0x72, 0x22, 0x6d, 0x0a, 0x0e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, + 0x76, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x49, 0x0a, 0x12, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x5f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x2e, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x11, + 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x65, 0x72, 0x72, 0x22, 0x44, 0x0a, 0x21, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3d, 0x0a, 0x1f, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x46, 0x72, 0x6f, + 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x2d, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x32, 0xa5, 0x03, 0x0a, 0x07, 0x42, 0x61, 0x63, 0x6b, + 0x65, 0x6e, 0x64, 0x12, 0x3e, 0x0a, 0x0d, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x70, 0x62, + 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x0c, 0x53, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x50, 0x61, + 0x74, 0x68, 0x73, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, + 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x50, 0x61, 0x74, 0x68, 0x73, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x53, 0x0a, 0x14, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, + 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x1c, 0x2e, + 0x70, 0x62, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x63, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1d, 0x2e, 0x70, 0x62, + 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x65, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1f, 0x0a, 0x07, 0x43, 0x6c, + 0x65, 0x61, 0x6e, 0x75, 0x70, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x0d, 0x49, + 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x15, 0x2e, 0x70, + 0x62, 0x2e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, + 0x72, 0x67, 0x73, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x26, + 0x0a, 0x05, 0x53, 0x65, 0x74, 0x75, 0x70, 0x12, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, + 0x75, 0x70, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x75, + 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x35, 0x0a, 0x0a, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x20, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x0d, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, + 0xd5, 0x01, 0x0a, 0x07, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e, + 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x47, 0x65, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e, + 0x0a, 0x03, 0x50, 0x75, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x50, 0x75, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x50, 0x75, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x37, + 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, + 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x32, 0xb1, 0x05, 0x0a, 0x0a, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x56, 0x69, 0x65, 0x77, 0x12, 0x2a, 0x0a, 0x0f, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, + 0x74, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x54, 0x4c, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x54, 0x4c, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x26, 0x0a, 0x0b, 0x4d, 0x61, 0x78, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x54, 0x54, + 0x4c, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0c, 0x2e, 0x70, + 0x62, 0x2e, 0x54, 0x54, 0x4c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x26, 0x0a, 0x07, 0x54, 0x61, + 0x69, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x54, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x64, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x36, 0x0a, 0x0f, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x38, 0x0a, 0x10, 0x52, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x09, + 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x52, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x47, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x57, 0x72, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x57, 0x72, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x41, 0x72, + 0x67, 0x73, 0x1a, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x57, 0x72, 0x61, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, + 0x0c, 0x4d, 0x6c, 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x09, 0x2e, + 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x4d, 0x6c, + 0x6f, 0x63, 0x6b, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, + 0x2c, 0x0a, 0x0a, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x09, 0x2e, + 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x6f, + 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x35, 0x0a, + 0x0a, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x2e, 0x70, 0x62, + 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x41, 0x72, 0x67, 0x73, 0x1a, + 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x09, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, + 0x76, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x70, + 0x62, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6e, 0x76, 0x52, 0x65, 0x70, 0x6c, 0x79, + 0x12, 0x3f, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, + 0x6e, 0x66, 0x6f, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x46, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x12, 0x68, 0x0a, 0x1a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x25, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x46, 0x72, 0x6f, 0x6d, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x2a, 0x5a, 0x28, 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, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_sdk_plugin_pb_backend_proto_rawDescOnce sync.Once + file_sdk_plugin_pb_backend_proto_rawDescData = file_sdk_plugin_pb_backend_proto_rawDesc +) + +func file_sdk_plugin_pb_backend_proto_rawDescGZIP() []byte { + file_sdk_plugin_pb_backend_proto_rawDescOnce.Do(func() { + file_sdk_plugin_pb_backend_proto_rawDescData = protoimpl.X.CompressGZIP(file_sdk_plugin_pb_backend_proto_rawDescData) + }) + return file_sdk_plugin_pb_backend_proto_rawDescData +} + +var file_sdk_plugin_pb_backend_proto_msgTypes = make([]protoimpl.MessageInfo, 52) +var file_sdk_plugin_pb_backend_proto_goTypes = []interface{}{ + (*Empty)(nil), // 0: pb.Empty + (*Header)(nil), // 1: pb.Header + (*ProtoError)(nil), // 2: pb.ProtoError + (*Paths)(nil), // 3: pb.Paths + (*Request)(nil), // 4: pb.Request + (*Auth)(nil), // 5: pb.Auth + (*TokenEntry)(nil), // 6: pb.TokenEntry + (*LeaseOptions)(nil), // 7: pb.LeaseOptions + (*Secret)(nil), // 8: pb.Secret + (*Response)(nil), // 9: pb.Response + (*ResponseWrapInfo)(nil), // 10: pb.ResponseWrapInfo + (*RequestWrapInfo)(nil), // 11: pb.RequestWrapInfo + (*HandleRequestArgs)(nil), // 12: pb.HandleRequestArgs + (*HandleRequestReply)(nil), // 13: pb.HandleRequestReply + (*InitializeArgs)(nil), // 14: pb.InitializeArgs + (*InitializeReply)(nil), // 15: pb.InitializeReply + (*SpecialPathsReply)(nil), // 16: pb.SpecialPathsReply + (*HandleExistenceCheckArgs)(nil), // 17: pb.HandleExistenceCheckArgs + (*HandleExistenceCheckReply)(nil), // 18: pb.HandleExistenceCheckReply + (*SetupArgs)(nil), // 19: pb.SetupArgs + (*SetupReply)(nil), // 20: pb.SetupReply + (*TypeReply)(nil), // 21: pb.TypeReply + (*InvalidateKeyArgs)(nil), // 22: pb.InvalidateKeyArgs + (*StorageEntry)(nil), // 23: pb.StorageEntry + (*StorageListArgs)(nil), // 24: pb.StorageListArgs + (*StorageListReply)(nil), // 25: pb.StorageListReply + (*StorageGetArgs)(nil), // 26: pb.StorageGetArgs + (*StorageGetReply)(nil), // 27: pb.StorageGetReply + (*StoragePutArgs)(nil), // 28: pb.StoragePutArgs + (*StoragePutReply)(nil), // 29: pb.StoragePutReply + (*StorageDeleteArgs)(nil), // 30: pb.StorageDeleteArgs + (*StorageDeleteReply)(nil), // 31: pb.StorageDeleteReply + (*TTLReply)(nil), // 32: pb.TTLReply + (*TaintedReply)(nil), // 33: pb.TaintedReply + (*CachingDisabledReply)(nil), // 34: pb.CachingDisabledReply + (*ReplicationStateReply)(nil), // 35: pb.ReplicationStateReply + (*ResponseWrapDataArgs)(nil), // 36: pb.ResponseWrapDataArgs + (*ResponseWrapDataReply)(nil), // 37: pb.ResponseWrapDataReply + (*MlockEnabledReply)(nil), // 38: pb.MlockEnabledReply + (*LocalMountReply)(nil), // 39: pb.LocalMountReply + (*EntityInfoArgs)(nil), // 40: pb.EntityInfoArgs + (*EntityInfoReply)(nil), // 41: pb.EntityInfoReply + (*GroupsForEntityReply)(nil), // 42: pb.GroupsForEntityReply + (*PluginEnvReply)(nil), // 43: pb.PluginEnvReply + (*GeneratePasswordFromPolicyRequest)(nil), // 44: pb.GeneratePasswordFromPolicyRequest + (*GeneratePasswordFromPolicyReply)(nil), // 45: pb.GeneratePasswordFromPolicyReply + (*Connection)(nil), // 46: pb.Connection + nil, // 47: pb.Request.HeadersEntry + nil, // 48: pb.Auth.MetadataEntry + nil, // 49: pb.TokenEntry.MetaEntry + nil, // 50: pb.Response.HeadersEntry + nil, // 51: pb.SetupArgs.ConfigEntry + (*logical.Alias)(nil), // 52: logical.Alias + (*timestamp.Timestamp)(nil), // 53: google.protobuf.Timestamp + (*logical.Entity)(nil), // 54: logical.Entity + (*logical.Group)(nil), // 55: logical.Group + (*logical.PluginEnvironment)(nil), // 56: logical.PluginEnvironment +} +var file_sdk_plugin_pb_backend_proto_depIDxs = []int32{ + 8, // 0: pb.Request.secret:type_name -> pb.Secret + 5, // 1: pb.Request.auth:type_name -> pb.Auth + 47, // 2: pb.Request.headers:type_name -> pb.Request.HeadersEntry + 11, // 3: pb.Request.wrap_info:type_name -> pb.RequestWrapInfo + 46, // 4: pb.Request.connection:type_name -> pb.Connection + 7, // 5: pb.Auth.lease_options:type_name -> pb.LeaseOptions + 48, // 6: pb.Auth.metadata:type_name -> pb.Auth.MetadataEntry + 52, // 7: pb.Auth.alias:type_name -> logical.Alias + 52, // 8: pb.Auth.group_aliases:type_name -> logical.Alias + 49, // 9: pb.TokenEntry.meta:type_name -> pb.TokenEntry.MetaEntry + 53, // 10: pb.LeaseOptions.issue_time:type_name -> google.protobuf.Timestamp + 7, // 11: pb.Secret.lease_options:type_name -> pb.LeaseOptions + 8, // 12: pb.Response.secret:type_name -> pb.Secret + 5, // 13: pb.Response.auth:type_name -> pb.Auth + 10, // 14: pb.Response.wrap_info:type_name -> pb.ResponseWrapInfo + 50, // 15: pb.Response.headers:type_name -> pb.Response.HeadersEntry + 53, // 16: pb.ResponseWrapInfo.creation_time:type_name -> google.protobuf.Timestamp + 4, // 17: pb.HandleRequestArgs.request:type_name -> pb.Request + 9, // 18: pb.HandleRequestReply.response:type_name -> pb.Response + 2, // 19: pb.HandleRequestReply.err:type_name -> pb.ProtoError + 2, // 20: pb.InitializeReply.err:type_name -> pb.ProtoError + 3, // 21: pb.SpecialPathsReply.paths:type_name -> pb.Paths + 4, // 22: pb.HandleExistenceCheckArgs.request:type_name -> pb.Request + 2, // 23: pb.HandleExistenceCheckReply.err:type_name -> pb.ProtoError + 51, // 24: pb.SetupArgs.Config:type_name -> pb.SetupArgs.ConfigEntry + 23, // 25: pb.StorageGetReply.entry:type_name -> pb.StorageEntry + 23, // 26: pb.StoragePutArgs.entry:type_name -> pb.StorageEntry + 10, // 27: pb.ResponseWrapDataReply.wrap_info:type_name -> pb.ResponseWrapInfo + 54, // 28: pb.EntityInfoReply.entity:type_name -> logical.Entity + 55, // 29: pb.GroupsForEntityReply.groups:type_name -> logical.Group + 56, // 30: pb.PluginEnvReply.plugin_environment:type_name -> logical.PluginEnvironment + 1, // 31: pb.Request.HeadersEntry.value:type_name -> pb.Header + 1, // 32: pb.Response.HeadersEntry.value:type_name -> pb.Header + 12, // 33: pb.Backend.HandleRequest:input_type -> pb.HandleRequestArgs + 0, // 34: pb.Backend.SpecialPaths:input_type -> pb.Empty + 17, // 35: pb.Backend.HandleExistenceCheck:input_type -> pb.HandleExistenceCheckArgs + 0, // 36: pb.Backend.Cleanup:input_type -> pb.Empty + 22, // 37: pb.Backend.InvalidateKey:input_type -> pb.InvalidateKeyArgs + 19, // 38: pb.Backend.Setup:input_type -> pb.SetupArgs + 14, // 39: pb.Backend.Initialize:input_type -> pb.InitializeArgs + 0, // 40: pb.Backend.Type:input_type -> pb.Empty + 24, // 41: pb.Storage.List:input_type -> pb.StorageListArgs + 26, // 42: pb.Storage.Get:input_type -> pb.StorageGetArgs + 28, // 43: pb.Storage.Put:input_type -> pb.StoragePutArgs + 30, // 44: pb.Storage.Delete:input_type -> pb.StorageDeleteArgs + 0, // 45: pb.SystemView.DefaultLeaseTTL:input_type -> pb.Empty + 0, // 46: pb.SystemView.MaxLeaseTTL:input_type -> pb.Empty + 0, // 47: pb.SystemView.Tainted:input_type -> pb.Empty + 0, // 48: pb.SystemView.CachingDisabled:input_type -> pb.Empty + 0, // 49: pb.SystemView.ReplicationState:input_type -> pb.Empty + 36, // 50: pb.SystemView.ResponseWrapData:input_type -> pb.ResponseWrapDataArgs + 0, // 51: pb.SystemView.MlockEnabled:input_type -> pb.Empty + 0, // 52: pb.SystemView.LocalMount:input_type -> pb.Empty + 40, // 53: pb.SystemView.EntityInfo:input_type -> pb.EntityInfoArgs + 0, // 54: pb.SystemView.PluginEnv:input_type -> pb.Empty + 40, // 55: pb.SystemView.GroupsForEntity:input_type -> pb.EntityInfoArgs + 44, // 56: pb.SystemView.GeneratePasswordFromPolicy:input_type -> pb.GeneratePasswordFromPolicyRequest + 13, // 57: pb.Backend.HandleRequest:output_type -> pb.HandleRequestReply + 16, // 58: pb.Backend.SpecialPaths:output_type -> pb.SpecialPathsReply + 18, // 59: pb.Backend.HandleExistenceCheck:output_type -> pb.HandleExistenceCheckReply + 0, // 60: pb.Backend.Cleanup:output_type -> pb.Empty + 0, // 61: pb.Backend.InvalidateKey:output_type -> pb.Empty + 20, // 62: pb.Backend.Setup:output_type -> pb.SetupReply + 15, // 63: pb.Backend.Initialize:output_type -> pb.InitializeReply + 21, // 64: pb.Backend.Type:output_type -> pb.TypeReply + 25, // 65: pb.Storage.List:output_type -> pb.StorageListReply + 27, // 66: pb.Storage.Get:output_type -> pb.StorageGetReply + 29, // 67: pb.Storage.Put:output_type -> pb.StoragePutReply + 31, // 68: pb.Storage.Delete:output_type -> pb.StorageDeleteReply + 32, // 69: pb.SystemView.DefaultLeaseTTL:output_type -> pb.TTLReply + 32, // 70: pb.SystemView.MaxLeaseTTL:output_type -> pb.TTLReply + 33, // 71: pb.SystemView.Tainted:output_type -> pb.TaintedReply + 34, // 72: pb.SystemView.CachingDisabled:output_type -> pb.CachingDisabledReply + 35, // 73: pb.SystemView.ReplicationState:output_type -> pb.ReplicationStateReply + 37, // 74: pb.SystemView.ResponseWrapData:output_type -> pb.ResponseWrapDataReply + 38, // 75: pb.SystemView.MlockEnabled:output_type -> pb.MlockEnabledReply + 39, // 76: pb.SystemView.LocalMount:output_type -> pb.LocalMountReply + 41, // 77: pb.SystemView.EntityInfo:output_type -> pb.EntityInfoReply + 43, // 78: pb.SystemView.PluginEnv:output_type -> pb.PluginEnvReply + 42, // 79: pb.SystemView.GroupsForEntity:output_type -> pb.GroupsForEntityReply + 45, // 80: pb.SystemView.GeneratePasswordFromPolicy:output_type -> pb.GeneratePasswordFromPolicyReply + 57, // [57:81] is the sub-list for method output_type + 33, // [33:57] is the sub-list for method input_type + 33, // [33:33] is the sub-list for extension type_name + 33, // [33:33] is the sub-list for extension extendee + 0, // [0:33] is the sub-list for field type_name +} + +func init() { file_sdk_plugin_pb_backend_proto_init() } +func file_sdk_plugin_pb_backend_proto_init() { + if File_sdk_plugin_pb_backend_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_sdk_plugin_pb_backend_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Header); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProtoError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Paths); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Request); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Auth); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TokenEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LeaseOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Secret); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Response); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseWrapInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RequestWrapInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandleRequestArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandleRequestReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitializeArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitializeReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SpecialPathsReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandleExistenceCheckArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HandleExistenceCheckReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetupArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetupReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TypeReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InvalidateKeyArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageListArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageListReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageGetArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageGetReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StoragePutArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StoragePutReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageDeleteArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageDeleteReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TTLReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TaintedReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CachingDisabledReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReplicationStateReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseWrapDataArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseWrapDataReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MlockEnabledReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LocalMountReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EntityInfoArgs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EntityInfoReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GroupsForEntityReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PluginEnvReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GeneratePasswordFromPolicyRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GeneratePasswordFromPolicyReply); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_sdk_plugin_pb_backend_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Connection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_sdk_plugin_pb_backend_proto_rawDesc, + NumEnums: 0, + NumMessages: 52, + NumExtensions: 0, + NumServices: 3, + }, + GoTypes: file_sdk_plugin_pb_backend_proto_goTypes, + DependencyIndexes: file_sdk_plugin_pb_backend_proto_depIDxs, + MessageInfos: file_sdk_plugin_pb_backend_proto_msgTypes, + }.Build() + File_sdk_plugin_pb_backend_proto = out.File + file_sdk_plugin_pb_backend_proto_rawDesc = nil + file_sdk_plugin_pb_backend_proto_goTypes = nil + file_sdk_plugin_pb_backend_proto_depIDxs = nil } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 +const _ = grpc.SupportPackageIsVersion6 // BackendClient is the client API for Backend service. // @@ -3055,10 +4419,10 @@ type BackendClient interface { } type backendClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewBackendClient(cc *grpc.ClientConn) BackendClient { +func NewBackendClient(cc grpc.ClientConnInterface) BackendClient { return &backendClient{cc} } @@ -3177,28 +4541,28 @@ type BackendServer interface { type UnimplementedBackendServer struct { } -func (*UnimplementedBackendServer) HandleRequest(ctx context.Context, req *HandleRequestArgs) (*HandleRequestReply, error) { +func (*UnimplementedBackendServer) HandleRequest(context.Context, *HandleRequestArgs) (*HandleRequestReply, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleRequest not implemented") } -func (*UnimplementedBackendServer) SpecialPaths(ctx context.Context, req *Empty) (*SpecialPathsReply, error) { +func (*UnimplementedBackendServer) SpecialPaths(context.Context, *Empty) (*SpecialPathsReply, error) { return nil, status.Errorf(codes.Unimplemented, "method SpecialPaths not implemented") } -func (*UnimplementedBackendServer) HandleExistenceCheck(ctx context.Context, req *HandleExistenceCheckArgs) (*HandleExistenceCheckReply, error) { +func (*UnimplementedBackendServer) HandleExistenceCheck(context.Context, *HandleExistenceCheckArgs) (*HandleExistenceCheckReply, error) { return nil, status.Errorf(codes.Unimplemented, "method HandleExistenceCheck not implemented") } -func (*UnimplementedBackendServer) Cleanup(ctx context.Context, req *Empty) (*Empty, error) { +func (*UnimplementedBackendServer) Cleanup(context.Context, *Empty) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Cleanup not implemented") } -func (*UnimplementedBackendServer) InvalidateKey(ctx context.Context, req *InvalidateKeyArgs) (*Empty, error) { +func (*UnimplementedBackendServer) InvalidateKey(context.Context, *InvalidateKeyArgs) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method InvalidateKey not implemented") } -func (*UnimplementedBackendServer) Setup(ctx context.Context, req *SetupArgs) (*SetupReply, error) { +func (*UnimplementedBackendServer) Setup(context.Context, *SetupArgs) (*SetupReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Setup not implemented") } -func (*UnimplementedBackendServer) Initialize(ctx context.Context, req *InitializeArgs) (*InitializeReply, error) { +func (*UnimplementedBackendServer) Initialize(context.Context, *InitializeArgs) (*InitializeReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented") } -func (*UnimplementedBackendServer) Type(ctx context.Context, req *Empty) (*TypeReply, error) { +func (*UnimplementedBackendServer) Type(context.Context, *Empty) (*TypeReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Type not implemented") } @@ -3402,10 +4766,10 @@ type StorageClient interface { } type storageClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewStorageClient(cc *grpc.ClientConn) StorageClient { +func NewStorageClient(cc grpc.ClientConnInterface) StorageClient { return &storageClient{cc} } @@ -3457,16 +4821,16 @@ type StorageServer interface { type UnimplementedStorageServer struct { } -func (*UnimplementedStorageServer) List(ctx context.Context, req *StorageListArgs) (*StorageListReply, error) { +func (*UnimplementedStorageServer) List(context.Context, *StorageListArgs) (*StorageListReply, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } -func (*UnimplementedStorageServer) Get(ctx context.Context, req *StorageGetArgs) (*StorageGetReply, error) { +func (*UnimplementedStorageServer) Get(context.Context, *StorageGetArgs) (*StorageGetReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") } -func (*UnimplementedStorageServer) Put(ctx context.Context, req *StoragePutArgs) (*StoragePutReply, error) { +func (*UnimplementedStorageServer) Put(context.Context, *StoragePutArgs) (*StoragePutReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Put not implemented") } -func (*UnimplementedStorageServer) Delete(ctx context.Context, req *StorageDeleteArgs) (*StorageDeleteReply, error) { +func (*UnimplementedStorageServer) Delete(context.Context, *StorageDeleteArgs) (*StorageDeleteReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") } @@ -3616,10 +4980,10 @@ type SystemViewClient interface { } type systemViewClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewSystemViewClient(cc *grpc.ClientConn) SystemViewClient { +func NewSystemViewClient(cc grpc.ClientConnInterface) SystemViewClient { return &systemViewClient{cc} } @@ -3777,40 +5141,40 @@ type SystemViewServer interface { type UnimplementedSystemViewServer struct { } -func (*UnimplementedSystemViewServer) DefaultLeaseTTL(ctx context.Context, req *Empty) (*TTLReply, error) { +func (*UnimplementedSystemViewServer) DefaultLeaseTTL(context.Context, *Empty) (*TTLReply, error) { return nil, status.Errorf(codes.Unimplemented, "method DefaultLeaseTTL not implemented") } -func (*UnimplementedSystemViewServer) MaxLeaseTTL(ctx context.Context, req *Empty) (*TTLReply, error) { +func (*UnimplementedSystemViewServer) MaxLeaseTTL(context.Context, *Empty) (*TTLReply, error) { return nil, status.Errorf(codes.Unimplemented, "method MaxLeaseTTL not implemented") } -func (*UnimplementedSystemViewServer) Tainted(ctx context.Context, req *Empty) (*TaintedReply, error) { +func (*UnimplementedSystemViewServer) Tainted(context.Context, *Empty) (*TaintedReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Tainted not implemented") } -func (*UnimplementedSystemViewServer) CachingDisabled(ctx context.Context, req *Empty) (*CachingDisabledReply, error) { +func (*UnimplementedSystemViewServer) CachingDisabled(context.Context, *Empty) (*CachingDisabledReply, error) { return nil, status.Errorf(codes.Unimplemented, "method CachingDisabled not implemented") } -func (*UnimplementedSystemViewServer) ReplicationState(ctx context.Context, req *Empty) (*ReplicationStateReply, error) { +func (*UnimplementedSystemViewServer) ReplicationState(context.Context, *Empty) (*ReplicationStateReply, error) { return nil, status.Errorf(codes.Unimplemented, "method ReplicationState not implemented") } -func (*UnimplementedSystemViewServer) ResponseWrapData(ctx context.Context, req *ResponseWrapDataArgs) (*ResponseWrapDataReply, error) { +func (*UnimplementedSystemViewServer) ResponseWrapData(context.Context, *ResponseWrapDataArgs) (*ResponseWrapDataReply, error) { return nil, status.Errorf(codes.Unimplemented, "method ResponseWrapData not implemented") } -func (*UnimplementedSystemViewServer) MlockEnabled(ctx context.Context, req *Empty) (*MlockEnabledReply, error) { +func (*UnimplementedSystemViewServer) MlockEnabled(context.Context, *Empty) (*MlockEnabledReply, error) { return nil, status.Errorf(codes.Unimplemented, "method MlockEnabled not implemented") } -func (*UnimplementedSystemViewServer) LocalMount(ctx context.Context, req *Empty) (*LocalMountReply, error) { +func (*UnimplementedSystemViewServer) LocalMount(context.Context, *Empty) (*LocalMountReply, error) { return nil, status.Errorf(codes.Unimplemented, "method LocalMount not implemented") } -func (*UnimplementedSystemViewServer) EntityInfo(ctx context.Context, req *EntityInfoArgs) (*EntityInfoReply, error) { +func (*UnimplementedSystemViewServer) EntityInfo(context.Context, *EntityInfoArgs) (*EntityInfoReply, error) { return nil, status.Errorf(codes.Unimplemented, "method EntityInfo not implemented") } -func (*UnimplementedSystemViewServer) PluginEnv(ctx context.Context, req *Empty) (*PluginEnvReply, error) { +func (*UnimplementedSystemViewServer) PluginEnv(context.Context, *Empty) (*PluginEnvReply, error) { return nil, status.Errorf(codes.Unimplemented, "method PluginEnv not implemented") } -func (*UnimplementedSystemViewServer) GroupsForEntity(ctx context.Context, req *EntityInfoArgs) (*GroupsForEntityReply, error) { +func (*UnimplementedSystemViewServer) GroupsForEntity(context.Context, *EntityInfoArgs) (*GroupsForEntityReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GroupsForEntity not implemented") } -func (*UnimplementedSystemViewServer) GeneratePasswordFromPolicy(ctx context.Context, req *GeneratePasswordFromPolicyRequest) (*GeneratePasswordFromPolicyReply, error) { +func (*UnimplementedSystemViewServer) GeneratePasswordFromPolicy(context.Context, *GeneratePasswordFromPolicyRequest) (*GeneratePasswordFromPolicyReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GeneratePasswordFromPolicy not implemented") } From 430ab29f2b44a5d726cb4764228edf454bf031eb Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Fri, 15 May 2020 16:18:55 -0600 Subject: [PATCH 27/29] Fix test build --- sdk/helper/random/parser_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/helper/random/parser_test.go b/sdk/helper/random/parser_test.go index f608b0692a3f..2ce1fde521e4 100644 --- a/sdk/helper/random/parser_test.go +++ b/sdk/helper/random/parser_test.go @@ -2,7 +2,6 @@ package random import ( "encoding/json" - "fmt" "reflect" "testing" ) From c5b4ece61839b43d7aa543b356d925226c194685 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Tue, 19 May 2020 15:07:24 -0600 Subject: [PATCH 28/29] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d2ac8c9a03e..c77c40fffcaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ CHANGES: IMPROVEMENTS: +* core: Added Password Policies for user-configurable password generation [[GH-8637](https://github.com/hashicorp/vault/pull/8637)] * secrets/gcp: Support BigQuery dataset ACLs in absence of IAM endpoints [[GH-78](https://github.com/hashicorp/vault-plugin-secrets-gcp/pull/78)] * sdk/framework: Support accepting TypeFloat parameters over the API [[GH-8923](https://github.com/hashicorp/vault/pull/8923)] * ui: Update TTL picker styling on SSH secret engine [[GH-8891](https://github.com/hashicorp/vault/pull/8891)] From e7551e5b0d9569c919f46a686e84ee8a9e63fac0 Mon Sep 17 00:00:00 2001 From: Michael Golowka <72365+pcman312@users.noreply.github.com> Date: Wed, 27 May 2020 11:32:38 -0600 Subject: [PATCH 29/29] Revert changelog as merge conflicts are a pain --- CHANGELOG.md | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 436ae3d892b7..02d5ad176d13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,8 @@ CHANGES: -* token: Token creation with custom token ID via `id` will no longer allow periods (`.`) as part of the input string. - The final generated token value may contain periods, such as the `s.` prefix for service token +* token: Token creation with custom token ID via `id` will no longer allow periods (`.`) as part of the input string. + The final generated token value may contain periods, such as the `s.` prefix for service token indication. [[GH-8646](https://github.com/hashicorp/vault/pull/8646/files)] * token: Token renewals will now return token policies within the `token_policies` , identity policies within `identity_policies`, and the full policy set within `policies`. [[GH-8535](https://github.com/hashicorp/vault/pull/8535)] * cubbyhole: Reject reads and writes to an empty ("") path. [[GH-8971](https://github.com/hashicorp/vault/pull/8971)] @@ -13,7 +13,7 @@ IMPROVEMENTS: * core: Add the Go version used to build a Vault binary to the server message output. [[GH-9078](https://github.com/hashicorp/vault/pull/9078)] * cli: Support reading TLS parameters from file for the `vault operator raft join` command. [[GH-9060](https://github.com/hashicorp/vault/pull/9060)] -* plugin: Add SDK method, `Sys.ReloadPlugin`, and CLI command, `vault plugin reload`, +* plugin: Add SDK method, `Sys.ReloadPlugin`, and CLI command, `vault plugin reload`, for reloading plugins. [[GH-8777](https://github.com/hashicorp/vault/pull/8777)] * sdk/framework: Support accepting TypeFloat parameters over the API [[GH-8923](https://github.com/hashicorp/vault/pull/8923)] * secrets/gcp: Support BigQuery dataset ACLs in absence of IAM endpoints [[GH-78](https://github.com/hashicorp/vault-plugin-secrets-gcp/pull/78)] @@ -36,16 +36,16 @@ SECURITY: IMPROVEMENTS: -* storage/raft: The storage stanza now accepts `leader_ca_cert_file`, `leader_client_cert_file`, and +* storage/raft: The storage stanza now accepts `leader_ca_cert_file`, `leader_client_cert_file`, and `leader_client_key_file` parameters to read and parse TLS certificate information from paths on disk. - Existing non-path based parameters will continue to work, but their values will need to be provided as a + Existing non-path based parameters will continue to work, but their values will need to be provided as a single-line string with newlines delimited by `\n`. [[GH-8894](https://github.com/hashicorp/vault/pull/8894)] * storage/raft: The `vault status` CLI command and the `sys/leader` API now contain the committed and applied raft indexes. [[GH-9011](https://github.com/hashicorp/vault/pull/9011)] - + BUG FIXES: -* auth/aws: Fix token renewal issues caused by the metadata changes in 1.4.1 [[GH-8991](https://github.com/hashicorp/vault/pull/8991)] +* auth/aws: Fix token renewal issues caused by the metadata changes in 1.4.1 [[GH-8991](https://github.com/hashicorp/vault/pull/8991)] * auth/ldap: Fix 1.4.0 regression that could result in auth failures when LDAP auth config includes upndomain. [[GH-9041](https://github.com/hashicorp/vault/pull/9041)] * secrets/ad: Forward rotation requests from standbys to active clusters [[GH-66](https://github.com/hashicorp/vault-plugin-secrets-ad/pull/66)] * secrets/database: Prevent generation of usernames that are not allowed by the MongoDB Atlas API [[GH-9](https://github.com/hashicorp/vault-plugin-database-mongodbatlas/pull/9)] @@ -66,7 +66,7 @@ BUG FIXES: ## 1.4.1 (April 30th, 2020) -CHANGES: +CHANGES: * auth/aws: The default set of metadata fields added in 1.4.1 has been changed to `account_id` and `auth_type` [[GH-8783](https://github.com/hashicorp/vault/pull/8783)] * storage/raft: Disallow `ha_storage` to be specified if `raft` is set as the `storage` type. [[GH-8707](https://github.com/hashicorp/vault/pull/8707)] @@ -92,7 +92,7 @@ BUG FIXES: * auth/userpass: Fix upgrade value for `token_bound_cidrs` being ignored due to incorrect key provided [[GH-8826](https://github.com/hashicorp/vault/pull/8826/files)] * config/seal: Fix segfault when seal block is removed [[GH-8517](https://github.com/hashicorp/vault/pull/8517)] * core: Fix an issue where users attempting to build Vault could receive Go module checksum errors [[GH-8770](https://github.com/hashicorp/vault/pull/8770)] -* core: Fix blocked requests if a SIGHUP is issued during a long-running request has the state lock held. +* core: Fix blocked requests if a SIGHUP is issued during a long-running request has the state lock held. Also fixes deadlock that can happen if `vault debug` with the config target is ran during this time. [[GH-8755](https://github.com/hashicorp/vault/pull/8755)] * core: Always rewrite the .vault-token file as part of a `vault login` to ensure permissions and ownership are set correctly [[GH-8867](https://github.com/hashicorp/vault/pull/8867)] @@ -100,7 +100,7 @@ BUG FIXES: [[GH-8863](https://github.com/hashicorp/vault/pull/8863)] * http: Fix superflous call messages from the http package on logs caused by missing returns after `respondError` calls [[GH-8796](https://github.com/hashicorp/vault/pull/8796)] -* namespace (enterprise): Fix namespace listing to return `key_info` when a scoping namespace is also provided. +* namespace (enterprise): Fix namespace listing to return `key_info` when a scoping namespace is also provided. * seal/gcpkms: Fix panic that could occur if all seal parameters were provided via environment variables [[GH-8840](https://github.com/hashicorp/vault/pull/8840)] * storage/raft: Fix memory allocation and incorrect metadata tracking issues with snapshots [[GH-8793](https://github.com/hashicorp/vault/pull/8793)] @@ -117,9 +117,9 @@ CHANGES: FEATURES: -* **Kerberos Authentication**: Vault now supports Kerberos authentication using a SPNEGO token. +* **Kerberos Authentication**: Vault now supports Kerberos authentication using a SPNEGO token. Login can be performed using the Vault CLI, API, or agent. -* **Kubernetes Service Discovery**: A new Kubernetes service discovery feature where, if +* **Kubernetes Service Discovery**: A new Kubernetes service discovery feature where, if configured, Vault will tag Vault pods with their current health status. For more, see [#8249](https://github.com/hashicorp/vault/pull/8249). * **MongoDB Atlas Secrets**: Vault can now generate dynamic credentials for both MongoDB Atlas databases as well as the [Atlas programmatic interface](https://docs.atlas.mongodb.com/tutorial/manage-programmatic-access/). @@ -155,9 +155,9 @@ IMPROVEMENTS: * metrics/prometheus: improve performance with high volume of metrics updates [[GH-8507](https://github.com/hashicorp/vault/pull/8507)] * replication (enterprise): Fix race condition causing clusters with high throughput writes to sometimes fail to enter streaming-wal mode -* replication (enterprise): Secondary clusters can now perform an extra gRPC call to all nodes in a primary +* replication (enterprise): Secondary clusters can now perform an extra gRPC call to all nodes in a primary cluster in an attempt to resolve the active node's address -* replication (enterprise): The replication status API now outputs `last_performance_wal`, `last_dr_wal`, +* replication (enterprise): The replication status API now outputs `last_performance_wal`, `last_dr_wal`, and `connection_state` values * replication (enterprise): DR secondary clusters can now be recovered by the `replication/dr/secondary/recover` API @@ -209,7 +209,7 @@ BUG FIXES: different queries. Now it allows for either for backwards compatibility [[GH-8240](https://github.com/hashicorp/vault/pull/8240)] * secrets/pki: Support FQDNs in DNS Name [[GH-8288](https://github.com/hashicorp/vault/pull/8288)] * storage/raft: Allow seal migration to be performed on Vault clusters using raft storage [[GH-8103](https://github.com/hashicorp/vault/pull/8103)] -* telemetry: Prometheus requests on standby nodes will now return an error instead of forwarding +* telemetry: Prometheus requests on standby nodes will now return an error instead of forwarding the request to the active node [[GH-8280](https://github.com/hashicorp/vault/pull/8280)] * ui: Fix broken popup menu on the transit secrets list page [[GH-8348](https://github.com/hashicorp/vault/pull/8348)] * ui: Update headless Chrome flag to fix `yarn run test:oss` [[GH-8035](https://github.com/hashicorp/vault/pull/8035)] @@ -223,12 +223,12 @@ SECURITY: BUG FIXES: -* auth/aws: Fix token renewal issues caused by the metadata changes in 1.3.5 [[GH-8991](https://github.com/hashicorp/vault/pull/8991)] +* auth/aws: Fix token renewal issues caused by the metadata changes in 1.3.5 [[GH-8991](https://github.com/hashicorp/vault/pull/8991)] * replication: Fix mount filter bug that allowed replication filters to hide local mounts on a performance secondary ## 1.3.5 (April 28th, 2020) -CHANGES: +CHANGES: * auth/aws: The default set of metadata fields added in 1.3.2 has been changed to `account_id` and `auth_type` [[GH-8783](https://github.com/hashicorp/vault/pull/8783)] @@ -3359,4 +3359,3 @@ DEPRECATIONS/CHANGES: Vault startup time since leases associated with these certificates will not have to be loaded; however note that it also means that revocation of a token used to issue -