github.com/hashicorp/vault/sdk@v0.13.0/database/dbplugin/v5/proto/database.proto (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 syntax = "proto3"; 5 package dbplugin.v5; 6 7 import "google/protobuf/struct.proto"; 8 import "google/protobuf/timestamp.proto"; 9 10 option go_package = "github.com/hashicorp/vault/sdk/database/dbplugin/v5/proto"; 11 12 ///////////////// 13 // Initialize() 14 ///////////////// 15 message InitializeRequest { 16 google.protobuf.Struct config_data = 1; 17 bool verify_connection = 2; 18 } 19 20 message InitializeResponse { 21 google.protobuf.Struct config_data = 1; 22 } 23 ///////////////// 24 // NewUser() 25 ///////////////// 26 27 message NewUserRequest { 28 UsernameConfig username_config = 1; 29 string password = 2; 30 google.protobuf.Timestamp expiration = 3; 31 Statements statements = 4; 32 Statements rollback_statements = 5; 33 int32 credential_type = 6; 34 bytes public_key = 7; 35 string subject = 8; 36 } 37 38 message UsernameConfig { 39 string display_name = 1; 40 string role_name = 2; 41 } 42 43 message NewUserResponse { 44 string username = 1; 45 } 46 47 ///////////////// 48 // UpdateUser() 49 ///////////////// 50 message UpdateUserRequest { 51 string username = 1; 52 ChangePassword password = 2; 53 ChangeExpiration expiration = 3; 54 ChangePublicKey public_key = 4; 55 int32 credential_type = 5; 56 } 57 58 message ChangePassword { 59 string new_password = 1; 60 Statements statements = 2; 61 } 62 63 message ChangePublicKey { 64 bytes new_public_key = 1; 65 Statements statements = 2; 66 } 67 68 message ChangeExpiration { 69 google.protobuf.Timestamp new_expiration = 1; 70 Statements statements = 2; 71 } 72 73 message UpdateUserResponse {} 74 75 ///////////////// 76 // DeleteUser() 77 ///////////////// 78 message DeleteUserRequest { 79 string username = 1; 80 Statements statements = 2; 81 } 82 83 message DeleteUserResponse {} 84 85 ///////////////// 86 // Type() 87 ///////////////// 88 message TypeResponse { 89 string Type = 1; 90 } 91 92 ///////////////// 93 // General purpose 94 ///////////////// 95 message Statements { 96 repeated string Commands = 1; 97 } 98 99 message Empty {} 100 101 service Database { 102 rpc Initialize(InitializeRequest) returns (InitializeResponse); 103 rpc NewUser(NewUserRequest) returns (NewUserResponse); 104 rpc UpdateUser(UpdateUserRequest) returns (UpdateUserResponse); 105 rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse); 106 rpc Type(Empty) returns (TypeResponse); 107 rpc Close(Empty) returns (Empty); 108 }