1syntax = "proto3"; 2 3option go_package = "github.com/hashicorp/vault/sdk/database/dbplugin"; 4 5package dbplugin; 6 7import "google/protobuf/timestamp.proto"; 8 9message InitializeRequest { 10 option deprecated = true; 11 bytes config = 1; 12 bool verify_connection = 2; 13} 14 15message InitRequest { 16 bytes config = 1; 17 bool verify_connection = 2; 18} 19 20message CreateUserRequest { 21 Statements statements = 1; 22 UsernameConfig username_config = 2; 23 google.protobuf.Timestamp expiration = 3; 24} 25 26message RenewUserRequest { 27 Statements statements = 1; 28 string username = 2; 29 google.protobuf.Timestamp expiration = 3; 30} 31 32message RevokeUserRequest { 33 Statements statements = 1; 34 string username = 2; 35} 36 37message RotateRootCredentialsRequest { 38 repeated string statements = 1; 39} 40 41message Statements { 42 // DEPRECATED, will be removed in 0.12 43 string creation_statements = 1 [deprecated=true]; 44 // DEPRECATED, will be removed in 0.12 45 string revocation_statements = 2 [deprecated=true]; 46 // DEPRECATED, will be removed in 0.12 47 string rollback_statements = 3 [deprecated=true]; 48 // DEPRECATED, will be removed in 0.12 49 string renew_statements = 4 [deprecated=true]; 50 51 repeated string creation = 5; 52 repeated string revocation = 6; 53 repeated string rollback = 7; 54 repeated string renewal = 8; 55 repeated string rotation = 9; 56} 57 58message UsernameConfig { 59 string DisplayName = 1; 60 string RoleName = 2; 61} 62 63message InitResponse { 64 bytes config = 1; 65} 66 67message CreateUserResponse { 68 string username = 1; 69 string password = 2; 70} 71 72message TypeResponse { 73 string type = 1; 74} 75 76message RotateRootCredentialsResponse { 77 bytes config = 1; 78} 79 80message Empty {} 81 82message GenerateCredentialsResponse { 83 string password = 1; 84} 85 86message StaticUserConfig{ 87 string username = 1; 88 string password = 2; 89 bool create = 3; 90} 91 92message SetCredentialsRequest { 93 Statements statements = 1; 94 StaticUserConfig static_user_config = 2; 95} 96 97message SetCredentialsResponse { 98 string username = 1; 99 string password = 2; 100} 101 102service Database { 103 rpc Type(Empty) returns (TypeResponse); 104 rpc CreateUser(CreateUserRequest) returns (CreateUserResponse); 105 rpc RenewUser(RenewUserRequest) returns (Empty); 106 rpc RevokeUser(RevokeUserRequest) returns (Empty); 107 rpc RotateRootCredentials(RotateRootCredentialsRequest) returns (RotateRootCredentialsResponse); 108 rpc Init(InitRequest) returns (InitResponse); 109 rpc Close(Empty) returns (Empty); 110 rpc SetCredentials(SetCredentialsRequest) returns (SetCredentialsResponse); 111 rpc GenerateCredentials(Empty) returns (GenerateCredentialsResponse); 112 113 rpc Initialize(InitializeRequest) returns (Empty) { 114 option deprecated = true; 115 }; 116} 117