github.com/hashicorp/vault/sdk@v0.13.0/database/dbplugin/database.proto (about)

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