e4832fdbcf
* redoing connection handling * a little more cleanup * empty implementation of rotation * updating rotate signature * signature update * updating interfaces again :( * changing back to interface * adding templated url support and rotation for postgres * adding correct username * return updates * updating statements to be a list * adding error sanitizing middleware * fixing log sanitizier * adding postgres rotate test * removing conf from rotate * adding rotate command * adding mysql rotate * finishing up the endpoint in the db backend for rotate * no more structs, just store raw config * fixing tests * adding db instance lock * adding support for statement list in cassandra * wip redoing interface to support BC * adding falllback for Initialize implementation * adding backwards compat for statements * fix tests * fix more tests * fixing up tests, switching to new fields in statements * fixing more tests * adding mssql and mysql * wrapping all the things in middleware, implementing templating for mongodb * wrapping all db servers with error santizer * fixing test * store the name with the db instance * adding rotate to cassandra * adding compatibility translation to both server and plugin * reordering a few things * store the name with the db instance * reordering * adding a few more tests * switch secret values from slice to map * addressing some feedback * reinstate execute plugin after resetting connection * set database connection to closed * switching secret values func to map[string]interface for potential future uses * addressing feedback
91 lines
1.9 KiB
Protocol Buffer
91 lines
1.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
package dbplugin;
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
message InitializeRequest {
|
|
option deprecated = true;
|
|
bytes config = 1;
|
|
bool verify_connection = 2;
|
|
}
|
|
|
|
message InitRequest {
|
|
bytes config = 1;
|
|
bool verify_connection = 2;
|
|
}
|
|
|
|
message CreateUserRequest {
|
|
Statements statements = 1;
|
|
UsernameConfig username_config = 2;
|
|
google.protobuf.Timestamp expiration = 3;
|
|
}
|
|
|
|
message RenewUserRequest {
|
|
Statements statements = 1;
|
|
string username = 2;
|
|
google.protobuf.Timestamp expiration = 3;
|
|
}
|
|
|
|
message RevokeUserRequest {
|
|
Statements statements = 1;
|
|
string username = 2;
|
|
}
|
|
|
|
message RotateRootCredentialsRequest {
|
|
repeated string statements = 1;
|
|
}
|
|
|
|
message Statements {
|
|
// DEPRECATED, will be removed in 0.12
|
|
string creation_statements = 1;
|
|
// DEPRECATED, will be removed in 0.12
|
|
string revocation_statements = 2;
|
|
// DEPRECATED, will be removed in 0.12
|
|
string rollback_statements = 3;
|
|
// DEPRECATED, will be removed in 0.12
|
|
string renew_statements = 4;
|
|
|
|
repeated string creation = 5;
|
|
repeated string revocation = 6;
|
|
repeated string rollback = 7;
|
|
repeated string renewal = 8;
|
|
}
|
|
|
|
message UsernameConfig {
|
|
string DisplayName = 1;
|
|
string RoleName = 2;
|
|
}
|
|
|
|
message InitResponse {
|
|
bytes config = 1;
|
|
}
|
|
|
|
message CreateUserResponse {
|
|
string username = 1;
|
|
string password = 2;
|
|
}
|
|
|
|
message TypeResponse {
|
|
string type = 1;
|
|
}
|
|
|
|
message RotateRootCredentialsResponse {
|
|
bytes config = 1;
|
|
}
|
|
|
|
message Empty {}
|
|
|
|
service Database {
|
|
rpc Type(Empty) returns (TypeResponse);
|
|
rpc CreateUser(CreateUserRequest) returns (CreateUserResponse);
|
|
rpc RenewUser(RenewUserRequest) returns (Empty);
|
|
rpc RevokeUser(RevokeUserRequest) returns (Empty);
|
|
rpc RotateRootCredentials(RotateRootCredentialsRequest) returns (RotateRootCredentialsResponse);
|
|
rpc Init(InitRequest) returns (InitResponse);
|
|
rpc Close(Empty) returns (Empty);
|
|
|
|
rpc Initialize(InitializeRequest) returns (Empty) {
|
|
option deprecated = true;
|
|
};
|
|
}
|