diff --git a/cmd/certmanagerctl/issuercli.go b/cmd/certmanagerctl/issuercli.go index f5f770f..35a5ab1 100644 --- a/cmd/certmanagerctl/issuercli.go +++ b/cmd/certmanagerctl/issuercli.go @@ -5,8 +5,8 @@ import ( "encoding/base64" "os" - cmapi "certmanager/pkg/cmctl" "certmanager/pkg/client" + cmapi "certmanager/pkg/cmctl" ) func (util *Util) CreateIssuerPair(ctx context.Context) (*cmapi.CreateIssuerPairResult, error) { diff --git a/cmd/certmanagerctl/main.go b/cmd/certmanagerctl/main.go index d9de473..a3ec19b 100644 --- a/cmd/certmanagerctl/main.go +++ b/cmd/certmanagerctl/main.go @@ -14,8 +14,8 @@ import ( "path/filepath" "time" - cmapi "certmanager/pkg/cmctl" "certmanager/pkg/client" + cmapi "certmanager/pkg/cmctl" "sigs.k8s.io/yaml" ) diff --git a/cmd/certmanagerctl/servicecli.go b/cmd/certmanagerctl/servicecli.go index 9a0e236..4242019 100644 --- a/cmd/certmanagerctl/servicecli.go +++ b/cmd/certmanagerctl/servicecli.go @@ -5,8 +5,8 @@ import ( "encoding/base64" "strings" - cmapi "certmanager/pkg/cmctl" "certmanager/pkg/client" + cmapi "certmanager/pkg/cmctl" ) func (util *Util) CreateServicePair(ctx context.Context) (*cmapi.CreateServicePairResult, error) { diff --git a/internal/config/path.go b/internal/config/path.go index d80b682..df56554 100644 --- a/internal/config/path.go +++ b/internal/config/path.go @@ -1,9 +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 = "/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" ) - diff --git a/internal/database/database.go b/internal/database/database.go index ee19964..a904cc9 100644 --- a/internal/database/database.go +++ b/internal/database/database.go @@ -1,6 +1,7 @@ package database import ( + "context" "path/filepath" "certmanager/pkg/logger" @@ -10,18 +11,20 @@ import ( ) const schema = ` - --- DROP TABLE IF EXISTS issuer; + DROP TABLE IF EXISTS issuer; CREATE TABLE IF NOT EXISTS issuer ( - id INT NOT NULL, - name TEXT NOT NULL, - cert TEXT NOT NULL, - key TEXT, - revoked BOOL + id INT NOT NULL, + name TEXT NOT NULL, + cert TEXT NOT NULL, + key TEXT, + signer_id INT NOT NULL, + signer_name TEXT NOT NULL, + revoked BOOL ); CREATE INDEX IF NOT EXISTS issuer_index ON issuer(id, name); - --- DROP TABLE IF EXISTS service; + DROP TABLE IF EXISTS service; CREATE TABLE IF NOT EXISTS service ( id INT NOT NULL, issuer_id INT NOT NULL, @@ -71,3 +74,16 @@ func (db *Database) InitDatabase() error { } return err } + +func (db *Database) CleanDatabase(ctx context.Context) error { + var err error + request := ` + DELETE FROM issuer; + DELETE FROM service; + ` + _, err = db.db.Exec(request) + if err != nil { + return err + } + return err +} diff --git a/internal/database/issuer.go b/internal/database/issuer.go index 05c4315..12cf1c1 100644 --- a/internal/database/issuer.go +++ b/internal/database/issuer.go @@ -4,23 +4,20 @@ import ( "context" "certmanager/internal/descriptor" - "certmanager/pkg/auxid" _ "github.com/mattn/go-sqlite3" ) -func (db *Database) InsertIssuer(ctx context.Context, issuer *descriptor.Issuer) (int64, error) { +func (db *Database) InsertIssuer(ctx context.Context, issuer *descriptor.Issuer) error { var err error - var res int64 - issuer.ID = auxid.GenID() - request := `INSERT INTO issuer(id, name, cert, key, revoked) - VALUES ($1, $2, $3, $4, $5)` - _, err = db.db.Exec(request, issuer.ID, issuer.Name, issuer.Cert, issuer.Key, issuer.Revoked) + request := `INSERT INTO issuer(id, name, cert, key, revoked, signer_id, signer_name) + VALUES ($1, $2, $3, $4, $5, $6, $7)` + _, err = db.db.Exec(request, issuer.ID, issuer.Name, issuer.Cert, issuer.Key, issuer.Revoked, + issuer.SignerID, issuer.SignerName) if err != nil { - return res, err + return err } - res = issuer.ID - return res, err + return err } func (db *Database) UpdateIssuerByID(ctx context.Context, issuerID int64, issuer *descriptor.Issuer) error { @@ -35,7 +32,7 @@ func (db *Database) UpdateIssuerByID(ctx context.Context, issuerID int64, issuer func (db *Database) ListIssuers(ctx context.Context) ([]descriptor.Issuer, error) { var err error - request := `SELECT id, name, revoked FROM issuer` + request := `SELECT id, name, signer_id, signer_name, revoked FROM issuer` res := make([]descriptor.Issuer, 0) err = db.db.Select(&res, request) if err != nil { @@ -48,7 +45,7 @@ func (db *Database) GetIssuerByID(ctx context.Context, issuerID int64) (bool, *d var err error var res *descriptor.Issuer var exists bool - request := `SELECT id, name, cert, key, revoked FROM issuer WHERE id = $1 LiMIT 1` + request := `SELECT id, name, cert, key, revoked, signer_id, signer_name FROM issuer WHERE id = $1 LiMIT 1` dbRes := make([]descriptor.Issuer, 0) err = db.db.Select(&dbRes, request, issuerID) if err != nil { @@ -66,7 +63,7 @@ func (db *Database) GetIssuerByName(ctx context.Context, issuerName string) (boo var err error var res *descriptor.Issuer var exists bool - request := `SELECT id, name, cert, key, revoked FROM issuer WHERE name = $1 LIMIT 1` + request := `SELECT id, name, cert, key, revoked, signer_id, signer_name FROM issuer WHERE name = $1 LIMIT 1` dbRes := make([]descriptor.Issuer, 0) err = db.db.Select(&dbRes, request, issuerName) if err != nil { diff --git a/internal/database/service.go b/internal/database/service.go index 4b285f7..3890312 100644 --- a/internal/database/service.go +++ b/internal/database/service.go @@ -4,24 +4,20 @@ import ( "context" "certmanager/internal/descriptor" - "certmanager/pkg/auxid" _ "github.com/mattn/go-sqlite3" ) -func (db *Database) InsertService(ctx context.Context, service *descriptor.Service) (int64, error) { +func (db *Database) InsertService(ctx context.Context, service *descriptor.Service) error { var err error - var res int64 - service.ID = auxid.GenID() request := `INSERT INTO service(id, issuer_id, name, cert, key, revoked, issuer_name) VALUES ($1, $2, $3, $4, $5, $6, $7)` _, err = db.db.Exec(request, service.ID, service.IssuerID, service.Name, service.Cert, service.Key, service.Revoked, service.IssuerName) if err != nil { - return res, err + return err } - res = service.ID - return res, err + return err } func (db *Database) UpdateServiceByID(ctx context.Context, serviceID int64, service *descriptor.Service) error { @@ -36,7 +32,7 @@ func (db *Database) UpdateServiceByID(ctx context.Context, serviceID int64, serv func (db *Database) ListServices(ctx context.Context) ([]descriptor.Service, error) { var err error - request := `SELECT * FROM service` + request := `SELECT id, name, issuer_id, issuer_name, revoked FROM service` res := make([]descriptor.Service, 0) err = db.db.Select(&res, request) if err != nil { @@ -81,7 +77,7 @@ func (db *Database) GetServiceByName(ctx context.Context, serviceName string) (b return exists, res, err } -func (db *Database) XXXDeleteServiceByID(ctx context.Context, serviceID int64) error { +func (db *Database) DeleteServiceByID(ctx context.Context, serviceID int64) error { var err error request := `DELETE FROM service WHERE id = $1` _, err = db.db.Exec(request, serviceID) @@ -91,7 +87,7 @@ func (db *Database) XXXDeleteServiceByID(ctx context.Context, serviceID int64) e return err } -func (db *Database) XXXDeleteServiceByName(ctx context.Context, serviceName string) error { +func (db *Database) DeleteServiceByName(ctx context.Context, serviceName string) error { var err error request := `DELETE FROM service WHERE name = $1` _, err = db.db.Exec(request, serviceName) diff --git a/internal/descriptor/descriptor.go b/internal/descriptor/descriptor.go index 3a11582..da2356d 100644 --- a/internal/descriptor/descriptor.go +++ b/internal/descriptor/descriptor.go @@ -1,11 +1,13 @@ package descriptor type Issuer struct { - ID int64 `json:"id" yaml:"id" db:"id"` - Name string `json:"name" yaml:"name" db:"name"` - Cert string `json:"cert" yaml:"cert" db:"cert"` - Key string `json:"key" yaml:"key" db:"key"` - Revoked bool `json:"revoked" yaml:"revoked" db:"revoked"` + ID int64 `json:"id" yaml:"id" db:"id"` + Name string `json:"name" yaml:"name" db:"name"` + SignerID int64 `json:"signerId" yaml:"signerId" db:"signer_id"` + SignerName string `json:"signerName" yaml:"signerName" db:"signer_name"` + Cert string `json:"cert" yaml:"cert" db:"cert"` + Key string `json:"key" yaml:"key" db:"key"` + Revoked bool `json:"revoked" yaml:"revoked" db:"revoked"` } type Service struct { diff --git a/internal/grpc/handler/certman.go b/internal/grpc/handler/certman.go index 02e5e52..37e8fb9 100644 --- a/internal/grpc/handler/certman.go +++ b/internal/grpc/handler/certman.go @@ -6,72 +6,79 @@ import ( "certmanager/pkg/cmctl" ) -func (hand *Handler) CreateIssuerPair(ctx context.Context, req *cmctl.CreateIssuerPairParams) (*cmctl.CreateIssuerPairResult, error) { +func (hand *Handler) CreateIssuerPair(ctx context.Context, params *cmctl.CreateIssuerPairParams) (*cmctl.CreateIssuerPairResult, error) { var err error - hand.log.Debugf("Handle CreateIssuerPair request") - res, err := hand.lg.CreateIssuerPair(ctx, req) + hand.log.Debugf("Handle CreateIssuerPair call") + res, err := hand.lg.CreateIssuerPair(ctx, params) return res, err } -func (hand *Handler) ImportIssuerPair(ctx context.Context, req *cmctl.ImportIssuerPairParams) (*cmctl.ImportIssuerPairResult, error) { +func (hand *Handler) ImportIssuerPair(ctx context.Context, params *cmctl.ImportIssuerPairParams) (*cmctl.ImportIssuerPairResult, error) { var err error - hand.log.Debugf("Handle ImportIssuerPair request") - res, err := hand.lg.ImportIssuerPair(ctx, req) + hand.log.Debugf("Handle ImportIssuerPair call") + res, err := hand.lg.ImportIssuerPair(ctx, params) return res, err } -func (hand *Handler) RevokeIssuerPair(ctx context.Context, req *cmctl.RevokeIssuerPairParams) (*cmctl.RevokeIssuerPairResult, error) { +func (hand *Handler) RevokeIssuerPair(ctx context.Context, params *cmctl.RevokeIssuerPairParams) (*cmctl.RevokeIssuerPairResult, error) { var err error - hand.log.Debugf("Handle RevokeIssuerPair request") - res, err := hand.lg.RevokeIssuerPair(ctx, req) + hand.log.Debugf("Handle RevokeIssuerPair call") + res, err := hand.lg.RevokeIssuerPair(ctx, params) return res, err } -func (hand *Handler) UnrevokeIssuerPair(ctx context.Context, req *cmctl.UnrevokeIssuerPairParams) (*cmctl.UnrevokeIssuerPairResult, error) { +func (hand *Handler) UnrevokeIssuerPair(ctx context.Context, params *cmctl.UnrevokeIssuerPairParams) (*cmctl.UnrevokeIssuerPairResult, error) { var err error - hand.log.Debugf("Handle UnrevokeIssuerPair request") - res, err := hand.lg.UnrevokeIssuerPair(ctx, req) + hand.log.Debugf("Handle UnrevokeIssuerPair call") + res, err := hand.lg.UnrevokeIssuerPair(ctx, params) return res, err } -func (hand *Handler) ListIssuerPairs(ctx context.Context, req *cmctl.ListIssuerPairsParams) (*cmctl.ListIssuerPairsResult, error) { +func (hand *Handler) ListIssuerPairs(ctx context.Context, params *cmctl.ListIssuerPairsParams) (*cmctl.ListIssuerPairsResult, error) { var err error - hand.log.Debugf("Handle ListIssuerPairs request") - res, err := hand.lg.ListIssuerPairs(ctx, req) + hand.log.Debugf("Handle ListIssuerPairs call") + res, err := hand.lg.ListIssuerPairs(ctx, params) return res, err } -func (hand *Handler) GetIssuerCertificate(ctx context.Context, req *cmctl.GetIssuerCertificateParams) (*cmctl.GetIssuerCertificateResult, error) { +func (hand *Handler) GetIssuerCertificate(ctx context.Context, params *cmctl.GetIssuerCertificateParams) (*cmctl.GetIssuerCertificateResult, error) { var err error - hand.log.Debugf("Handle GetIssuerCertificate request") - res, err := hand.lg.GetIssuerCertificate(ctx, req) + hand.log.Debugf("Handle GetIssuerCertificate call") + res, err := hand.lg.GetIssuerCertificate(ctx, params) return res, err } -func (hand *Handler) CreateServicePair(ctx context.Context, req *cmctl.CreateServicePairParams) (*cmctl.CreateServicePairResult, error) { +func (hand *Handler) CreateServicePair(ctx context.Context, params *cmctl.CreateServicePairParams) (*cmctl.CreateServicePairResult, error) { var err error - hand.log.Debugf("Handle CreateServicePair request") - res, err := hand.lg.CreateServicePair(ctx, req) + hand.log.Debugf("Handle CreateServicePair call") + res, err := hand.lg.CreateServicePair(ctx, params) return res, err } -func (hand *Handler) RevokeServicePair(ctx context.Context, req *cmctl.RevokeServicePairParams) (*cmctl.RevokeServicePairResult, error) { +func (hand *Handler) RevokeServicePair(ctx context.Context, params *cmctl.RevokeServicePairParams) (*cmctl.RevokeServicePairResult, error) { var err error - hand.log.Debugf("Handle RevokeServicePair request") - res, err := hand.lg.RevokeServicePair(ctx, req) + hand.log.Debugf("Handle RevokeServicePair call") + res, err := hand.lg.RevokeServicePair(ctx, params) return res, err } -func (hand *Handler) ListServicePairs(ctx context.Context, req *cmctl.ListServicePairsParams) (*cmctl.ListServicePairsResult, error) { +func (hand *Handler) UnrevokeServicePair(ctx context.Context, params *cmctl.UnrevokeServicePairParams) (*cmctl.UnrevokeServicePairResult, error) { var err error - hand.log.Debugf("Handle ListServicePairs request") - res, err := hand.lg.ListServicePairs(ctx, req) + hand.log.Debugf("Handle UnrevokeServicePair call") + res, err := hand.lg.UnrevokeServicePair(ctx, params) return res, err } -func (hand *Handler) GetServicePair(ctx context.Context, req *cmctl.GetServicePairParams) (*cmctl.GetServicePairResult, error) { +func (hand *Handler) ListServicePairs(ctx context.Context, params *cmctl.ListServicePairsParams) (*cmctl.ListServicePairsResult, error) { var err error - hand.log.Debugf("Handle GetServicePair request") - res, err := hand.lg.GetServicePair(ctx, req) + 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/handler.go b/internal/grpc/handler/handler.go index fd5ca70..8f9d37c 100644 --- a/internal/grpc/handler/handler.go +++ b/internal/grpc/handler/handler.go @@ -1,8 +1,8 @@ package handler import ( - "certmanager/pkg/cmctl" "certmanager/internal/logic" + "certmanager/pkg/cmctl" "certmanager/pkg/logger" "google.golang.org/grpc" diff --git a/internal/grpc/handler/status.go b/internal/grpc/handler/status.go index dd18fd6..02f9659 100644 --- a/internal/grpc/handler/status.go +++ b/internal/grpc/handler/status.go @@ -6,9 +6,9 @@ import ( "certmanager/pkg/cmctl" ) -func (hand *Handler) GetStatus(ctx context.Context, req *cmctl.GetStatusParams) (*cmctl.GetStatusResult, error) { +func (hand *Handler) GetStatus(ctx context.Context, params *cmctl.GetStatusParams) (*cmctl.GetStatusResult, error) { var err error - hand.log.Debugf("Handle getStatus request") - res, err := hand.lg.GetStatus(ctx, req) + hand.log.Debugf("Handle getStatus call") + res, err := hand.lg.GetStatus(ctx, params) return res, err } diff --git a/internal/logic/issuer.go b/internal/logic/issuer.go index b4c4b49..4f369f4 100644 --- a/internal/logic/issuer.go +++ b/internal/logic/issuer.go @@ -5,14 +5,15 @@ import ( "fmt" "time" - cmapi "certmanager/pkg/cmctl" "certmanager/internal/descriptor" + "certmanager/pkg/auxid" "certmanager/pkg/cm509" + "certmanager/pkg/cmctl" ) -func (lg *Logic) CreateIssuerPair(ctx context.Context, params *cmapi.CreateIssuerPairParams) (*cmapi.CreateIssuerPairResult, error) { +func (lg *Logic) CreateIssuerPair(ctx context.Context, params *cmctl.CreateIssuerPairParams) (*cmctl.CreateIssuerPairResult, error) { var err error - res := &cmapi.CreateIssuerPairResult{} + res := &cmctl.CreateIssuerPairResult{} var signerDescr *descriptor.Issuer var signerExists bool @@ -47,10 +48,18 @@ func (lg *Logic) CreateIssuerPair(ctx context.Context, params *cmapi.CreateIssue } issuerDescr := &descriptor.Issuer{ + ID: auxid.GenID(), Name: createIssuerPairRes.Name, Cert: createIssuerPairRes.Cert, Key: createIssuerPairRes.Key, } + if signerDescr != nil { + issuerDescr.SignerName = signerDescr.Name + issuerDescr.SignerID = signerDescr.ID + } else { + issuerDescr.SignerName = issuerDescr.Name + issuerDescr.SignerID = issuerDescr.ID + } issuerExists, _, err := lg.db.GetIssuerByName(ctx, issuerDescr.Name) if issuerExists { @@ -60,19 +69,21 @@ func (lg *Logic) CreateIssuerPair(ctx context.Context, params *cmapi.CreateIssue } } - issuerID, err := lg.db.InsertIssuer(ctx, issuerDescr) + err = lg.db.InsertIssuer(ctx, issuerDescr) if err != nil { return res, err } - res.IssuerID = issuerID + res.IssuerID = issuerDescr.ID res.IssuerName = createIssuerPairRes.Name res.Certificate = createIssuerPairRes.Cert return res, err } -func (lg *Logic) GetIssuerCertificate(ctx context.Context, params *cmapi.GetIssuerCertificateParams) (*cmapi.GetIssuerCertificateResult, error) { +func (lg *Logic) GetIssuerCertificate(ctx context.Context, params *cmctl.GetIssuerCertificateParams) (*cmctl.GetIssuerCertificateResult, error) { var err error - res := &cmapi.GetIssuerCertificateResult{} + res := &cmctl.GetIssuerCertificateResult{ + SignerCertificates: make([]string, 0), + } var issuerDescr *descriptor.Issuer var issuerExists bool switch { @@ -105,6 +116,14 @@ func (lg *Logic) GetIssuerCertificate(ctx context.Context, params *cmapi.GetIssu } } + signerDescrs, err := lg.GetIssuerChain(ctx, issuerDescr.SignerID) + if err != nil { + return res, err + } + for _, signerDescr := range signerDescrs { + res.SignerCertificates = append(res.SignerCertificates, signerDescr.Cert) + } + res.IssuerID = issuerDescr.ID res.Certificate = issuerDescr.Cert res.Name = issuerDescr.Name @@ -112,9 +131,9 @@ func (lg *Logic) GetIssuerCertificate(ctx context.Context, params *cmapi.GetIssu return res, err } -func (lg *Logic) ImportIssuerPair(ctx context.Context, params *cmapi.ImportIssuerPairParams) (*cmapi.ImportIssuerPairResult, error) { +func (lg *Logic) ImportIssuerPair(ctx context.Context, params *cmctl.ImportIssuerPairParams) (*cmctl.ImportIssuerPairResult, error) { var err error - res := &cmapi.ImportIssuerPairResult{} + res := &cmctl.ImportIssuerPairResult{} if params.Certificate == "" { err := fmt.Errorf("Empty issuer cerificata data") @@ -161,34 +180,35 @@ func (lg *Logic) ImportIssuerPair(ctx context.Context, params *cmapi.ImportIssue return res, err } issuerDescr := &descriptor.Issuer{ + ID: auxid.GenID(), Name: intermCertObj.Issuer.String(), Cert: intermCertString, Key: "", } - _, err = lg.db.InsertIssuer(ctx, issuerDescr) + err = lg.db.InsertIssuer(ctx, issuerDescr) if err != nil { return res, err } } } - issuerDescr := &descriptor.Issuer{ + ID: auxid.GenID(), Name: cert.Issuer.String(), Cert: params.Certificate, Key: params.Key, } - issuerID, err := lg.db.InsertIssuer(ctx, issuerDescr) + err = lg.db.InsertIssuer(ctx, issuerDescr) if err != nil { return res, err } res.IssuerName = cert.Subject.String() - res.IssuerID = issuerID + res.IssuerID = issuerDescr.ID return res, err } -func (lg *Logic) RevokeIssuerPair(ctx context.Context, params *cmapi.RevokeIssuerPairParams) (*cmapi.RevokeIssuerPairResult, error) { +func (lg *Logic) RevokeIssuerPair(ctx context.Context, params *cmctl.RevokeIssuerPairParams) (*cmctl.RevokeIssuerPairResult, error) { var err error - res := &cmapi.RevokeIssuerPairResult{} + res := &cmctl.RevokeIssuerPairResult{} var issuerDescr *descriptor.Issuer var issuerExists bool @@ -231,9 +251,9 @@ func (lg *Logic) RevokeIssuerPair(ctx context.Context, params *cmapi.RevokeIssue return res, err } -func (lg *Logic) UnrevokeIssuerPair(ctx context.Context, params *cmapi.UnrevokeIssuerPairParams) (*cmapi.UnrevokeIssuerPairResult, error) { +func (lg *Logic) UnrevokeIssuerPair(ctx context.Context, params *cmctl.UnrevokeIssuerPairParams) (*cmctl.UnrevokeIssuerPairResult, error) { var err error - res := &cmapi.UnrevokeIssuerPairResult{} + res := &cmctl.UnrevokeIssuerPairResult{} var issuerDescr *descriptor.Issuer var issuerExists bool @@ -276,10 +296,10 @@ func (lg *Logic) UnrevokeIssuerPair(ctx context.Context, params *cmapi.UnrevokeI return res, err } -func (lg *Logic) ListIssuerPairs(ctx context.Context, params *cmapi.ListIssuerPairsParams) (*cmapi.ListIssuerPairsResult, error) { +func (lg *Logic) ListIssuerPairs(ctx context.Context, params *cmctl.ListIssuerPairsParams) (*cmctl.ListIssuerPairsResult, error) { var err error - res := &cmapi.ListIssuerPairsResult{ - Issuers: make([]*cmapi.IssierShortDescriptor, 0), + res := &cmctl.ListIssuerPairsResult{ + Issuers: make([]*cmctl.IssierShortDescriptor, 0), } listIssuers, err := lg.db.ListIssuers(ctx) @@ -287,10 +307,12 @@ func (lg *Logic) ListIssuerPairs(ctx context.Context, params *cmapi.ListIssuerPa return res, err } for _, issuer := range listIssuers { - issuerShortDescr := cmapi.IssierShortDescriptor{ - IssuerID: issuer.ID, - Name: issuer.Name, - Revoked: issuer.Revoked, + issuerShortDescr := cmctl.IssierShortDescriptor{ + IssuerID: issuer.ID, + Name: issuer.Name, + SignerID: issuer.SignerID, + SignerName: issuer.SignerName, + Revoked: issuer.Revoked, } res.Issuers = append(res.Issuers, &issuerShortDescr) } diff --git a/internal/logic/service.go b/internal/logic/service.go index 31d3b35..0b0d2dc 100644 --- a/internal/logic/service.go +++ b/internal/logic/service.go @@ -4,14 +4,15 @@ import ( "context" "fmt" - cmapi "certmanager/pkg/cmctl" "certmanager/internal/descriptor" + "certmanager/pkg/auxid" "certmanager/pkg/cm509" + "certmanager/pkg/cmctl" ) -func (lg *Logic) CreateServicePair(ctx context.Context, params *cmapi.CreateServicePairParams) (*cmapi.CreateServicePairResult, error) { +func (lg *Logic) CreateServicePair(ctx context.Context, params *cmctl.CreateServicePairParams) (*cmctl.CreateServicePairResult, error) { var err error - res := &cmapi.CreateServicePairResult{} + res := &cmctl.CreateServicePairResult{} var issuerDescr *descriptor.Issuer var issuerExists bool @@ -64,18 +65,19 @@ func (lg *Logic) CreateServicePair(ctx context.Context, params *cmapi.CreateServ } serviceDescr := &descriptor.Service{ + ID: auxid.GenID(), Name: createSericePairRes.Name, IssuerID: issuerDescr.ID, IssuerName: issuerDescr.Name, Cert: createSericePairRes.Cert, Key: createSericePairRes.Key, } - serviceID, err := lg.db.InsertService(ctx, serviceDescr) + err = lg.db.InsertService(ctx, serviceDescr) if err != nil { return res, err } res.ServiceName = createSericePairRes.Name - res.ServiceID = serviceID + res.ServiceID = serviceDescr.ID res.Certificate = createSericePairRes.Cert res.Key = createSericePairRes.Key res.IssuerID = issuerDescr.ID @@ -84,9 +86,11 @@ func (lg *Logic) CreateServicePair(ctx context.Context, params *cmapi.CreateServ return res, err } -func (lg *Logic) GetServicePair(ctx context.Context, params *cmapi.GetServicePairParams) (*cmapi.GetServicePairResult, error) { +func (lg *Logic) GetServicePair(ctx context.Context, params *cmctl.GetServicePairParams) (*cmctl.GetServicePairResult, error) { var err error - res := &cmapi.GetServicePairResult{} + res := &cmctl.GetServicePairResult{ + IssuerCertificates: make([]string, 0), + } var serviceDescr *descriptor.Service var serviceExists bool switch { @@ -121,12 +125,57 @@ func (lg *Logic) GetServicePair(ctx context.Context, params *cmapi.GetServicePai issuerExists, issuerDescr, err := lg.db.GetIssuerByID(ctx, serviceDescr.IssuerID) if !issuerExists { - err := fmt.Errorf("No issuer for serice was found") + err := fmt.Errorf("No issuer for service was found") if err != nil { return res, err } } + serviceCertObj, err := cm509.ParseDoubleEncodedCerificate(serviceDescr.Cert) + if err != nil { + return res, err + } + + issuerCertObj, err := cm509.ParseDoubleEncodedCerificate(issuerDescr.Cert) + if err != nil { + return res, err + } + + if serviceCertObj.Subject.String() != serviceDescr.Name { + err := fmt.Errorf("The subject's identities in the database and certificate do not match") + if err != nil { + return res, err + } + } + if serviceCertObj.Issuer.String() != serviceDescr.IssuerName { + err := fmt.Errorf("The issuer's identities in the database and certificate do not match") + if err != nil { + return res, err + } + } + + if serviceCertObj.Issuer.String() != issuerDescr.Name { + err := fmt.Errorf("The issuer's and service identities in the database and certificate do not match") + if err != nil { + return res, err + } + } + + if serviceCertObj.Issuer.String() != issuerCertObj.Subject.String() { + err := fmt.Errorf("The issuer's and service identities into certificates do not match") + if err != nil { + return res, err + } + } + + issuerDescrs, err := lg.GetIssuerChain(ctx, serviceDescr.IssuerID) + if err != nil { + return res, err + } + for _, issuerDescr := range issuerDescrs { + res.IssuerCertificates = append(res.IssuerCertificates, issuerDescr.Cert) + } + res.Certificate = serviceDescr.Cert res.Key = serviceDescr.Key res.IssuerID = serviceDescr.IssuerID @@ -136,10 +185,72 @@ func (lg *Logic) GetServicePair(ctx context.Context, params *cmapi.GetServicePai return res, err } -func (lg *Logic) ListServicePairs(ctx context.Context, params *cmapi.ListServicePairsParams) (*cmapi.ListServicePairsResult, error) { +func (lg *Logic) GetIssuerChain(ctx context.Context, firstIssuerID int64) ([]*descriptor.Issuer, error) { var err error - res := &cmapi.ListServicePairsResult{ - Services: make([]*cmapi.ServiceShortDescriptor, 0), + res := make([]*descriptor.Issuer, 0) + + firstIssuerExists, firstIssuerDescr, err := lg.db.GetIssuerByID(ctx, firstIssuerID) + if !firstIssuerExists { + err := fmt.Errorf("No issuer for service was found") + if err != nil { + return res, err + } + } + + deep := 1 + nextDescrs, err := lg.GetNextIssuerChain(ctx, deep, firstIssuerDescr) + if err != nil { + return res, err + } + + res = append(res, nextDescrs...) + return res, err +} +func (lg *Logic) GetNextIssuerChain(ctx context.Context, deep int, firstIssuerDescr *descriptor.Issuer) ([]*descriptor.Issuer, error) { + var err error + res := make([]*descriptor.Issuer, 0) + + res = append(res, firstIssuerDescr) + + deep += 1 + const maxDeep = 12 + if deep > maxDeep { + err := fmt.Errorf("Cannot found root issuer after %d loops", maxDeep) + if err != nil { + return res, err + } + } + + firstIssuerCertObj, err := cm509.ParseDoubleEncodedCerificate(firstIssuerDescr.Cert) + if err != nil { + return res, err + } + + itIsSelfSignedRoot := (firstIssuerDescr.SignerID == firstIssuerDescr.SignerID) && + (firstIssuerCertObj.Issuer.String() == firstIssuerCertObj.Subject.String()) + if itIsSelfSignedRoot { + return res, err + } + + lg.log.Debugf("%d %d", firstIssuerDescr.ID, firstIssuerDescr.SignerID) + + nextIssuerExists, nextIssuerDescrs, err := lg.db.GetIssuerByID(ctx, firstIssuerDescr.SignerID) + if !nextIssuerExists { + err := fmt.Errorf("No issuer for service was found") + if err != nil { + return res, err + } + } + nextDescrs, err := lg.GetNextIssuerChain(ctx, deep, nextIssuerDescrs) + res = append(res, nextDescrs...) + + return res, err +} + +func (lg *Logic) ListServicePairs(ctx context.Context, params *cmctl.ListServicePairsParams) (*cmctl.ListServicePairsResult, error) { + var err error + res := &cmctl.ListServicePairsResult{ + Services: make([]*cmctl.ServiceShortDescriptor, 0), } listServices, err := lg.db.ListServices(ctx) @@ -147,7 +258,7 @@ func (lg *Logic) ListServicePairs(ctx context.Context, params *cmapi.ListService return res, err } for _, service := range listServices { - serviceShortDescr := cmapi.ServiceShortDescriptor{ + serviceShortDescr := cmctl.ServiceShortDescriptor{ ServiceID: service.ID, IssuerID: service.IssuerID, IssuerName: service.IssuerName, @@ -159,9 +270,9 @@ func (lg *Logic) ListServicePairs(ctx context.Context, params *cmapi.ListService return res, err } -func (lg *Logic) RevokeServicePair(ctx context.Context, params *cmapi.RevokeServicePairParams) (*cmapi.RevokeServicePairResult, error) { +func (lg *Logic) RevokeServicePair(ctx context.Context, params *cmctl.RevokeServicePairParams) (*cmctl.RevokeServicePairResult, error) { var err error - res := &cmapi.RevokeServicePairResult{} + res := &cmctl.RevokeServicePairResult{} var serviceDescr *descriptor.Service var serviceExists bool @@ -204,9 +315,9 @@ func (lg *Logic) RevokeServicePair(ctx context.Context, params *cmapi.RevokeServ return res, err } -func (lg *Logic) UnrevokeServicePair(ctx context.Context, params *cmapi.UnrevokeServicePairParams) (*cmapi.UnrevokeServicePairResult, error) { +func (lg *Logic) UnrevokeServicePair(ctx context.Context, params *cmctl.UnrevokeServicePairParams) (*cmctl.UnrevokeServicePairResult, error) { var err error - res := &cmapi.UnrevokeServicePairResult{} + res := &cmctl.UnrevokeServicePairResult{} var serviceDescr *descriptor.Service var serviceExists bool diff --git a/internal/test/database_test.go b/internal/test/database_test.go index ba8eec5..408439b 100644 --- a/internal/test/database_test.go +++ b/internal/test/database_test.go @@ -9,6 +9,7 @@ import ( "certmanager/internal/config" "certmanager/internal/database" "certmanager/internal/descriptor" + "certmanager/pkg/auxid" "github.com/stretchr/testify/require" yaml "gopkg.in/yaml.v3" @@ -29,13 +30,15 @@ func XXTestDatabaseIssuer(t *testing.T) { ctx, _ := context.WithTimeout(context.Background(), 1*time.Second) + issuerID := auxid.GenID() issuer := &descriptor.Issuer{ + ID: issuerID, Name: "foo.bar", Cert: "ASDFF", Key: "QWERT", Revoked: true, } - issuerID, err := db.InsertIssuer(ctx, issuer) + err = db.InsertIssuer(ctx, issuer) require.NoError(t, err) fmt.Printf("issuerId: %d\n", issuerID) @@ -80,14 +83,16 @@ func XXXTestDatabaseService(t *testing.T) { ctx, _ := context.WithTimeout(context.Background(), 1*time.Second) + serviceID := auxid.GenID() service := &descriptor.Service{ + ID: serviceID, Name: "foo.bar", IssuerID: 123456, Cert: "ASDFF", Key: "QWERT", Revoked: true, } - serviceID, err := db.InsertService(ctx, service) + err = db.InsertService(ctx, service) require.NoError(t, err) fmt.Printf("serviceId: %d\n", serviceID) diff --git a/internal/test/logic_issuer_create_test.go b/internal/test/logic_issuer_create_test.go index c8f5166..4b948be 100644 --- a/internal/test/logic_issuer_create_test.go +++ b/internal/test/logic_issuer_create_test.go @@ -2,15 +2,16 @@ package test import ( "context" + "encoding/base64" "fmt" "testing" "time" - cmapi "certmanager/pkg/cmctl" "certmanager/internal/config" "certmanager/internal/database" "certmanager/internal/logic" "certmanager/pkg/cm509" + "certmanager/pkg/cmctl" "github.com/stretchr/testify/require" ) @@ -40,12 +41,12 @@ func TestIssuerCreateN0(t *testing.T) { ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) - signerCommonName := "foo.bar" + signerCommonName := "make.love" var signerID int64 var signerCert string var signerName string { - createIssuerPairParams := &cmapi.CreateIssuerPairParams{ + createIssuerPairParams := &cmctl.CreateIssuerPairParams{ IssuerCommonName: signerCommonName, } createIssuerPairRes, err := lg.CreateIssuerPair(ctx, createIssuerPairParams) @@ -56,7 +57,7 @@ func TestIssuerCreateN0(t *testing.T) { printObj("signerID", signerID) signerCert = createIssuerPairRes.Certificate - printObj("signerCert", signerCert) + //printObj("signerCert", signerCert) signerName = createIssuerPairRes.IssuerName printObj("signerName", signerName) @@ -66,13 +67,19 @@ func TestIssuerCreateN0(t *testing.T) { require.NotNil(t, signerCertObj) printObj("signerCertObj Subject", signerCertObj.Subject.String()) printObj("signerCertObj Issuer", signerCertObj.Issuer.String()) + + signerPEM, err := base64.StdEncoding.DecodeString(signerCert) + require.NoError(t, err) + require.NotZero(t, len(signerPEM)) + printObj("signerPEM", string(signerPEM)) + } - issuerCommonName := "make.love.not.war" + issuerCommonName := "not.war" var issuerID int64 var issuerCert string var issuerName string { - createIssuerPairParams := &cmapi.CreateIssuerPairParams{ + createIssuerPairParams := &cmctl.CreateIssuerPairParams{ IssuerCommonName: issuerCommonName, SignerID: signerID, } @@ -84,7 +91,7 @@ func TestIssuerCreateN0(t *testing.T) { printObj("issuerID", issuerID) issuerCert = createIssuerPairRes.Certificate - printObj("issuerCert", issuerCert) + //printObj("issuerCert", issuerCert) issuerName = createIssuerPairRes.IssuerName printObj("issuerName", issuerName) @@ -96,13 +103,18 @@ func TestIssuerCreateN0(t *testing.T) { printObj("issuerCertObj Issuer", issuerCertObj.Issuer.String()) require.NotEqual(t, issuerCertObj.Subject.String(), issuerCertObj.Issuer.String()) + + issuerPEM, err := base64.StdEncoding.DecodeString(issuerCert) + require.NoError(t, err) + require.NotZero(t, len(issuerPEM)) + printObj("issuerPEM", string(issuerPEM)) } serviceCommonName := "dont.worry" var serviceID int64 var serviceCert string var serviceName string { - createServicePairParams := &cmapi.CreateServicePairParams{ + createServicePairParams := &cmctl.CreateServicePairParams{ ServiceCommonName: serviceCommonName, IssuerID: issuerID, InetAddresses: []string{"1.1.1.1", "1.1.1.2", "1.1.1.3"}, @@ -116,7 +128,7 @@ func TestIssuerCreateN0(t *testing.T) { printObj("serviceID", serviceID) serviceCert = createServicePairRes.Certificate - printObj("serviceCert", serviceCert) + //printObj("serviceCert", serviceCert) serviceName = createServicePairRes.ServiceName printObj("serviceName", serviceName) @@ -130,10 +142,48 @@ func TestIssuerCreateN0(t *testing.T) { printObj("serviceCertObj IP addresses", serviceCertObj.IPAddresses) require.NotEqual(t, serviceCertObj.Subject.String(), serviceCertObj.Issuer.String()) + + servicePEM, err := base64.StdEncoding.DecodeString(serviceCert) + require.NoError(t, err) + require.NotZero(t, len(servicePEM)) + printObj("servicePEM", string(servicePEM)) + } + { + listIssuerPairsParams := &cmctl.ListIssuerPairsParams{} + listIssuerPairsRes, err := lg.ListIssuerPairs(ctx, listIssuerPairsParams) + require.NoError(t, err) + require.NotNil(t, listIssuerPairsRes) + require.NotZero(t, len(listIssuerPairsRes.Issuers)) + + printObj("listIssuerPairRes", listIssuerPairsRes) + } + { + getServicePairParams := &cmctl.GetServicePairParams{ + ServiceID: serviceID, + } + getServicePairRes, err := lg.GetServicePair(ctx, getServicePairParams) + require.NoError(t, err) + require.NotNil(t, getServicePairRes) + require.NotZero(t, len(getServicePairRes.Certificate)) + require.False(t, getServicePairRes.Revoked) + + printObj("getServicePairRes.IssuerCertificates", getServicePairRes.IssuerCertificates) + } + { + getIssuerCertificateParams := &cmctl.GetIssuerCertificateParams{ + IssuerID: issuerID, + } + getIssuerCertificateRes, err := lg.GetIssuerCertificate(ctx, getIssuerCertificateParams) + require.NoError(t, err) + require.NotNil(t, getIssuerCertificateRes) + require.NotZero(t, len(getIssuerCertificateRes.Certificate)) + + printObj("getIssuerCertificateRes", getIssuerCertificateRes) + require.NoError(t, err) } } -func TestIssuerCreateN2(t *testing.T) { +func XXXTestIssuerCreateN2(t *testing.T) { var err error var lg *logic.Logic { @@ -163,7 +213,7 @@ func TestIssuerCreateN2(t *testing.T) { var issuerID int64 var issuerCert string { - createIssuerPairParams := &cmapi.CreateIssuerPairParams{ + createIssuerPairParams := &cmctl.CreateIssuerPairParams{ IssuerCommonName: issuerCommonName, } createIssuerPairRes, err := lg.CreateIssuerPair(ctx, createIssuerPairParams) @@ -174,7 +224,7 @@ func TestIssuerCreateN2(t *testing.T) { printObj("issuerID", issuerID) } { - getIssuerCertificateParams := &cmapi.GetIssuerCertificateParams{ + getIssuerCertificateParams := &cmctl.GetIssuerCertificateParams{ IssuerID: issuerID, } getIssuerCertificateRes, err := lg.GetIssuerCertificate(ctx, getIssuerCertificateParams) @@ -190,7 +240,7 @@ func TestIssuerCreateN2(t *testing.T) { printObj("issuerCert", string(issuerCert)) } { - revokeIssuerPairParams := &cmapi.RevokeIssuerPairParams{ + revokeIssuerPairParams := &cmctl.RevokeIssuerPairParams{ IssuerID: issuerID, } revokeIssuerPairRes, err := lg.RevokeIssuerPair(ctx, revokeIssuerPairParams) @@ -201,7 +251,7 @@ func TestIssuerCreateN2(t *testing.T) { require.NoError(t, err) } { - getIssuerCertificateParams := &cmapi.GetIssuerCertificateParams{ + getIssuerCertificateParams := &cmctl.GetIssuerCertificateParams{ IssuerID: issuerID, } getIssuerCertificateRes, err := lg.GetIssuerCertificate(ctx, getIssuerCertificateParams) @@ -213,7 +263,7 @@ func TestIssuerCreateN2(t *testing.T) { printObj("getIssuerCertificateRes", getIssuerCertificateRes) } { - unrevokeIssuerPairParams := &cmapi.UnrevokeIssuerPairParams{ + unrevokeIssuerPairParams := &cmctl.UnrevokeIssuerPairParams{ IssuerID: issuerID, } unrevokeIssuerPairRes, err := lg.UnrevokeIssuerPair(ctx, unrevokeIssuerPairParams) @@ -224,7 +274,7 @@ func TestIssuerCreateN2(t *testing.T) { require.NoError(t, err) } { - getIssuerCertificateParams := &cmapi.GetIssuerCertificateParams{ + getIssuerCertificateParams := &cmctl.GetIssuerCertificateParams{ IssuerID: issuerID, } getIssuerCertificateRes, err := lg.GetIssuerCertificate(ctx, getIssuerCertificateParams) @@ -236,7 +286,7 @@ func TestIssuerCreateN2(t *testing.T) { printObj("getIssuerCertificateRes", getIssuerCertificateRes) } { - listIssuerPairsParams := &cmapi.ListIssuerPairsParams{} + listIssuerPairsParams := &cmctl.ListIssuerPairsParams{} listIssuerPairsRes, err := lg.ListIssuerPairs(ctx, listIssuerPairsParams) require.NoError(t, err) require.NotNil(t, listIssuerPairsRes) @@ -246,7 +296,7 @@ func TestIssuerCreateN2(t *testing.T) { } { for i := 0; i < 3; i++ { - createIssuerPairParams := &cmapi.CreateIssuerPairParams{ + createIssuerPairParams := &cmctl.CreateIssuerPairParams{ IssuerCommonName: fmt.Sprintf("sub%0d.%s", i, issuerCommonName), } createIssuerPairRes, err := lg.CreateIssuerPair(ctx, createIssuerPairParams) @@ -257,7 +307,7 @@ func TestIssuerCreateN2(t *testing.T) { } } { - listIssuerPairsParams := &cmapi.ListIssuerPairsParams{} + listIssuerPairsParams := &cmctl.ListIssuerPairsParams{} listIssuerPairsRes, err := lg.ListIssuerPairs(ctx, listIssuerPairsParams) require.NoError(t, err) require.NotNil(t, listIssuerPairsRes) @@ -268,7 +318,7 @@ func TestIssuerCreateN2(t *testing.T) { serviceCommonName := "make.love.not.war" var serviceID int64 { - createServicePairParams := &cmapi.CreateServicePairParams{ + createServicePairParams := &cmctl.CreateServicePairParams{ ServiceCommonName: serviceCommonName, IssuerID: issuerID, } @@ -281,7 +331,7 @@ func TestIssuerCreateN2(t *testing.T) { printObj("serviceID", serviceID) } { - getServicePairParams := &cmapi.GetServicePairParams{ + getServicePairParams := &cmctl.GetServicePairParams{ ServiceID: serviceID, } getServicePairRes, err := lg.GetServicePair(ctx, getServicePairParams) diff --git a/internal/test/logic_issuer_import_test.go b/internal/test/logic_issuer_import_test.go index c9557c2..db33d51 100644 --- a/internal/test/logic_issuer_import_test.go +++ b/internal/test/logic_issuer_import_test.go @@ -11,11 +11,11 @@ import ( "testing" "time" - cmapi "certmanager/pkg/cmctl" "certmanager/internal/config" "certmanager/internal/database" "certmanager/internal/logic" "certmanager/pkg/cm509" + cmapi "certmanager/pkg/cmctl" "github.com/stretchr/testify/require" ) diff --git a/internal/wrpc/handler/status.go b/internal/wrpc/handler/status.go index 22e9707..1ed0aaf 100644 --- a/internal/wrpc/handler/status.go +++ b/internal/wrpc/handler/status.go @@ -1,8 +1,8 @@ package handler import ( - "certmanager/pkg/cmctl" "certmanager/pkg/auxhttp" + "certmanager/pkg/cmctl" "github.com/gin-gonic/gin" ) diff --git a/pkg/client/certman.go b/pkg/client/certman.go index 21c5c19..22af92d 100644 --- a/pkg/client/certman.go +++ b/pkg/client/certman.go @@ -4,8 +4,8 @@ import ( "context" "time" - cmapi "certmanager/pkg/cmctl" "certmanager/pkg/auxgrpc" + cmapi "certmanager/pkg/cmctl" ) func (cont *Control) CreateIssuerPair(ctx context.Context, param *cmapi.CreateIssuerPairParams) (*cmapi.CreateIssuerPairResult, error) { diff --git a/pkg/cmctl/cmctl.pb.go b/pkg/cmctl/cmctl.pb.go index 2470559..9759373 100644 --- a/pkg/cmctl/cmctl.pb.go +++ b/pkg/cmctl/cmctl.pb.go @@ -315,10 +315,13 @@ type GetIssuerCertificateResult struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Certificate string `protobuf:"bytes,2,opt,name=certificate,proto3" json:"certificate,omitempty"` - Revoked bool `protobuf:"varint,3,opt,name=revoked,proto3" json:"revoked,omitempty"` - IssuerID int64 `protobuf:"varint,4,opt,name=issuerID,proto3" json:"issuerID,omitempty"` + IssuerID int64 `protobuf:"varint,1,opt,name=issuerID,proto3" json:"issuerID,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Certificate string `protobuf:"bytes,3,opt,name=certificate,proto3" json:"certificate,omitempty"` + SignerID int64 `protobuf:"varint,4,opt,name=signerID,proto3" json:"signerID,omitempty"` + 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"` } func (x *GetIssuerCertificateResult) Reset() { @@ -353,6 +356,13 @@ func (*GetIssuerCertificateResult) Descriptor() ([]byte, []int) { return file_cmctl_proto_rawDescGZIP(), []int{5} } +func (x *GetIssuerCertificateResult) GetIssuerID() int64 { + if x != nil { + return x.IssuerID + } + return 0 +} + func (x *GetIssuerCertificateResult) GetName() string { if x != nil { return x.Name @@ -367,6 +377,20 @@ func (x *GetIssuerCertificateResult) GetCertificate() string { return "" } +func (x *GetIssuerCertificateResult) GetSignerID() int64 { + if x != nil { + return x.SignerID + } + return 0 +} + +func (x *GetIssuerCertificateResult) GetSignerName() string { + if x != nil { + return x.SignerName + } + return "" +} + func (x *GetIssuerCertificateResult) GetRevoked() bool { if x != nil { return x.Revoked @@ -374,11 +398,11 @@ func (x *GetIssuerCertificateResult) GetRevoked() bool { return false } -func (x *GetIssuerCertificateResult) GetIssuerID() int64 { +func (x *GetIssuerCertificateResult) GetSignerCertificates() []string { if x != nil { - return x.IssuerID + return x.SignerCertificates } - return 0 + return nil } type ImportIssuerPairParams struct { @@ -775,9 +799,11 @@ type IssierShortDescriptor struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - IssuerID int64 `protobuf:"varint,1,opt,name=issuerID,proto3" json:"issuerID,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Revoked bool `protobuf:"varint,3,opt,name=revoked,proto3" json:"revoked,omitempty"` + IssuerID int64 `protobuf:"varint,1,opt,name=issuerID,proto3" json:"issuerID,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + SignerID int64 `protobuf:"varint,3,opt,name=signerID,proto3" json:"signerID,omitempty"` + SignerName string `protobuf:"bytes,4,opt,name=signerName,proto3" json:"signerName,omitempty"` + Revoked bool `protobuf:"varint,5,opt,name=revoked,proto3" json:"revoked,omitempty"` } func (x *IssierShortDescriptor) Reset() { @@ -826,6 +852,20 @@ func (x *IssierShortDescriptor) GetName() string { return "" } +func (x *IssierShortDescriptor) GetSignerID() int64 { + if x != nil { + return x.SignerID + } + return 0 +} + +func (x *IssierShortDescriptor) GetSignerName() string { + if x != nil { + return x.SignerName + } + return "" +} + func (x *IssierShortDescriptor) GetRevoked() bool { if x != nil { return x.Revoked @@ -1583,233 +1623,244 @@ var file_cmctl_proto_rawDesc = []byte{ 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, 0x88, 0x01, 0x0a, 0x1a, 0x67, 0x65, 0x74, 0x49, 0x73, 0x73, 0x75, + 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, 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, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, - 0x6f, 0x6b, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x64, 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, 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, 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, 0x61, 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, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x64, 0x18, 0x03, - 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, + 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, 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, 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, + 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, + 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, - 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, + 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, 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, + 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, 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, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, - 0x63, 0x6d, 0x63, 0x74, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 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, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x63, 0x6d, 0x63, 0x74, 0x6c, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/cmctl.proto b/proto/cmctl.proto index 94d857b..a676802 100644 --- a/proto/cmctl.proto +++ b/proto/cmctl.proto @@ -45,10 +45,13 @@ message getIssuerCertificateParams { string issuerName = 2; } message getIssuerCertificateResult { - string name = 1; - string certificate = 2; - bool revoked = 3; - int64 issuerID = 4; + int64 issuerID = 1; + string name = 2; + string certificate = 3; + int64 signerID = 4; + string signerName = 5; + bool revoked = 6; + repeated string signerCertificates = 7; } message importIssuerPairParams { @@ -81,7 +84,9 @@ message listIssuerPairsResult { message IssierShortDescriptor { int64 issuerID = 1; string name = 2; - bool revoked = 3; + int64 signerID = 3; + string signerName = 4; + bool revoked = 5; } message createServicePairParams {