diff --git a/cmd/certmanagerctl/issuercli.go b/cmd/certmanagerctl/issuercli.go deleted file mode 100644 index 35a5ab1..0000000 --- a/cmd/certmanagerctl/issuercli.go +++ /dev/null @@ -1,132 +0,0 @@ -package main - -import ( - "context" - "encoding/base64" - "os" - - "certmanager/pkg/client" - cmapi "certmanager/pkg/cmctl" -) - -func (util *Util) CreateIssuerPair(ctx context.Context) (*cmapi.CreateIssuerPairResult, error) { - var err error - res := &cmapi.CreateIssuerPairResult{} - cli, err := client.NewClient(&util.access) - if err != nil { - return res, err - } - params := &cmapi.CreateIssuerPairParams{ - IssuerCommonName: util.issuerCommonName, - SignerID: util.signerID, - } - res, err = cli.CreateIssuerPair(ctx, params) - if err != nil { - return res, err - } - certPEM, err := base64.StdEncoding.DecodeString(res.Certificate) - if err != nil { - return res, err - } - res.Certificate = string(certPEM) - - return res, err -} - -func (util *Util) ImportIssuerPair(ctx context.Context) (*cmapi.ImportIssuerPairResult, error) { - var err error - res := &cmapi.ImportIssuerPairResult{} - cli, err := client.NewClient(&util.access) - if err != nil { - return res, err - } - certBytes, err := os.ReadFile(util.certFilename) - if err != nil { - return res, err - } - cert := base64.StdEncoding.EncodeToString(certBytes) - keyBytes, err := os.ReadFile(util.certFilename) - if err != nil { - return res, err - } - key := base64.StdEncoding.EncodeToString(keyBytes) - - params := &cmapi.ImportIssuerPairParams{ - Certificate: cert, - Key: key, - } - res, err = cli.ImportIssuerPair(ctx, params) - if err != nil { - return res, err - } - return res, err -} - -func (util *Util) RevokeIssuerPair(ctx context.Context) (*cmapi.RevokeIssuerPairResult, error) { - var err error - res := &cmapi.RevokeIssuerPairResult{} - cli, err := client.NewClient(&util.access) - if err != nil { - return res, err - } - params := &cmapi.RevokeIssuerPairParams{ - IssuerID: util.issuerID, - IssuerName: util.issuerName, - } - res, err = cli.RevokeIssuerPair(ctx, params) - if err != nil { - return res, err - } - return res, err -} - -func (util *Util) UnrevokeIssuerPair(ctx context.Context) (*cmapi.UnrevokeIssuerPairResult, error) { - var err error - res := &cmapi.UnrevokeIssuerPairResult{} - cli, err := client.NewClient(&util.access) - if err != nil { - return res, err - } - params := &cmapi.UnrevokeIssuerPairParams{ - IssuerID: util.issuerID, - IssuerName: util.issuerName, - } - res, err = cli.UnrevokeIssuerPair(ctx, params) - if err != nil { - return res, err - } - return res, err -} - -func (util *Util) ListIssuerPairs(ctx context.Context) (*cmapi.ListIssuerPairsResult, error) { - var err error - res := &cmapi.ListIssuerPairsResult{} - cli, err := client.NewClient(&util.access) - if err != nil { - return res, err - } - params := &cmapi.ListIssuerPairsParams{} - res, err = cli.ListIssuerPairs(ctx, params) - if err != nil { - return res, err - } - return res, err -} - -func (util *Util) GetIssuerCertificate(ctx context.Context) (*cmapi.GetIssuerCertificateResult, error) { - var err error - res := &cmapi.GetIssuerCertificateResult{} - cli, err := client.NewClient(&util.access) - if err != nil { - return res, err - } - params := &cmapi.GetIssuerCertificateParams{ - IssuerID: util.issuerID, - IssuerName: util.issuerName, - } - res, err = cli.GetIssuerCertificate(ctx, params) - if err != nil { - return res, err - } - return res, err -} diff --git a/cmd/certmanagerctl/main.go b/cmd/certmanagerctl/main.go index a3ec19b..b8f59b9 100644 --- a/cmd/certmanagerctl/main.go +++ b/cmd/certmanagerctl/main.go @@ -39,6 +39,11 @@ const ( unrevokeServicePairCmd = "unrevokeServicePair" listServicePairsCmd = "listServicePairs" getServicePairCmd = "getServicePair" + + createAccountCmd = "createAccount" + updateAccountCmd = "updateAccount" + deleteAccountCmd = "revokeAccount" + listAccountsCmd = "listAccounts" ) func main() { @@ -70,6 +75,13 @@ type Util struct { serviceCommonName string serviceID int64 serviceName string + + accountID int64 + username string + password string + disable bool + newUsername string + newPassword string } func NewUtil() *Util { @@ -114,17 +126,23 @@ func (util *Util) GetOpt() error { fmt.Printf("Usage: %s [option] command [command option]\n", exeName) fmt.Printf("\n") fmt.Printf("Command list: help, %s\n", getStatusCmd) - fmt.Printf("Command list: %s, %s, %s, %s, %s, %s, %s, %s, %s, %s\n", + fmt.Printf("Command list: %s, %s, %s, %s, %s, %s\n", createIssuerPairCmd, importIssuerPairCmd, revokeIssuerPairCmd, unrevokeIssuerPairCmd, listIssuerPairsCmd, - getIssuerCertificateCmd, + getIssuerCertificateCmd) + fmt.Printf("Command list: %s, %s, %s, %s\n", createServicePairCmd, revokeServicePairCmd, listServicePairsCmd, getServicePairCmd) + fmt.Printf("Command list: %s, %s, %s, %s\n", + createAccountCmd, + deleteAccountCmd, + listAccountsCmd, + updateAccountCmd) fmt.Printf("\n") fmt.Printf("Global options:\n") flag.PrintDefaults() @@ -342,6 +360,76 @@ func (util *Util) GetOpt() error { } flagSet.Parse(subArgs) util.subCmd = subCmd + + case createAccountCmd: + flagSet := flag.NewFlagSet(createAccountCmd, flag.ExitOnError) + + flagSet.StringVar(&util.username, "username", util.username, "user name") + flagSet.StringVar(&util.password, "password", util.password, "user password") + + flagSet.Usage = func() { + fmt.Printf("\n") + fmt.Printf("Usage: %s [global options] %s [command options]\n", exeName, subCmd) + fmt.Printf("\n") + fmt.Printf("The command options: none\n") + flagSet.PrintDefaults() + fmt.Printf("\n") + } + flagSet.Parse(subArgs) + util.subCmd = subCmd + + case deleteAccountCmd: + flagSet := flag.NewFlagSet(deleteAccountCmd, flag.ExitOnError) + + flagSet.StringVar(&util.username, "username", util.username, "user name") + flagSet.Int64Var(&util.accountID, "accountId", util.accountID, "account ID") + + flagSet.Usage = func() { + fmt.Printf("\n") + fmt.Printf("Usage: %s [global options] %s [command options]\n", exeName, subCmd) + fmt.Printf("\n") + fmt.Printf("The command options: none\n") + flagSet.PrintDefaults() + fmt.Printf("\n") + } + flagSet.Parse(subArgs) + util.subCmd = subCmd + + case listAccountsCmd: + flagSet := flag.NewFlagSet(listAccountsCmd, flag.ExitOnError) + + flagSet.Usage = func() { + fmt.Printf("\n") + fmt.Printf("Usage: %s [global options] %s [command options]\n", exeName, subCmd) + fmt.Printf("\n") + fmt.Printf("The command options: none\n") + flagSet.PrintDefaults() + fmt.Printf("\n") + } + flagSet.Parse(subArgs) + util.subCmd = subCmd + + case updateAccountCmd: + flagSet := flag.NewFlagSet(updateAccountCmd, flag.ExitOnError) + + flagSet.StringVar(&util.username, "username", util.username, "user name") + flagSet.Int64Var(&util.accountID, "accountId", util.accountID, "account ID") + + flagSet.StringVar(&util.newUsername, "username", util.newUsername, "new user name") + flagSet.StringVar(&util.newPassword, "password", util.newPassword, "new user password") + flagSet.BoolVar(&util.disable, "disable", util.disable, "disable account") + + flagSet.Usage = func() { + fmt.Printf("\n") + fmt.Printf("Usage: %s [global options] %s [command options]\n", exeName, subCmd) + fmt.Printf("\n") + fmt.Printf("The command options: none\n") + flagSet.PrintDefaults() + fmt.Printf("\n") + } + flagSet.Parse(subArgs) + util.subCmd = subCmd + default: help() return errors.New("Unknown command") @@ -392,6 +480,16 @@ func (util *Util) Exec() error { res, err = util.ListServicePairs(ctx) case getServicePairCmd: res, err = util.GetServicePair(ctx) + + case createAccountCmd: + res, err = util.CreateAccount(ctx) + case updateAccountCmd: + res, err = util.UpdateAccount(ctx) + case listAccountsCmd: + res, err = util.ListAccounts(ctx) + case deleteAccountCmd: + res, err = util.DeleteAccount(ctx) + default: err = errors.New("Unknown cli command") } diff --git a/cmd/certmanagerctl/servicecli.go b/cmd/certmanagerctl/servicecli.go deleted file mode 100644 index 4242019..0000000 --- a/cmd/certmanagerctl/servicecli.go +++ /dev/null @@ -1,133 +0,0 @@ -package main - -import ( - "context" - "encoding/base64" - "strings" - - "certmanager/pkg/client" - cmapi "certmanager/pkg/cmctl" -) - -func (util *Util) CreateServicePair(ctx context.Context) (*cmapi.CreateServicePairResult, error) { - var err error - res := &cmapi.CreateServicePairResult{} - cli, err := client.NewClient(&util.access) - if err != nil { - return res, err - } - inetAddresses := strings.Split(util.ipAdressesList, ",") - hostnames := strings.Split(util.hostnameList, ",") - - params := &cmapi.CreateServicePairParams{ - IssuerName: util.issuerName, - IssuerID: util.issuerID, - ServiceCommonName: util.serviceCommonName, - InetAddresses: inetAddresses, - Hostnames: hostnames, - } - res, err = cli.CreateServicePair(ctx, params) - if err != nil { - return res, err - } - certPEM, err := base64.StdEncoding.DecodeString(res.Certificate) - if err != nil { - return res, err - } - res.Certificate = string(certPEM) - keyPEM, err := base64.StdEncoding.DecodeString(res.Key) - if err != nil { - return res, err - } - res.Key = string(keyPEM) - caPEM, err := base64.StdEncoding.DecodeString(res.IssuerCertificate) - if err != nil { - return res, err - } - res.IssuerCertificate = string(caPEM) - return res, err -} - -func (util *Util) RevokeServicePair(ctx context.Context) (*cmapi.RevokeServicePairResult, error) { - var err error - res := &cmapi.RevokeServicePairResult{} - cli, err := client.NewClient(&util.access) - if err != nil { - return res, err - } - params := &cmapi.RevokeServicePairParams{ - ServiceName: util.serviceName, - ServiceID: util.serviceID, - } - res, err = cli.RevokeServicePair(ctx, params) - if err != nil { - return res, err - } - return res, err -} - -func (util *Util) UnrevokeServicePair(ctx context.Context) (*cmapi.UnrevokeServicePairResult, error) { - var err error - res := &cmapi.UnrevokeServicePairResult{} - cli, err := client.NewClient(&util.access) - if err != nil { - return res, err - } - params := &cmapi.UnrevokeServicePairParams{ - ServiceName: util.serviceName, - ServiceID: util.serviceID, - } - res, err = cli.UnrevokeServicePair(ctx, params) - if err != nil { - return res, err - } - return res, err -} - -func (util *Util) ListServicePairs(ctx context.Context) (*cmapi.ListServicePairsResult, error) { - var err error - res := &cmapi.ListServicePairsResult{} - cli, err := client.NewClient(&util.access) - if err != nil { - return res, err - } - params := &cmapi.ListServicePairsParams{} - res, err = cli.ListServicePairs(ctx, params) - if err != nil { - return res, err - } - return res, err -} - -func (util *Util) GetServicePair(ctx context.Context) (*cmapi.GetServicePairResult, error) { - var err error - res := &cmapi.GetServicePairResult{} - cli, err := client.NewClient(&util.access) - if err != nil { - return res, err - } - params := &cmapi.GetServicePairParams{ - ServiceID: util.serviceID, - ServiceName: util.serviceName, - } - res, err = cli.GetServicePair(ctx, params) - if err != nil { - return res, err - } - certPEM, err := base64.StdEncoding.DecodeString(res.Certificate) - if err != nil { - return res, err - } - res.Certificate = string(certPEM) - keyPEM, err := base64.StdEncoding.DecodeString(res.Key) - if err != nil { - return res, err - } - res.Key = string(keyPEM) - caPEM, err := base64.StdEncoding.DecodeString(res.IssuerCertificate) - if err != nil { - return res, err - } - res.IssuerCertificate = string(caPEM) - return res, err -} diff --git a/internal/config/path.go b/internal/config/path.go index df56554..a96ee01 100644 --- a/internal/config/path.go +++ b/internal/config/path.go @@ -1,8 +1,8 @@ package config const ( - confdirPath = "/home/ziggi/Projects/certman/etc/certmanager" - rundirPath = "/home/ziggi/Projects/certman/tmp/run" - logdirPath = "/home/ziggi/Projects/certman/tmp/log" - datadirPath = "/home/ziggi/Projects/certman/tmp/data" + confdirPath = "/usr/local/etc/certmanager" + rundirPath = "/var/run/certmanager" + logdirPath = "/var/log/certmanager" + datadirPath = "/var/data/certmanager" ) diff --git a/internal/database/account.go b/internal/database/account.go new file mode 100644 index 0000000..5fa2c50 --- /dev/null +++ b/internal/database/account.go @@ -0,0 +1,100 @@ +package database + +import ( + "context" + + "certmanager/internal/descriptor" + + _ "github.com/mattn/go-sqlite3" +) + +func (db *Database) InsertAccount(ctx context.Context, account *descriptor.Account) error { + var err error + request := `INSERT INTO account(id, username, password, disabled, created_at, updated_at) + VALUES ($1, $2, $3, $4, $5, $6)` + _, err = db.db.Exec(request, account.ID, account.Username, account.Password, + account.Disabled, account.CreatedAt, account.UpdatedAt) + if err != nil { + return err + } + return err +} + +func (db *Database) UpdateAccountByID(ctx context.Context, accountID int64, account *descriptor.Account) error { + var err error + request := `UPDATE account SET username = $1, password = $2, disabled = $3, updated_at = $4 WHERE id = $6` + _, err = db.db.Exec(request, account.Username, account.Password, account.Disabled, account.UpdatedAt, accountID) + if err != nil { + return err + } + return err +} + +func (db *Database) ListAccounts(ctx context.Context) ([]descriptor.Account, error) { + var err error + request := `SELECT id, username, disabled, created_at, updated_at FROM account` + res := make([]descriptor.Account, 0) + err = db.db.Select(&res, request) + if err != nil { + return res, err + } + return res, err +} + +func (db *Database) GetAccountByID(ctx context.Context, accountID int64) (bool, *descriptor.Account, error) { + var err error + var res *descriptor.Account + var exists bool + request := `SELECT id, username, password, disabled, created_at, updated_at + FROM account WHERE id = $1 LiMIT 1` + dbRes := make([]descriptor.Account, 0) + err = db.db.Select(&dbRes, request, accountID) + if err != nil { + return exists, res, err + } + if len(dbRes) == 0 { + return exists, res, err + } + exists = true + res = &dbRes[0] + return exists, res, err +} + +func (db *Database) GetAccountByUsername(ctx context.Context, username string) (bool, *descriptor.Account, error) { + var err error + var res *descriptor.Account + var exists bool + request := `SELECT id, username, password, disabled, created_at, updated_at + FROM account WHERE username = $1 LIMIT 1` + dbRes := make([]descriptor.Account, 0) + err = db.db.Select(&dbRes, request, username) + if err != nil { + return exists, res, err + } + if len(dbRes) == 0 { + return false, res, err + } + exists = true + res = &dbRes[0] + return exists, res, err +} + +func (db *Database) DeleteAccountByID(ctx context.Context, accountID int64) error { + var err error + request := `DELETE FROM account WHERE id = $1` + _, err = db.db.Exec(request, accountID) + if err != nil { + return err + } + return err +} + +func (db *Database) DeleteAccountByUsername(ctx context.Context, username string) error { + var err error + request := `DELETE FROM account WHERE username = $1` + _, err = db.db.Exec(request, username) + if err != nil { + return err + } + return err +} diff --git a/internal/database/database.go b/internal/database/database.go index a904cc9..8b93a75 100644 --- a/internal/database/database.go +++ b/internal/database/database.go @@ -36,6 +36,24 @@ const schema = ` ); CREATE INDEX IF NOT EXISTS service_index ON issuer(id, name); + + DROP TABLE IF EXISTS account; + CREATE TABLE IF NOT EXISTS account ( + id INT NOT NULL, + username TEXT NOT NULL, + password TEXT NOT NULL, + created_at TEXT NOT NULL, + updated_at TEXT NOT NULL, + disabled BOOL + ); + + DROP TABLE IF EXISTS grant; + CREATE TABLE IF NOT EXISTS grant ( + id INT NOT NULL, + account_id INT NOT NULL, + operation TEXT NOT NULL, + subject_id INT NOT NULL + ); ` type Database struct { diff --git a/internal/database/grant.go b/internal/database/grant.go new file mode 100644 index 0000000..181f3f1 --- /dev/null +++ b/internal/database/grant.go @@ -0,0 +1,79 @@ +package database + +import ( + "context" + + "certmanager/internal/descriptor" + + _ "github.com/mattn/go-sqlite3" +) + +//type Grant struct { +//ID int64 `json:"id" yaml:"id" db:"id"` +//AccountID int64 `json:"accountID" yaml:"accountID" db:"account_id"` +//Operation string `json:"operation" yaml:"operation" db:"operation"` +//SubjectID int64 `json:"subjectID" yaml:"subjectID" db:"subjectID"` +//} + +func (db *Database) InsertGrant(ctx context.Context, grant *descriptor.Grant) error { + var err error + request := `INSERT INTO grant(id, account_id, operation, subject_id) + VALUES ($1, $2, $3, $4)` + _, err = db.db.Exec(request, grant.ID, grant.AccountID, grant.Operation, + grant.SubjectID) + if err != nil { + return err + } + return err +} + +func (db *Database) ListGrantsByAccountID(ctx context.Context, accountID int64) ([]descriptor.Grant, error) { + var err error + request := `SELECT * FROM grant WHERE ` + res := make([]descriptor.Grant, 0) + err = db.db.Select(&res, request, accountID) + if err != nil { + return res, err + } + return res, err +} + +func (db *Database) GetGrant(ctx context.Context, accountID, subjectID int64) (bool, []*descriptor.Grant, error) { + var err error + var res []*descriptor.Grant + var exists bool + request := `SELECT id, operation, grant_id, subject_id FROM grant + WHERE account_id = $1 + AND subject_id = $1` + dbRes := make([]*descriptor.Grant, 0) + err = db.db.Select(&dbRes, request, accountID, subjectID) + if err != nil { + return exists, res, err + } + if len(dbRes) == 0 { + return false, res, err + } + exists = true + res = dbRes + return exists, res, err +} + +func (db *Database) DeleteGrantByAccountID(ctx context.Context, grantID int64) error { + var err error + request := `DELETE FROM grant WHERE grant_id = $1` + _, err = db.db.Exec(request, grantID) + if err != nil { + return err + } + return err +} + +func (db *Database) DeleteGrantsBySubjectID(ctx context.Context, subjectID int64) error { + var err error + request := `DELETE FROM grant WHERE subject_id = $1` + _, err = db.db.Exec(request, subjectID) + if err != nil { + return err + } + return err +} diff --git a/internal/descriptor/descriptor.go b/internal/descriptor/descriptor.go index da2356d..aba246c 100644 --- a/internal/descriptor/descriptor.go +++ b/internal/descriptor/descriptor.go @@ -1,5 +1,15 @@ package descriptor +const ( + OperationAddGrant = "addGrant" + OperationDeleteGrant = "deleteGrant" + OperationCreateIssuerPair = "createIssuerPair" + OperationRevokeIssuerPair = "revokeIssuerPair" + OperationCreateServicePair = "createSericePair" + OperationRevokeServicePair = "revokeServicePair" + OperationGetServicePair = "getServicePair" +) + type Issuer struct { ID int64 `json:"id" yaml:"id" db:"id"` Name string `json:"name" yaml:"name" db:"name"` @@ -19,3 +29,19 @@ type Service struct { Key string `json:"key" yaml:"key" db:"key"` Revoked bool `json:"revoked" yaml:"revoked" db:"revoked"` } + +type Account struct { + ID int64 `json:"id" yaml:"id" db:"id"` + Username string `json:"username" yaml:"username" db:"username"` + Password string `json:"password" yaml:"password" db:"password"` + Disabled bool `json:"disabled" yaml:"disabled" db:"disabled"` + CreatedAt string `json:"createdAt" yaml:"createdAt" db:"created_at"` + UpdatedAt string `json:"updatedAt" yaml:"updatedAt" db:"updated_at"` +} + +type Grant struct { + ID int64 `json:"id" yaml:"id" db:"id"` + AccountID int64 `json:"accountID" yaml:"accountID" db:"account_id"` + Operation string `json:"operation" yaml:"operation" db:"operation"` + SubjectID int64 `json:"subjectID" yaml:"subjectID" db:"subject_id"` +} diff --git a/internal/grpc/handler/account.go b/internal/grpc/handler/account.go new file mode 100644 index 0000000..236a036 --- /dev/null +++ b/internal/grpc/handler/account.go @@ -0,0 +1,82 @@ +package handler + +import ( + "context" + + "certmanager/pkg/cmctl" + + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +func (hand *Handler) Authentificate(ctx context.Context) (int64, error) { + var err error + var userID int64 + + meta, _ := metadata.FromIncomingContext(ctx) + hand.log.Debugf("Reqest username: %s", meta["username"]) + hand.log.Debugf("Reqest password: %s", meta["password"]) + usernameArr := meta["username"] + passwordArr := meta["password"] + if len(usernameArr) == 0 || len(passwordArr) == 0 { + err := status.Errorf(codes.PermissionDenied, "Empty auth data") + return userID, err + } + username := meta["username"][0] + password := meta["password"][0] + validated, userID, err := hand.lg.ValidateAcount(ctx, username, password) + if !validated { + err := status.Errorf(codes.PermissionDenied, "Wrong auth data") + return userID, err + } + return userID, err +} + +func (hand *Handler) CreateAccount(ctx context.Context, params *cmctl.CreateAccountParams) (*cmctl.CreateAccountResult, error) { + var err error + hand.log.Debugf("Handle CreateAccount call") + res := &cmctl.CreateAccountResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.CreateAccount(ctx, userID, params) + return res, err +} + +func (hand *Handler) DeleteAccount(ctx context.Context, params *cmctl.DeleteAccountParams) (*cmctl.DeleteAccountResult, error) { + var err error + hand.log.Debugf("Handle DeleteAccount call") + res := &cmctl.DeleteAccountResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.DeleteAccount(ctx, userID, params) + return res, err +} + +func (hand *Handler) ListAccounts(ctx context.Context, params *cmctl.ListAccountsParams) (*cmctl.ListAccountsResult, error) { + var err error + hand.log.Debugf("Handle ListAccounts call") + res := &cmctl.ListAccountsResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.ListAccounts(ctx, userID, params) + return res, err +} + +func (hand *Handler) UpdateAccount(ctx context.Context, params *cmctl.UpdateAccountParams) (*cmctl.UpdateAccountResult, error) { + var err error + hand.log.Debugf("Handle UpdateAccount call") + res := &cmctl.UpdateAccountResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.UpdateAccount(ctx, userID, params) + return res, err +} diff --git a/internal/grpc/handler/certman.go b/internal/grpc/handler/certman.go deleted file mode 100644 index 37e8fb9..0000000 --- a/internal/grpc/handler/certman.go +++ /dev/null @@ -1,84 +0,0 @@ -package handler - -import ( - "context" - - "certmanager/pkg/cmctl" -) - -func (hand *Handler) CreateIssuerPair(ctx context.Context, params *cmctl.CreateIssuerPairParams) (*cmctl.CreateIssuerPairResult, error) { - var err error - hand.log.Debugf("Handle CreateIssuerPair call") - res, err := hand.lg.CreateIssuerPair(ctx, params) - return res, err -} - -func (hand *Handler) ImportIssuerPair(ctx context.Context, params *cmctl.ImportIssuerPairParams) (*cmctl.ImportIssuerPairResult, error) { - var err error - hand.log.Debugf("Handle ImportIssuerPair call") - res, err := hand.lg.ImportIssuerPair(ctx, params) - return res, err -} - -func (hand *Handler) RevokeIssuerPair(ctx context.Context, params *cmctl.RevokeIssuerPairParams) (*cmctl.RevokeIssuerPairResult, error) { - var err error - hand.log.Debugf("Handle RevokeIssuerPair call") - res, err := hand.lg.RevokeIssuerPair(ctx, params) - return res, err -} - -func (hand *Handler) UnrevokeIssuerPair(ctx context.Context, params *cmctl.UnrevokeIssuerPairParams) (*cmctl.UnrevokeIssuerPairResult, error) { - var err error - hand.log.Debugf("Handle UnrevokeIssuerPair call") - res, err := hand.lg.UnrevokeIssuerPair(ctx, params) - return res, err -} - -func (hand *Handler) ListIssuerPairs(ctx context.Context, params *cmctl.ListIssuerPairsParams) (*cmctl.ListIssuerPairsResult, error) { - var err error - hand.log.Debugf("Handle ListIssuerPairs call") - res, err := hand.lg.ListIssuerPairs(ctx, params) - return res, err -} - -func (hand *Handler) GetIssuerCertificate(ctx context.Context, params *cmctl.GetIssuerCertificateParams) (*cmctl.GetIssuerCertificateResult, error) { - var err error - hand.log.Debugf("Handle GetIssuerCertificate call") - res, err := hand.lg.GetIssuerCertificate(ctx, params) - return res, err -} - -func (hand *Handler) CreateServicePair(ctx context.Context, params *cmctl.CreateServicePairParams) (*cmctl.CreateServicePairResult, error) { - var err error - hand.log.Debugf("Handle CreateServicePair call") - res, err := hand.lg.CreateServicePair(ctx, params) - return res, err -} - -func (hand *Handler) RevokeServicePair(ctx context.Context, params *cmctl.RevokeServicePairParams) (*cmctl.RevokeServicePairResult, error) { - var err error - hand.log.Debugf("Handle RevokeServicePair call") - res, err := hand.lg.RevokeServicePair(ctx, params) - return res, err -} - -func (hand *Handler) UnrevokeServicePair(ctx context.Context, params *cmctl.UnrevokeServicePairParams) (*cmctl.UnrevokeServicePairResult, error) { - var err error - hand.log.Debugf("Handle UnrevokeServicePair call") - res, err := hand.lg.UnrevokeServicePair(ctx, params) - return res, err -} - -func (hand *Handler) ListServicePairs(ctx context.Context, params *cmctl.ListServicePairsParams) (*cmctl.ListServicePairsResult, error) { - var err error - hand.log.Debugf("Handle ListServicePairs call") - res, err := hand.lg.ListServicePairs(ctx, params) - return res, err -} - -func (hand *Handler) GetServicePair(ctx context.Context, params *cmctl.GetServicePairParams) (*cmctl.GetServicePairResult, error) { - var err error - hand.log.Debugf("Handle GetServicePair call") - res, err := hand.lg.GetServicePair(ctx, params) - return res, err -} diff --git a/internal/grpc/handler/issuer.go b/internal/grpc/handler/issuer.go new file mode 100644 index 0000000..aaaea1a --- /dev/null +++ b/internal/grpc/handler/issuer.go @@ -0,0 +1,79 @@ +package handler + +import ( + "context" + + "certmanager/pkg/cmctl" +) + +func (hand *Handler) CreateIssuerPair(ctx context.Context, params *cmctl.CreateIssuerPairParams) (*cmctl.CreateIssuerPairResult, error) { + var err error + hand.log.Debugf("Handle CreateIssuerPair call") + res := &cmctl.CreateIssuerPairResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.CreateIssuerPair(ctx, userID, params) + return res, err +} + +func (hand *Handler) ImportIssuerPair(ctx context.Context, params *cmctl.ImportIssuerPairParams) (*cmctl.ImportIssuerPairResult, error) { + var err error + hand.log.Debugf("Handle ImportIssuerPair call") + res := &cmctl.ImportIssuerPairResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.ImportIssuerPair(ctx, userID, params) + return res, err +} + +func (hand *Handler) RevokeIssuerPair(ctx context.Context, params *cmctl.RevokeIssuerPairParams) (*cmctl.RevokeIssuerPairResult, error) { + var err error + hand.log.Debugf("Handle RevokeIssuerPair call") + res := &cmctl.RevokeIssuerPairResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.RevokeIssuerPair(ctx, userID, params) + return res, err +} + +func (hand *Handler) UnrevokeIssuerPair(ctx context.Context, params *cmctl.UnrevokeIssuerPairParams) (*cmctl.UnrevokeIssuerPairResult, error) { + var err error + hand.log.Debugf("Handle UnrevokeIssuerPair call") + res := &cmctl.UnrevokeIssuerPairResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.UnrevokeIssuerPair(ctx, userID, params) + return res, err +} + +func (hand *Handler) ListIssuerPairs(ctx context.Context, params *cmctl.ListIssuerPairsParams) (*cmctl.ListIssuerPairsResult, error) { + var err error + hand.log.Debugf("Handle ListIssuerPairs call") + res := &cmctl.ListIssuerPairsResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.ListIssuerPairs(ctx, userID, params) + return res, err +} + +func (hand *Handler) GetIssuerCertificate(ctx context.Context, params *cmctl.GetIssuerCertificateParams) (*cmctl.GetIssuerCertificateResult, error) { + var err error + hand.log.Debugf("Handle GetIssuerCertificate call") + res := &cmctl.GetIssuerCertificateResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.GetIssuerCertificate(ctx, userID, params) + return res, err +} diff --git a/internal/grpc/handler/service.go b/internal/grpc/handler/service.go new file mode 100644 index 0000000..7fd39b1 --- /dev/null +++ b/internal/grpc/handler/service.go @@ -0,0 +1,67 @@ +package handler + +import ( + "context" + + "certmanager/pkg/cmctl" +) + +func (hand *Handler) CreateServicePair(ctx context.Context, params *cmctl.CreateServicePairParams) (*cmctl.CreateServicePairResult, error) { + var err error + hand.log.Debugf("Handle CreateServicePair call") + res := &cmctl.CreateServicePairResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.CreateServicePair(ctx, userID, params) + return res, err +} + +func (hand *Handler) RevokeServicePair(ctx context.Context, params *cmctl.RevokeServicePairParams) (*cmctl.RevokeServicePairResult, error) { + var err error + hand.log.Debugf("Handle RevokeServicePair call") + res := &cmctl.RevokeServicePairResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.RevokeServicePair(ctx, userID, params) + return res, err +} + +func (hand *Handler) UnrevokeServicePair(ctx context.Context, params *cmctl.UnrevokeServicePairParams) (*cmctl.UnrevokeServicePairResult, error) { + var err error + hand.log.Debugf("Handle UnrevokeServicePair call") + res := &cmctl.UnrevokeServicePairResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.UnrevokeServicePair(ctx, userID, params) + return res, err +} + +func (hand *Handler) ListServicePairs(ctx context.Context, params *cmctl.ListServicePairsParams) (*cmctl.ListServicePairsResult, error) { + var err error + hand.log.Debugf("Handle ListServicePairs call") + res := &cmctl.ListServicePairsResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.ListServicePairs(ctx, userID, params) + return res, err +} + +func (hand *Handler) GetServicePair(ctx context.Context, params *cmctl.GetServicePairParams) (*cmctl.GetServicePairResult, error) { + var err error + hand.log.Debugf("Handle GetServicePair call") + res := &cmctl.GetServicePairResult{} + userID, err := hand.Authentificate(ctx) + if err != nil { + return res, err + } + res, err = hand.lg.GetServicePair(ctx, userID, params) + return res, err +} diff --git a/internal/grpc/service/service.go b/internal/grpc/service/service.go index af6ed3d..7b9301c 100644 --- a/internal/grpc/service/service.go +++ b/internal/grpc/service/service.go @@ -12,10 +12,8 @@ import ( "certmanager/pkg/logger" "google.golang.org/grpc" - "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" ) type ServiceConfig struct { @@ -82,7 +80,7 @@ func (svc *Service) Run() error { gsrvOpts := []grpc.ServerOption{ grpc.Creds(tlsCredentials), - grpc.UnaryInterceptor(svc.authInterceptor), + grpc.UnaryInterceptor(svc.debugInterceptor), } svc.gsrv = grpc.NewServer(gsrvOpts...) @@ -96,27 +94,11 @@ func (svc *Service) Run() error { return err } -func (svc *Service) authInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error) { +func (svc *Service) debugInterceptor(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (any, error) { svc.log.Debugf("Called unary interceptor with method: %v", info.FullMethod) meta, _ := metadata.FromIncomingContext(ctx) - svc.log.Debugf("Reqest username: %s", meta["username"]) - svc.log.Debugf("Reqest password: %s", meta["password"]) - usernameArr := meta["username"] - passwordArr := meta["password"] - if len(usernameArr) == 0 || len(passwordArr) == 0 { - err := status.Errorf(codes.PermissionDenied, "Empty auth data") - return nil, err - } - username := meta["username"][0] - password := meta["password"][0] - if !svc.lg.ValidateUser(username, password) { - err := status.Errorf(codes.PermissionDenied, "Wrong auth data") - return nil, err - } - reqBinary, err := json.Marshal(req) - if err == nil { - svc.log.Debugf("Request: %s", string(reqBinary)) - } + svc.log.Debugf("Reqest username: %v", meta["username"]) + svc.log.Debugf("Reqest password: %v", meta["password"]) return handler(ctx, req) } diff --git a/internal/logic/account.go b/internal/logic/account.go new file mode 100644 index 0000000..8b6a171 --- /dev/null +++ b/internal/logic/account.go @@ -0,0 +1,181 @@ +package logic + +import ( + "context" + "fmt" + "time" + + "certmanager/internal/descriptor" + "certmanager/pkg/auxid" + "certmanager/pkg/cmctl" +) + +func (lg *Logic) SeedAccount(ctx context.Context) (int64, error) { + var err error + var userID int64 + + accountDescrs, err := lg.db.ListAccounts(ctx) + if err != nil { + return userID, err + } + if len(accountDescrs) == 0 { + now := time.Now().Format(time.RFC3339) + accountDescr := &descriptor.Account{ + ID: auxid.GenID(), + Username: "certman", + Password: "certman", + Disabled: false, + CreatedAt: now, + UpdatedAt: now, + } + err = lg.db.InsertAccount(ctx, accountDescr) + if err != nil { + return userID, err + } + userID = accountDescr.ID + } + return userID, err +} + +func (lg *Logic) ValidateAcount(ctx context.Context, username, password string) (bool, int64, error) { + var err error + var userID int64 + var valid bool + + accountExists, accountDescr, err := lg.db.GetAccountByUsername(ctx, username) + if !accountExists { + err := fmt.Errorf("Account not exists") + return valid, userID, err + } + if password != accountDescr.Password { + err := fmt.Errorf("Login data mismatch") + return valid, userID, err + } + valid = true + userID = accountDescr.ID + return valid, userID, err + +} + +func (lg *Logic) CreateAccount(ctx context.Context, userID int64, params *cmctl.CreateAccountParams) (*cmctl.CreateAccountResult, error) { + var err error + res := &cmctl.CreateAccountResult{} + + accountExists, _, err := lg.db.GetAccountByUsername(ctx, params.Username) + if err != nil { + return res, err + } + if accountExists { + err := fmt.Errorf("Account with thist name already exists") + return res, err + } + now := time.Now().Format(time.RFC3339) + accountDescr := &descriptor.Account{ + ID: auxid.GenID(), + Username: params.Username, + Password: params.Password, + Disabled: false, + CreatedAt: now, + UpdatedAt: now, + } + err = lg.db.InsertAccount(ctx, accountDescr) + if err != nil { + return res, err + } + res.AccountID = accountDescr.ID + return res, err +} + +func (lg *Logic) UpdateAccount(ctx context.Context, userID int64, params *cmctl.UpdateAccountParams) (*cmctl.UpdateAccountResult, error) { + var err error + res := &cmctl.UpdateAccountResult{} + + var accountDescr *descriptor.Account + var accountExists bool + switch { + case params.AccountID != 0: + accountExists, accountDescr, err = lg.db.GetAccountByID(ctx, params.AccountID) + if err != nil { + return res, err + } + case params.Username != "": + accountExists, accountDescr, err = lg.db.GetAccountByUsername(ctx, params.Username) + if err != nil { + return res, err + } + } + if !accountExists { + err := fmt.Errorf("Account with this is or name dont exists") + return res, err + } + now := time.Now().Format(time.RFC3339) + if params.NewUsername != "" { + accountDescr.UpdatedAt = now + accountDescr.Username = params.NewUsername + } + if params.NewPassword != "" { + accountDescr.UpdatedAt = now + accountDescr.Password = params.NewPassword + } + if params.Disabled != accountDescr.Disabled { + accountDescr.UpdatedAt = now + accountDescr.Disabled = params.Disabled + } + + err = lg.db.UpdateAccountByID(ctx, accountDescr.ID, accountDescr) + if err != nil { + return res, err + } + return res, err +} + +func (lg *Logic) DeleteAccount(ctx context.Context, userID int64, params *cmctl.DeleteAccountParams) (*cmctl.DeleteAccountResult, error) { + var err error + res := &cmctl.DeleteAccountResult{} + + var accountDescr *descriptor.Account + var accountExists bool + switch { + case params.AccountID != 0: + accountExists, accountDescr, err = lg.db.GetAccountByID(ctx, params.AccountID) + if err != nil { + return res, err + } + case params.Username != "": + accountExists, accountDescr, err = lg.db.GetAccountByUsername(ctx, params.Username) + if err != nil { + return res, err + } + } + if !accountExists { + err := fmt.Errorf("Account with this is or name dont exists") + return res, err + } + + err = lg.db.DeleteAccountByID(ctx, accountDescr.ID) + if err != nil { + return res, err + } + return res, err +} + +func (lg *Logic) ListAccounts(ctx context.Context, userID int64, params *cmctl.ListAccountsParams) (*cmctl.ListAccountsResult, error) { + var err error + res := &cmctl.ListAccountsResult{ + Accounts: make([]*cmctl.AccountShortDescr, 0), + } + accountDescrs, err := lg.db.ListAccounts(ctx) + if err != nil { + return res, err + } + for _, accountDescr := range accountDescrs { + shortDescr := &cmctl.AccountShortDescr{ + Username: accountDescr.Username, + Disabled: accountDescr.Disabled, + CreatedAt: accountDescr.CreatedAt, + UpdatedAt: accountDescr.UpdatedAt, + } + res.Accounts = append(res.Accounts, shortDescr) + } + return res, err +} diff --git a/internal/logic/auth.go b/internal/logic/auth.go deleted file mode 100644 index d3c47ef..0000000 --- a/internal/logic/auth.go +++ /dev/null @@ -1,10 +0,0 @@ -package logic - -func (lg *Logic) ValidateUser(username, password string) bool { - for i := range lg.auths { - if username == lg.auths[i].Username && password == lg.auths[i].Password { - return true - } - } - return true -} diff --git a/internal/logic/issuer.go b/internal/logic/issuer.go index 4f369f4..6bf6adb 100644 --- a/internal/logic/issuer.go +++ b/internal/logic/issuer.go @@ -11,7 +11,7 @@ import ( "certmanager/pkg/cmctl" ) -func (lg *Logic) CreateIssuerPair(ctx context.Context, params *cmctl.CreateIssuerPairParams) (*cmctl.CreateIssuerPairResult, error) { +func (lg *Logic) CreateIssuerPair(ctx context.Context, userID int64, params *cmctl.CreateIssuerPairParams) (*cmctl.CreateIssuerPairResult, error) { var err error res := &cmctl.CreateIssuerPairResult{} @@ -38,6 +38,11 @@ func (lg *Logic) CreateIssuerPair(ctx context.Context, params *cmctl.CreateIssue CommonName: params.IssuerCommonName, } if signerDescr != nil { + err = cm509.DoubleEncodedCertKeyMatch(signerDescr.Cert, signerDescr.Key) + if err != nil { + return res, err + } + lg.log.Debugf("Create issuer with signer name %s", signerDescr.Name) createIssuerPairParams.SignerCert = signerDescr.Cert createIssuerPairParams.SignerKey = signerDescr.Key @@ -79,10 +84,11 @@ func (lg *Logic) CreateIssuerPair(ctx context.Context, params *cmctl.CreateIssue return res, err } -func (lg *Logic) GetIssuerCertificate(ctx context.Context, params *cmctl.GetIssuerCertificateParams) (*cmctl.GetIssuerCertificateResult, error) { +func (lg *Logic) GetIssuerCertificate(ctx context.Context, userID int64, params *cmctl.GetIssuerCertificateParams) (*cmctl.GetIssuerCertificateResult, error) { var err error res := &cmctl.GetIssuerCertificateResult{ SignerCertificates: make([]string, 0), + SignerNames: make([]string, 0), } var issuerDescr *descriptor.Issuer var issuerExists bool @@ -122,6 +128,12 @@ func (lg *Logic) GetIssuerCertificate(ctx context.Context, params *cmctl.GetIssu } for _, signerDescr := range signerDescrs { res.SignerCertificates = append(res.SignerCertificates, signerDescr.Cert) + res.SignerNames = append(res.SignerNames, signerDescr.Name) + } + + err = cm509.DoubleEncodedCertKeyMatch(issuerDescr.Cert, issuerDescr.Key) + if err != nil { + return res, err } res.IssuerID = issuerDescr.ID @@ -131,7 +143,7 @@ func (lg *Logic) GetIssuerCertificate(ctx context.Context, params *cmctl.GetIssu return res, err } -func (lg *Logic) ImportIssuerPair(ctx context.Context, params *cmctl.ImportIssuerPairParams) (*cmctl.ImportIssuerPairResult, error) { +func (lg *Logic) ImportIssuerPair(ctx context.Context, userID int64, params *cmctl.ImportIssuerPairParams) (*cmctl.ImportIssuerPairResult, error) { var err error res := &cmctl.ImportIssuerPairResult{} @@ -206,7 +218,7 @@ func (lg *Logic) ImportIssuerPair(ctx context.Context, params *cmctl.ImportIssue return res, err } -func (lg *Logic) RevokeIssuerPair(ctx context.Context, params *cmctl.RevokeIssuerPairParams) (*cmctl.RevokeIssuerPairResult, error) { +func (lg *Logic) RevokeIssuerPair(ctx context.Context, userID int64, params *cmctl.RevokeIssuerPairParams) (*cmctl.RevokeIssuerPairResult, error) { var err error res := &cmctl.RevokeIssuerPairResult{} @@ -251,7 +263,7 @@ func (lg *Logic) RevokeIssuerPair(ctx context.Context, params *cmctl.RevokeIssue return res, err } -func (lg *Logic) UnrevokeIssuerPair(ctx context.Context, params *cmctl.UnrevokeIssuerPairParams) (*cmctl.UnrevokeIssuerPairResult, error) { +func (lg *Logic) UnrevokeIssuerPair(ctx context.Context, userID int64, params *cmctl.UnrevokeIssuerPairParams) (*cmctl.UnrevokeIssuerPairResult, error) { var err error res := &cmctl.UnrevokeIssuerPairResult{} @@ -296,7 +308,7 @@ func (lg *Logic) UnrevokeIssuerPair(ctx context.Context, params *cmctl.UnrevokeI return res, err } -func (lg *Logic) ListIssuerPairs(ctx context.Context, params *cmctl.ListIssuerPairsParams) (*cmctl.ListIssuerPairsResult, error) { +func (lg *Logic) ListIssuerPairs(ctx context.Context, userID int64, params *cmctl.ListIssuerPairsParams) (*cmctl.ListIssuerPairsResult, error) { var err error res := &cmctl.ListIssuerPairsResult{ Issuers: make([]*cmctl.IssierShortDescriptor, 0), diff --git a/internal/logic/service.go b/internal/logic/service.go index 0b0d2dc..8b89e74 100644 --- a/internal/logic/service.go +++ b/internal/logic/service.go @@ -2,7 +2,9 @@ package logic import ( "context" + "crypto/x509" "fmt" + "time" "certmanager/internal/descriptor" "certmanager/pkg/auxid" @@ -10,7 +12,7 @@ import ( "certmanager/pkg/cmctl" ) -func (lg *Logic) CreateServicePair(ctx context.Context, params *cmctl.CreateServicePairParams) (*cmctl.CreateServicePairResult, error) { +func (lg *Logic) CreateServicePair(ctx context.Context, userID int64, params *cmctl.CreateServicePairParams) (*cmctl.CreateServicePairResult, error) { var err error res := &cmctl.CreateServicePairResult{} @@ -52,6 +54,11 @@ func (lg *Logic) CreateServicePair(ctx context.Context, params *cmctl.CreateServ } } + err = cm509.DoubleEncodedCertKeyMatch(issuerDescr.Cert, issuerDescr.Key) + if err != nil { + return res, err + } + createServicePairParams := &cm509.CreateServicePairParams{ CommonName: params.ServiceCommonName, IssuerKey: issuerDescr.Key, @@ -86,7 +93,7 @@ func (lg *Logic) CreateServicePair(ctx context.Context, params *cmctl.CreateServ return res, err } -func (lg *Logic) GetServicePair(ctx context.Context, params *cmctl.GetServicePairParams) (*cmctl.GetServicePairResult, error) { +func (lg *Logic) GetServicePair(ctx context.Context, userID int64, params *cmctl.GetServicePairParams) (*cmctl.GetServicePairResult, error) { var err error res := &cmctl.GetServicePairResult{ IssuerCertificates: make([]string, 0), @@ -176,6 +183,28 @@ func (lg *Logic) GetServicePair(ctx context.Context, params *cmctl.GetServicePai res.IssuerCertificates = append(res.IssuerCertificates, issuerDescr.Cert) } + signerCertPool := x509.NewCertPool() + for _, issuerDescr := range issuerDescrs { + issuerCertObj, err := cm509.ParseDoubleEncodedCerificate(issuerDescr.Cert) + if err != nil { + return res, err + } + signerCertPool.AddCert(issuerCertObj) + } + opts := x509.VerifyOptions{ + Roots: signerCertPool, + CurrentTime: time.Now(), + } + _, err = serviceCertObj.Verify(opts) + if err != nil { + return res, err + } + + err = cm509.DoubleEncodedCertKeyMatch(serviceDescr.Cert, serviceDescr.Key) + if err != nil { + return res, err + } + res.Certificate = serviceDescr.Cert res.Key = serviceDescr.Key res.IssuerID = serviceDescr.IssuerID @@ -247,7 +276,7 @@ func (lg *Logic) GetNextIssuerChain(ctx context.Context, deep int, firstIssuerDe return res, err } -func (lg *Logic) ListServicePairs(ctx context.Context, params *cmctl.ListServicePairsParams) (*cmctl.ListServicePairsResult, error) { +func (lg *Logic) ListServicePairs(ctx context.Context, userID int64, params *cmctl.ListServicePairsParams) (*cmctl.ListServicePairsResult, error) { var err error res := &cmctl.ListServicePairsResult{ Services: make([]*cmctl.ServiceShortDescriptor, 0), @@ -270,7 +299,7 @@ func (lg *Logic) ListServicePairs(ctx context.Context, params *cmctl.ListService return res, err } -func (lg *Logic) RevokeServicePair(ctx context.Context, params *cmctl.RevokeServicePairParams) (*cmctl.RevokeServicePairResult, error) { +func (lg *Logic) RevokeServicePair(ctx context.Context, userID int64, params *cmctl.RevokeServicePairParams) (*cmctl.RevokeServicePairResult, error) { var err error res := &cmctl.RevokeServicePairResult{} @@ -315,7 +344,7 @@ func (lg *Logic) RevokeServicePair(ctx context.Context, params *cmctl.RevokeServ return res, err } -func (lg *Logic) UnrevokeServicePair(ctx context.Context, params *cmctl.UnrevokeServicePairParams) (*cmctl.UnrevokeServicePairResult, error) { +func (lg *Logic) UnrevokeServicePair(ctx context.Context, userID int64, params *cmctl.UnrevokeServicePairParams) (*cmctl.UnrevokeServicePairResult, error) { var err error res := &cmctl.UnrevokeServicePairResult{} diff --git a/internal/server/server.go b/internal/server/server.go index 20be66f..488d83e 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -1,13 +1,14 @@ package server import ( + "context" "os" "os/signal" - "syscall" - "os/user" "path/filepath" "strconv" + "syscall" + "time" "certmanager/internal/config" "certmanager/internal/database" @@ -92,6 +93,13 @@ func (srv *Server) Build() error { if err != nil { return err } + // Seed accounts + ctx, _ := context.WithTimeout(context.Background(), 1*time.Second) + _, err = srv.lg.SeedAccount(ctx) + if err != nil { + return err + } + // Create whandler whandlerConfig := &whandler.HandlerConfig{ Logic: srv.lg, diff --git a/internal/test/logic_issuer_create_test.go b/internal/test/logic_issuer_create_test.go index 4b948be..7b308a0 100644 --- a/internal/test/logic_issuer_create_test.go +++ b/internal/test/logic_issuer_create_test.go @@ -40,6 +40,9 @@ func TestIssuerCreateN0(t *testing.T) { } ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) + userID, err := lg.SeedAccount(ctx) + require.NoError(t, err) + require.NotZero(t, userID) signerCommonName := "make.love" var signerID int64 @@ -49,7 +52,7 @@ func TestIssuerCreateN0(t *testing.T) { createIssuerPairParams := &cmctl.CreateIssuerPairParams{ IssuerCommonName: signerCommonName, } - createIssuerPairRes, err := lg.CreateIssuerPair(ctx, createIssuerPairParams) + createIssuerPairRes, err := lg.CreateIssuerPair(ctx, userID, createIssuerPairParams) require.NoError(t, err) require.NotNil(t, createIssuerPairRes) @@ -83,7 +86,7 @@ func TestIssuerCreateN0(t *testing.T) { IssuerCommonName: issuerCommonName, SignerID: signerID, } - createIssuerPairRes, err := lg.CreateIssuerPair(ctx, createIssuerPairParams) + createIssuerPairRes, err := lg.CreateIssuerPair(ctx, userID, createIssuerPairParams) require.NoError(t, err) require.NotNil(t, createIssuerPairRes) @@ -120,7 +123,7 @@ func TestIssuerCreateN0(t *testing.T) { InetAddresses: []string{"1.1.1.1", "1.1.1.2", "1.1.1.3"}, Hostnames: []string{"dont.worry", "be.happy"}, } - createServicePairRes, err := lg.CreateServicePair(ctx, createServicePairParams) + createServicePairRes, err := lg.CreateServicePair(ctx, userID, createServicePairParams) require.NoError(t, err) require.NotNil(t, createServicePairRes) @@ -150,7 +153,7 @@ func TestIssuerCreateN0(t *testing.T) { } { listIssuerPairsParams := &cmctl.ListIssuerPairsParams{} - listIssuerPairsRes, err := lg.ListIssuerPairs(ctx, listIssuerPairsParams) + listIssuerPairsRes, err := lg.ListIssuerPairs(ctx, userID, listIssuerPairsParams) require.NoError(t, err) require.NotNil(t, listIssuerPairsRes) require.NotZero(t, len(listIssuerPairsRes.Issuers)) @@ -161,7 +164,7 @@ func TestIssuerCreateN0(t *testing.T) { getServicePairParams := &cmctl.GetServicePairParams{ ServiceID: serviceID, } - getServicePairRes, err := lg.GetServicePair(ctx, getServicePairParams) + getServicePairRes, err := lg.GetServicePair(ctx, userID, getServicePairParams) require.NoError(t, err) require.NotNil(t, getServicePairRes) require.NotZero(t, len(getServicePairRes.Certificate)) @@ -173,7 +176,7 @@ func TestIssuerCreateN0(t *testing.T) { getIssuerCertificateParams := &cmctl.GetIssuerCertificateParams{ IssuerID: issuerID, } - getIssuerCertificateRes, err := lg.GetIssuerCertificate(ctx, getIssuerCertificateParams) + getIssuerCertificateRes, err := lg.GetIssuerCertificate(ctx, userID, getIssuerCertificateParams) require.NoError(t, err) require.NotNil(t, getIssuerCertificateRes) require.NotZero(t, len(getIssuerCertificateRes.Certificate)) @@ -208,6 +211,9 @@ func XXXTestIssuerCreateN2(t *testing.T) { } ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) + userID, err := lg.SeedAccount(ctx) + require.NoError(t, err) + require.NotZero(t, userID) issuerCommonName := "foo.bar" var issuerID int64 @@ -216,7 +222,7 @@ func XXXTestIssuerCreateN2(t *testing.T) { createIssuerPairParams := &cmctl.CreateIssuerPairParams{ IssuerCommonName: issuerCommonName, } - createIssuerPairRes, err := lg.CreateIssuerPair(ctx, createIssuerPairParams) + createIssuerPairRes, err := lg.CreateIssuerPair(ctx, userID, createIssuerPairParams) require.NoError(t, err) require.NotNil(t, createIssuerPairRes) issuerID = createIssuerPairRes.IssuerID @@ -227,7 +233,7 @@ func XXXTestIssuerCreateN2(t *testing.T) { getIssuerCertificateParams := &cmctl.GetIssuerCertificateParams{ IssuerID: issuerID, } - getIssuerCertificateRes, err := lg.GetIssuerCertificate(ctx, getIssuerCertificateParams) + getIssuerCertificateRes, err := lg.GetIssuerCertificate(ctx, userID, getIssuerCertificateParams) require.NoError(t, err) require.NotNil(t, getIssuerCertificateRes) require.NotZero(t, len(getIssuerCertificateRes.Certificate)) @@ -243,7 +249,7 @@ func XXXTestIssuerCreateN2(t *testing.T) { revokeIssuerPairParams := &cmctl.RevokeIssuerPairParams{ IssuerID: issuerID, } - revokeIssuerPairRes, err := lg.RevokeIssuerPair(ctx, revokeIssuerPairParams) + revokeIssuerPairRes, err := lg.RevokeIssuerPair(ctx, userID, revokeIssuerPairParams) require.NoError(t, err) require.NotNil(t, revokeIssuerPairRes) @@ -254,7 +260,7 @@ func XXXTestIssuerCreateN2(t *testing.T) { getIssuerCertificateParams := &cmctl.GetIssuerCertificateParams{ IssuerID: issuerID, } - getIssuerCertificateRes, err := lg.GetIssuerCertificate(ctx, getIssuerCertificateParams) + getIssuerCertificateRes, err := lg.GetIssuerCertificate(ctx, userID, getIssuerCertificateParams) require.NoError(t, err) require.NotNil(t, getIssuerCertificateRes) require.NotZero(t, len(getIssuerCertificateRes.Certificate)) @@ -266,7 +272,7 @@ func XXXTestIssuerCreateN2(t *testing.T) { unrevokeIssuerPairParams := &cmctl.UnrevokeIssuerPairParams{ IssuerID: issuerID, } - unrevokeIssuerPairRes, err := lg.UnrevokeIssuerPair(ctx, unrevokeIssuerPairParams) + unrevokeIssuerPairRes, err := lg.UnrevokeIssuerPair(ctx, userID, unrevokeIssuerPairParams) require.NoError(t, err) require.NotNil(t, unrevokeIssuerPairRes) @@ -277,7 +283,7 @@ func XXXTestIssuerCreateN2(t *testing.T) { getIssuerCertificateParams := &cmctl.GetIssuerCertificateParams{ IssuerID: issuerID, } - getIssuerCertificateRes, err := lg.GetIssuerCertificate(ctx, getIssuerCertificateParams) + getIssuerCertificateRes, err := lg.GetIssuerCertificate(ctx, userID, getIssuerCertificateParams) require.NoError(t, err) require.NotNil(t, getIssuerCertificateRes) require.NotZero(t, len(getIssuerCertificateRes.Certificate)) @@ -287,7 +293,7 @@ func XXXTestIssuerCreateN2(t *testing.T) { } { listIssuerPairsParams := &cmctl.ListIssuerPairsParams{} - listIssuerPairsRes, err := lg.ListIssuerPairs(ctx, listIssuerPairsParams) + listIssuerPairsRes, err := lg.ListIssuerPairs(ctx, userID, listIssuerPairsParams) require.NoError(t, err) require.NotNil(t, listIssuerPairsRes) require.NotZero(t, len(listIssuerPairsRes.Issuers)) @@ -299,7 +305,7 @@ func XXXTestIssuerCreateN2(t *testing.T) { createIssuerPairParams := &cmctl.CreateIssuerPairParams{ IssuerCommonName: fmt.Sprintf("sub%0d.%s", i, issuerCommonName), } - createIssuerPairRes, err := lg.CreateIssuerPair(ctx, createIssuerPairParams) + createIssuerPairRes, err := lg.CreateIssuerPair(ctx, userID, createIssuerPairParams) require.NoError(t, err) require.NotNil(t, createIssuerPairRes) issuerID = createIssuerPairRes.IssuerID @@ -308,7 +314,7 @@ func XXXTestIssuerCreateN2(t *testing.T) { } { listIssuerPairsParams := &cmctl.ListIssuerPairsParams{} - listIssuerPairsRes, err := lg.ListIssuerPairs(ctx, listIssuerPairsParams) + listIssuerPairsRes, err := lg.ListIssuerPairs(ctx, userID, listIssuerPairsParams) require.NoError(t, err) require.NotNil(t, listIssuerPairsRes) require.NotZero(t, len(listIssuerPairsRes.Issuers)) @@ -322,7 +328,7 @@ func XXXTestIssuerCreateN2(t *testing.T) { ServiceCommonName: serviceCommonName, IssuerID: issuerID, } - createServicePairRes, err := lg.CreateServicePair(ctx, createServicePairParams) + createServicePairRes, err := lg.CreateServicePair(ctx, userID, createServicePairParams) printObj("createServicePairRes", createServicePairRes) require.NoError(t, err) @@ -334,7 +340,7 @@ func XXXTestIssuerCreateN2(t *testing.T) { getServicePairParams := &cmctl.GetServicePairParams{ ServiceID: serviceID, } - getServicePairRes, err := lg.GetServicePair(ctx, getServicePairParams) + getServicePairRes, err := lg.GetServicePair(ctx, userID, getServicePairParams) require.NoError(t, err) require.NotNil(t, getServicePairRes) require.NotZero(t, len(getServicePairRes.Certificate)) diff --git a/internal/test/logic_issuer_import_test.go b/internal/test/logic_issuer_import_test.go index db33d51..a494cab 100644 --- a/internal/test/logic_issuer_import_test.go +++ b/internal/test/logic_issuer_import_test.go @@ -43,6 +43,10 @@ func XXXTestLogicImportIssuer(t *testing.T) { require.NoError(t, err) require.NotNil(t, lg) } + ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) + userID, err := lg.SeedAccount(ctx) + require.NoError(t, err) + require.NotZero(t, userID) certBytes, err := os.ReadFile("testchain_a00.crt") require.NoError(t, err) @@ -80,13 +84,12 @@ func XXXTestLogicImportIssuer(t *testing.T) { certStrings = append(certStrings, certString) } - ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) { importIssuerPairParams := &cmapi.ImportIssuerPairParams{ Certificate: certString, Key: keyString, } - importIssuerPairRes, err := lg.ImportIssuerPair(ctx, importIssuerPairParams) + importIssuerPairRes, err := lg.ImportIssuerPair(ctx, userID, importIssuerPairParams) require.NoError(t, err) require.NotNil(t, importIssuerPairRes) diff --git a/internal/wrpc/handler/basauth.go b/internal/wrpc/handler/basauth.go deleted file mode 100644 index 3bf6b02..0000000 --- a/internal/wrpc/handler/basauth.go +++ /dev/null @@ -1,32 +0,0 @@ -package handler - -import ( - "errors" - "fmt" - - "certmanager/pkg/auxhttp" - - "github.com/gin-gonic/gin" -) - -func (hand *Handler) BasicAuth(gctx *gin.Context) { - var err error - authHeader := gctx.Request.Header.Get("Authorization") - if authHeader == "" { - err = errors.New("Cannot found autentification data") - auxhttp.SendError(gctx, err) - return - } - username, password, err := auxhttp.ParseAuthBasicHeader(authHeader) - if err != nil { - err = fmt.Errorf("Authorization error: %s", err) - auxhttp.SendError(gctx, err) - return - } - if !hand.lg.ValidateUser(username, password) { - err = errors.New("Incorrect autentification data") - auxhttp.SendError(gctx, err) - return - } - gctx.Next() -} diff --git a/internal/wrpc/service/service.go b/internal/wrpc/service/service.go index 132dba4..7d1bd2f 100644 --- a/internal/wrpc/service/service.go +++ b/internal/wrpc/service/service.go @@ -71,19 +71,6 @@ func (svc *Service) Build() error { { statusGroup := v1Group.Group("status") statusGroup.POST("get", svc.hand.GetStatus) - /* - forwardingGroup := v1Group.Group("forwarding") - forwardingGroup.POST("create", svc.hand.CreateForwarding) - forwardingGroup.POST("list", svc.hand.ListForwardings) - forwardingGroup.POST("delete", svc.hand.DeleteForwarding) - - defaultsGroup := v1Group.Group("defaults") - defaultsGroup.POST("set", svc.hand.SetDefaults) - defaultsGroup.POST("get", svc.hand.GetDefaults) - - proxyGroup := v1Group.Group("proxy") - proxyGroup.POST("reset", svc.hand.ResetProxy) - */ } noRouteFunc := func(gctx *gin.Context) { err := fmt.Errorf("No route") diff --git a/pkg/client/certman.go b/pkg/client/certman.go deleted file mode 100644 index 22af92d..0000000 --- a/pkg/client/certman.go +++ /dev/null @@ -1,159 +0,0 @@ -package client - -import ( - "context" - "time" - - "certmanager/pkg/auxgrpc" - cmapi "certmanager/pkg/cmctl" -) - -func (cont *Control) CreateIssuerPair(ctx context.Context, param *cmapi.CreateIssuerPairParams) (*cmapi.CreateIssuerPairResult, error) { - var err error - res := &cmapi.CreateIssuerPairResult{} - - const timeout time.Duration = 50 * time.Second - ctx, cancel := context.WithTimeout(ctx, timeout) - defer cancel() - res, err = cont.client.CreateIssuerPair(ctx, param) - err = auxgrpc.FmtError(err) - if err != nil { - return res, err - } - return res, err -} - -func (cont *Control) ImportIssuerPair(ctx context.Context, param *cmapi.ImportIssuerPairParams) (*cmapi.ImportIssuerPairResult, error) { - var err error - res := &cmapi.ImportIssuerPairResult{} - - const timeout time.Duration = 50 * time.Second - ctx, cancel := context.WithTimeout(ctx, timeout) - defer cancel() - res, err = cont.client.ImportIssuerPair(ctx, param) - err = auxgrpc.FmtError(err) - if err != nil { - return res, err - } - return res, err -} - -func (cont *Control) RevokeIssuerPair(ctx context.Context, param *cmapi.RevokeIssuerPairParams) (*cmapi.RevokeIssuerPairResult, error) { - var err error - res := &cmapi.RevokeIssuerPairResult{} - - const timeout time.Duration = 50 * time.Second - ctx, cancel := context.WithTimeout(ctx, timeout) - defer cancel() - res, err = cont.client.RevokeIssuerPair(ctx, param) - err = auxgrpc.FmtError(err) - if err != nil { - return res, err - } - return res, err -} - -func (cont *Control) UnrevokeIssuerPair(ctx context.Context, param *cmapi.UnrevokeIssuerPairParams) (*cmapi.UnrevokeIssuerPairResult, error) { - var err error - res := &cmapi.UnrevokeIssuerPairResult{} - - const timeout time.Duration = 50 * time.Second - ctx, cancel := context.WithTimeout(ctx, timeout) - defer cancel() - res, err = cont.client.UnrevokeIssuerPair(ctx, param) - err = auxgrpc.FmtError(err) - if err != nil { - return res, err - } - return res, err -} - -func (cont *Control) ListIssuerPairs(ctx context.Context, param *cmapi.ListIssuerPairsParams) (*cmapi.ListIssuerPairsResult, error) { - var err error - res := &cmapi.ListIssuerPairsResult{} - - const timeout time.Duration = 50 * time.Second - ctx, cancel := context.WithTimeout(ctx, timeout) - defer cancel() - res, err = cont.client.ListIssuerPairs(ctx, param) - err = auxgrpc.FmtError(err) - if err != nil { - return res, err - } - return res, err -} - -func (cont *Control) GetIssuerCertificate(ctx context.Context, param *cmapi.GetIssuerCertificateParams) (*cmapi.GetIssuerCertificateResult, error) { - var err error - res := &cmapi.GetIssuerCertificateResult{} - - const timeout time.Duration = 50 * time.Second - ctx, cancel := context.WithTimeout(ctx, timeout) - defer cancel() - res, err = cont.client.GetIssuerCertificate(ctx, param) - err = auxgrpc.FmtError(err) - if err != nil { - return res, err - } - return res, err -} - -func (cont *Control) CreateServicePair(ctx context.Context, param *cmapi.CreateServicePairParams) (*cmapi.CreateServicePairResult, error) { - var err error - res := &cmapi.CreateServicePairResult{} - - const timeout time.Duration = 50 * time.Second - ctx, cancel := context.WithTimeout(ctx, timeout) - defer cancel() - res, err = cont.client.CreateServicePair(ctx, param) - err = auxgrpc.FmtError(err) - if err != nil { - return res, err - } - return res, err -} - -func (cont *Control) RevokeServicePair(ctx context.Context, param *cmapi.RevokeServicePairParams) (*cmapi.RevokeServicePairResult, error) { - var err error - res := &cmapi.RevokeServicePairResult{} - - const timeout time.Duration = 50 * time.Second - ctx, cancel := context.WithTimeout(ctx, timeout) - defer cancel() - res, err = cont.client.RevokeServicePair(ctx, param) - err = auxgrpc.FmtError(err) - if err != nil { - return res, err - } - return res, err -} - -func (cont *Control) ListServicePairs(ctx context.Context, param *cmapi.ListServicePairsParams) (*cmapi.ListServicePairsResult, error) { - var err error - res := &cmapi.ListServicePairsResult{} - - const timeout time.Duration = 50 * time.Second - ctx, cancel := context.WithTimeout(ctx, timeout) - defer cancel() - res, err = cont.client.ListServicePairs(ctx, param) - err = auxgrpc.FmtError(err) - if err != nil { - return res, err - } - return res, err -} - -func (cont *Control) GetServicePair(ctx context.Context, param *cmapi.GetServicePairParams) (*cmapi.GetServicePairResult, error) { - var err error - res := &cmapi.GetServicePairResult{} - - const timeout time.Duration = 50 * time.Second - ctx, cancel := context.WithTimeout(ctx, timeout) - defer cancel() - res, err = cont.client.GetServicePair(ctx, param) - err = auxgrpc.FmtError(err) - if err != nil { - return res, err - } - return res, err -} diff --git a/pkg/client/client.go b/pkg/client/client.go new file mode 100644 index 0000000..a7622ad --- /dev/null +++ b/pkg/client/client.go @@ -0,0 +1,51 @@ +package client + +import ( + "context" + "crypto/tls" + "fmt" + "time" + + "certmanager/pkg/cmctl" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" +) + +const ( + DefaultWrpcPort int = 20311 + DefaultGrpcPort int = 20312 +) + +type Access struct { + Hostname string + Port int + Username string + Password string +} + +func NewClient(access *Access) (cmctl.ControlClient, error) { + var err error + var cli cmctl.ControlClient + + tlsConfig := &tls.Config{ + InsecureSkipVerify: true, + } + const dialTimeout time.Duration = 1 * time.Second + const idleTimeout time.Duration = 5 * time.Second + + authCred := NewAuthCredential(access.Username, access.Password) + dialOpts := []grpc.DialOption{ + grpc.WithTransportCredentials(credentials.NewTLS(tlsConfig)), + grpc.WithPerRPCCredentials(authCred), + grpc.WithBlock(), + grpc.WithIdleTimeout(idleTimeout), + } + address := fmt.Sprintf("%s:%d", access.Hostname, access.Port) + ctx, _ := context.WithTimeout(context.Background(), dialTimeout) + conn, err := grpc.DialContext(ctx, address, dialOpts...) + if err != nil { + return cli, fmt.Errorf("Dial error: %v", err) + } + cli = cmctl.NewControlClient(conn) + return cli, err +} diff --git a/pkg/client/control.go b/pkg/client/control.go index 5842c7f..6249077 100644 --- a/pkg/client/control.go +++ b/pkg/client/control.go @@ -6,27 +6,15 @@ import ( "fmt" "time" - cmapi "certmanager/pkg/cmctl" + "certmanager/pkg/cmctl" "google.golang.org/grpc" "google.golang.org/grpc/credentials" ) -const ( - DefaultWrpcPort int = 20311 - DefaultGrpcPort int = 20312 -) - -type Access struct { - Hostname string - Port int - Username string - Password string -} - type Control struct { conn *grpc.ClientConn - client cmapi.ControlClient + client cmctl.ControlClient } func NewControl(access *Access) (*Control, error) { @@ -54,7 +42,7 @@ func NewControl(access *Access) (*Control, error) { return cont, fmt.Errorf("Dial error: %v", err) } cont.conn = conn - cont.client = cmapi.NewControlClient(conn) + cont.client = cmctl.NewControlClient(conn) if cont.client == nil { return cont, fmt.Errorf("Nil control client") } @@ -66,30 +54,3 @@ func (cont *Control) Close() { cont.conn.Close() } } - -func NewClient(access *Access) (cmapi.ControlClient, error) { - var err error - var cli cmapi.ControlClient - - tlsConfig := &tls.Config{ - InsecureSkipVerify: true, - } - const dialTimeout time.Duration = 1 * time.Second - const idleTimeout time.Duration = 5 * time.Second - - authCred := NewAuthCredential(access.Username, access.Password) - dialOpts := []grpc.DialOption{ - grpc.WithTransportCredentials(credentials.NewTLS(tlsConfig)), - grpc.WithPerRPCCredentials(authCred), - grpc.WithBlock(), - grpc.WithIdleTimeout(idleTimeout), - } - address := fmt.Sprintf("%s:%d", access.Hostname, access.Port) - ctx, _ := context.WithTimeout(context.Background(), dialTimeout) - conn, err := grpc.DialContext(ctx, address, dialOpts...) - if err != nil { - return cli, fmt.Errorf("Dial error: %v", err) - } - cli = cmapi.NewControlClient(conn) - return cli, err -} diff --git a/pkg/cm509/x509.go b/pkg/cm509/x509.go index 0a8f2b6..93abdc3 100644 --- a/pkg/cm509/x509.go +++ b/pkg/cm509/x509.go @@ -3,6 +3,7 @@ package cm509 import ( "crypto/rand" "crypto/rsa" + "crypto/tls" "crypto/x509" "crypto/x509/pkix" "encoding/base64" @@ -13,6 +14,23 @@ import ( "time" ) +func DoubleEncodedCertKeyMatch(cert, key string) error { + var err error + certPEM, err := base64.StdEncoding.DecodeString(cert) + if err != nil { + return err + } + keyPEM, err := base64.StdEncoding.DecodeString(key) + if err != nil { + return err + } + _, err = tls.X509KeyPair(certPEM, keyPEM) + if err != nil { + return err + } + return err +} + type CreateIssuerPairParams struct { CommonName string SignerCert string diff --git a/pkg/cmctl/cmctl.pb.go b/pkg/cmctl/cmctl.pb.go index 9759373..8059b3e 100644 --- a/pkg/cmctl/cmctl.pb.go +++ b/pkg/cmctl/cmctl.pb.go @@ -20,6 +20,550 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type CreateAccountParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + 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 (x *CreateAccountParams) Reset() { + *x = CreateAccountParams{} + if protoimpl.UnsafeEnabled { + mi := &file_cmctl_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAccountParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAccountParams) ProtoMessage() {} + +func (x *CreateAccountParams) ProtoReflect() protoreflect.Message { + mi := &file_cmctl_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) +} + +// Deprecated: Use CreateAccountParams.ProtoReflect.Descriptor instead. +func (*CreateAccountParams) Descriptor() ([]byte, []int) { + return file_cmctl_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateAccountParams) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *CreateAccountParams) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +type CreateAccountResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountID int64 `protobuf:"varint,1,opt,name=accountID,proto3" json:"accountID,omitempty"` +} + +func (x *CreateAccountResult) Reset() { + *x = CreateAccountResult{} + if protoimpl.UnsafeEnabled { + mi := &file_cmctl_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateAccountResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateAccountResult) ProtoMessage() {} + +func (x *CreateAccountResult) ProtoReflect() protoreflect.Message { + mi := &file_cmctl_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) +} + +// Deprecated: Use CreateAccountResult.ProtoReflect.Descriptor instead. +func (*CreateAccountResult) Descriptor() ([]byte, []int) { + return file_cmctl_proto_rawDescGZIP(), []int{1} +} + +func (x *CreateAccountResult) GetAccountID() int64 { + if x != nil { + return x.AccountID + } + return 0 +} + +type DeleteAccountParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + AccountID int64 `protobuf:"varint,2,opt,name=accountID,proto3" json:"accountID,omitempty"` +} + +func (x *DeleteAccountParams) Reset() { + *x = DeleteAccountParams{} + if protoimpl.UnsafeEnabled { + mi := &file_cmctl_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAccountParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAccountParams) ProtoMessage() {} + +func (x *DeleteAccountParams) ProtoReflect() protoreflect.Message { + mi := &file_cmctl_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) +} + +// Deprecated: Use DeleteAccountParams.ProtoReflect.Descriptor instead. +func (*DeleteAccountParams) Descriptor() ([]byte, []int) { + return file_cmctl_proto_rawDescGZIP(), []int{2} +} + +func (x *DeleteAccountParams) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *DeleteAccountParams) GetAccountID() int64 { + if x != nil { + return x.AccountID + } + return 0 +} + +type DeleteAccountResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteAccountResult) Reset() { + *x = DeleteAccountResult{} + if protoimpl.UnsafeEnabled { + mi := &file_cmctl_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteAccountResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteAccountResult) ProtoMessage() {} + +func (x *DeleteAccountResult) ProtoReflect() protoreflect.Message { + mi := &file_cmctl_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) +} + +// Deprecated: Use DeleteAccountResult.ProtoReflect.Descriptor instead. +func (*DeleteAccountResult) Descriptor() ([]byte, []int) { + return file_cmctl_proto_rawDescGZIP(), []int{3} +} + +type UpdateAccountParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + AccountID int64 `protobuf:"varint,2,opt,name=accountID,proto3" json:"accountID,omitempty"` + NewUsername string `protobuf:"bytes,3,opt,name=newUsername,proto3" json:"newUsername,omitempty"` + NewPassword string `protobuf:"bytes,4,opt,name=newPassword,proto3" json:"newPassword,omitempty"` + Disabled bool `protobuf:"varint,5,opt,name=disabled,proto3" json:"disabled,omitempty"` +} + +func (x *UpdateAccountParams) Reset() { + *x = UpdateAccountParams{} + if protoimpl.UnsafeEnabled { + mi := &file_cmctl_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAccountParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAccountParams) ProtoMessage() {} + +func (x *UpdateAccountParams) ProtoReflect() protoreflect.Message { + mi := &file_cmctl_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) +} + +// Deprecated: Use UpdateAccountParams.ProtoReflect.Descriptor instead. +func (*UpdateAccountParams) Descriptor() ([]byte, []int) { + return file_cmctl_proto_rawDescGZIP(), []int{4} +} + +func (x *UpdateAccountParams) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *UpdateAccountParams) GetAccountID() int64 { + if x != nil { + return x.AccountID + } + return 0 +} + +func (x *UpdateAccountParams) GetNewUsername() string { + if x != nil { + return x.NewUsername + } + return "" +} + +func (x *UpdateAccountParams) GetNewPassword() string { + if x != nil { + return x.NewPassword + } + return "" +} + +func (x *UpdateAccountParams) GetDisabled() bool { + if x != nil { + return x.Disabled + } + return false +} + +type UpdateAccountResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateAccountResult) Reset() { + *x = UpdateAccountResult{} + if protoimpl.UnsafeEnabled { + mi := &file_cmctl_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateAccountResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateAccountResult) ProtoMessage() {} + +func (x *UpdateAccountResult) ProtoReflect() protoreflect.Message { + mi := &file_cmctl_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) +} + +// Deprecated: Use UpdateAccountResult.ProtoReflect.Descriptor instead. +func (*UpdateAccountResult) Descriptor() ([]byte, []int) { + return file_cmctl_proto_rawDescGZIP(), []int{5} +} + +type GetAccountParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetAccountParams) Reset() { + *x = GetAccountParams{} + if protoimpl.UnsafeEnabled { + mi := &file_cmctl_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccountParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountParams) ProtoMessage() {} + +func (x *GetAccountParams) ProtoReflect() protoreflect.Message { + mi := &file_cmctl_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 GetAccountParams.ProtoReflect.Descriptor instead. +func (*GetAccountParams) Descriptor() ([]byte, []int) { + return file_cmctl_proto_rawDescGZIP(), []int{6} +} + +type GetAccountResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetAccountResult) Reset() { + *x = GetAccountResult{} + if protoimpl.UnsafeEnabled { + mi := &file_cmctl_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetAccountResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAccountResult) ProtoMessage() {} + +func (x *GetAccountResult) ProtoReflect() protoreflect.Message { + mi := &file_cmctl_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) +} + +// Deprecated: Use GetAccountResult.ProtoReflect.Descriptor instead. +func (*GetAccountResult) Descriptor() ([]byte, []int) { + return file_cmctl_proto_rawDescGZIP(), []int{7} +} + +type ListAccountsParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListAccountsParams) Reset() { + *x = ListAccountsParams{} + if protoimpl.UnsafeEnabled { + mi := &file_cmctl_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAccountsParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccountsParams) ProtoMessage() {} + +func (x *ListAccountsParams) ProtoReflect() protoreflect.Message { + mi := &file_cmctl_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) +} + +// Deprecated: Use ListAccountsParams.ProtoReflect.Descriptor instead. +func (*ListAccountsParams) Descriptor() ([]byte, []int) { + return file_cmctl_proto_rawDescGZIP(), []int{8} +} + +type ListAccountsResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Accounts []*AccountShortDescr `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` +} + +func (x *ListAccountsResult) Reset() { + *x = ListAccountsResult{} + if protoimpl.UnsafeEnabled { + mi := &file_cmctl_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListAccountsResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListAccountsResult) ProtoMessage() {} + +func (x *ListAccountsResult) ProtoReflect() protoreflect.Message { + mi := &file_cmctl_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) +} + +// Deprecated: Use ListAccountsResult.ProtoReflect.Descriptor instead. +func (*ListAccountsResult) Descriptor() ([]byte, []int) { + return file_cmctl_proto_rawDescGZIP(), []int{9} +} + +func (x *ListAccountsResult) GetAccounts() []*AccountShortDescr { + if x != nil { + return x.Accounts + } + return nil +} + +type AccountShortDescr struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Disabled bool `protobuf:"varint,2,opt,name=disabled,proto3" json:"disabled,omitempty"` + CreatedAt string `protobuf:"bytes,3,opt,name=createdAt,proto3" json:"createdAt,omitempty"` + UpdatedAt string `protobuf:"bytes,4,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"` +} + +func (x *AccountShortDescr) Reset() { + *x = AccountShortDescr{} + if protoimpl.UnsafeEnabled { + mi := &file_cmctl_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountShortDescr) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountShortDescr) ProtoMessage() {} + +func (x *AccountShortDescr) ProtoReflect() protoreflect.Message { + mi := &file_cmctl_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) +} + +// Deprecated: Use AccountShortDescr.ProtoReflect.Descriptor instead. +func (*AccountShortDescr) Descriptor() ([]byte, []int) { + return file_cmctl_proto_rawDescGZIP(), []int{10} +} + +func (x *AccountShortDescr) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *AccountShortDescr) GetDisabled() bool { + if x != nil { + return x.Disabled + } + return false +} + +func (x *AccountShortDescr) GetCreatedAt() string { + if x != nil { + return x.CreatedAt + } + return "" +} + +func (x *AccountShortDescr) GetUpdatedAt() string { + if x != nil { + return x.UpdatedAt + } + return "" +} + type GetStatusParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -29,7 +573,7 @@ type GetStatusParams struct { func (x *GetStatusParams) Reset() { *x = GetStatusParams{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[0] + mi := &file_cmctl_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -42,7 +586,7 @@ func (x *GetStatusParams) String() string { func (*GetStatusParams) ProtoMessage() {} func (x *GetStatusParams) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[0] + mi := &file_cmctl_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -55,7 +599,7 @@ func (x *GetStatusParams) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStatusParams.ProtoReflect.Descriptor instead. func (*GetStatusParams) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{0} + return file_cmctl_proto_rawDescGZIP(), []int{11} } type GetStatusResult struct { @@ -69,7 +613,7 @@ type GetStatusResult struct { func (x *GetStatusResult) Reset() { *x = GetStatusResult{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[1] + mi := &file_cmctl_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -82,7 +626,7 @@ func (x *GetStatusResult) String() string { func (*GetStatusResult) ProtoMessage() {} func (x *GetStatusResult) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[1] + mi := &file_cmctl_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -95,7 +639,7 @@ func (x *GetStatusResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStatusResult.ProtoReflect.Descriptor instead. func (*GetStatusResult) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{1} + return file_cmctl_proto_rawDescGZIP(), []int{12} } func (x *GetStatusResult) GetMessage() string { @@ -121,7 +665,7 @@ type CreateIssuerPairParams struct { func (x *CreateIssuerPairParams) Reset() { *x = CreateIssuerPairParams{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[2] + mi := &file_cmctl_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -134,7 +678,7 @@ func (x *CreateIssuerPairParams) String() string { func (*CreateIssuerPairParams) ProtoMessage() {} func (x *CreateIssuerPairParams) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[2] + mi := &file_cmctl_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -147,7 +691,7 @@ func (x *CreateIssuerPairParams) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateIssuerPairParams.ProtoReflect.Descriptor instead. func (*CreateIssuerPairParams) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{2} + return file_cmctl_proto_rawDescGZIP(), []int{13} } func (x *CreateIssuerPairParams) GetIssuerCommonName() string { @@ -205,7 +749,7 @@ type CreateIssuerPairResult struct { func (x *CreateIssuerPairResult) Reset() { *x = CreateIssuerPairResult{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[3] + mi := &file_cmctl_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -218,7 +762,7 @@ func (x *CreateIssuerPairResult) String() string { func (*CreateIssuerPairResult) ProtoMessage() {} func (x *CreateIssuerPairResult) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[3] + mi := &file_cmctl_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -231,7 +775,7 @@ func (x *CreateIssuerPairResult) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateIssuerPairResult.ProtoReflect.Descriptor instead. func (*CreateIssuerPairResult) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{3} + return file_cmctl_proto_rawDescGZIP(), []int{14} } func (x *CreateIssuerPairResult) GetIssuerID() int64 { @@ -267,7 +811,7 @@ type GetIssuerCertificateParams struct { func (x *GetIssuerCertificateParams) Reset() { *x = GetIssuerCertificateParams{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[4] + mi := &file_cmctl_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -280,7 +824,7 @@ func (x *GetIssuerCertificateParams) String() string { func (*GetIssuerCertificateParams) ProtoMessage() {} func (x *GetIssuerCertificateParams) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[4] + mi := &file_cmctl_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -293,7 +837,7 @@ func (x *GetIssuerCertificateParams) ProtoReflect() protoreflect.Message { // Deprecated: Use GetIssuerCertificateParams.ProtoReflect.Descriptor instead. func (*GetIssuerCertificateParams) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{4} + return file_cmctl_proto_rawDescGZIP(), []int{15} } func (x *GetIssuerCertificateParams) GetIssuerID() int64 { @@ -322,12 +866,13 @@ type GetIssuerCertificateResult struct { SignerName string `protobuf:"bytes,5,opt,name=signerName,proto3" json:"signerName,omitempty"` Revoked bool `protobuf:"varint,6,opt,name=revoked,proto3" json:"revoked,omitempty"` SignerCertificates []string `protobuf:"bytes,7,rep,name=signerCertificates,proto3" json:"signerCertificates,omitempty"` + SignerNames []string `protobuf:"bytes,8,rep,name=signerNames,proto3" json:"signerNames,omitempty"` } func (x *GetIssuerCertificateResult) Reset() { *x = GetIssuerCertificateResult{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[5] + mi := &file_cmctl_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -340,7 +885,7 @@ func (x *GetIssuerCertificateResult) String() string { func (*GetIssuerCertificateResult) ProtoMessage() {} func (x *GetIssuerCertificateResult) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[5] + mi := &file_cmctl_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -353,7 +898,7 @@ func (x *GetIssuerCertificateResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetIssuerCertificateResult.ProtoReflect.Descriptor instead. func (*GetIssuerCertificateResult) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{5} + return file_cmctl_proto_rawDescGZIP(), []int{16} } func (x *GetIssuerCertificateResult) GetIssuerID() int64 { @@ -405,6 +950,13 @@ func (x *GetIssuerCertificateResult) GetSignerCertificates() []string { return nil } +func (x *GetIssuerCertificateResult) GetSignerNames() []string { + if x != nil { + return x.SignerNames + } + return nil +} + type ImportIssuerPairParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -418,7 +970,7 @@ type ImportIssuerPairParams struct { func (x *ImportIssuerPairParams) Reset() { *x = ImportIssuerPairParams{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[6] + mi := &file_cmctl_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -431,7 +983,7 @@ func (x *ImportIssuerPairParams) String() string { func (*ImportIssuerPairParams) ProtoMessage() {} func (x *ImportIssuerPairParams) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[6] + mi := &file_cmctl_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -444,7 +996,7 @@ func (x *ImportIssuerPairParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ImportIssuerPairParams.ProtoReflect.Descriptor instead. func (*ImportIssuerPairParams) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{6} + return file_cmctl_proto_rawDescGZIP(), []int{17} } func (x *ImportIssuerPairParams) GetCertificate() string { @@ -480,7 +1032,7 @@ type ImportIssuerPairResult struct { func (x *ImportIssuerPairResult) Reset() { *x = ImportIssuerPairResult{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[7] + mi := &file_cmctl_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -493,7 +1045,7 @@ func (x *ImportIssuerPairResult) String() string { func (*ImportIssuerPairResult) ProtoMessage() {} func (x *ImportIssuerPairResult) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[7] + mi := &file_cmctl_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -506,7 +1058,7 @@ func (x *ImportIssuerPairResult) ProtoReflect() protoreflect.Message { // Deprecated: Use ImportIssuerPairResult.ProtoReflect.Descriptor instead. func (*ImportIssuerPairResult) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{7} + return file_cmctl_proto_rawDescGZIP(), []int{18} } func (x *ImportIssuerPairResult) GetIssuerID() int64 { @@ -535,7 +1087,7 @@ type RevokeIssuerPairParams struct { func (x *RevokeIssuerPairParams) Reset() { *x = RevokeIssuerPairParams{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[8] + mi := &file_cmctl_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -548,7 +1100,7 @@ func (x *RevokeIssuerPairParams) String() string { func (*RevokeIssuerPairParams) ProtoMessage() {} func (x *RevokeIssuerPairParams) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[8] + mi := &file_cmctl_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -561,7 +1113,7 @@ func (x *RevokeIssuerPairParams) ProtoReflect() protoreflect.Message { // Deprecated: Use RevokeIssuerPairParams.ProtoReflect.Descriptor instead. func (*RevokeIssuerPairParams) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{8} + return file_cmctl_proto_rawDescGZIP(), []int{19} } func (x *RevokeIssuerPairParams) GetIssuerID() int64 { @@ -587,7 +1139,7 @@ type RevokeIssuerPairResult struct { func (x *RevokeIssuerPairResult) Reset() { *x = RevokeIssuerPairResult{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[9] + mi := &file_cmctl_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -600,7 +1152,7 @@ func (x *RevokeIssuerPairResult) String() string { func (*RevokeIssuerPairResult) ProtoMessage() {} func (x *RevokeIssuerPairResult) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[9] + mi := &file_cmctl_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -613,7 +1165,7 @@ func (x *RevokeIssuerPairResult) ProtoReflect() protoreflect.Message { // Deprecated: Use RevokeIssuerPairResult.ProtoReflect.Descriptor instead. func (*RevokeIssuerPairResult) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{9} + return file_cmctl_proto_rawDescGZIP(), []int{20} } type UnrevokeIssuerPairParams struct { @@ -628,7 +1180,7 @@ type UnrevokeIssuerPairParams struct { func (x *UnrevokeIssuerPairParams) Reset() { *x = UnrevokeIssuerPairParams{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[10] + mi := &file_cmctl_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -641,7 +1193,7 @@ func (x *UnrevokeIssuerPairParams) String() string { func (*UnrevokeIssuerPairParams) ProtoMessage() {} func (x *UnrevokeIssuerPairParams) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[10] + mi := &file_cmctl_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -654,7 +1206,7 @@ func (x *UnrevokeIssuerPairParams) ProtoReflect() protoreflect.Message { // Deprecated: Use UnrevokeIssuerPairParams.ProtoReflect.Descriptor instead. func (*UnrevokeIssuerPairParams) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{10} + return file_cmctl_proto_rawDescGZIP(), []int{21} } func (x *UnrevokeIssuerPairParams) GetIssuerID() int64 { @@ -680,7 +1232,7 @@ type UnrevokeIssuerPairResult struct { func (x *UnrevokeIssuerPairResult) Reset() { *x = UnrevokeIssuerPairResult{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[11] + mi := &file_cmctl_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -693,7 +1245,7 @@ func (x *UnrevokeIssuerPairResult) String() string { func (*UnrevokeIssuerPairResult) ProtoMessage() {} func (x *UnrevokeIssuerPairResult) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[11] + mi := &file_cmctl_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -706,7 +1258,7 @@ func (x *UnrevokeIssuerPairResult) ProtoReflect() protoreflect.Message { // Deprecated: Use UnrevokeIssuerPairResult.ProtoReflect.Descriptor instead. func (*UnrevokeIssuerPairResult) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{11} + return file_cmctl_proto_rawDescGZIP(), []int{22} } type ListIssuerPairsParams struct { @@ -718,7 +1270,7 @@ type ListIssuerPairsParams struct { func (x *ListIssuerPairsParams) Reset() { *x = ListIssuerPairsParams{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[12] + mi := &file_cmctl_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -731,7 +1283,7 @@ func (x *ListIssuerPairsParams) String() string { func (*ListIssuerPairsParams) ProtoMessage() {} func (x *ListIssuerPairsParams) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[12] + mi := &file_cmctl_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -744,7 +1296,7 @@ func (x *ListIssuerPairsParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ListIssuerPairsParams.ProtoReflect.Descriptor instead. func (*ListIssuerPairsParams) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{12} + return file_cmctl_proto_rawDescGZIP(), []int{23} } type ListIssuerPairsResult struct { @@ -758,7 +1310,7 @@ type ListIssuerPairsResult struct { func (x *ListIssuerPairsResult) Reset() { *x = ListIssuerPairsResult{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[13] + mi := &file_cmctl_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -771,7 +1323,7 @@ func (x *ListIssuerPairsResult) String() string { func (*ListIssuerPairsResult) ProtoMessage() {} func (x *ListIssuerPairsResult) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[13] + mi := &file_cmctl_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -784,7 +1336,7 @@ func (x *ListIssuerPairsResult) ProtoReflect() protoreflect.Message { // Deprecated: Use ListIssuerPairsResult.ProtoReflect.Descriptor instead. func (*ListIssuerPairsResult) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{13} + return file_cmctl_proto_rawDescGZIP(), []int{24} } func (x *ListIssuerPairsResult) GetIssuers() []*IssierShortDescriptor { @@ -809,7 +1361,7 @@ type IssierShortDescriptor struct { func (x *IssierShortDescriptor) Reset() { *x = IssierShortDescriptor{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[14] + mi := &file_cmctl_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -822,7 +1374,7 @@ func (x *IssierShortDescriptor) String() string { func (*IssierShortDescriptor) ProtoMessage() {} func (x *IssierShortDescriptor) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[14] + mi := &file_cmctl_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -835,7 +1387,7 @@ func (x *IssierShortDescriptor) ProtoReflect() protoreflect.Message { // Deprecated: Use IssierShortDescriptor.ProtoReflect.Descriptor instead. func (*IssierShortDescriptor) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{14} + return file_cmctl_proto_rawDescGZIP(), []int{25} } func (x *IssierShortDescriptor) GetIssuerID() int64 { @@ -888,7 +1440,7 @@ type CreateServicePairParams struct { func (x *CreateServicePairParams) Reset() { *x = CreateServicePairParams{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[15] + mi := &file_cmctl_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -901,7 +1453,7 @@ func (x *CreateServicePairParams) String() string { func (*CreateServicePairParams) ProtoMessage() {} func (x *CreateServicePairParams) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[15] + mi := &file_cmctl_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -914,7 +1466,7 @@ func (x *CreateServicePairParams) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateServicePairParams.ProtoReflect.Descriptor instead. func (*CreateServicePairParams) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{15} + return file_cmctl_proto_rawDescGZIP(), []int{26} } func (x *CreateServicePairParams) GetIssuerName() string { @@ -969,7 +1521,7 @@ type CreateServicePairResult struct { func (x *CreateServicePairResult) Reset() { *x = CreateServicePairResult{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[16] + mi := &file_cmctl_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -982,7 +1534,7 @@ func (x *CreateServicePairResult) String() string { func (*CreateServicePairResult) ProtoMessage() {} func (x *CreateServicePairResult) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[16] + mi := &file_cmctl_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -995,7 +1547,7 @@ func (x *CreateServicePairResult) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateServicePairResult.ProtoReflect.Descriptor instead. func (*CreateServicePairResult) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{16} + return file_cmctl_proto_rawDescGZIP(), []int{27} } func (x *CreateServicePairResult) GetServiceID() int64 { @@ -1061,7 +1613,7 @@ type RevokeServicePairParams struct { func (x *RevokeServicePairParams) Reset() { *x = RevokeServicePairParams{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[17] + mi := &file_cmctl_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1074,7 +1626,7 @@ func (x *RevokeServicePairParams) String() string { func (*RevokeServicePairParams) ProtoMessage() {} func (x *RevokeServicePairParams) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[17] + mi := &file_cmctl_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1087,7 +1639,7 @@ func (x *RevokeServicePairParams) ProtoReflect() protoreflect.Message { // Deprecated: Use RevokeServicePairParams.ProtoReflect.Descriptor instead. func (*RevokeServicePairParams) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{17} + return file_cmctl_proto_rawDescGZIP(), []int{28} } func (x *RevokeServicePairParams) GetServiceID() int64 { @@ -1127,7 +1679,7 @@ type RevokeServicePairResult struct { func (x *RevokeServicePairResult) Reset() { *x = RevokeServicePairResult{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[18] + mi := &file_cmctl_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1140,7 +1692,7 @@ func (x *RevokeServicePairResult) String() string { func (*RevokeServicePairResult) ProtoMessage() {} func (x *RevokeServicePairResult) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[18] + mi := &file_cmctl_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1153,7 +1705,7 @@ func (x *RevokeServicePairResult) ProtoReflect() protoreflect.Message { // Deprecated: Use RevokeServicePairResult.ProtoReflect.Descriptor instead. func (*RevokeServicePairResult) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{18} + return file_cmctl_proto_rawDescGZIP(), []int{29} } type UnrevokeServicePairParams struct { @@ -1170,7 +1722,7 @@ type UnrevokeServicePairParams struct { func (x *UnrevokeServicePairParams) Reset() { *x = UnrevokeServicePairParams{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[19] + mi := &file_cmctl_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1183,7 +1735,7 @@ func (x *UnrevokeServicePairParams) String() string { func (*UnrevokeServicePairParams) ProtoMessage() {} func (x *UnrevokeServicePairParams) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[19] + mi := &file_cmctl_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1196,7 +1748,7 @@ func (x *UnrevokeServicePairParams) ProtoReflect() protoreflect.Message { // Deprecated: Use UnrevokeServicePairParams.ProtoReflect.Descriptor instead. func (*UnrevokeServicePairParams) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{19} + return file_cmctl_proto_rawDescGZIP(), []int{30} } func (x *UnrevokeServicePairParams) GetServiceID() int64 { @@ -1236,7 +1788,7 @@ type UnrevokeServicePairResult struct { func (x *UnrevokeServicePairResult) Reset() { *x = UnrevokeServicePairResult{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[20] + mi := &file_cmctl_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1249,7 +1801,7 @@ func (x *UnrevokeServicePairResult) String() string { func (*UnrevokeServicePairResult) ProtoMessage() {} func (x *UnrevokeServicePairResult) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[20] + mi := &file_cmctl_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1262,7 +1814,7 @@ func (x *UnrevokeServicePairResult) ProtoReflect() protoreflect.Message { // Deprecated: Use UnrevokeServicePairResult.ProtoReflect.Descriptor instead. func (*UnrevokeServicePairResult) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{20} + return file_cmctl_proto_rawDescGZIP(), []int{31} } type ServiceShortDescriptor struct { @@ -1280,7 +1832,7 @@ type ServiceShortDescriptor struct { func (x *ServiceShortDescriptor) Reset() { *x = ServiceShortDescriptor{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[21] + mi := &file_cmctl_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1293,7 +1845,7 @@ func (x *ServiceShortDescriptor) String() string { func (*ServiceShortDescriptor) ProtoMessage() {} func (x *ServiceShortDescriptor) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[21] + mi := &file_cmctl_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1306,7 +1858,7 @@ func (x *ServiceShortDescriptor) ProtoReflect() protoreflect.Message { // Deprecated: Use ServiceShortDescriptor.ProtoReflect.Descriptor instead. func (*ServiceShortDescriptor) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{21} + return file_cmctl_proto_rawDescGZIP(), []int{32} } func (x *ServiceShortDescriptor) GetServiceID() int64 { @@ -1353,7 +1905,7 @@ type ListServicePairsParams struct { func (x *ListServicePairsParams) Reset() { *x = ListServicePairsParams{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[22] + mi := &file_cmctl_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1366,7 +1918,7 @@ func (x *ListServicePairsParams) String() string { func (*ListServicePairsParams) ProtoMessage() {} func (x *ListServicePairsParams) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[22] + mi := &file_cmctl_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1379,7 +1931,7 @@ func (x *ListServicePairsParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ListServicePairsParams.ProtoReflect.Descriptor instead. func (*ListServicePairsParams) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{22} + return file_cmctl_proto_rawDescGZIP(), []int{33} } type ListServicePairsResult struct { @@ -1393,7 +1945,7 @@ type ListServicePairsResult struct { func (x *ListServicePairsResult) Reset() { *x = ListServicePairsResult{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[23] + mi := &file_cmctl_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1406,7 +1958,7 @@ func (x *ListServicePairsResult) String() string { func (*ListServicePairsResult) ProtoMessage() {} func (x *ListServicePairsResult) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[23] + mi := &file_cmctl_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1419,7 +1971,7 @@ func (x *ListServicePairsResult) ProtoReflect() protoreflect.Message { // Deprecated: Use ListServicePairsResult.ProtoReflect.Descriptor instead. func (*ListServicePairsResult) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{23} + return file_cmctl_proto_rawDescGZIP(), []int{34} } func (x *ListServicePairsResult) GetServices() []*ServiceShortDescriptor { @@ -1441,7 +1993,7 @@ type GetServicePairParams struct { func (x *GetServicePairParams) Reset() { *x = GetServicePairParams{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[24] + mi := &file_cmctl_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1454,7 +2006,7 @@ func (x *GetServicePairParams) String() string { func (*GetServicePairParams) ProtoMessage() {} func (x *GetServicePairParams) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[24] + mi := &file_cmctl_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1467,7 +2019,7 @@ func (x *GetServicePairParams) ProtoReflect() protoreflect.Message { // Deprecated: Use GetServicePairParams.ProtoReflect.Descriptor instead. func (*GetServicePairParams) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{24} + return file_cmctl_proto_rawDescGZIP(), []int{35} } func (x *GetServicePairParams) GetServiceID() int64 { @@ -1502,7 +2054,7 @@ type GetServicePairResult struct { func (x *GetServicePairResult) Reset() { *x = GetServicePairResult{} if protoimpl.UnsafeEnabled { - mi := &file_cmctl_proto_msgTypes[25] + mi := &file_cmctl_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1515,7 +2067,7 @@ func (x *GetServicePairResult) String() string { func (*GetServicePairResult) ProtoMessage() {} func (x *GetServicePairResult) ProtoReflect() protoreflect.Message { - mi := &file_cmctl_proto_msgTypes[25] + mi := &file_cmctl_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1528,7 +2080,7 @@ func (x *GetServicePairResult) ProtoReflect() protoreflect.Message { // Deprecated: Use GetServicePairResult.ProtoReflect.Descriptor instead. func (*GetServicePairResult) Descriptor() ([]byte, []int) { - return file_cmctl_proto_rawDescGZIP(), []int{25} + return file_cmctl_proto_rawDescGZIP(), []int{36} } func (x *GetServicePairResult) GetName() string { @@ -1592,275 +2144,353 @@ var File_cmctl_proto protoreflect.FileDescriptor var file_cmctl_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x63, 0x6d, 0x63, 0x74, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x22, 0x11, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x22, 0x2b, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x22, 0xde, 0x01, 0x0a, 0x16, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2a, 0x0a, 0x10, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x53, - 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x53, 0x69, - 0x7a, 0x65, 0x22, 0x76, 0x0a, 0x16, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, - 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x58, 0x0a, 0x1a, 0x67, 0x65, - 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xf4, 0x01, 0x0a, 0x1a, 0x67, 0x65, 0x74, 0x49, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, - 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, - 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x73, + 0x6c, 0x22, 0x4d, 0x0a, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 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, 0x33, 0x0a, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x44, 0x22, 0x4f, 0x0a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 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, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x22, 0x15, 0x0a, 0x13, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xaf, 0x01, + 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 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, 0x1c, 0x0a, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x44, 0x12, + 0x20, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, + 0x15, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x12, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x67, 0x65, + 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x14, + 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x22, 0x57, 0x0a, 0x12, 0x6c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x41, 0x0a, 0x08, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, + 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x87, 0x01, + 0x0a, 0x11, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, + 0x73, 0x63, 0x72, 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, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x67, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x2b, 0x0a, 0x0f, 0x67, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xde, 0x01, 0x0a, 0x16, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x69, 0x73, + 0x73, 0x75, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, + 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6d, 0x65, 0x64, 0x69, 0x61, + 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, + 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, + 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x12, 0x18, + 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6b, 0x65, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x76, 0x0a, 0x16, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, + 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x22, 0x58, 0x0a, 0x1a, 0x67, 0x65, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, + 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x96, 0x02, 0x0a, 0x1a, 0x67, + 0x65, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, + 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, + 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, + 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x22, 0x78, 0x0a, 0x16, 0x69, - 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x10, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x54, 0x0a, 0x16, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x49, - 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x69, - 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x54, 0x0a, 0x16, 0x72, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, - 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, - 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, - 0x65, 0x22, 0x18, 0x0a, 0x16, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, - 0x72, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x56, 0x0a, 0x18, 0x75, - 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, - 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x22, 0x78, 0x0a, 0x16, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x73, 0x73, + 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x20, 0x0a, + 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x54, 0x0a, + 0x16, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, + 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, - 0x61, 0x6d, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, - 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, - 0x17, 0x0a, 0x15, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, - 0x72, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x5c, 0x0a, 0x15, 0x6c, 0x69, 0x73, 0x74, - 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x43, 0x0a, 0x07, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x49, 0x73, 0x73, 0x69, 0x65, 0x72, 0x53, 0x68, - 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x69, - 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x15, 0x49, 0x73, 0x73, 0x69, 0x65, - 0x72, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x22, 0xc7, 0x01, 0x0a, 0x17, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x2c, - 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x09, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x6e, - 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, - 0x22, 0xf7, 0x01, 0x0a, 0x17, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x09, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, - 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, - 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x9b, 0x01, 0x0a, 0x17, 0x72, - 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x72, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x19, 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x12, - 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x22, 0xa0, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x72, - 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, - 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x60, 0x0a, - 0x16, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x46, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, - 0x56, 0x0a, 0x14, 0x67, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, - 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x92, 0x02, 0x0a, 0x14, 0x67, 0x65, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, - 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x12, 0x2c, - 0x0a, 0x11, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x69, 0x73, 0x73, 0x75, 0x65, - 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x12, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x32, 0xb4, 0x0a, 0x0a, - 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x57, 0x0a, 0x09, 0x67, 0x65, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x67, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x23, 0x2e, 0x63, 0x65, 0x72, - 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, - 0x00, 0x12, 0x6c, 0x0a, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, - 0x72, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x1a, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x73, 0x73, - 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, - 0x6c, 0x0a, 0x10, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, - 0x61, 0x69, 0x72, 0x12, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x49, - 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, - 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, - 0x72, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x6c, 0x0a, - 0x10, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, - 0x72, 0x12, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x73, 0x73, - 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2a, 0x2e, - 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, - 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x72, 0x0a, 0x12, 0x75, + 0x61, 0x6d, 0x65, 0x22, 0x54, 0x0a, 0x16, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x73, 0x73, + 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x0a, + 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x73, + 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, + 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x72, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x22, 0x56, 0x0a, 0x18, 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x69, + 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1a, 0x0a, 0x18, 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, - 0x72, 0x12, 0x2c, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, - 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, - 0x2c, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x73, 0x73, - 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, - 0x69, 0x0a, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, - 0x72, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x29, 0x2e, - 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, - 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x78, 0x0a, 0x14, 0x67, 0x65, - 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x67, 0x65, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, - 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x1a, 0x2e, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x67, 0x65, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, - 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x22, 0x00, 0x12, 0x6f, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2b, 0x2e, 0x63, 0x65, 0x72, 0x74, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2b, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x6f, 0x0a, 0x11, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2b, 0x2e, 0x63, 0x65, 0x72, + 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x6c, 0x69, 0x73, 0x74, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x22, 0x5c, 0x0a, 0x15, 0x6c, 0x69, 0x73, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, + 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x43, 0x0a, 0x07, 0x69, 0x73, 0x73, + 0x75, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, - 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, - 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2b, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x72, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x75, 0x0a, 0x13, 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2d, 0x2e, + 0x49, 0x73, 0x73, 0x69, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x07, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x73, 0x22, 0x9d, + 0x01, 0x0a, 0x15, 0x49, 0x73, 0x73, 0x69, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, + 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, + 0x65, 0x72, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x22, 0xc7, + 0x01, 0x0a, 0x17, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, + 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, + 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, + 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x69, 0x6e, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x69, 0x6e, 0x65, 0x74, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0xf7, 0x01, 0x0a, 0x17, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x11, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, + 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x22, 0x9b, 0x01, 0x0a, 0x17, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, + 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, + 0x0a, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x22, 0x19, 0x0a, 0x17, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x19, + 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, + 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, + 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x75, + 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, + 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xa0, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x44, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, + 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, + 0x44, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x6c, + 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x60, 0x0a, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x46, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x68, + 0x6f, 0x72, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0x56, 0x0a, 0x14, 0x67, 0x65, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x44, 0x12, 0x20, 0x0a, + 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, + 0x92, 0x02, 0x0a, 0x14, 0x67, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, + 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, + 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, + 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, + 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x11, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x12, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x73, 0x32, 0xa1, 0x0e, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x12, 0x57, 0x0a, 0x09, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2d, 0x2e, 0x63, + 0x6f, 0x6c, 0x2e, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x1a, 0x23, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x10, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2a, 0x2e, + 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, + 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x10, 0x69, 0x6d, 0x70, 0x6f, 0x72, + 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2a, 0x2e, 0x63, 0x65, + 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x2e, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, + 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x69, 0x6d, 0x70, + 0x6f, 0x72, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x72, + 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x72, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x22, 0x00, 0x12, 0x72, 0x0a, 0x12, 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2c, 0x2e, 0x63, 0x65, 0x72, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x75, + 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, + 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x75, 0x6e, 0x72, + 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x63, 0x65, 0x72, + 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, + 0x6c, 0x69, 0x73, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x73, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x29, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x49, + 0x73, 0x73, 0x75, 0x65, 0x72, 0x50, 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x22, 0x00, 0x12, 0x78, 0x0a, 0x14, 0x67, 0x65, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x63, 0x65, 0x72, + 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, + 0x67, 0x65, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2e, 0x2e, 0x63, 0x65, 0x72, + 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, + 0x67, 0x65, 0x74, 0x49, 0x73, 0x73, 0x75, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x6f, 0x0a, 0x11, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, + 0x72, 0x12, 0x2b, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2b, + 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x6f, 0x0a, + 0x11, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, + 0x69, 0x72, 0x12, 0x2b, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, + 0x2b, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x75, + 0x0a, 0x13, 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x2d, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x75, 0x6e, 0x72, 0x65, 0x76, + 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2d, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, + 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x10, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x6c, + 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x0e, 0x67, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x28, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x67, 0x65, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, + 0x28, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x67, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, + 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x0d, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x2e, 0x75, 0x6e, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x6c, 0x0a, - 0x10, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, - 0x73, 0x12, 0x2a, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2a, 0x2e, - 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, - 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x0e, 0x67, - 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x12, 0x28, 0x2e, - 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2e, 0x67, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, - 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x28, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x67, 0x65, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x22, 0x00, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x63, 0x6d, 0x63, 0x74, 0x6c, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x27, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, + 0x12, 0x63, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x27, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x27, 0x2e, 0x63, 0x65, 0x72, + 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, + 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, + 0x27, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0a, 0x67, 0x65, + 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x24, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x67, 0x65, + 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x24, + 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2e, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x60, 0x0a, 0x0c, 0x6c, 0x69, 0x73, 0x74, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x6c, 0x69, 0x73, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26, + 0x2e, 0x63, 0x65, 0x72, 0x74, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x63, 0x6d, + 0x63, 0x74, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1875,67 +2505,89 @@ func file_cmctl_proto_rawDescGZIP() []byte { return file_cmctl_proto_rawDescData } -var file_cmctl_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_cmctl_proto_msgTypes = make([]protoimpl.MessageInfo, 37) var file_cmctl_proto_goTypes = []interface{}{ - (*GetStatusParams)(nil), // 0: certmanagercontrol.getStatusParams - (*GetStatusResult)(nil), // 1: certmanagercontrol.getStatusResult - (*CreateIssuerPairParams)(nil), // 2: certmanagercontrol.createIssuerPairParams - (*CreateIssuerPairResult)(nil), // 3: certmanagercontrol.createIssuerPairResult - (*GetIssuerCertificateParams)(nil), // 4: certmanagercontrol.getIssuerCertificateParams - (*GetIssuerCertificateResult)(nil), // 5: certmanagercontrol.getIssuerCertificateResult - (*ImportIssuerPairParams)(nil), // 6: certmanagercontrol.importIssuerPairParams - (*ImportIssuerPairResult)(nil), // 7: certmanagercontrol.importIssuerPairResult - (*RevokeIssuerPairParams)(nil), // 8: certmanagercontrol.revokeIssuerPairParams - (*RevokeIssuerPairResult)(nil), // 9: certmanagercontrol.revokeIssuerPairResult - (*UnrevokeIssuerPairParams)(nil), // 10: certmanagercontrol.unrevokeIssuerPairParams - (*UnrevokeIssuerPairResult)(nil), // 11: certmanagercontrol.unrevokeIssuerPairResult - (*ListIssuerPairsParams)(nil), // 12: certmanagercontrol.listIssuerPairsParams - (*ListIssuerPairsResult)(nil), // 13: certmanagercontrol.listIssuerPairsResult - (*IssierShortDescriptor)(nil), // 14: certmanagercontrol.IssierShortDescriptor - (*CreateServicePairParams)(nil), // 15: certmanagercontrol.createServicePairParams - (*CreateServicePairResult)(nil), // 16: certmanagercontrol.createServicePairResult - (*RevokeServicePairParams)(nil), // 17: certmanagercontrol.revokeServicePairParams - (*RevokeServicePairResult)(nil), // 18: certmanagercontrol.revokeServicePairResult - (*UnrevokeServicePairParams)(nil), // 19: certmanagercontrol.unrevokeServicePairParams - (*UnrevokeServicePairResult)(nil), // 20: certmanagercontrol.unrevokeServicePairResult - (*ServiceShortDescriptor)(nil), // 21: certmanagercontrol.ServiceShortDescriptor - (*ListServicePairsParams)(nil), // 22: certmanagercontrol.listServicePairsParams - (*ListServicePairsResult)(nil), // 23: certmanagercontrol.listServicePairsResult - (*GetServicePairParams)(nil), // 24: certmanagercontrol.getServicePairParams - (*GetServicePairResult)(nil), // 25: certmanagercontrol.getServicePairResult + (*CreateAccountParams)(nil), // 0: certmanagercontrol.createAccountParams + (*CreateAccountResult)(nil), // 1: certmanagercontrol.createAccountResult + (*DeleteAccountParams)(nil), // 2: certmanagercontrol.deleteAccountParams + (*DeleteAccountResult)(nil), // 3: certmanagercontrol.deleteAccountResult + (*UpdateAccountParams)(nil), // 4: certmanagercontrol.updateAccountParams + (*UpdateAccountResult)(nil), // 5: certmanagercontrol.updateAccountResult + (*GetAccountParams)(nil), // 6: certmanagercontrol.getAccountParams + (*GetAccountResult)(nil), // 7: certmanagercontrol.getAccountResult + (*ListAccountsParams)(nil), // 8: certmanagercontrol.listAccountsParams + (*ListAccountsResult)(nil), // 9: certmanagercontrol.listAccountsResult + (*AccountShortDescr)(nil), // 10: certmanagercontrol.accountShortDescr + (*GetStatusParams)(nil), // 11: certmanagercontrol.getStatusParams + (*GetStatusResult)(nil), // 12: certmanagercontrol.getStatusResult + (*CreateIssuerPairParams)(nil), // 13: certmanagercontrol.createIssuerPairParams + (*CreateIssuerPairResult)(nil), // 14: certmanagercontrol.createIssuerPairResult + (*GetIssuerCertificateParams)(nil), // 15: certmanagercontrol.getIssuerCertificateParams + (*GetIssuerCertificateResult)(nil), // 16: certmanagercontrol.getIssuerCertificateResult + (*ImportIssuerPairParams)(nil), // 17: certmanagercontrol.importIssuerPairParams + (*ImportIssuerPairResult)(nil), // 18: certmanagercontrol.importIssuerPairResult + (*RevokeIssuerPairParams)(nil), // 19: certmanagercontrol.revokeIssuerPairParams + (*RevokeIssuerPairResult)(nil), // 20: certmanagercontrol.revokeIssuerPairResult + (*UnrevokeIssuerPairParams)(nil), // 21: certmanagercontrol.unrevokeIssuerPairParams + (*UnrevokeIssuerPairResult)(nil), // 22: certmanagercontrol.unrevokeIssuerPairResult + (*ListIssuerPairsParams)(nil), // 23: certmanagercontrol.listIssuerPairsParams + (*ListIssuerPairsResult)(nil), // 24: certmanagercontrol.listIssuerPairsResult + (*IssierShortDescriptor)(nil), // 25: certmanagercontrol.IssierShortDescriptor + (*CreateServicePairParams)(nil), // 26: certmanagercontrol.createServicePairParams + (*CreateServicePairResult)(nil), // 27: certmanagercontrol.createServicePairResult + (*RevokeServicePairParams)(nil), // 28: certmanagercontrol.revokeServicePairParams + (*RevokeServicePairResult)(nil), // 29: certmanagercontrol.revokeServicePairResult + (*UnrevokeServicePairParams)(nil), // 30: certmanagercontrol.unrevokeServicePairParams + (*UnrevokeServicePairResult)(nil), // 31: certmanagercontrol.unrevokeServicePairResult + (*ServiceShortDescriptor)(nil), // 32: certmanagercontrol.ServiceShortDescriptor + (*ListServicePairsParams)(nil), // 33: certmanagercontrol.listServicePairsParams + (*ListServicePairsResult)(nil), // 34: certmanagercontrol.listServicePairsResult + (*GetServicePairParams)(nil), // 35: certmanagercontrol.getServicePairParams + (*GetServicePairResult)(nil), // 36: certmanagercontrol.getServicePairResult } var file_cmctl_proto_depIdxs = []int32{ - 14, // 0: certmanagercontrol.listIssuerPairsResult.issuers:type_name -> certmanagercontrol.IssierShortDescriptor - 21, // 1: certmanagercontrol.listServicePairsResult.services:type_name -> certmanagercontrol.ServiceShortDescriptor - 0, // 2: certmanagercontrol.Control.getStatus:input_type -> certmanagercontrol.getStatusParams - 2, // 3: certmanagercontrol.Control.createIssuerPair:input_type -> certmanagercontrol.createIssuerPairParams - 6, // 4: certmanagercontrol.Control.importIssuerPair:input_type -> certmanagercontrol.importIssuerPairParams - 8, // 5: certmanagercontrol.Control.revokeIssuerPair:input_type -> certmanagercontrol.revokeIssuerPairParams - 10, // 6: certmanagercontrol.Control.unrevokeIssuerPair:input_type -> certmanagercontrol.unrevokeIssuerPairParams - 12, // 7: certmanagercontrol.Control.listIssuerPairs:input_type -> certmanagercontrol.listIssuerPairsParams - 4, // 8: certmanagercontrol.Control.getIssuerCertificate:input_type -> certmanagercontrol.getIssuerCertificateParams - 15, // 9: certmanagercontrol.Control.createServicePair:input_type -> certmanagercontrol.createServicePairParams - 17, // 10: certmanagercontrol.Control.revokeServicePair:input_type -> certmanagercontrol.revokeServicePairParams - 19, // 11: certmanagercontrol.Control.unrevokeServicePair:input_type -> certmanagercontrol.unrevokeServicePairParams - 22, // 12: certmanagercontrol.Control.listServicePairs:input_type -> certmanagercontrol.listServicePairsParams - 24, // 13: certmanagercontrol.Control.getServicePair:input_type -> certmanagercontrol.getServicePairParams - 1, // 14: certmanagercontrol.Control.getStatus:output_type -> certmanagercontrol.getStatusResult - 3, // 15: certmanagercontrol.Control.createIssuerPair:output_type -> certmanagercontrol.createIssuerPairResult - 7, // 16: certmanagercontrol.Control.importIssuerPair:output_type -> certmanagercontrol.importIssuerPairResult - 9, // 17: certmanagercontrol.Control.revokeIssuerPair:output_type -> certmanagercontrol.revokeIssuerPairResult - 11, // 18: certmanagercontrol.Control.unrevokeIssuerPair:output_type -> certmanagercontrol.unrevokeIssuerPairResult - 13, // 19: certmanagercontrol.Control.listIssuerPairs:output_type -> certmanagercontrol.listIssuerPairsResult - 5, // 20: certmanagercontrol.Control.getIssuerCertificate:output_type -> certmanagercontrol.getIssuerCertificateResult - 16, // 21: certmanagercontrol.Control.createServicePair:output_type -> certmanagercontrol.createServicePairResult - 18, // 22: certmanagercontrol.Control.revokeServicePair:output_type -> certmanagercontrol.revokeServicePairResult - 20, // 23: certmanagercontrol.Control.unrevokeServicePair:output_type -> certmanagercontrol.unrevokeServicePairResult - 23, // 24: certmanagercontrol.Control.listServicePairs:output_type -> certmanagercontrol.listServicePairsResult - 25, // 25: certmanagercontrol.Control.getServicePair:output_type -> certmanagercontrol.getServicePairResult - 14, // [14:26] is the sub-list for method output_type - 2, // [2:14] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 10, // 0: certmanagercontrol.listAccountsResult.accounts:type_name -> certmanagercontrol.accountShortDescr + 25, // 1: certmanagercontrol.listIssuerPairsResult.issuers:type_name -> certmanagercontrol.IssierShortDescriptor + 32, // 2: certmanagercontrol.listServicePairsResult.services:type_name -> certmanagercontrol.ServiceShortDescriptor + 11, // 3: certmanagercontrol.Control.getStatus:input_type -> certmanagercontrol.getStatusParams + 13, // 4: certmanagercontrol.Control.createIssuerPair:input_type -> certmanagercontrol.createIssuerPairParams + 17, // 5: certmanagercontrol.Control.importIssuerPair:input_type -> certmanagercontrol.importIssuerPairParams + 19, // 6: certmanagercontrol.Control.revokeIssuerPair:input_type -> certmanagercontrol.revokeIssuerPairParams + 21, // 7: certmanagercontrol.Control.unrevokeIssuerPair:input_type -> certmanagercontrol.unrevokeIssuerPairParams + 23, // 8: certmanagercontrol.Control.listIssuerPairs:input_type -> certmanagercontrol.listIssuerPairsParams + 15, // 9: certmanagercontrol.Control.getIssuerCertificate:input_type -> certmanagercontrol.getIssuerCertificateParams + 26, // 10: certmanagercontrol.Control.createServicePair:input_type -> certmanagercontrol.createServicePairParams + 28, // 11: certmanagercontrol.Control.revokeServicePair:input_type -> certmanagercontrol.revokeServicePairParams + 30, // 12: certmanagercontrol.Control.unrevokeServicePair:input_type -> certmanagercontrol.unrevokeServicePairParams + 33, // 13: certmanagercontrol.Control.listServicePairs:input_type -> certmanagercontrol.listServicePairsParams + 35, // 14: certmanagercontrol.Control.getServicePair:input_type -> certmanagercontrol.getServicePairParams + 0, // 15: certmanagercontrol.Control.createAccount:input_type -> certmanagercontrol.createAccountParams + 2, // 16: certmanagercontrol.Control.deleteAccount:input_type -> certmanagercontrol.deleteAccountParams + 4, // 17: certmanagercontrol.Control.updateAccount:input_type -> certmanagercontrol.updateAccountParams + 6, // 18: certmanagercontrol.Control.getAccount:input_type -> certmanagercontrol.getAccountParams + 8, // 19: certmanagercontrol.Control.listAccounts:input_type -> certmanagercontrol.listAccountsParams + 12, // 20: certmanagercontrol.Control.getStatus:output_type -> certmanagercontrol.getStatusResult + 14, // 21: certmanagercontrol.Control.createIssuerPair:output_type -> certmanagercontrol.createIssuerPairResult + 18, // 22: certmanagercontrol.Control.importIssuerPair:output_type -> certmanagercontrol.importIssuerPairResult + 20, // 23: certmanagercontrol.Control.revokeIssuerPair:output_type -> certmanagercontrol.revokeIssuerPairResult + 22, // 24: certmanagercontrol.Control.unrevokeIssuerPair:output_type -> certmanagercontrol.unrevokeIssuerPairResult + 24, // 25: certmanagercontrol.Control.listIssuerPairs:output_type -> certmanagercontrol.listIssuerPairsResult + 16, // 26: certmanagercontrol.Control.getIssuerCertificate:output_type -> certmanagercontrol.getIssuerCertificateResult + 27, // 27: certmanagercontrol.Control.createServicePair:output_type -> certmanagercontrol.createServicePairResult + 29, // 28: certmanagercontrol.Control.revokeServicePair:output_type -> certmanagercontrol.revokeServicePairResult + 31, // 29: certmanagercontrol.Control.unrevokeServicePair:output_type -> certmanagercontrol.unrevokeServicePairResult + 34, // 30: certmanagercontrol.Control.listServicePairs:output_type -> certmanagercontrol.listServicePairsResult + 36, // 31: certmanagercontrol.Control.getServicePair:output_type -> certmanagercontrol.getServicePairResult + 1, // 32: certmanagercontrol.Control.createAccount:output_type -> certmanagercontrol.createAccountResult + 3, // 33: certmanagercontrol.Control.deleteAccount:output_type -> certmanagercontrol.deleteAccountResult + 5, // 34: certmanagercontrol.Control.updateAccount:output_type -> certmanagercontrol.updateAccountResult + 7, // 35: certmanagercontrol.Control.getAccount:output_type -> certmanagercontrol.getAccountResult + 9, // 36: certmanagercontrol.Control.listAccounts:output_type -> certmanagercontrol.listAccountsResult + 20, // [20:37] is the sub-list for method output_type + 3, // [3:20] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_cmctl_proto_init() } @@ -1945,7 +2597,7 @@ func file_cmctl_proto_init() { } if !protoimpl.UnsafeEnabled { file_cmctl_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStatusParams); i { + switch v := v.(*CreateAccountParams); i { case 0: return &v.state case 1: @@ -1957,7 +2609,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetStatusResult); i { + switch v := v.(*CreateAccountResult); i { case 0: return &v.state case 1: @@ -1969,7 +2621,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateIssuerPairParams); i { + switch v := v.(*DeleteAccountParams); i { case 0: return &v.state case 1: @@ -1981,7 +2633,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateIssuerPairResult); i { + switch v := v.(*DeleteAccountResult); i { case 0: return &v.state case 1: @@ -1993,7 +2645,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetIssuerCertificateParams); i { + switch v := v.(*UpdateAccountParams); i { case 0: return &v.state case 1: @@ -2005,7 +2657,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetIssuerCertificateResult); i { + switch v := v.(*UpdateAccountResult); i { case 0: return &v.state case 1: @@ -2017,7 +2669,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ImportIssuerPairParams); i { + switch v := v.(*GetAccountParams); i { case 0: return &v.state case 1: @@ -2029,7 +2681,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ImportIssuerPairResult); i { + switch v := v.(*GetAccountResult); i { case 0: return &v.state case 1: @@ -2041,7 +2693,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RevokeIssuerPairParams); i { + switch v := v.(*ListAccountsParams); i { case 0: return &v.state case 1: @@ -2053,7 +2705,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RevokeIssuerPairResult); i { + switch v := v.(*ListAccountsResult); i { case 0: return &v.state case 1: @@ -2065,7 +2717,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnrevokeIssuerPairParams); i { + switch v := v.(*AccountShortDescr); i { case 0: return &v.state case 1: @@ -2077,7 +2729,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnrevokeIssuerPairResult); i { + switch v := v.(*GetStatusParams); i { case 0: return &v.state case 1: @@ -2089,7 +2741,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListIssuerPairsParams); i { + switch v := v.(*GetStatusResult); i { case 0: return &v.state case 1: @@ -2101,7 +2753,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListIssuerPairsResult); i { + switch v := v.(*CreateIssuerPairParams); i { case 0: return &v.state case 1: @@ -2113,7 +2765,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IssierShortDescriptor); i { + switch v := v.(*CreateIssuerPairResult); i { case 0: return &v.state case 1: @@ -2125,7 +2777,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateServicePairParams); i { + switch v := v.(*GetIssuerCertificateParams); i { case 0: return &v.state case 1: @@ -2137,7 +2789,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateServicePairResult); i { + switch v := v.(*GetIssuerCertificateResult); i { case 0: return &v.state case 1: @@ -2149,7 +2801,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RevokeServicePairParams); i { + switch v := v.(*ImportIssuerPairParams); i { case 0: return &v.state case 1: @@ -2161,7 +2813,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RevokeServicePairResult); i { + switch v := v.(*ImportIssuerPairResult); i { case 0: return &v.state case 1: @@ -2173,7 +2825,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnrevokeServicePairParams); i { + switch v := v.(*RevokeIssuerPairParams); i { case 0: return &v.state case 1: @@ -2185,7 +2837,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnrevokeServicePairResult); i { + switch v := v.(*RevokeIssuerPairResult); i { case 0: return &v.state case 1: @@ -2197,7 +2849,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServiceShortDescriptor); i { + switch v := v.(*UnrevokeIssuerPairParams); i { case 0: return &v.state case 1: @@ -2209,7 +2861,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListServicePairsParams); i { + switch v := v.(*UnrevokeIssuerPairResult); i { case 0: return &v.state case 1: @@ -2221,7 +2873,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListServicePairsResult); i { + switch v := v.(*ListIssuerPairsParams); i { case 0: return &v.state case 1: @@ -2233,7 +2885,7 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetServicePairParams); i { + switch v := v.(*ListIssuerPairsResult); i { case 0: return &v.state case 1: @@ -2245,6 +2897,138 @@ func file_cmctl_proto_init() { } } file_cmctl_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IssierShortDescriptor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cmctl_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateServicePairParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cmctl_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateServicePairResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cmctl_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RevokeServicePairParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cmctl_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RevokeServicePairResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cmctl_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnrevokeServicePairParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cmctl_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnrevokeServicePairResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cmctl_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceShortDescriptor); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cmctl_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListServicePairsParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cmctl_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListServicePairsResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cmctl_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetServicePairParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cmctl_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetServicePairResult); i { case 0: return &v.state @@ -2263,7 +3047,7 @@ func file_cmctl_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cmctl_proto_rawDesc, NumEnums: 0, - NumMessages: 26, + NumMessages: 37, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/cmctl/cmctl_grpc.pb.go b/pkg/cmctl/cmctl_grpc.pb.go index 4bd6829..df795af 100644 --- a/pkg/cmctl/cmctl_grpc.pb.go +++ b/pkg/cmctl/cmctl_grpc.pb.go @@ -31,6 +31,11 @@ const ( Control_UnrevokeServicePair_FullMethodName = "/certmanagercontrol.Control/unrevokeServicePair" Control_ListServicePairs_FullMethodName = "/certmanagercontrol.Control/listServicePairs" Control_GetServicePair_FullMethodName = "/certmanagercontrol.Control/getServicePair" + Control_CreateAccount_FullMethodName = "/certmanagercontrol.Control/createAccount" + Control_DeleteAccount_FullMethodName = "/certmanagercontrol.Control/deleteAccount" + Control_UpdateAccount_FullMethodName = "/certmanagercontrol.Control/updateAccount" + Control_GetAccount_FullMethodName = "/certmanagercontrol.Control/getAccount" + Control_ListAccounts_FullMethodName = "/certmanagercontrol.Control/listAccounts" ) // ControlClient is the client API for Control service. @@ -49,6 +54,11 @@ type ControlClient interface { UnrevokeServicePair(ctx context.Context, in *UnrevokeServicePairParams, opts ...grpc.CallOption) (*UnrevokeServicePairResult, error) ListServicePairs(ctx context.Context, in *ListServicePairsParams, opts ...grpc.CallOption) (*ListServicePairsResult, error) GetServicePair(ctx context.Context, in *GetServicePairParams, opts ...grpc.CallOption) (*GetServicePairResult, error) + CreateAccount(ctx context.Context, in *CreateAccountParams, opts ...grpc.CallOption) (*CreateAccountResult, error) + DeleteAccount(ctx context.Context, in *DeleteAccountParams, opts ...grpc.CallOption) (*DeleteAccountResult, error) + UpdateAccount(ctx context.Context, in *UpdateAccountParams, opts ...grpc.CallOption) (*UpdateAccountResult, error) + GetAccount(ctx context.Context, in *GetAccountParams, opts ...grpc.CallOption) (*GetAccountResult, error) + ListAccounts(ctx context.Context, in *ListAccountsParams, opts ...grpc.CallOption) (*ListAccountsResult, error) } type controlClient struct { @@ -167,6 +177,51 @@ func (c *controlClient) GetServicePair(ctx context.Context, in *GetServicePairPa return out, nil } +func (c *controlClient) CreateAccount(ctx context.Context, in *CreateAccountParams, opts ...grpc.CallOption) (*CreateAccountResult, error) { + out := new(CreateAccountResult) + err := c.cc.Invoke(ctx, Control_CreateAccount_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlClient) DeleteAccount(ctx context.Context, in *DeleteAccountParams, opts ...grpc.CallOption) (*DeleteAccountResult, error) { + out := new(DeleteAccountResult) + err := c.cc.Invoke(ctx, Control_DeleteAccount_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlClient) UpdateAccount(ctx context.Context, in *UpdateAccountParams, opts ...grpc.CallOption) (*UpdateAccountResult, error) { + out := new(UpdateAccountResult) + err := c.cc.Invoke(ctx, Control_UpdateAccount_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlClient) GetAccount(ctx context.Context, in *GetAccountParams, opts ...grpc.CallOption) (*GetAccountResult, error) { + out := new(GetAccountResult) + err := c.cc.Invoke(ctx, Control_GetAccount_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *controlClient) ListAccounts(ctx context.Context, in *ListAccountsParams, opts ...grpc.CallOption) (*ListAccountsResult, error) { + out := new(ListAccountsResult) + err := c.cc.Invoke(ctx, Control_ListAccounts_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ControlServer is the server API for Control service. // All implementations must embed UnimplementedControlServer // for forward compatibility @@ -183,6 +238,11 @@ type ControlServer interface { UnrevokeServicePair(context.Context, *UnrevokeServicePairParams) (*UnrevokeServicePairResult, error) ListServicePairs(context.Context, *ListServicePairsParams) (*ListServicePairsResult, error) GetServicePair(context.Context, *GetServicePairParams) (*GetServicePairResult, error) + CreateAccount(context.Context, *CreateAccountParams) (*CreateAccountResult, error) + DeleteAccount(context.Context, *DeleteAccountParams) (*DeleteAccountResult, error) + UpdateAccount(context.Context, *UpdateAccountParams) (*UpdateAccountResult, error) + GetAccount(context.Context, *GetAccountParams) (*GetAccountResult, error) + ListAccounts(context.Context, *ListAccountsParams) (*ListAccountsResult, error) mustEmbedUnimplementedControlServer() } @@ -226,6 +286,21 @@ func (UnimplementedControlServer) ListServicePairs(context.Context, *ListService func (UnimplementedControlServer) GetServicePair(context.Context, *GetServicePairParams) (*GetServicePairResult, error) { return nil, status.Errorf(codes.Unimplemented, "method GetServicePair not implemented") } +func (UnimplementedControlServer) CreateAccount(context.Context, *CreateAccountParams) (*CreateAccountResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAccount not implemented") +} +func (UnimplementedControlServer) DeleteAccount(context.Context, *DeleteAccountParams) (*DeleteAccountResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAccount not implemented") +} +func (UnimplementedControlServer) UpdateAccount(context.Context, *UpdateAccountParams) (*UpdateAccountResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAccount not implemented") +} +func (UnimplementedControlServer) GetAccount(context.Context, *GetAccountParams) (*GetAccountResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented") +} +func (UnimplementedControlServer) ListAccounts(context.Context, *ListAccountsParams) (*ListAccountsResult, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAccounts not implemented") +} func (UnimplementedControlServer) mustEmbedUnimplementedControlServer() {} // UnsafeControlServer may be embedded to opt out of forward compatibility for this service. @@ -455,6 +530,96 @@ func _Control_GetServicePair_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _Control_CreateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAccountParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).CreateAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_CreateAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).CreateAccount(ctx, req.(*CreateAccountParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Control_DeleteAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAccountParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).DeleteAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_DeleteAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).DeleteAccount(ctx, req.(*DeleteAccountParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Control_UpdateAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAccountParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).UpdateAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_UpdateAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).UpdateAccount(ctx, req.(*UpdateAccountParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Control_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAccountParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).GetAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_GetAccount_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).GetAccount(ctx, req.(*GetAccountParams)) + } + return interceptor(ctx, in, info, handler) +} + +func _Control_ListAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAccountsParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ControlServer).ListAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Control_ListAccounts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ControlServer).ListAccounts(ctx, req.(*ListAccountsParams)) + } + return interceptor(ctx, in, info, handler) +} + // Control_ServiceDesc is the grpc.ServiceDesc for Control service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -510,6 +675,26 @@ var Control_ServiceDesc = grpc.ServiceDesc{ MethodName: "getServicePair", Handler: _Control_GetServicePair_Handler, }, + { + MethodName: "createAccount", + Handler: _Control_CreateAccount_Handler, + }, + { + MethodName: "deleteAccount", + Handler: _Control_DeleteAccount_Handler, + }, + { + MethodName: "updateAccount", + Handler: _Control_UpdateAccount_Handler, + }, + { + MethodName: "getAccount", + Handler: _Control_GetAccount_Handler, + }, + { + MethodName: "listAccounts", + Handler: _Control_ListAccounts_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cmctl.proto", diff --git a/proto/cmctl.proto b/proto/cmctl.proto index a676802..5a0bfb5 100644 --- a/proto/cmctl.proto +++ b/proto/cmctl.proto @@ -19,6 +19,52 @@ service Control { rpc unrevokeServicePair(unrevokeServicePairParams) returns (unrevokeServicePairResult) {}; rpc listServicePairs(listServicePairsParams) returns (listServicePairsResult) {}; rpc getServicePair(getServicePairParams) returns (getServicePairResult) {}; + + rpc createAccount(createAccountParams) returns (createAccountResult) {}; + rpc deleteAccount(deleteAccountParams) returns (deleteAccountResult) {}; + rpc updateAccount(updateAccountParams) returns (updateAccountResult) {}; + rpc getAccount(getAccountParams) returns (getAccountResult) {}; + rpc listAccounts(listAccountsParams) returns (listAccountsResult) {}; + +} + + +message createAccountParams { + string username = 1; + string password = 2; +} +message createAccountResult { + int64 accountID = 1; +} + +message deleteAccountParams { + string username = 1; + int64 accountID = 2; +} +message deleteAccountResult {} + +message updateAccountParams { + string username = 1; + int64 accountID = 2; + string newUsername = 3; + string newPassword = 4; + bool disabled = 5; +} +message updateAccountResult {} + +message getAccountParams {} +message getAccountResult {} + +message listAccountsParams {} +message listAccountsResult { + repeated accountShortDescr accounts = 1; +} + +message accountShortDescr { + string username = 1; + bool disabled = 2; + string createdAt = 3; + string updatedAt = 4; } message getStatusParams {} @@ -52,6 +98,7 @@ message getIssuerCertificateResult { string signerName = 5; bool revoked = 6; repeated string signerCertificates = 7; + repeated string signerNames = 8; } message importIssuerPairParams {