Resolve aliases prior to subtype attribute transforming interceptor (#4379)
* Resolve aliases prior to subtype interceptor
This commit is contained in:
1 parent
203ea57165
commit
5a17c9cd39
20 files changed
+1226
-855
No files matched your search
@@ -3,6 +3,42 @@
|
||||
|
||||
package alias
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/boundary/internal/types/resource"
|
||||
)
|
||||
|
||||
const (
|
||||
Domain = "alias"
|
||||
)
|
||||
|
||||
// An Alias is a view object containing only the information needed to lookup
|
||||
// generic information about an alias.
|
||||
type Alias struct {
|
||||
tableName string `gorm:"-"`
|
||||
PublicId string `gorm:"primary_key"`
|
||||
DestinationId string
|
||||
Value string
|
||||
}
|
||||
|
||||
// allocAlias is just easier/better than leaking the underlying type
|
||||
// bits to the repo, since the repo needs to alloc this type quite often.
|
||||
func allocAlias() *Alias {
|
||||
fresh := &Alias{}
|
||||
return fresh
|
||||
}
|
||||
|
||||
// GetResourceType returns the resource type of the Alias
|
||||
func (al Alias) GetResourceType() resource.Type {
|
||||
return resource.Alias
|
||||
}
|
||||
|
||||
func (al *Alias) TableName() string {
|
||||
if al.tableName != "" {
|
||||
return al.tableName
|
||||
}
|
||||
return "alias_all_subtypes"
|
||||
}
|
||||
|
||||
func (al *Alias) SetTableName(tableName string) {
|
||||
al.tableName = tableName
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
package alias
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/hashicorp/boundary/internal/errors"
|
||||
"github.com/hashicorp/boundary/sdk/pbs/controller/protooptions"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/reflect/protoregistry"
|
||||
"google.golang.org/protobuf/types/descriptorpb"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// register all proto fields that are aliasable.
|
||||
protoregistry.GlobalTypes.RangeMessages(func(m protoreflect.MessageType) bool {
|
||||
registerAliasableFields(m.Descriptor())
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
type registrationInfo struct {
|
||||
unaliasableWithFields []string
|
||||
}
|
||||
|
||||
// globalAliasableRegistry is a map of proto field's FullName to registrationInfo.
|
||||
var globalAliasableRegistry sync.Map
|
||||
|
||||
func registerAliasableFields(d protoreflect.MessageDescriptor) {
|
||||
fields := d.Fields()
|
||||
for i := 0; i < fields.Len(); i++ {
|
||||
f := fields.Get(i)
|
||||
name := f.FullName()
|
||||
opts, ok := f.Options().(*descriptorpb.FieldOptions)
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
aliasableInfo := proto.GetExtension(opts, protooptions.E_Aliasable).(*protooptions.AliasInfo)
|
||||
if aliasableInfo != nil {
|
||||
ri := ®istrationInfo{unaliasableWithFields: aliasableInfo.GetUnlessSet().GetFields()}
|
||||
globalAliasableRegistry.Store(name, ri)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// aliasLookup is an interface for looking up an alias by its value.
|
||||
type aliasLookup interface {
|
||||
lookupAliasByValue(ctx context.Context, value string) (*Alias, error)
|
||||
}
|
||||
|
||||
// ResolveRequestIds transforms the request by replacing aliasable field values
|
||||
// with their corresponding destination ids. A field is aliasable depending on
|
||||
// if and how the custom proto option "custom_options.v1.aliasable" is set on
|
||||
// it. When the option is set on a field, it can be marked as always aliasable,
|
||||
// in which case the field will always be checked for an alias value on the field
|
||||
// or it can be marked as aliasable unless other specified fields on the same
|
||||
// message is set.
|
||||
// If no alias is found or the alias has no destination id, an error is returned.
|
||||
func ResolveRequestIds(ctx context.Context, req proto.Message, lookup aliasLookup) (context.Context, error) {
|
||||
const op = "alias.ResolveRequestIds"
|
||||
r := req.ProtoReflect()
|
||||
fields := r.Descriptor().Fields()
|
||||
|
||||
nextField:
|
||||
for i := 0; i < fields.Len(); i++ {
|
||||
f := fields.Get(i)
|
||||
if f.Kind() != protoreflect.StringKind {
|
||||
continue
|
||||
}
|
||||
aiVal, ok := globalAliasableRegistry.Load(f.FullName())
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
ai, ok := aiVal.(*registrationInfo)
|
||||
if !ok {
|
||||
return ctx, errors.New(ctx, errors.Internal, op, fmt.Sprintf("unable to cast aliasable info for field %q", f.FullName()))
|
||||
}
|
||||
|
||||
v := r.Get(f).String()
|
||||
if !maybeAlias(v) {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, fieldName := range ai.unaliasableWithFields {
|
||||
if r.Has(fields.ByName(protoreflect.Name(fieldName))) {
|
||||
continue nextField
|
||||
}
|
||||
}
|
||||
|
||||
a, err := lookup.lookupAliasByValue(ctx, v)
|
||||
if err != nil {
|
||||
return ctx, err
|
||||
}
|
||||
if a == nil {
|
||||
return ctx, errors.New(ctx, errors.NotFound, op, fmt.Sprintf("resource alias not found with value %q", v))
|
||||
}
|
||||
if a.DestinationId == "" {
|
||||
return ctx, errors.New(ctx, errors.NotFound, op, fmt.Sprintf("resource not found for alias value %q", v))
|
||||
}
|
||||
r.Set(f, protoreflect.ValueOfString(a.DestinationId))
|
||||
ctx = setCtxAliasInfo(ctx, a)
|
||||
}
|
||||
|
||||
return ctx, nil
|
||||
}
|
||||
|
||||
// maybeAlias returns true if the input string is a candidate for being an alias.
|
||||
func maybeAlias(s string) bool {
|
||||
return !strings.Contains(s, "_") &&
|
||||
len(s) > 0
|
||||
}
|
||||
|
||||
type key int
|
||||
|
||||
var aliasCtxKey key
|
||||
|
||||
func setCtxAliasInfo(ctx context.Context, a *Alias) context.Context {
|
||||
return context.WithValue(ctx, aliasCtxKey, a)
|
||||
}
|
||||
|
||||
// FromContext returns the Alias from the context, if it exists. It will only
|
||||
// exist if the original request contained an alias in a field marked as
|
||||
// aliasable in the proto definition, and the alias was successfully resolved.
|
||||
func FromContext(ctx context.Context) *Alias {
|
||||
v, ok := ctx.Value(aliasCtxKey).(*Alias)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
return v
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
package alias
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
pbs "github.com/hashicorp/boundary/internal/gen/controller/api/services"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
)
|
||||
|
||||
func TestRegisterAliasableFields(t *testing.T) {
|
||||
// When this package is imported the aliasable fields are registered so
|
||||
// we can immediately assert that some of the expected fields are present.
|
||||
|
||||
successCases := []protoreflect.FullName{
|
||||
(&pbs.GetTargetRequest{}).ProtoReflect().Descriptor().Fields().ByName("id").FullName(),
|
||||
(&pbs.UpdateTargetRequest{}).ProtoReflect().Descriptor().Fields().ByName("id").FullName(),
|
||||
(&pbs.DeleteTargetRequest{}).ProtoReflect().Descriptor().Fields().ByName("id").FullName(),
|
||||
(&pbs.AddTargetHostSourcesRequest{}).ProtoReflect().Descriptor().Fields().ByName("id").FullName(),
|
||||
(&pbs.SetTargetHostSourcesRequest{}).ProtoReflect().Descriptor().Fields().ByName("id").FullName(),
|
||||
(&pbs.RemoveTargetHostSourcesRequest{}).ProtoReflect().Descriptor().Fields().ByName("id").FullName(),
|
||||
(&pbs.AddTargetCredentialSourcesRequest{}).ProtoReflect().Descriptor().Fields().ByName("id").FullName(),
|
||||
(&pbs.SetTargetCredentialSourcesRequest{}).ProtoReflect().Descriptor().Fields().ByName("id").FullName(),
|
||||
(&pbs.RemoveTargetCredentialSourcesRequest{}).ProtoReflect().Descriptor().Fields().ByName("id").FullName(),
|
||||
(&pbs.AuthorizeSessionRequest{}).ProtoReflect().Descriptor().Fields().ByName("id").FullName(),
|
||||
}
|
||||
|
||||
for _, c := range successCases {
|
||||
t.Run(string(c), func(t *testing.T) {
|
||||
_, ok := globalAliasableRegistry.Load(c)
|
||||
assert.Truef(t, ok, "expected field %q to be aliasable", c)
|
||||
})
|
||||
}
|
||||
|
||||
failCases := []protoreflect.FullName{
|
||||
(&pbs.GetAccountRequest{}).ProtoReflect().Descriptor().Fields().ByName("id").FullName(),
|
||||
(&pbs.UpdateAccountRequest{}).ProtoReflect().Descriptor().Fields().ByName("id").FullName(),
|
||||
(&pbs.DeleteAccountRequest{}).ProtoReflect().Descriptor().Fields().ByName("id").FullName(),
|
||||
}
|
||||
|
||||
for _, c := range failCases {
|
||||
t.Run(string(c), func(t *testing.T) {
|
||||
_, ok := globalAliasableRegistry.Load(c)
|
||||
assert.Falsef(t, ok, "expected field %q to not be aliasable", c)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestResolveAliasFields(t *testing.T) {
|
||||
t.Run("no alias", func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
m := aliasMapping{m: make(map[string]*Alias)}
|
||||
req := &pbs.GetTargetRequest{Id: "foo"}
|
||||
ctx, err := ResolveRequestIds(ctx, req, m)
|
||||
assert.ErrorContains(t, err, "resource alias not found with value")
|
||||
assert.Nil(t, FromContext(ctx))
|
||||
})
|
||||
|
||||
t.Run("alias", func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
m := aliasMapping{m: make(map[string]*Alias)}
|
||||
m.m["foo"] = &Alias{PublicId: "alt_1234", Value: "foo", DestinationId: "ttcp_mapped"}
|
||||
req := &pbs.GetTargetRequest{Id: "foo"}
|
||||
ctx, err := ResolveRequestIds(ctx, req, m)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "ttcp_mapped", req.Id)
|
||||
assert.NotNil(t, FromContext(ctx))
|
||||
})
|
||||
|
||||
t.Run("public id", func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
m := aliasMapping{m: make(map[string]*Alias)}
|
||||
m.m["foo"] = &Alias{PublicId: "alt_1234", Value: "foo", DestinationId: "ttcp_mapped"}
|
||||
req := &pbs.GetTargetRequest{Id: "ttcp_existing"}
|
||||
ctx, err := ResolveRequestIds(ctx, req, m)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "ttcp_existing", req.Id)
|
||||
assert.Nil(t, FromContext(ctx))
|
||||
})
|
||||
|
||||
t.Run("alias has no destination id", func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
m := aliasMapping{m: make(map[string]*Alias)}
|
||||
m.m["foo"] = &Alias{PublicId: "alt_1234", Value: "foo"}
|
||||
req := &pbs.GetTargetRequest{Id: "foo"}
|
||||
ctx, err := ResolveRequestIds(ctx, req, m)
|
||||
assert.ErrorContains(t, err, "resource not found for alias value")
|
||||
assert.Nil(t, FromContext(ctx))
|
||||
})
|
||||
|
||||
// Authorize sessions allow target names to be passed in through the id field
|
||||
// the only way to tell if that is happening is if the scope id or scope name
|
||||
// are also present.
|
||||
t.Run("authorize session target name with scope id", func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
m := aliasMapping{m: make(map[string]*Alias)}
|
||||
m.m["foo"] = &Alias{PublicId: "alt_1234", Value: "foo", DestinationId: "ttcp_mapped"}
|
||||
req := &pbs.AuthorizeSessionRequest{Id: "foo", ScopeId: "scope_id"}
|
||||
ctx, err := ResolveRequestIds(ctx, req, m)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "foo", req.Id)
|
||||
assert.Nil(t, FromContext(ctx))
|
||||
})
|
||||
|
||||
t.Run("authorize session target name with scope name", func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
m := aliasMapping{m: make(map[string]*Alias)}
|
||||
m.m["foo"] = &Alias{PublicId: "alt_1234", Value: "foo", DestinationId: "ttcp_mapped"}
|
||||
req := &pbs.AuthorizeSessionRequest{Id: "foo", ScopeName: "scope_name"}
|
||||
ctx, err := ResolveRequestIds(ctx, req, m)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "foo", req.Id)
|
||||
assert.Nil(t, FromContext(ctx))
|
||||
})
|
||||
|
||||
t.Run("authorize session alias", func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
m := aliasMapping{m: make(map[string]*Alias)}
|
||||
m.m["foo"] = &Alias{PublicId: "alt_1234", Value: "foo", DestinationId: "ttcp_mapped"}
|
||||
req := &pbs.AuthorizeSessionRequest{Id: "foo"}
|
||||
ctx, err := ResolveRequestIds(ctx, req, m)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "ttcp_mapped", req.Id)
|
||||
assert.NotNil(t, FromContext(ctx))
|
||||
})
|
||||
}
|
||||
|
||||
type aliasMapping struct {
|
||||
m map[string]*Alias
|
||||
}
|
||||
|
||||
func (a aliasMapping) lookupAliasByValue(ctx context.Context, value string) (*Alias, error) {
|
||||
return a.m[value], nil
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
package alias
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/hashicorp/boundary/internal/db"
|
||||
"github.com/hashicorp/boundary/internal/errors"
|
||||
"github.com/hashicorp/boundary/internal/kms"
|
||||
)
|
||||
|
||||
// A Repository stores and retrieves the persistent types in the alias
|
||||
// package. It is not safe to use a repository concurrently.
|
||||
type Repository struct {
|
||||
reader db.Reader
|
||||
writer db.Writer
|
||||
kms *kms.Kms
|
||||
}
|
||||
|
||||
// NewRepository creates a new Repository. The returned repository should
|
||||
// only be used for one transaction and it is not safe for concurrent go
|
||||
// routines to access it.
|
||||
func NewRepository(ctx context.Context, r db.Reader, w db.Writer, kms *kms.Kms) (*Repository, error) {
|
||||
const op = "alias.NewRepository"
|
||||
switch {
|
||||
case r == nil:
|
||||
return nil, errors.New(ctx, errors.InvalidParameter, op, "db.Reader")
|
||||
case w == nil:
|
||||
return nil, errors.New(ctx, errors.InvalidParameter, op, "db.Writer")
|
||||
case kms == nil:
|
||||
return nil, errors.New(ctx, errors.InvalidParameter, op, "kms")
|
||||
}
|
||||
|
||||
return &Repository{
|
||||
reader: r,
|
||||
writer: w,
|
||||
kms: kms,
|
||||
}, nil
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
package alias
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/hashicorp/boundary/internal/errors"
|
||||
)
|
||||
|
||||
// lookupAliasByValue returns the Alias for the provided value. Returns nil, nil
|
||||
// if no Alias is found for the provided value. No Options are currently supported
|
||||
func (r *Repository) lookupAliasByValue(ctx context.Context, value string) (*Alias, error) {
|
||||
const op = "alias.(Repository).LookupAliasByValue"
|
||||
if value == "" {
|
||||
return nil, errors.New(ctx, errors.InvalidParameter, op, "value is empty")
|
||||
}
|
||||
a := allocAlias()
|
||||
if err := r.reader.LookupWhere(ctx, a, "value = $1", []any{value}); err != nil {
|
||||
if errors.IsNotFoundError(err) {
|
||||
return nil, nil
|
||||
}
|
||||
return nil, errors.Wrap(ctx, err, op, errors.WithMsg(fmt.Sprintf("failed for %q", value)))
|
||||
}
|
||||
return a, nil
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/hashicorp/boundary/internal/kms"
|
||||
)
|
||||
|
||||
// A Repository stores and retrieves the persistent types in the static
|
||||
// A Repository stores and retrieves the persistent types in the alias target
|
||||
// package. It is not safe to use a repository concurrently.
|
||||
type Repository struct {
|
||||
reader db.Reader
|
||||
@@ -27,7 +27,7 @@ type Repository struct {
|
||||
// routines to access it. WithLimit option is used as a repo wide default
|
||||
// limit applied to all ListX methods.
|
||||
func NewRepository(ctx context.Context, r db.Reader, w db.Writer, kms *kms.Kms, opt ...Option) (*Repository, error) {
|
||||
const op = "static.NewRepository"
|
||||
const op = "target.NewRepository"
|
||||
switch {
|
||||
case r == nil:
|
||||
return nil, errors.New(ctx, errors.InvalidParameter, op, "db.Reader")
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"github.com/hashicorp/boundary/internal/alias"
|
||||
"github.com/hashicorp/boundary/internal/alias/target"
|
||||
"github.com/hashicorp/boundary/internal/auth"
|
||||
"github.com/hashicorp/boundary/internal/auth/ldap"
|
||||
@@ -42,6 +43,7 @@ type (
|
||||
WorkerAuthRepoStorageFactory func() (*server.WorkerAuthRepositoryStorage, error)
|
||||
PluginStorageBucketRepoFactory func() (*pluginstorage.Repository, error)
|
||||
BillingRepoFactory func() (*billing.Repository, error)
|
||||
AliasRepoFactory func() (*alias.Repository, error)
|
||||
TargetAliasRepoFactory func() (*target.Repository, error)
|
||||
)
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/hashicorp/boundary/internal/alias"
|
||||
target2 "github.com/hashicorp/boundary/internal/alias/target"
|
||||
"github.com/hashicorp/boundary/internal/auth"
|
||||
"github.com/hashicorp/boundary/internal/auth/ldap"
|
||||
@@ -151,6 +152,7 @@ type Controller struct {
|
||||
TargetRepoFn target.RepositoryFactory
|
||||
WorkerAuthRepoStorageFn common.WorkerAuthRepoStorageFactory
|
||||
BillingRepoFn common.BillingRepoFactory
|
||||
AliasRepoFn common.AliasRepoFactory
|
||||
TargetAliasRepoFn common.TargetAliasRepoFactory
|
||||
|
||||
scheduler *scheduler.Scheduler
|
||||
@@ -455,6 +457,9 @@ func New(ctx context.Context, conf *Config) (*Controller, error) {
|
||||
c.BillingRepoFn = func() (*billing.Repository, error) {
|
||||
return billing.NewRepository(ctx, dbase)
|
||||
}
|
||||
c.AliasRepoFn = func() (*alias.Repository, error) {
|
||||
return alias.NewRepository(ctx, dbase, dbase, c.kms)
|
||||
}
|
||||
c.TargetAliasRepoFn = func() (*target2.Repository, error) {
|
||||
return target2.NewRepository(ctx, dbase, dbase, c.kms)
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ func newGrpcServer(
|
||||
passwordAuthRepoFn common.PasswordAuthRepoFactory,
|
||||
oidcAuthRepoFn common.OidcAuthRepoFactory,
|
||||
ldapAuthRepoFn common.LdapAuthRepoFactory,
|
||||
aliasRepoFn common.AliasRepoFactory,
|
||||
kms *kms.Kms,
|
||||
eventer *event.Eventer,
|
||||
) (*grpc.Server, string, error) {
|
||||
@@ -116,6 +117,7 @@ func newGrpcServer(
|
||||
grpc_middleware.ChainUnaryServer(
|
||||
unaryCtxInterceptor, // populated requestInfo from headers into the request ctx
|
||||
errorInterceptor(ctx), // convert domain and api errors into headers for the http proxy
|
||||
aliasResolutionInterceptor(ctx, aliasRepoFn), // Resolve ids when an alias is provided
|
||||
subtypes.AttributeTransformerInterceptor(ctx), // convert to/from generic attributes from/to subtype specific attributes
|
||||
eventsRequestInterceptor(ctx), // before we get started, send the required events with the request
|
||||
statusCodeInterceptor(ctx), // convert grpc codes into http status codes for the http proxy (can modify the resp)
|
||||
|
||||
@@ -16,6 +16,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/boundary/globals"
|
||||
"github.com/hashicorp/boundary/internal/alias"
|
||||
talias "github.com/hashicorp/boundary/internal/alias/target"
|
||||
"github.com/hashicorp/boundary/internal/credential"
|
||||
wl "github.com/hashicorp/boundary/internal/daemon/common"
|
||||
@@ -355,14 +356,6 @@ func (s Service) ListTargets(ctx context.Context, req *pbs.ListTargetsRequest) (
|
||||
func (s Service) GetTarget(ctx context.Context, req *pbs.GetTargetRequest) (*pbs.GetTargetResponse, error) {
|
||||
const op = "targets.(Service).GetTarget"
|
||||
|
||||
if maybeAlias(req.GetId()) {
|
||||
if a, err := s.resolveAlias(ctx, req.GetId()); err != nil {
|
||||
return nil, errors.Wrap(ctx, err, op)
|
||||
} else {
|
||||
req.Id = a.DestinationId
|
||||
}
|
||||
}
|
||||
|
||||
if err := validateGetRequest(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -443,14 +436,6 @@ func (s Service) CreateTarget(ctx context.Context, req *pbs.CreateTargetRequest)
|
||||
func (s Service) UpdateTarget(ctx context.Context, req *pbs.UpdateTargetRequest) (*pbs.UpdateTargetResponse, error) {
|
||||
const op = "targets.(Service).UpdateTarget"
|
||||
|
||||
if maybeAlias(req.GetId()) {
|
||||
if a, err := s.resolveAlias(ctx, req.GetId()); err != nil {
|
||||
return nil, errors.Wrap(ctx, err, op)
|
||||
} else {
|
||||
req.Id = a.DestinationId
|
||||
}
|
||||
}
|
||||
|
||||
if err := validateUpdateRequest(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -491,14 +476,6 @@ func (s Service) UpdateTarget(ctx context.Context, req *pbs.UpdateTargetRequest)
|
||||
func (s Service) DeleteTarget(ctx context.Context, req *pbs.DeleteTargetRequest) (*pbs.DeleteTargetResponse, error) {
|
||||
const op = "targets.(Service).DeleteTarget"
|
||||
|
||||
if maybeAlias(req.GetId()) {
|
||||
if a, err := s.resolveAlias(ctx, req.GetId()); err != nil {
|
||||
return nil, errors.Wrap(ctx, err, op)
|
||||
} else {
|
||||
req.Id = a.DestinationId
|
||||
}
|
||||
}
|
||||
|
||||
if err := validateDeleteRequest(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -517,14 +494,6 @@ func (s Service) DeleteTarget(ctx context.Context, req *pbs.DeleteTargetRequest)
|
||||
func (s Service) AddTargetHostSources(ctx context.Context, req *pbs.AddTargetHostSourcesRequest) (*pbs.AddTargetHostSourcesResponse, error) {
|
||||
const op = "targets.(Service).AddTargetHostSources"
|
||||
|
||||
if maybeAlias(req.GetId()) {
|
||||
if a, err := s.resolveAlias(ctx, req.GetId()); err != nil {
|
||||
return nil, errors.Wrap(ctx, err, op)
|
||||
} else {
|
||||
req.Id = a.DestinationId
|
||||
}
|
||||
}
|
||||
|
||||
if err := validateAddHostSourcesRequest(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -567,14 +536,6 @@ func (s Service) AddTargetHostSources(ctx context.Context, req *pbs.AddTargetHos
|
||||
func (s Service) SetTargetHostSources(ctx context.Context, req *pbs.SetTargetHostSourcesRequest) (*pbs.SetTargetHostSourcesResponse, error) {
|
||||
const op = "targets.(Service).SetTargetHostSources"
|
||||
|
||||
if maybeAlias(req.GetId()) {
|
||||
if a, err := s.resolveAlias(ctx, req.GetId()); err != nil {
|
||||
return nil, errors.Wrap(ctx, err, op)
|
||||
} else {
|
||||
req.Id = a.DestinationId
|
||||
}
|
||||
}
|
||||
|
||||
if err := validateSetHostSourcesRequest(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -615,14 +576,6 @@ func (s Service) SetTargetHostSources(ctx context.Context, req *pbs.SetTargetHos
|
||||
func (s Service) RemoveTargetHostSources(ctx context.Context, req *pbs.RemoveTargetHostSourcesRequest) (*pbs.RemoveTargetHostSourcesResponse, error) {
|
||||
const op = "targets.(Service).RemoveTargetHostSources"
|
||||
|
||||
if maybeAlias(req.GetId()) {
|
||||
if a, err := s.resolveAlias(ctx, req.GetId()); err != nil {
|
||||
return nil, errors.Wrap(ctx, err, op)
|
||||
} else {
|
||||
req.Id = a.DestinationId
|
||||
}
|
||||
}
|
||||
|
||||
if err := validateRemoveHostSourcesRequest(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -663,14 +616,6 @@ func (s Service) RemoveTargetHostSources(ctx context.Context, req *pbs.RemoveTar
|
||||
func (s Service) AddTargetCredentialSources(ctx context.Context, req *pbs.AddTargetCredentialSourcesRequest) (*pbs.AddTargetCredentialSourcesResponse, error) {
|
||||
const op = "targets.(Service).AddTargetCredentialSources"
|
||||
|
||||
if maybeAlias(req.GetId()) {
|
||||
if a, err := s.resolveAlias(ctx, req.GetId()); err != nil {
|
||||
return nil, errors.Wrap(ctx, err, op)
|
||||
} else {
|
||||
req.Id = a.DestinationId
|
||||
}
|
||||
}
|
||||
|
||||
if err := validateAddCredentialSourcesRequest(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -712,14 +657,6 @@ func (s Service) AddTargetCredentialSources(ctx context.Context, req *pbs.AddTar
|
||||
func (s Service) SetTargetCredentialSources(ctx context.Context, req *pbs.SetTargetCredentialSourcesRequest) (*pbs.SetTargetCredentialSourcesResponse, error) {
|
||||
const op = "targets.(Service).SetTargetCredentialSources"
|
||||
|
||||
if maybeAlias(req.GetId()) {
|
||||
if a, err := s.resolveAlias(ctx, req.GetId()); err != nil {
|
||||
return nil, errors.Wrap(ctx, err, op)
|
||||
} else {
|
||||
req.Id = a.DestinationId
|
||||
}
|
||||
}
|
||||
|
||||
if err := validateSetCredentialSourcesRequest(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -761,14 +698,6 @@ func (s Service) SetTargetCredentialSources(ctx context.Context, req *pbs.SetTar
|
||||
func (s Service) RemoveTargetCredentialSources(ctx context.Context, req *pbs.RemoveTargetCredentialSourcesRequest) (*pbs.RemoveTargetCredentialSourcesResponse, error) {
|
||||
const op = "targets.(Service).RemoveTargetCredentialSources"
|
||||
|
||||
if maybeAlias(req.GetId()) {
|
||||
if a, err := s.resolveAlias(ctx, req.GetId()); err != nil {
|
||||
return nil, errors.Wrap(ctx, err, op)
|
||||
} else {
|
||||
req.Id = a.DestinationId
|
||||
}
|
||||
}
|
||||
|
||||
if err := validateRemoveCredentialSourcesRequest(req); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -855,23 +784,18 @@ func DefaultPostSessionAuthorizationCallback(context.Context, intglobals.Control
|
||||
func (s Service) AuthorizeSession(ctx context.Context, req *pbs.AuthorizeSessionRequest) (_ *pbs.AuthorizeSessionResponse, retErr error) {
|
||||
const op = "targets.(Service).AuthorizeSession"
|
||||
|
||||
if maybeAlias(req.GetId()) && len(req.GetScopeId()) == 0 && len(req.GetScopeName()) == 0 {
|
||||
// AuthorizeSession allows passing the target name in the place of an id but
|
||||
// requires that the scope id or scope name is also provided in the request.
|
||||
// If the scope id or the scope name is provided, we will not attempt to
|
||||
// resolve the alias.
|
||||
if a, err := s.resolveAlias(ctx, req.GetId()); err != nil {
|
||||
if ctxAlias := alias.FromContext(ctx); ctxAlias != nil {
|
||||
a, err := s.resolveAlias(ctx, ctxAlias.PublicId)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(ctx, err, op)
|
||||
} else {
|
||||
req.Id = a.DestinationId
|
||||
if a.HostId != "" {
|
||||
if req.GetHostId() != "" && req.GetHostId() != a.HostId {
|
||||
return nil, handlers.InvalidArgumentErrorf("Errors in provided fields.", map[string]string{
|
||||
"host_id": "The host id specified in the request does not match the one provided by the alias. Consider omiting the host id in the request.",
|
||||
})
|
||||
}
|
||||
req.HostId = a.HostId
|
||||
}
|
||||
if a.HostId != "" {
|
||||
if req.GetHostId() != "" && req.GetHostId() != a.HostId {
|
||||
return nil, handlers.InvalidArgumentErrorf("Errors in provided fields.", map[string]string{
|
||||
"host_id": "The host id specified in the request does not match the one provided by the alias. Consider omiting the host id in the request.",
|
||||
})
|
||||
}
|
||||
req.HostId = a.HostId
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1324,34 +1248,23 @@ func (s Service) getFromRepo(ctx context.Context, id string) (target.Target, []t
|
||||
return u, hs, cl, nil
|
||||
}
|
||||
|
||||
// maybeAlias returns true if the input string is a candidate for being an alias.
|
||||
func maybeAlias(s string) bool {
|
||||
return !strings.Contains(s, "_") &&
|
||||
len(s) > 0
|
||||
}
|
||||
|
||||
// resolveAlias returns the alias resource with the specified value.
|
||||
// If the alias does not have a destination id or there is no alias with a
|
||||
// matching value, an error is returned.
|
||||
func (s Service) resolveAlias(ctx context.Context, value string) (*talias.Alias, error) {
|
||||
// resolveAlias returns the alias resource with the specified public id.
|
||||
func (s Service) resolveAlias(ctx context.Context, id string) (*talias.Alias, error) {
|
||||
const op = "targets.(Service).resolveAlias"
|
||||
if value == "" {
|
||||
return nil, errors.New(ctx, errors.InvalidParameter, op, "input string is empty")
|
||||
if id == "" {
|
||||
return nil, errors.New(ctx, errors.InvalidParameter, op, "alias id is empty")
|
||||
}
|
||||
|
||||
r, err := s.aliasRepoFn()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(ctx, err, op)
|
||||
}
|
||||
a, err := r.LookupAliasByValue(ctx, value)
|
||||
a, err := r.LookupAlias(ctx, id)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(ctx, err, op)
|
||||
}
|
||||
if a == nil {
|
||||
return nil, handlers.ApiErrorWithCodeAndMessage(codes.NotFound, "alias with value %q not found", value)
|
||||
}
|
||||
if a.DestinationId == "" {
|
||||
return nil, handlers.ApiErrorWithCodeAndMessage(codes.NotFound, "target not found for alias value %q", value)
|
||||
return nil, handlers.ApiErrorWithCodeAndMessage(codes.NotFound, "alias with id %q not found", id)
|
||||
}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
@@ -157,7 +157,6 @@ func TestGet(t *testing.T) {
|
||||
tarAddr := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "test address", target.WithAddress("8.8.8.8"))
|
||||
|
||||
al := talias.TestAlias(t, rw, "test.alias", talias.WithDestinationId(tar.GetPublicId()))
|
||||
alNoDest := talias.TestAlias(t, rw, "no.destination.test.alias")
|
||||
|
||||
pAlias := &pb.Alias{
|
||||
Id: al.GetPublicId(),
|
||||
@@ -210,11 +209,6 @@ func TestGet(t *testing.T) {
|
||||
req: &pbs.GetTargetRequest{Id: tar.GetPublicId()},
|
||||
res: &pbs.GetTargetResponse{Item: pTar},
|
||||
},
|
||||
{
|
||||
name: "Get an Existing Target by Alias",
|
||||
req: &pbs.GetTargetRequest{Id: al.GetValue()},
|
||||
res: &pbs.GetTargetResponse{Item: pTar},
|
||||
},
|
||||
{
|
||||
name: "Get an Existing Target w/ address",
|
||||
req: &pbs.GetTargetRequest{Id: tarAddr.GetPublicId()},
|
||||
@@ -226,16 +220,6 @@ func TestGet(t *testing.T) {
|
||||
res: nil,
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Alias With No Destination",
|
||||
req: &pbs.GetTargetRequest{Id: alNoDest.GetValue()},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Unknown Alias",
|
||||
req: &pbs.GetTargetRequest{Id: "alias.doesnt.exist"},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Wrong id prefix",
|
||||
req: &pbs.GetTargetRequest{Id: "j_1234567890"},
|
||||
@@ -868,10 +852,6 @@ func TestDelete(t *testing.T) {
|
||||
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "test")
|
||||
|
||||
tarWithAlias := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "targetWithAlias")
|
||||
al := talias.TestAlias(t, rw, "test.alias", talias.WithDestinationId(tarWithAlias.GetPublicId()))
|
||||
alNoDest := talias.TestAlias(t, rw, "no.destination.test.alias")
|
||||
|
||||
s, err := testService(t, ctx, conn, kms, wrapper)
|
||||
require.NoError(t, err, "Couldn't create a new target service.")
|
||||
|
||||
@@ -889,29 +869,6 @@ func TestDelete(t *testing.T) {
|
||||
Id: tar.GetPublicId(),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Delete an Existing Target By Alias",
|
||||
scopeId: proj.GetPublicId(),
|
||||
req: &pbs.DeleteTargetRequest{
|
||||
Id: al.GetValue(),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Delete By Destinationless Alias",
|
||||
scopeId: proj.GetPublicId(),
|
||||
req: &pbs.DeleteTargetRequest{
|
||||
Id: alNoDest.GetValue(),
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Delete By Non Existing Alias",
|
||||
scopeId: proj.GetPublicId(),
|
||||
req: &pbs.DeleteTargetRequest{
|
||||
Id: "alias.doesnt.exist",
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Delete Not Existing Target",
|
||||
scopeId: proj.GetPublicId(),
|
||||
@@ -1299,9 +1256,6 @@ func TestUpdate(t *testing.T) {
|
||||
tar, err = repo.AddTargetHostSources(context.Background(), tar.GetPublicId(), tar.GetVersion(), []string{hs[0].GetPublicId(), hs[1].GetPublicId()})
|
||||
require.NoError(t, err)
|
||||
|
||||
al := talias.TestAlias(t, rw, "test.alias", talias.WithDestinationId(tar.GetPublicId()))
|
||||
alWithNoDest := talias.TestAlias(t, rw, "no.destination.test.alias")
|
||||
|
||||
resetTarget := func() {
|
||||
itar, err := repo.LookupTarget(context.Background(), tar.GetPublicId())
|
||||
require.NoError(t, err)
|
||||
@@ -1460,67 +1414,6 @@ func TestUpdate(t *testing.T) {
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.InvalidArgument),
|
||||
},
|
||||
{
|
||||
name: "Update Name By Alias",
|
||||
req: &pbs.UpdateTargetRequest{
|
||||
Id: al.GetValue(),
|
||||
UpdateMask: &field_mask.FieldMask{
|
||||
Paths: []string{"name"},
|
||||
},
|
||||
Item: &pb.Target{
|
||||
Name: wrapperspb.String("updated"),
|
||||
},
|
||||
},
|
||||
res: &pbs.UpdateTargetResponse{
|
||||
Item: &pb.Target{
|
||||
Id: tar.GetPublicId(),
|
||||
ScopeId: tar.GetProjectId(),
|
||||
Scope: &scopes.ScopeInfo{Id: proj.GetPublicId(), Type: scope.Project.String(), ParentScopeId: org.GetPublicId()},
|
||||
Name: wrapperspb.String("updated"),
|
||||
Description: wrapperspb.String("default"),
|
||||
CreatedTime: tar.GetCreateTime().GetTimestamp(),
|
||||
Type: tcp.Subtype.String(),
|
||||
Attrs: &pb.Target_TcpTargetAttributes{
|
||||
TcpTargetAttributes: &pb.TcpTargetAttributes{
|
||||
DefaultPort: wrapperspb.UInt32(2),
|
||||
DefaultClientPort: wrapperspb.UInt32(3),
|
||||
},
|
||||
},
|
||||
HostSourceIds: hostSourceIds,
|
||||
HostSources: hostSources,
|
||||
SessionMaxSeconds: wrapperspb.UInt32(tar.GetSessionMaxSeconds()),
|
||||
SessionConnectionLimit: wrapperspb.Int32(tar.GetSessionConnectionLimit()),
|
||||
AuthorizedActions: testAuthorizedActions,
|
||||
Address: &wrapperspb.StringValue{},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Update Name By Destinationless Alias",
|
||||
req: &pbs.UpdateTargetRequest{
|
||||
Id: alWithNoDest.GetValue(),
|
||||
UpdateMask: &field_mask.FieldMask{
|
||||
Paths: []string{"name"},
|
||||
},
|
||||
Item: &pb.Target{
|
||||
Name: wrapperspb.String("updated"),
|
||||
},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Update Name By Unknown Alias",
|
||||
req: &pbs.UpdateTargetRequest{
|
||||
Id: "alias.doesnt.exist",
|
||||
UpdateMask: &field_mask.FieldMask{
|
||||
Paths: []string{"name"},
|
||||
},
|
||||
Item: &pb.Target{
|
||||
Name: wrapperspb.String("updated"),
|
||||
},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Unset Name",
|
||||
req: &pbs.UpdateTargetRequest{
|
||||
@@ -1917,47 +1810,37 @@ func TestAddTargetHostSources(t *testing.T) {
|
||||
|
||||
addCases := []struct {
|
||||
name string
|
||||
requestId string
|
||||
tar target.Target
|
||||
addHostSources []string
|
||||
resultHostSources []string
|
||||
}{
|
||||
{
|
||||
name: "Add set on empty target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty").GetPublicId(),
|
||||
addHostSources: []string{hs[1].GetPublicId()},
|
||||
resultHostSources: []string{hs[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Add set on empty target by alias",
|
||||
requestId: func() string {
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "by alias").GetPublicId()
|
||||
al := talias.TestAlias(t, rw, "test.alias", talias.WithDestinationId(tar))
|
||||
return al.GetValue()
|
||||
}(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty"),
|
||||
addHostSources: []string{hs[1].GetPublicId()},
|
||||
resultHostSources: []string{hs[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Add set on populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated", target.WithHostSources([]string{hs[0].GetPublicId()})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated", target.WithHostSources([]string{hs[0].GetPublicId()})),
|
||||
addHostSources: []string{hs[1].GetPublicId()},
|
||||
resultHostSources: []string{hs[0].GetPublicId(), hs[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Add duplicated sets on populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "duplicated", target.WithHostSources([]string{hs[0].GetPublicId()})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "duplicated", target.WithHostSources([]string{hs[0].GetPublicId()})),
|
||||
addHostSources: []string{hs[1].GetPublicId(), hs[1].GetPublicId()},
|
||||
resultHostSources: []string{hs[0].GetPublicId(), hs[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Add plugin set on empty target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "plugin empty").GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "plugin empty"),
|
||||
addHostSources: []string{pluginHs.GetPublicId()},
|
||||
resultHostSources: []string{pluginHs.GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Add plugin set on populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "plugin populated", target.WithHostSources([]string{hs[0].GetPublicId()})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "plugin populated", target.WithHostSources([]string{hs[0].GetPublicId()})),
|
||||
addHostSources: []string{pluginHs.GetPublicId()},
|
||||
resultHostSources: []string{hs[0].GetPublicId(), pluginHs.GetPublicId()},
|
||||
},
|
||||
@@ -1966,8 +1849,8 @@ func TestAddTargetHostSources(t *testing.T) {
|
||||
for _, tc := range addCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
req := &pbs.AddTargetHostSourcesRequest{
|
||||
Id: tc.requestId,
|
||||
Version: 1,
|
||||
Id: tc.tar.GetPublicId(),
|
||||
Version: tc.tar.GetVersion(),
|
||||
HostSourceIds: tc.addHostSources,
|
||||
}
|
||||
|
||||
@@ -1988,7 +1871,6 @@ func TestAddTargetHostSources(t *testing.T) {
|
||||
}
|
||||
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "test")
|
||||
alWithNoDest := talias.TestAlias(t, rw, "no.destination.test.alias")
|
||||
|
||||
failCases := []struct {
|
||||
name string
|
||||
@@ -1998,30 +1880,12 @@ func TestAddTargetHostSources(t *testing.T) {
|
||||
{
|
||||
name: "Bad Target Id",
|
||||
req: &pbs.AddTargetHostSourcesRequest{
|
||||
Id: "b ad_id",
|
||||
Id: "bad id",
|
||||
Version: tar.GetVersion(),
|
||||
HostSourceIds: []string{hs[0].GetPublicId()},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.InvalidArgument),
|
||||
},
|
||||
{
|
||||
name: "Alias With No Destination",
|
||||
req: &pbs.AddTargetHostSourcesRequest{
|
||||
Id: alWithNoDest.GetValue(),
|
||||
Version: tar.GetVersion(),
|
||||
HostSourceIds: []string{hs[0].GetPublicId()},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Unknown Alias",
|
||||
req: &pbs.AddTargetHostSourcesRequest{
|
||||
Id: "alias.doesnt.exist",
|
||||
Version: tar.GetVersion(),
|
||||
HostSourceIds: []string{hs[0].GetPublicId()},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Bad version",
|
||||
req: &pbs.AddTargetHostSourcesRequest{
|
||||
@@ -2109,47 +1973,37 @@ func TestSetTargetHostSources(t *testing.T) {
|
||||
|
||||
setCases := []struct {
|
||||
name string
|
||||
requestId string
|
||||
tar target.Target
|
||||
setHostSources []string
|
||||
resultHostSources []string
|
||||
}{
|
||||
{
|
||||
name: "Set on empty target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty").GetPublicId(),
|
||||
setHostSources: []string{hs[1].GetPublicId()},
|
||||
resultHostSources: []string{hs[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set on empty target",
|
||||
requestId: func() string {
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "by alias").GetPublicId()
|
||||
al := talias.TestAlias(t, rw, "test.alias", talias.WithDestinationId(tar))
|
||||
return al.GetValue()
|
||||
}(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty"),
|
||||
setHostSources: []string{hs[1].GetPublicId()},
|
||||
resultHostSources: []string{hs[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set on populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated", target.WithHostSources([]string{hs[0].GetPublicId()})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated", target.WithHostSources([]string{hs[0].GetPublicId()})),
|
||||
setHostSources: []string{hs[1].GetPublicId()},
|
||||
resultHostSources: []string{hs[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set plugin set on populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "plugin populated", target.WithHostSources([]string{hs[0].GetPublicId()})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "plugin populated", target.WithHostSources([]string{hs[0].GetPublicId()})),
|
||||
setHostSources: []string{pluginHs.GetPublicId()},
|
||||
resultHostSources: []string{pluginHs.GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set duplicate host set on populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "duplicate", target.WithHostSources([]string{hs[0].GetPublicId()})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "duplicate", target.WithHostSources([]string{hs[0].GetPublicId()})),
|
||||
setHostSources: []string{hs[1].GetPublicId(), hs[1].GetPublicId()},
|
||||
resultHostSources: []string{hs[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set empty on populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "another populated", target.WithHostSources([]string{hs[0].GetPublicId()})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "another populated", target.WithHostSources([]string{hs[0].GetPublicId()})),
|
||||
setHostSources: []string{},
|
||||
resultHostSources: nil,
|
||||
},
|
||||
@@ -2157,8 +2011,8 @@ func TestSetTargetHostSources(t *testing.T) {
|
||||
for _, tc := range setCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
req := &pbs.SetTargetHostSourcesRequest{
|
||||
Id: tc.requestId,
|
||||
Version: 1,
|
||||
Id: tc.tar.GetPublicId(),
|
||||
Version: tc.tar.GetVersion(),
|
||||
HostSourceIds: tc.setHostSources,
|
||||
}
|
||||
|
||||
@@ -2176,7 +2030,6 @@ func TestSetTargetHostSources(t *testing.T) {
|
||||
}
|
||||
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "test name")
|
||||
aliasWithoutDest := talias.TestAlias(t, rw, "no.destination.test.alias")
|
||||
|
||||
failCases := []struct {
|
||||
name string
|
||||
@@ -2186,30 +2039,12 @@ func TestSetTargetHostSources(t *testing.T) {
|
||||
{
|
||||
name: "Bad target Id",
|
||||
req: &pbs.SetTargetHostSourcesRequest{
|
||||
Id: "b_ad id",
|
||||
Id: "bad id",
|
||||
Version: tar.GetVersion(),
|
||||
HostSourceIds: []string{hs[0].GetPublicId()},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.InvalidArgument),
|
||||
},
|
||||
{
|
||||
name: "alias without destination",
|
||||
req: &pbs.SetTargetHostSourcesRequest{
|
||||
Id: aliasWithoutDest.GetValue(),
|
||||
Version: tar.GetVersion(),
|
||||
HostSourceIds: []string{hs[0].GetPublicId()},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "non existing alias",
|
||||
req: &pbs.SetTargetHostSourcesRequest{
|
||||
Id: "alias.doesnt.exist",
|
||||
Version: tar.GetVersion(),
|
||||
HostSourceIds: []string{hs[0].GetPublicId()},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Bad version",
|
||||
req: &pbs.SetTargetHostSourcesRequest{
|
||||
@@ -2289,48 +2124,38 @@ func TestRemoveTargetHostSources(t *testing.T) {
|
||||
|
||||
removeCases := []struct {
|
||||
name string
|
||||
requestId string
|
||||
tar target.Target
|
||||
removeHostSources []string
|
||||
resultHostSources []string
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "Remove from empty",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty").GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty"),
|
||||
removeHostSources: []string{hs[1].GetPublicId()},
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "Remove 1 of 2 sets",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "remove partial", target.WithHostSources([]string{hs[0].GetPublicId(), hs[1].GetPublicId()})).GetPublicId(),
|
||||
removeHostSources: []string{hs[1].GetPublicId()},
|
||||
resultHostSources: []string{hs[0].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Remove using alias",
|
||||
requestId: func() string {
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "remove using alias", target.WithHostSources([]string{hs[0].GetPublicId(), hs[1].GetPublicId()})).GetPublicId()
|
||||
al := talias.TestAlias(t, rw, "test.alias", talias.WithDestinationId(tar))
|
||||
return al.GetValue()
|
||||
}(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "remove partial", target.WithHostSources([]string{hs[0].GetPublicId(), hs[1].GetPublicId()})),
|
||||
removeHostSources: []string{hs[1].GetPublicId()},
|
||||
resultHostSources: []string{hs[0].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Remove 1 plugin set of 2 sets",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "remove plugin partial", target.WithHostSources([]string{hs[0].GetPublicId(), pluginHs.GetPublicId()})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "remove plugin partial", target.WithHostSources([]string{hs[0].GetPublicId(), pluginHs.GetPublicId()})),
|
||||
removeHostSources: []string{pluginHs.GetPublicId()},
|
||||
resultHostSources: []string{hs[0].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Remove 1 duplicate set of 2 sets",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "remove duplicate", target.WithHostSources([]string{hs[0].GetPublicId(), hs[1].GetPublicId()})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "remove duplicate", target.WithHostSources([]string{hs[0].GetPublicId(), hs[1].GetPublicId()})),
|
||||
removeHostSources: []string{hs[1].GetPublicId(), hs[1].GetPublicId()},
|
||||
resultHostSources: []string{hs[0].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Remove all hosts from set",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "remove all", target.WithHostSources([]string{hs[0].GetPublicId(), hs[1].GetPublicId()})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "remove all", target.WithHostSources([]string{hs[0].GetPublicId(), hs[1].GetPublicId()})),
|
||||
removeHostSources: []string{hs[0].GetPublicId(), hs[1].GetPublicId()},
|
||||
resultHostSources: []string{},
|
||||
},
|
||||
@@ -2339,8 +2164,8 @@ func TestRemoveTargetHostSources(t *testing.T) {
|
||||
for _, tc := range removeCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
req := &pbs.RemoveTargetHostSourcesRequest{
|
||||
Id: tc.requestId,
|
||||
Version: 1,
|
||||
Id: tc.tar.GetPublicId(),
|
||||
Version: tc.tar.GetVersion(),
|
||||
HostSourceIds: tc.removeHostSources,
|
||||
}
|
||||
|
||||
@@ -2365,7 +2190,6 @@ func TestRemoveTargetHostSources(t *testing.T) {
|
||||
}
|
||||
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "testing")
|
||||
aliasWithoutDest := talias.TestAlias(t, rw, "no.destination.test.alias")
|
||||
|
||||
failCases := []struct {
|
||||
name string
|
||||
@@ -2384,30 +2208,12 @@ func TestRemoveTargetHostSources(t *testing.T) {
|
||||
{
|
||||
name: "Bad target Id",
|
||||
req: &pbs.RemoveTargetHostSourcesRequest{
|
||||
Id: "b_ad id",
|
||||
Id: "bad id",
|
||||
Version: tar.GetVersion(),
|
||||
HostSourceIds: []string{hs[0].GetPublicId()},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.InvalidArgument),
|
||||
},
|
||||
{
|
||||
name: "alias without destination",
|
||||
req: &pbs.RemoveTargetHostSourcesRequest{
|
||||
Id: aliasWithoutDest.GetValue(),
|
||||
Version: tar.GetVersion(),
|
||||
HostSourceIds: []string{hs[0].GetPublicId()},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "non existing alias",
|
||||
req: &pbs.RemoveTargetHostSourcesRequest{
|
||||
Id: "alias.doesnt.exist",
|
||||
Version: tar.GetVersion(),
|
||||
HostSourceIds: []string{hs[0].GetPublicId()},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "empty sets",
|
||||
req: &pbs.RemoveTargetHostSourcesRequest{
|
||||
@@ -2483,65 +2289,55 @@ func TestAddTargetCredentialSources(t *testing.T) {
|
||||
|
||||
addCases := []struct {
|
||||
name string
|
||||
requestId string
|
||||
tar target.Target
|
||||
addSources []string
|
||||
resultSourceIds []string
|
||||
}{
|
||||
{
|
||||
name: "Add library on empty target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty for lib sources").GetPublicId(),
|
||||
addSources: []string{cls[1].GetPublicId()},
|
||||
resultSourceIds: []string{cls[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Add library by alias",
|
||||
requestId: func() string {
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "add by alias").GetPublicId()
|
||||
al := talias.TestAlias(t, rw, "test.alias", talias.WithDestinationId(tar))
|
||||
return al.GetValue()
|
||||
}(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty for lib sources"),
|
||||
addSources: []string{cls[1].GetPublicId()},
|
||||
resultSourceIds: []string{cls[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Add static cred on empty target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty for static sources").GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty for static sources"),
|
||||
addSources: []string{creds[1].GetPublicId()},
|
||||
resultSourceIds: []string{creds[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Add library on library populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated for lib-lib sources", target.WithCredentialLibraries([]*target.CredentialLibrary{target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose)})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated for lib-lib sources", target.WithCredentialLibraries([]*target.CredentialLibrary{target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose)})),
|
||||
addSources: []string{cls[1].GetPublicId()},
|
||||
resultSourceIds: []string{cls[0].GetPublicId(), cls[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Add library on static cred populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated for lib-static sources", target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated for lib-static sources", target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})),
|
||||
addSources: []string{cls[1].GetPublicId()},
|
||||
resultSourceIds: []string{creds[0].GetPublicId(), cls[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Add static cred on library populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated for static-lib sources", target.WithCredentialLibraries([]*target.CredentialLibrary{target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose)})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated for static-lib sources", target.WithCredentialLibraries([]*target.CredentialLibrary{target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose)})),
|
||||
addSources: []string{creds[1].GetPublicId()},
|
||||
resultSourceIds: []string{cls[0].GetPublicId(), creds[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Add static cred on static cred populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated for static-static sources", target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated for static-static sources", target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})),
|
||||
addSources: []string{creds[1].GetPublicId()},
|
||||
resultSourceIds: []string{creds[0].GetPublicId(), creds[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Add duplicated sources on library populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "duplicated for lib sources", target.WithCredentialLibraries([]*target.CredentialLibrary{target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose)})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "duplicated for lib sources", target.WithCredentialLibraries([]*target.CredentialLibrary{target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose)})),
|
||||
addSources: []string{cls[1].GetPublicId(), cls[1].GetPublicId(), creds[1].GetPublicId(), creds[1].GetPublicId()},
|
||||
resultSourceIds: []string{cls[0].GetPublicId(), cls[1].GetPublicId(), creds[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Add duplicated sources on static cred populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "duplicated for static sources", target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "duplicated for static sources", target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})),
|
||||
addSources: []string{cls[1].GetPublicId(), cls[1].GetPublicId(), creds[1].GetPublicId(), creds[1].GetPublicId()},
|
||||
resultSourceIds: []string{creds[0].GetPublicId(), cls[1].GetPublicId(), creds[1].GetPublicId()},
|
||||
},
|
||||
@@ -2550,8 +2346,8 @@ func TestAddTargetCredentialSources(t *testing.T) {
|
||||
for _, tc := range addCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
req := &pbs.AddTargetCredentialSourcesRequest{
|
||||
Id: tc.requestId,
|
||||
Version: 1,
|
||||
Id: tc.tar.GetPublicId(),
|
||||
Version: tc.tar.GetVersion(),
|
||||
BrokeredCredentialSourceIds: tc.addSources,
|
||||
}
|
||||
|
||||
@@ -2571,7 +2367,6 @@ func TestAddTargetCredentialSources(t *testing.T) {
|
||||
}
|
||||
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "test")
|
||||
alWithNoDest := talias.TestAlias(t, rw, "no.destination.test.alias")
|
||||
|
||||
failCases := []struct {
|
||||
name string
|
||||
@@ -2581,7 +2376,7 @@ func TestAddTargetCredentialSources(t *testing.T) {
|
||||
{
|
||||
name: "Bad target id",
|
||||
req: &pbs.AddTargetCredentialSourcesRequest{
|
||||
Id: "b_ad id",
|
||||
Id: "bad id",
|
||||
Version: tar.GetVersion(),
|
||||
BrokeredCredentialSourceIds: []string{
|
||||
cls[0].GetPublicId(),
|
||||
@@ -2589,28 +2384,6 @@ func TestAddTargetCredentialSources(t *testing.T) {
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.InvalidArgument),
|
||||
},
|
||||
{
|
||||
name: "Alias with no destination",
|
||||
req: &pbs.AddTargetCredentialSourcesRequest{
|
||||
Id: alWithNoDest.GetValue(),
|
||||
Version: tar.GetVersion(),
|
||||
BrokeredCredentialSourceIds: []string{
|
||||
cls[0].GetPublicId(),
|
||||
},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Alias doesnt exist",
|
||||
req: &pbs.AddTargetCredentialSourcesRequest{
|
||||
Id: "doesnt.exist",
|
||||
Version: tar.GetVersion(),
|
||||
BrokeredCredentialSourceIds: []string{
|
||||
cls[0].GetPublicId(),
|
||||
},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Bad version",
|
||||
req: &pbs.AddTargetCredentialSourcesRequest{
|
||||
@@ -2696,73 +2469,63 @@ func TestSetTargetCredentialSources(t *testing.T) {
|
||||
|
||||
setCases := []struct {
|
||||
name string
|
||||
requestId string
|
||||
tar target.Target
|
||||
setCredentialSources []string
|
||||
resultCredentialSourceIds []string
|
||||
}{
|
||||
{
|
||||
name: "Set library on empty target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty library").GetPublicId(),
|
||||
setCredentialSources: []string{cls[1].GetPublicId()},
|
||||
resultCredentialSourceIds: []string{cls[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set library using alias",
|
||||
requestId: func() string {
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "using alias").GetPublicId()
|
||||
al := talias.TestAlias(t, rw, "test.alias", talias.WithDestinationId(tar))
|
||||
return al.GetValue()
|
||||
}(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty library"),
|
||||
setCredentialSources: []string{cls[1].GetPublicId()},
|
||||
resultCredentialSourceIds: []string{cls[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set static on empty target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty static").GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty static"),
|
||||
setCredentialSources: []string{creds[1].GetPublicId()},
|
||||
resultCredentialSourceIds: []string{creds[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set library on library populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated library-library", target.WithCredentialLibraries([]*target.CredentialLibrary{target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose)})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated library-library", target.WithCredentialLibraries([]*target.CredentialLibrary{target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose)})),
|
||||
setCredentialSources: []string{cls[1].GetPublicId()},
|
||||
resultCredentialSourceIds: []string{cls[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set static on library populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated static-library", target.WithCredentialLibraries([]*target.CredentialLibrary{target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose)})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated static-library", target.WithCredentialLibraries([]*target.CredentialLibrary{target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose)})),
|
||||
setCredentialSources: []string{creds[1].GetPublicId()},
|
||||
resultCredentialSourceIds: []string{creds[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set library on static populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated library-static", target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated library-static", target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})),
|
||||
setCredentialSources: []string{cls[1].GetPublicId()},
|
||||
resultCredentialSourceIds: []string{cls[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set static on static populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated static-static", target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "populated static-static", target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})),
|
||||
setCredentialSources: []string{creds[1].GetPublicId()},
|
||||
resultCredentialSourceIds: []string{creds[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set duplicate library on populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "duplicate library", target.WithCredentialLibraries([]*target.CredentialLibrary{target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose)})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "duplicate library", target.WithCredentialLibraries([]*target.CredentialLibrary{target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose)})),
|
||||
setCredentialSources: []string{cls[1].GetPublicId(), cls[1].GetPublicId()},
|
||||
resultCredentialSourceIds: []string{cls[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set duplicate static on populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "duplicate static", target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})).GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "duplicate static", target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})),
|
||||
setCredentialSources: []string{creds[1].GetPublicId(), creds[1].GetPublicId()},
|
||||
resultCredentialSourceIds: []string{creds[1].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Set empty on populated target",
|
||||
requestId: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "another populated",
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "another populated",
|
||||
target.WithCredentialLibraries([]*target.CredentialLibrary{target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose)}),
|
||||
target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})).GetPublicId(),
|
||||
target.WithStaticCredentials([]*target.StaticCredential{target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose)})),
|
||||
setCredentialSources: []string{},
|
||||
resultCredentialSourceIds: nil,
|
||||
},
|
||||
@@ -2770,8 +2533,8 @@ func TestSetTargetCredentialSources(t *testing.T) {
|
||||
for _, tc := range setCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
req := &pbs.SetTargetCredentialSourcesRequest{
|
||||
Id: tc.requestId,
|
||||
Version: 1,
|
||||
Id: tc.tar.GetPublicId(),
|
||||
Version: tc.tar.GetVersion(),
|
||||
BrokeredCredentialSourceIds: tc.setCredentialSources,
|
||||
}
|
||||
|
||||
@@ -2790,7 +2553,6 @@ func TestSetTargetCredentialSources(t *testing.T) {
|
||||
}
|
||||
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "test name")
|
||||
alWithNoDest := talias.TestAlias(t, rw, "no.destination.test.alias")
|
||||
|
||||
failCases := []struct {
|
||||
name string
|
||||
@@ -2800,30 +2562,12 @@ func TestSetTargetCredentialSources(t *testing.T) {
|
||||
{
|
||||
name: "Bad target Id",
|
||||
req: &pbs.SetTargetCredentialSourcesRequest{
|
||||
Id: "b_ad id",
|
||||
Id: "bad id",
|
||||
Version: tar.GetVersion(),
|
||||
BrokeredCredentialSourceIds: []string{cls[0].GetPublicId()},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.InvalidArgument),
|
||||
},
|
||||
{
|
||||
name: "alias with no destination",
|
||||
req: &pbs.SetTargetCredentialSourcesRequest{
|
||||
Id: alWithNoDest.GetValue(),
|
||||
Version: tar.GetVersion(),
|
||||
BrokeredCredentialSourceIds: []string{cls[0].GetPublicId()},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "alias doesnt exist",
|
||||
req: &pbs.SetTargetCredentialSourcesRequest{
|
||||
Id: "doesnt.exist",
|
||||
Version: tar.GetVersion(),
|
||||
BrokeredCredentialSourceIds: []string{cls[0].GetPublicId()},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Bad version",
|
||||
req: &pbs.SetTargetCredentialSourcesRequest{
|
||||
@@ -2899,20 +2643,20 @@ func TestRemoveTargetCredentialSources(t *testing.T) {
|
||||
|
||||
removeCases := []struct {
|
||||
name string
|
||||
tar string
|
||||
tar target.Target
|
||||
removeCredentialSources []string
|
||||
resultCredentialSourceIds []string
|
||||
wantErr bool
|
||||
}{
|
||||
{
|
||||
name: "Remove library from empty",
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty lib").GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty lib"),
|
||||
removeCredentialSources: []string{cls[1].GetPublicId()},
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "Remove static from empty",
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty static").GetPublicId(),
|
||||
tar: tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "empty static"),
|
||||
removeCredentialSources: []string{creds[1].GetPublicId()},
|
||||
wantErr: true,
|
||||
},
|
||||
@@ -2922,21 +2666,7 @@ func TestRemoveTargetCredentialSources(t *testing.T) {
|
||||
target.WithCredentialLibraries([]*target.CredentialLibrary{
|
||||
target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose),
|
||||
target.TestNewCredentialLibrary("", cls[1].GetPublicId(), credential.BrokeredPurpose),
|
||||
})).GetPublicId(),
|
||||
removeCredentialSources: []string{cls[1].GetPublicId()},
|
||||
resultCredentialSourceIds: []string{cls[0].GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "Remove 1 by alias",
|
||||
tar: func() string {
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "using alias",
|
||||
target.WithCredentialLibraries([]*target.CredentialLibrary{
|
||||
target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose),
|
||||
target.TestNewCredentialLibrary("", cls[1].GetPublicId(), credential.BrokeredPurpose),
|
||||
})).GetPublicId()
|
||||
al := talias.TestAlias(t, rw, "test.alias", talias.WithDestinationId(tar))
|
||||
return al.GetValue()
|
||||
}(),
|
||||
})),
|
||||
removeCredentialSources: []string{cls[1].GetPublicId()},
|
||||
resultCredentialSourceIds: []string{cls[0].GetPublicId()},
|
||||
},
|
||||
@@ -2946,7 +2676,7 @@ func TestRemoveTargetCredentialSources(t *testing.T) {
|
||||
target.WithStaticCredentials([]*target.StaticCredential{
|
||||
target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose),
|
||||
target.TestNewStaticCredential("", creds[1].GetPublicId(), credential.BrokeredPurpose),
|
||||
})).GetPublicId(),
|
||||
})),
|
||||
removeCredentialSources: []string{creds[1].GetPublicId()},
|
||||
resultCredentialSourceIds: []string{creds[0].GetPublicId()},
|
||||
},
|
||||
@@ -2956,7 +2686,7 @@ func TestRemoveTargetCredentialSources(t *testing.T) {
|
||||
target.WithCredentialLibraries([]*target.CredentialLibrary{
|
||||
target.TestNewCredentialLibrary("", cls[0].GetPublicId(), credential.BrokeredPurpose),
|
||||
target.TestNewCredentialLibrary("", cls[1].GetPublicId(), credential.BrokeredPurpose),
|
||||
})).GetPublicId(),
|
||||
})),
|
||||
removeCredentialSources: []string{
|
||||
cls[1].GetPublicId(), cls[1].GetPublicId(),
|
||||
},
|
||||
@@ -2968,7 +2698,7 @@ func TestRemoveTargetCredentialSources(t *testing.T) {
|
||||
target.WithStaticCredentials([]*target.StaticCredential{
|
||||
target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose),
|
||||
target.TestNewStaticCredential("", creds[1].GetPublicId(), credential.BrokeredPurpose),
|
||||
})).GetPublicId(),
|
||||
})),
|
||||
removeCredentialSources: []string{
|
||||
creds[1].GetPublicId(), creds[1].GetPublicId(),
|
||||
},
|
||||
@@ -2984,7 +2714,7 @@ func TestRemoveTargetCredentialSources(t *testing.T) {
|
||||
target.WithStaticCredentials([]*target.StaticCredential{
|
||||
target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose),
|
||||
target.TestNewStaticCredential("", creds[1].GetPublicId(), credential.BrokeredPurpose),
|
||||
})).GetPublicId(),
|
||||
})),
|
||||
removeCredentialSources: []string{
|
||||
cls[1].GetPublicId(), creds[0].GetPublicId(),
|
||||
},
|
||||
@@ -3002,7 +2732,7 @@ func TestRemoveTargetCredentialSources(t *testing.T) {
|
||||
target.WithStaticCredentials([]*target.StaticCredential{
|
||||
target.TestNewStaticCredential("", creds[0].GetPublicId(), credential.BrokeredPurpose),
|
||||
target.TestNewStaticCredential("", creds[1].GetPublicId(), credential.BrokeredPurpose),
|
||||
})).GetPublicId(),
|
||||
})),
|
||||
removeCredentialSources: []string{
|
||||
cls[0].GetPublicId(), cls[1].GetPublicId(),
|
||||
creds[0].GetPublicId(), creds[1].GetPublicId(),
|
||||
@@ -3014,8 +2744,8 @@ func TestRemoveTargetCredentialSources(t *testing.T) {
|
||||
for _, tc := range removeCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
req := &pbs.RemoveTargetCredentialSourcesRequest{
|
||||
Id: tc.tar,
|
||||
Version: 1,
|
||||
Id: tc.tar.GetPublicId(),
|
||||
Version: tc.tar.GetVersion(),
|
||||
BrokeredCredentialSourceIds: tc.removeCredentialSources,
|
||||
}
|
||||
|
||||
@@ -3039,7 +2769,6 @@ func TestRemoveTargetCredentialSources(t *testing.T) {
|
||||
}
|
||||
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "testing")
|
||||
alWithNoDest := talias.TestAlias(t, rw, "no.destination.test.alias")
|
||||
|
||||
failCases := []struct {
|
||||
name string
|
||||
@@ -3060,7 +2789,7 @@ func TestRemoveTargetCredentialSources(t *testing.T) {
|
||||
{
|
||||
name: "Bad target Id",
|
||||
req: &pbs.RemoveTargetCredentialSourcesRequest{
|
||||
Id: "b_ad id",
|
||||
Id: "bad id",
|
||||
Version: tar.GetVersion(),
|
||||
BrokeredCredentialSourceIds: []string{
|
||||
cls[0].GetPublicId(),
|
||||
@@ -3068,28 +2797,6 @@ func TestRemoveTargetCredentialSources(t *testing.T) {
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.InvalidArgument),
|
||||
},
|
||||
{
|
||||
name: "alias with no destination",
|
||||
req: &pbs.RemoveTargetCredentialSourcesRequest{
|
||||
Id: alWithNoDest.GetValue(),
|
||||
Version: tar.GetVersion(),
|
||||
BrokeredCredentialSourceIds: []string{
|
||||
cls[0].GetPublicId(),
|
||||
},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Alias doesnt exist",
|
||||
req: &pbs.RemoveTargetCredentialSourcesRequest{
|
||||
Id: "doesnt.exist",
|
||||
Version: tar.GetVersion(),
|
||||
BrokeredCredentialSourceIds: []string{
|
||||
cls[0].GetPublicId(),
|
||||
},
|
||||
},
|
||||
err: handlers.ApiErrorWithCode(codes.NotFound),
|
||||
},
|
||||
{
|
||||
name: "Empty sources",
|
||||
req: &pbs.RemoveTargetCredentialSourcesRequest{
|
||||
@@ -3291,7 +2998,6 @@ func TestAuthorizeSession(t *testing.T) {
|
||||
const defaultPort = 2
|
||||
cases := []struct {
|
||||
name string
|
||||
aliasValue string
|
||||
hostSourceId string
|
||||
credSourceId string
|
||||
wantedHostId string
|
||||
@@ -3304,14 +3010,6 @@ func TestAuthorizeSession(t *testing.T) {
|
||||
wantedHostId: h.GetPublicId(),
|
||||
wantedEndpoint: fmt.Sprintf("%s:%d", h.GetAddress(), defaultPort),
|
||||
},
|
||||
{
|
||||
name: "static host using alias",
|
||||
aliasValue: "static.host.alias",
|
||||
hostSourceId: shs.GetPublicId(),
|
||||
credSourceId: clsResp.GetItem().GetId(),
|
||||
wantedHostId: h.GetPublicId(),
|
||||
wantedEndpoint: fmt.Sprintf("%s:%d", h.GetAddress(), defaultPort),
|
||||
},
|
||||
{
|
||||
name: "static host with port defined",
|
||||
hostSourceId: shsWithPort.GetPublicId(),
|
||||
@@ -3335,12 +3033,6 @@ func TestAuthorizeSession(t *testing.T) {
|
||||
for _, tc := range cases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), tc.name, target.WithDefaultPort(defaultPort))
|
||||
requestId := tar.GetPublicId()
|
||||
if tc.aliasValue != "" {
|
||||
al := talias.TestAlias(t, rw, tc.aliasValue, talias.WithDestinationId(tar.GetPublicId()))
|
||||
requestId = al.GetValue()
|
||||
}
|
||||
|
||||
apiTar, err := s.AddTargetHostSources(ctx, &pbs.AddTargetHostSourcesRequest{
|
||||
Id: tar.GetPublicId(),
|
||||
Version: tar.GetVersion(),
|
||||
@@ -3359,11 +3051,11 @@ func TestAuthorizeSession(t *testing.T) {
|
||||
server.TestKmsWorker(t, conn, wrapper)
|
||||
|
||||
asRes1, err := s.AuthorizeSession(ctx, &pbs.AuthorizeSessionRequest{
|
||||
Id: requestId,
|
||||
Id: tar.GetPublicId(),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
asRes2, err := s.AuthorizeSession(ctx, &pbs.AuthorizeSessionRequest{
|
||||
Id: requestId,
|
||||
Id: tar.GetPublicId(),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
assert.NotEmpty(t, cmp.Diff(
|
||||
@@ -3377,7 +3069,7 @@ func TestAuthorizeSession(t *testing.T) {
|
||||
"the credentials aren't unique per request authorized session")
|
||||
|
||||
_, err = s.AuthorizeSession(ctx, &pbs.AuthorizeSessionRequest{
|
||||
Id: requestId,
|
||||
Id: tar.GetPublicId(),
|
||||
HostId: asRes2.GetItem().GetHostId(),
|
||||
})
|
||||
require.NoError(t, err, "session must authorize with explicit host ID")
|
||||
@@ -4364,23 +4056,6 @@ func TestAuthorizeSession_Errors(t *testing.T) {
|
||||
require.NotNil(t, res)
|
||||
})
|
||||
}
|
||||
|
||||
t.Run("host defined in request and alias", func(t *testing.T) {
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "host defined in multiple places", target.WithDefaultPort(22))
|
||||
|
||||
for _, fn := range []func(tcpTarget target.Target) uint32{workerExists, hostExists, libraryExists} {
|
||||
ver := fn(tar)
|
||||
tar.SetVersion(ver)
|
||||
}
|
||||
al := talias.TestAlias(t, rw, "host.included.alias", talias.WithDestinationId(tar.GetPublicId()), talias.WithHostId("hst_something"))
|
||||
|
||||
res, err := s.AuthorizeSession(ctx, &pbs.AuthorizeSessionRequest{
|
||||
Id: al.GetValue(),
|
||||
HostId: "hst_1234567890",
|
||||
})
|
||||
require.ErrorContains(t, err, "The host id specified in the request does not match the one provided by the alias. Consider omiting the host id in the request.")
|
||||
require.Nil(t, res)
|
||||
})
|
||||
}
|
||||
|
||||
func decodeJsonSecret(t *testing.T, in string) map[string]any {
|
||||
|
||||
@@ -11,6 +11,7 @@ import (
|
||||
"runtime/debug"
|
||||
|
||||
grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
|
||||
"github.com/hashicorp/boundary/internal/alias"
|
||||
commonSrv "github.com/hashicorp/boundary/internal/daemon/common"
|
||||
"github.com/hashicorp/boundary/internal/daemon/controller/auth"
|
||||
"github.com/hashicorp/boundary/internal/daemon/controller/common"
|
||||
@@ -328,6 +329,38 @@ func errorInterceptor(
|
||||
}
|
||||
}
|
||||
|
||||
// aliasResolutionInterceptor returns a grpc.UnaryServerInterceptor that resolves
|
||||
// alias values in the request to their corresponding destination ids. If no
|
||||
// alias is found or the alias has no destination id, an error is returned.
|
||||
// For an field in the request to be considered for alias resolution, it must
|
||||
// be annotated with the Aliasable proto option.
|
||||
func aliasResolutionInterceptor(
|
||||
ctx context.Context,
|
||||
aliasRepoFn common.AliasRepoFactory,
|
||||
) grpc.UnaryServerInterceptor {
|
||||
const op = "alias.ResolutionInterceptor"
|
||||
return func(interceptorCtx context.Context,
|
||||
req any,
|
||||
_ *grpc.UnaryServerInfo,
|
||||
handler grpc.UnaryHandler) (any, error,
|
||||
) {
|
||||
reqMsg, ok := req.(proto.Message)
|
||||
if !ok {
|
||||
return nil, handlers.InvalidArgumentErrorf("The request was not a proto.Message.", nil)
|
||||
}
|
||||
|
||||
r, err := aliasRepoFn()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
interceptorCtx, err = alias.ResolveRequestIds(interceptorCtx, reqMsg, r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return handler(interceptorCtx, req)
|
||||
}
|
||||
}
|
||||
|
||||
func statusCodeInterceptor(
|
||||
_ context.Context,
|
||||
) grpc.UnaryServerInterceptor {
|
||||
|
||||
@@ -12,6 +12,9 @@ import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/hashicorp/boundary/internal/alias"
|
||||
talias "github.com/hashicorp/boundary/internal/alias/target"
|
||||
"github.com/hashicorp/boundary/internal/authtoken"
|
||||
"github.com/hashicorp/boundary/internal/daemon/controller/auth"
|
||||
"github.com/hashicorp/boundary/internal/daemon/controller/common"
|
||||
@@ -20,12 +23,14 @@ import (
|
||||
"github.com/hashicorp/boundary/internal/errors"
|
||||
"github.com/hashicorp/boundary/internal/event"
|
||||
pb_api "github.com/hashicorp/boundary/internal/gen/controller/api"
|
||||
pbs "github.com/hashicorp/boundary/internal/gen/controller/api/services"
|
||||
authpb "github.com/hashicorp/boundary/internal/gen/controller/auth"
|
||||
pberrors "github.com/hashicorp/boundary/internal/gen/errors"
|
||||
"github.com/hashicorp/boundary/internal/gen/testing/interceptor"
|
||||
"github.com/hashicorp/boundary/internal/iam"
|
||||
"github.com/hashicorp/boundary/internal/kms"
|
||||
"github.com/hashicorp/boundary/internal/server"
|
||||
"github.com/hashicorp/boundary/internal/target/tcp"
|
||||
"github.com/hashicorp/go-hclog"
|
||||
"github.com/mr-tron/base58"
|
||||
"github.com/stretchr/testify/assert"
|
||||
@@ -34,6 +39,7 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/metadata"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/testing/protocmp"
|
||||
)
|
||||
|
||||
func Test_unaryCtxInterceptor(t *testing.T) {
|
||||
@@ -656,6 +662,100 @@ func (m *streamMock) RecvToClient() (*httpbody.HttpBody, error) {
|
||||
panic("recv not implemented")
|
||||
}
|
||||
|
||||
func Test_aliasResolutionInterceptor(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
conn, _ := db.TestSetup(t, "postgres")
|
||||
rw := db.New(conn)
|
||||
wrapper := db.TestWrapper(t)
|
||||
kmsCache := kms.TestKms(t, conn, wrapper)
|
||||
|
||||
aliasRepoFn := func() (*alias.Repository, error) {
|
||||
return alias.NewRepository(context.Background(), rw, rw, kmsCache)
|
||||
}
|
||||
|
||||
_, proj := iam.TestScopes(t, iam.TestRepo(t, conn, wrapper))
|
||||
tar := tcp.TestTarget(ctx, t, conn, proj.GetPublicId(), "test-target")
|
||||
al := talias.TestAlias(t, rw, "test-alias.example", talias.WithDestinationId(tar.GetPublicId()))
|
||||
alWithoutDest := talias.TestAlias(t, rw, "no-destination.alias")
|
||||
|
||||
interceptor := aliasResolutionInterceptor(ctx, aliasRepoFn)
|
||||
require.NotNil(t, interceptor)
|
||||
|
||||
returnCtxHandler := func(ctx context.Context, req any) (any, error) {
|
||||
return ctx, nil
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
FullMethod: "FakeMethod",
|
||||
}
|
||||
|
||||
cases := []struct {
|
||||
name string
|
||||
req proto.Message
|
||||
wantModifiedReq proto.Message
|
||||
wantAlias *alias.Alias
|
||||
errorContains string
|
||||
}{
|
||||
{
|
||||
name: "non aliasable request",
|
||||
req: &pbs.GetAccountRequest{Id: "test"},
|
||||
wantModifiedReq: &pbs.GetAccountRequest{Id: "test"},
|
||||
},
|
||||
{
|
||||
name: "non aliasable request with valid alias",
|
||||
req: &pbs.GetAccountRequest{Id: al.GetValue()},
|
||||
wantModifiedReq: &pbs.GetAccountRequest{Id: al.GetValue()},
|
||||
},
|
||||
{
|
||||
name: "aliasable request with id",
|
||||
req: &pbs.GetTargetRequest{Id: tar.GetPublicId()},
|
||||
wantModifiedReq: &pbs.GetTargetRequest{Id: tar.GetPublicId()},
|
||||
},
|
||||
{
|
||||
name: "aliasable request with alias",
|
||||
req: &pbs.GetTargetRequest{Id: al.GetValue()},
|
||||
wantModifiedReq: &pbs.GetTargetRequest{Id: tar.GetPublicId()},
|
||||
wantAlias: &alias.Alias{
|
||||
PublicId: al.GetPublicId(),
|
||||
Value: al.GetValue(),
|
||||
DestinationId: tar.GetPublicId(),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "aliasable request with unknown alias",
|
||||
req: &pbs.GetTargetRequest{Id: "not.a.registered.alias"},
|
||||
wantModifiedReq: &pbs.GetTargetRequest{Id: "not.a.registered.alias"},
|
||||
errorContains: "resource alias not found with value",
|
||||
},
|
||||
{
|
||||
name: "aliasable request with destinationless alias",
|
||||
req: &pbs.GetTargetRequest{Id: alWithoutDest.GetValue()},
|
||||
wantModifiedReq: &pbs.GetTargetRequest{Id: alWithoutDest.GetValue()},
|
||||
errorContains: "resource not found for alias value",
|
||||
},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
|
||||
req := proto.Clone(tc.req)
|
||||
retCtx, err := interceptor(ctx, req, info, returnCtxHandler)
|
||||
assert.Empty(t, cmp.Diff(tc.wantModifiedReq, req, protocmp.Transform()))
|
||||
if tc.errorContains != "" {
|
||||
require.Error(t, err)
|
||||
require.Contains(t, err.Error(), tc.errorContains)
|
||||
return
|
||||
}
|
||||
ctxAlias := alias.FromContext(retCtx.(context.Context))
|
||||
if tc.wantAlias == nil {
|
||||
require.Nil(t, ctxAlias)
|
||||
return
|
||||
}
|
||||
require.NotNil(t, ctxAlias)
|
||||
assert.EqualValues(t, tc.wantAlias, ctxAlias)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_errorInterceptor(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
tests := []struct {
|
||||
|
||||
@@ -50,7 +50,7 @@ func (c *Controller) startListeners() error {
|
||||
|
||||
servers := make([]func(), 0, len(c.conf.Listeners))
|
||||
|
||||
grpcServer, gwTicket, err := newGrpcServer(c.baseContext, c.IamRepoFn, c.AuthTokenRepoFn, c.ServersRepoFn, c.PasswordAuthRepoFn, c.OidcRepoFn, c.LdapRepoFn, c.kms, c.conf.Eventer)
|
||||
grpcServer, gwTicket, err := newGrpcServer(c.baseContext, c.IamRepoFn, c.AuthTokenRepoFn, c.ServersRepoFn, c.PasswordAuthRepoFn, c.OidcRepoFn, c.LdapRepoFn, c.AliasRepoFn, c.kms, c.conf.Eventer)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create new grpc server: %w", err)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
-- Copyright (c) HashiCorp, Inc.
|
||||
-- SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
begin;
|
||||
|
||||
-- alias_all_subtypes defines a view that retrieves the common columns from the
|
||||
-- subtype alias tables.
|
||||
create view alias_all_subtypes as
|
||||
select
|
||||
public_id,
|
||||
value,
|
||||
destination_id
|
||||
from alias_target;
|
||||
|
||||
commit;
|
||||
@@ -0,0 +1,11 @@
|
||||
-- Copyright (c) HashiCorp, Inc.
|
||||
-- SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
begin;
|
||||
select plan(1);
|
||||
select wtt_load('widgets', 'iam', 'kms', 'auth');
|
||||
|
||||
select has_view('alias_all_subtypes', 'view for reading generic alias data does not exist');
|
||||
|
||||
select * from finish();
|
||||
rollback;
|
||||
@@ -1475,58 +1475,59 @@ var file_controller_api_services_v1_target_service_proto_rawDesc = []byte{
|
||||
0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
|
||||
0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x22, 0x0a, 0x10, 0x47,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2a, 0x0a, 0x10, 0x47,
|
||||
0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22,
|
||||
0x54, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52,
|
||||
0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xa3, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08,
|
||||
0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||
0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72,
|
||||
0x73, 0x69, 0x76, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75,
|
||||
0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18,
|
||||
0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x28, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x9e, 0x02, 0x0a, 0x13,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52,
|
||||
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a,
|
||||
0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73,
|
||||
0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x64,
|
||||
0x69, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x64,
|
||||
0x69, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64,
|
||||
0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64,
|
||||
0x5f, 0x69, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x74, 0x65, 0x6d,
|
||||
0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x65, 0x73,
|
||||
0x74, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x56, 0x0a, 0x13,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72,
|
||||
0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x04,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x22, 0x69, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x3f,
|
||||
0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22,
|
||||
0xa4, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3f, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18,
|
||||
0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xaa, 0xe3, 0x29,
|
||||
0x02, 0x08, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x54, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x04,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xa3, 0x01,
|
||||
0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x18, 0x14, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x09, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66,
|
||||
0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x5f,
|
||||
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69,
|
||||
0x7a, 0x65, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73,
|
||||
0x69, 0x7a, 0x65, 0x22, 0x9e, 0x02, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x72, 0x67,
|
||||
0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x05, 0x69,
|
||||
0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x24,
|
||||
0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f,
|
||||
0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x74,
|
||||
0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x62, 0x79, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x73, 0x6f, 0x72, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x72, 0x65,
|
||||
0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e,
|
||||
0x65, 0x73, 0x74, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x5f, 0x63,
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x22, 0x56, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x04, 0x69,
|
||||
0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x69, 0x0a, 0x14,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x3f, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65,
|
||||
0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e,
|
||||
0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65,
|
||||
0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xac, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xaa, 0xe3, 0x29,
|
||||
0x02, 0x08, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3f, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c,
|
||||
0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
|
||||
0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67,
|
||||
@@ -1540,13 +1541,14 @@ var file_controller_api_services_v1_target_service_proto_rawDesc = []byte{
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22,
|
||||
0x25, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x71,
|
||||
0x0a, 0x1b, 0x41, 0x64, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a,
|
||||
0x2d, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x06, 0xaa, 0xe3, 0x29, 0x02, 0x08, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x16,
|
||||
0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x79, 0x0a, 0x1b, 0x41, 0x64, 0x64, 0x54, 0x61, 0x72,
|
||||
0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x06, 0xaa, 0xe3, 0x29, 0x02, 0x08, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07,
|
||||
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x5f,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09,
|
||||
@@ -1557,23 +1559,24 @@ var file_controller_api_services_v1_target_service_proto_rawDesc = []byte{
|
||||
0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65,
|
||||
0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74,
|
||||
0x65, 0x6d, 0x22, 0x71, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48,
|
||||
0x65, 0x6d, 0x22, 0x79, 0x0a, 0x1b, 0x53, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48,
|
||||
0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
|
||||
0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x68,
|
||||
0x6f, 0x73, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x5f, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67,
|
||||
0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74,
|
||||
0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x74, 0x0a, 0x1e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65,
|
||||
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
|
||||
0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xaa,
|
||||
0xe3, 0x29, 0x02, 0x08, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x68, 0x6f,
|
||||
0x73, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x5f, 0x0a,
|
||||
0x1c, 0x53, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a,
|
||||
0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x7c,
|
||||
0x0a, 0x1e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f,
|
||||
0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xaa, 0xe3,
|
||||
0x29, 0x02, 0x08, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x68, 0x6f, 0x73,
|
||||
@@ -1584,36 +1587,37 @@ var file_controller_api_services_v1_target_service_proto_rawDesc = []byte{
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d,
|
||||
0x22, 0xc2, 0x02, 0x0a, 0x21, 0x41, 0x64, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72,
|
||||
0x22, 0xca, 0x02, 0x0a, 0x21, 0x41, 0x64, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72,
|
||||
0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x46, 0x0a, 0x1e, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65,
|
||||
0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69,
|
||||
0x64, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1e, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72,
|
||||
0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x12, 0x5e, 0x0a, 0x2a, 0x69, 0x6e, 0x6a, 0x65,
|
||||
0x63, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x09, 0x52, 0x2a, 0x69, 0x6e,
|
||||
0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04,
|
||||
0x08, 0x03, 0x10, 0x04, 0x52, 0x1c, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x72, 0x65,
|
||||
0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69,
|
||||
0x64, 0x73, 0x52, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
|
||||
0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x65, 0x0a, 0x22, 0x41, 0x64, 0x64, 0x54, 0x61, 0x72, 0x67,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x06, 0xaa, 0xe3, 0x29, 0x02, 0x08, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,
|
||||
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x1e, 0x62, 0x72, 0x6f, 0x6b,
|
||||
0x65, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x1e, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73,
|
||||
0x12, 0x5e, 0x0a, 0x2a, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x70, 0x70,
|
||||
0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
|
||||
0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x14,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x2a, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x61,
|
||||
0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73,
|
||||
0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x1c, 0x65, 0x67,
|
||||
0x72, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x52, 0x21, 0x61, 0x70, 0x70, 0x6c,
|
||||
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
|
||||
0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x65, 0x0a,
|
||||
0x22, 0x41, 0x64, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e,
|
||||
0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72,
|
||||
0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x04,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x22, 0xca, 0x02, 0x0a, 0x21, 0x53, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67,
|
||||
0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x69,
|
||||
0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xc2, 0x02, 0x0a,
|
||||
0x21, 0x53, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e,
|
||||
0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
|
||||
0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xaa, 0xe3, 0x29, 0x02, 0x08, 0x01, 0x52, 0x02,
|
||||
0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x1e,
|
||||
0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
|
||||
@@ -1637,226 +1641,228 @@ var file_controller_api_services_v1_target_service_proto_rawDesc = []byte{
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c,
|
||||
0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
|
||||
0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67,
|
||||
0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xc5, 0x02, 0x0a, 0x24, 0x52, 0x65, 0x6d,
|
||||
0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xcd, 0x02, 0x0a, 0x24, 0x52, 0x65, 0x6d,
|
||||
0x6f, 0x76, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74,
|
||||
0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
|
||||
0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x1e, 0x62,
|
||||
0x72, 0x6f, 0x6b, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
|
||||
0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0a, 0x20,
|
||||
0x03, 0x28, 0x09, 0x52, 0x1e, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x72,
|
||||
0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
|
||||
0x69, 0x64, 0x73, 0x12, 0x5e, 0x0a, 0x2a, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f,
|
||||
0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x64,
|
||||
0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64,
|
||||
0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x09, 0x52, 0x2a, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65,
|
||||
0x64, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x72,
|
||||
0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
|
||||
0x69, 0x64, 0x73, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x52,
|
||||
0x1c, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
|
||||
0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x52, 0x21, 0x61,
|
||||
0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73,
|
||||
0x22, 0x68, 0x0a, 0x25, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x04, 0x69, 0x74, 0x65,
|
||||
0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x73, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x91, 0x01, 0x0a, 0x17, 0x41,
|
||||
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x63,
|
||||
0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x63,
|
||||
0x6f, 0x70, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x63, 0x6f, 0x70, 0x65,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x69,
|
||||
0x0a, 0x18, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x04, 0x69, 0x74,
|
||||
0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53,
|
||||
0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x32, 0x98, 0x15, 0x0a, 0x0d, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x09,
|
||||
0x47, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2c, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x92, 0x41, 0x17, 0x12, 0x15, 0x47, 0x65, 0x74,
|
||||
0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65,
|
||||
0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x10,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d,
|
||||
0x12, 0x9a, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73,
|
||||
0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x2a, 0x92, 0x41, 0x14, 0x12, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x73, 0x20, 0x61, 0x6c,
|
||||
0x6c, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d,
|
||||
0x12, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0xaf, 0x01,
|
||||
0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2f,
|
||||
0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xaa,
|
||||
0xe3, 0x29, 0x02, 0x08, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x1e, 0x62, 0x72, 0x6f, 0x6b, 0x65, 0x72, 0x65, 0x64, 0x5f,
|
||||
0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1e, 0x62, 0x72, 0x6f,
|
||||
0x6b, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
|
||||
0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x12, 0x5e, 0x0a, 0x2a, 0x69,
|
||||
0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||
0x2a, 0x69, 0x6e, 0x6a, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
|
||||
0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x4a, 0x04, 0x08, 0x04, 0x10,
|
||||
0x05, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x52, 0x1c, 0x65, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f,
|
||||
0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x5f, 0x69, 0x64, 0x73, 0x52, 0x21, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x22, 0x68, 0x0a, 0x25, 0x52, 0x65, 0x6d, 0x6f,
|
||||
0x76, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
|
||||
0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x3f, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x2b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65,
|
||||
0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x04, 0x69, 0x74,
|
||||
0x65, 0x6d, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65,
|
||||
0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c,
|
||||
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1c, 0xaa, 0xe3, 0x29, 0x18,
|
||||
0x12, 0x16, 0x0a, 0x08, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x0a, 0x0a, 0x73, 0x63,
|
||||
0x6f, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x12, 0x19, 0x0a, 0x08, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73,
|
||||
0x63, 0x6f, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x09, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x6f,
|
||||
0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x6f, 0x73,
|
||||
0x74, 0x5f, 0x69, 0x64, 0x22, 0x69, 0x0a, 0x18, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a,
|
||||
0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x4d, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39,
|
||||
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x30, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x3c, 0x92, 0x41, 0x1a, 0x12, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x73, 0x20,
|
||||
0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, 0x69, 0x74,
|
||||
0x65, 0x6d, 0x22, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12,
|
||||
0xad, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x3a, 0x92, 0x41, 0x13, 0x12, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x73, 0x20, 0x61, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x1e, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x32, 0x10, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12,
|
||||
0xa1, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x2e, 0x92, 0x41, 0x13, 0x12, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x73, 0x20, 0x61, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x12, 0x2a, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b,
|
||||
0x69, 0x64, 0x7d, 0x12, 0xcf, 0x01, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a,
|
||||
0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53,
|
||||
0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e,
|
||||
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68,
|
||||
0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x32,
|
||||
0x98, 0x15, 0x0a, 0x0d, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x12, 0xa2, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12,
|
||||
0x2c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f,
|
||||
0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x17, 0x12, 0x15, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
|
||||
0x69, 0x7a, 0x65, 0x73, 0x20, 0x61, 0x20, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x25,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x3d,
|
||||
0x2a, 0x2a, 0x7d, 0x3a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x2d, 0x73, 0x65,
|
||||
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0xa7, 0x02, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x54, 0x61, 0x72,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x92, 0x41,
|
||||
0x17, 0x12, 0x15, 0x47, 0x65, 0x74, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65,
|
||||
0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x62, 0x04,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9a, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x54,
|
||||
0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x92, 0x41, 0x14, 0x12, 0x12, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2e,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67,
|
||||
0x65, 0x74, 0x73, 0x12, 0xaf, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65,
|
||||
0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c,
|
||||
0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3c, 0x92, 0x41, 0x1a, 0x12, 0x18, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x54,
|
||||
0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x04, 0x69, 0x74,
|
||||
0x65, 0x6d, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x0b, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0xad, 0x01, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x92, 0x41, 0x13, 0x12, 0x11,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x62, 0x04, 0x69,
|
||||
0x74, 0x65, 0x6d, 0x32, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73,
|
||||
0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xa1, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x92, 0x41, 0x13, 0x12, 0x11,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x2a, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72,
|
||||
0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xcf, 0x01, 0x0a, 0x10, 0x41, 0x75,
|
||||
0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33,
|
||||
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68,
|
||||
0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x17, 0x12, 0x15,
|
||||
0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x73, 0x20, 0x61, 0x20, 0x53, 0x65, 0x73,
|
||||
0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x01, 0x2a, 0x62, 0x04,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x22, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x73, 0x2f, 0x7b, 0x69, 0x64, 0x3d, 0x2a, 0x2a, 0x7d, 0x3a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
|
||||
0x69, 0x7a, 0x65, 0x2d, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0xa7, 0x02, 0x0a, 0x14,
|
||||
0x41, 0x64, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x73, 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65,
|
||||
0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x92, 0x41, 0x66, 0x12, 0x64, 0x41,
|
||||
0x64, 0x64, 0x73, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x48, 0x6f, 0x73,
|
||||
0x74, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x54,
|
||||
0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x20, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65,
|
||||
0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73,
|
||||
0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72,
|
||||
0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x73,
|
||||
0x65, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x62, 0x04, 0x69, 0x74,
|
||||
0x65, 0x6d, 0x22, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2f,
|
||||
0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x61, 0x64, 0x64, 0x2d, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0xa7, 0x02, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x54, 0x61, 0x72,
|
||||
0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x37,
|
||||
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x54,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x54,
|
||||
0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f,
|
||||
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f,
|
||||
0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x9b, 0x01, 0x92, 0x41, 0x66, 0x12, 0x64, 0x41, 0x64, 0x64, 0x73, 0x20, 0x65, 0x78,
|
||||
0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x20, 0x53, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e,
|
||||
0x65, 0x22, 0x9b, 0x01, 0x92, 0x41, 0x66, 0x12, 0x64, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
|
||||
0x20, 0x74, 0x68, 0x65, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x73, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e,
|
||||
0x20, 0x43, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20,
|
||||
0x6f, 0x6e, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,
|
||||
0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65,
|
||||
0x73, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x73, 0x65, 0x74, 0x2e, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x21, 0x2f, 0x76,
|
||||
0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x61,
|
||||
0x64, 0x64, 0x2d, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12,
|
||||
0xa7, 0x02, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f, 0x73,
|
||||
0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x37, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48,
|
||||
0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x38, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53,
|
||||
0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x92, 0x41,
|
||||
0x66, 0x12, 0x64, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x48,
|
||||
0x6f, 0x73, 0x74, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x74,
|
||||
0x68, 0x65, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x20, 0x43, 0x61, 0x6e, 0x6e, 0x6f,
|
||||
0x74, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x61, 0x72,
|
||||
0x67, 0x65, 0x74, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74,
|
||||
0x68, 0x65, 0x69, 0x72, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x66, 0x69, 0x65,
|
||||
0x6c, 0x64, 0x20, 0x73, 0x65, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a,
|
||||
0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67,
|
||||
0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x73, 0x65, 0x74, 0x2d, 0x68, 0x6f, 0x73,
|
||||
0x74, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0xf3, 0x01, 0x0a, 0x17, 0x52, 0x65,
|
||||
0x6d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x3a, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c,
|
||||
0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48,
|
||||
0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x3b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52,
|
||||
0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f,
|
||||
0x92, 0x41, 0x27, 0x12, 0x25, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x20, 0x48, 0x6f, 0x73,
|
||||
0x74, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74,
|
||||
0x68, 0x65, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f,
|
||||
0x3a, 0x01, 0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x74,
|
||||
0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x72, 0x65, 0x6d, 0x6f,
|
||||
0x76, 0x65, 0x2d, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12,
|
||||
0x87, 0x02, 0x0a, 0x1a, 0x41, 0x64, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65,
|
||||
0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x73,
|
||||
0x65, 0x74, 0x2d, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12,
|
||||
0xf3, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x3a, 0x2e, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54,
|
||||
0x61, 0x72, 0x67, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65,
|
||||
0x74, 0x48, 0x6f, 0x73, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x92, 0x41, 0x27, 0x12, 0x25, 0x52, 0x65, 0x6d, 0x6f, 0x76,
|
||||
0x65, 0x73, 0x20, 0x48, 0x6f, 0x73, 0x74, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20,
|
||||
0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x01, 0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22,
|
||||
0x24, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64,
|
||||
0x7d, 0x3a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x2d, 0x68, 0x6f, 0x73, 0x74, 0x2d, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x87, 0x02, 0x0a, 0x1a, 0x41, 0x64, 0x64, 0x54, 0x61, 0x72,
|
||||
0x67, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65,
|
||||
0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65,
|
||||
0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x41, 0x64, 0x64, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e,
|
||||
0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x6a, 0x92, 0x41, 0x2f, 0x12, 0x2d, 0x41, 0x64, 0x64, 0x73, 0x20, 0x65,
|
||||
0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
|
||||
0x61, 0x6c, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20,
|
||||
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x3a, 0x01, 0x2a,
|
||||
0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67,
|
||||
0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x61, 0x64, 0x64, 0x2d, 0x63, 0x72, 0x65,
|
||||
0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12,
|
||||
0x84, 0x02, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65,
|
||||
0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x3d,
|
||||
0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x54,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x54,
|
||||
0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x54, 0x61,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6a, 0x92,
|
||||
0x41, 0x2f, 0x12, 0x2d, 0x41, 0x64, 0x64, 0x73, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x20, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x53, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x3a, 0x01, 0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d,
|
||||
0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69,
|
||||
0x64, 0x7d, 0x3a, 0x61, 0x64, 0x64, 0x2d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
|
||||
0x6c, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x84, 0x02, 0x0a, 0x1a, 0x53, 0x65,
|
||||
0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
|
||||
0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x92,
|
||||
0x41, 0x2c, 0x12, 0x2a, 0x53, 0x65, 0x74, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x72, 0x65,
|
||||
0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20,
|
||||
0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x32, 0x3a, 0x01, 0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x27, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a,
|
||||
0x73, 0x65, 0x74, 0x2d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2d, 0x73,
|
||||
0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x91, 0x02, 0x0a, 0x1d, 0x52, 0x65, 0x6d, 0x6f, 0x76,
|
||||
0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
|
||||
0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43,
|
||||
0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72,
|
||||
0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x92, 0x41, 0x2c, 0x12, 0x2a, 0x53, 0x65,
|
||||
0x74, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61,
|
||||
0x6c, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65,
|
||||
0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x3a, 0x01,
|
||||
0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x27, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72,
|
||||
0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x73, 0x65, 0x74, 0x2d, 0x63, 0x72,
|
||||
0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
|
||||
0x12, 0x91, 0x02, 0x0a, 0x1d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65,
|
||||
0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63,
|
||||
0x65, 0x73, 0x12, 0x40, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64,
|
||||
0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65,
|
||||
0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43, 0x72,
|
||||
0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6b, 0x92, 0x41, 0x2d, 0x12, 0x2b, 0x52, 0x65,
|
||||
0x6d, 0x6f, 0x76, 0x65, 0x73, 0x20, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c,
|
||||
0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68,
|
||||
0x65, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a,
|
||||
0x01, 0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x2a, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x72, 0x65, 0x6d, 0x6f, 0x76,
|
||||
0x65, 0x2d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x2d, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x73, 0x42, 0x57, 0xa2, 0xe3, 0x29, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
|
||||
0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73,
|
||||
0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x2f,
|
||||
0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x73, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x61, 0x72, 0x67,
|
||||
0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72,
|
||||
0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x53, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6b, 0x92,
|
||||
0x41, 0x2d, 0x12, 0x2b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x20, 0x43, 0x72, 0x65, 0x64,
|
||||
0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20, 0x66,
|
||||
0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2e, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x01, 0x2a, 0x62, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0x2a,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d,
|
||||
0x3a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x2d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69,
|
||||
0x61, 0x6c, 0x2d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x42, 0x57, 0xa2, 0xe3, 0x29, 0x06,
|
||||
0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5a, 0x4b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75,
|
||||
0x6e, 0x64, 0x61, 0x72, 0x79, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67,
|
||||
0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69,
|
||||
0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -187,7 +187,7 @@ service TargetService {
|
||||
}
|
||||
|
||||
message GetTargetRequest {
|
||||
string id = 1; // @gotags: `class:"public" eventstream:"observation"`
|
||||
string id = 1 [(custom_options.v1.aliasable) = {always: true}]; // @gotags: `class:"public" eventstream:"observation"`
|
||||
}
|
||||
|
||||
message GetTargetResponse {
|
||||
@@ -243,7 +243,7 @@ message CreateTargetResponse {
|
||||
}
|
||||
|
||||
message UpdateTargetRequest {
|
||||
string id = 1; // @gotags: `class:"public" eventstream:"observation"`
|
||||
string id = 1 [(custom_options.v1.aliasable) = {always: true}]; // @gotags: `class:"public" eventstream:"observation"`
|
||||
resources.targets.v1.Target item = 2;
|
||||
google.protobuf.FieldMask update_mask = 3 [json_name = "update_mask"];
|
||||
}
|
||||
@@ -253,13 +253,13 @@ message UpdateTargetResponse {
|
||||
}
|
||||
|
||||
message DeleteTargetRequest {
|
||||
string id = 1; // @gotags: `class:"public" eventstream:"observation"`
|
||||
string id = 1 [(custom_options.v1.aliasable) = {always: true}]; // @gotags: `class:"public" eventstream:"observation"`
|
||||
}
|
||||
|
||||
message DeleteTargetResponse {}
|
||||
|
||||
message AddTargetHostSourcesRequest {
|
||||
string id = 1; // @gotags: `class:"public" eventstream:"observation"`
|
||||
string id = 1 [(custom_options.v1.aliasable) = {always: true}]; // @gotags: `class:"public" eventstream:"observation"`
|
||||
// Version is used to ensure this resource has not changed.
|
||||
// The mutation will fail if the version does not match the latest known good version.
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
@@ -271,7 +271,7 @@ message AddTargetHostSourcesResponse {
|
||||
}
|
||||
|
||||
message SetTargetHostSourcesRequest {
|
||||
string id = 1; // @gotags: `class:"public" eventstream:"observation"`
|
||||
string id = 1 [(custom_options.v1.aliasable) = {always: true}]; // @gotags: `class:"public" eventstream:"observation"`
|
||||
// Version is used to ensure this resource has not changed.
|
||||
// The mutation will fail if the version does not match the latest known good version.
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
@@ -283,7 +283,7 @@ message SetTargetHostSourcesResponse {
|
||||
}
|
||||
|
||||
message RemoveTargetHostSourcesRequest {
|
||||
string id = 1; // @gotags: `class:"public" eventstream:"observation"`
|
||||
string id = 1 [(custom_options.v1.aliasable) = {always: true}]; // @gotags: `class:"public" eventstream:"observation"`
|
||||
// Version is used to ensure this resource has not changed.
|
||||
// The mutation will fail if the version does not match the latest known good version.
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
@@ -295,7 +295,7 @@ message RemoveTargetHostSourcesResponse {
|
||||
}
|
||||
|
||||
message AddTargetCredentialSourcesRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1 [(custom_options.v1.aliasable) = {always: true}]; // @gotags: `class:"public"`
|
||||
// Version is used to ensure this resource has not changed.
|
||||
// The mutation will fail if the version does not match the latest known good version.
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
@@ -322,7 +322,7 @@ message AddTargetCredentialSourcesResponse {
|
||||
// Sets the values for credential sources. Any credential_source_id field that
|
||||
// is not set in the request will result in those fields being cleared.
|
||||
message SetTargetCredentialSourcesRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1 [(custom_options.v1.aliasable) = {always: true}]; // @gotags: `class:"public"`
|
||||
// Version is used to ensure this resource has not changed.
|
||||
// The mutation will fail if the version does not match the latest known good version.
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
@@ -347,7 +347,7 @@ message SetTargetCredentialSourcesResponse {
|
||||
}
|
||||
|
||||
message RemoveTargetCredentialSourcesRequest {
|
||||
string id = 1; // @gotags: `class:"public"`
|
||||
string id = 1 [(custom_options.v1.aliasable) = {always: true}]; // @gotags: `class:"public"`
|
||||
// Version is used to ensure this resource has not changed.
|
||||
// The mutation will fail if the version does not match the latest known good version.
|
||||
uint32 version = 2; // @gotags: `class:"public"`
|
||||
@@ -373,7 +373,16 @@ message RemoveTargetCredentialSourcesResponse {
|
||||
|
||||
message AuthorizeSessionRequest {
|
||||
// The ID of the target. Required unless some combination of scope_id/scope_name and name are set.
|
||||
string id = 1; // @gotags: `class:"public" eventstream:"observation"`
|
||||
string id = 1 [(custom_options.v1.aliasable) = {
|
||||
unless_set: {
|
||||
// scope id and scope name being set indicates that the value in this field
|
||||
// is actually a target name and not an alias.
|
||||
fields: [
|
||||
'scope_id',
|
||||
'scope_name'
|
||||
]
|
||||
}
|
||||
}]; // @gotags: `class:"public" eventstream:"observation"`
|
||||
|
||||
// The name of the target. When using this, scope_id or scope_name must be set.
|
||||
string name = 3; // @gotags: `class:"public"`
|
||||
|
||||
@@ -29,6 +29,12 @@ extend google.protobuf.FieldOptions {
|
||||
// subtype_source_id is used to indicate that a field provided an id that can be used
|
||||
// to determine the subtype of a message.
|
||||
bool subtype_source_id = 85556;
|
||||
|
||||
// aliasable_field is used to indicate that a field is aliasable. Fields with
|
||||
// this option attached will have their values checked for a possible alias
|
||||
// value at request time and will be replaced with the destination id
|
||||
// associated with the alias if found.
|
||||
AliasInfo aliasable = 85557;
|
||||
}
|
||||
|
||||
extend google.protobuf.FileOptions {
|
||||
@@ -40,3 +46,20 @@ message MaskMapping {
|
||||
string this = 1;
|
||||
string that = 2;
|
||||
}
|
||||
|
||||
message AliasInfo {
|
||||
oneof aliasable {
|
||||
bool always = 1;
|
||||
|
||||
// aliasable_with_fields is used to indicate that the field this FieldOption
|
||||
// is on, while normally aliasable, should not be aliased if any fields on this
|
||||
// same message are populated.
|
||||
AliasableUnlessSet unless_set = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message AliasableUnlessSet {
|
||||
// fields is a list of fields that, if any of them are set with a non zero
|
||||
// value then the field this FieldOption is on should not be treated as an alias.
|
||||
repeated string fields = 1;
|
||||
}
|
||||
@@ -79,6 +79,139 @@ func (x *MaskMapping) GetThat() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type AliasInfo struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Aliasable:
|
||||
//
|
||||
// *AliasInfo_Always
|
||||
// *AliasInfo_UnlessSet
|
||||
Aliasable isAliasInfo_Aliasable `protobuf_oneof:"aliasable"`
|
||||
}
|
||||
|
||||
func (x *AliasInfo) Reset() {
|
||||
*x = AliasInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_controller_custom_options_v1_options_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *AliasInfo) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AliasInfo) ProtoMessage() {}
|
||||
|
||||
func (x *AliasInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_controller_custom_options_v1_options_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 AliasInfo.ProtoReflect.Descriptor instead.
|
||||
func (*AliasInfo) Descriptor() ([]byte, []int) {
|
||||
return file_controller_custom_options_v1_options_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (m *AliasInfo) GetAliasable() isAliasInfo_Aliasable {
|
||||
if m != nil {
|
||||
return m.Aliasable
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *AliasInfo) GetAlways() bool {
|
||||
if x, ok := x.GetAliasable().(*AliasInfo_Always); ok {
|
||||
return x.Always
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *AliasInfo) GetUnlessSet() *AliasableUnlessSet {
|
||||
if x, ok := x.GetAliasable().(*AliasInfo_UnlessSet); ok {
|
||||
return x.UnlessSet
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type isAliasInfo_Aliasable interface {
|
||||
isAliasInfo_Aliasable()
|
||||
}
|
||||
|
||||
type AliasInfo_Always struct {
|
||||
Always bool `protobuf:"varint,1,opt,name=always,proto3,oneof"`
|
||||
}
|
||||
|
||||
type AliasInfo_UnlessSet struct {
|
||||
// aliasable_with_fields is used to indicate that the field this FieldOption
|
||||
// is on, while normally aliasable, should not be aliased if any fields on this
|
||||
// same message are populated.
|
||||
UnlessSet *AliasableUnlessSet `protobuf:"bytes,2,opt,name=unless_set,json=unlessSet,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*AliasInfo_Always) isAliasInfo_Aliasable() {}
|
||||
|
||||
func (*AliasInfo_UnlessSet) isAliasInfo_Aliasable() {}
|
||||
|
||||
type AliasableUnlessSet struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// fields is a list of fields that, if any of them are set with a non zero
|
||||
// value then the field this FieldOption is on should not be treated as an alias.
|
||||
Fields []string `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AliasableUnlessSet) Reset() {
|
||||
*x = AliasableUnlessSet{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_controller_custom_options_v1_options_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *AliasableUnlessSet) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AliasableUnlessSet) ProtoMessage() {}
|
||||
|
||||
func (x *AliasableUnlessSet) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_controller_custom_options_v1_options_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 AliasableUnlessSet.ProtoReflect.Descriptor instead.
|
||||
func (*AliasableUnlessSet) Descriptor() ([]byte, []int) {
|
||||
return file_controller_custom_options_v1_options_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *AliasableUnlessSet) GetFields() []string {
|
||||
if x != nil {
|
||||
return x.Fields
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var file_controller_custom_options_v1_options_proto_extTypes = []protoimpl.ExtensionInfo{
|
||||
{
|
||||
ExtendedType: (*descriptorpb.FieldOptions)(nil),
|
||||
@@ -112,6 +245,14 @@ var file_controller_custom_options_v1_options_proto_extTypes = []protoimpl.Exten
|
||||
Tag: "varint,85556,opt,name=subtype_source_id",
|
||||
Filename: "controller/custom_options/v1/options.proto",
|
||||
},
|
||||
{
|
||||
ExtendedType: (*descriptorpb.FieldOptions)(nil),
|
||||
ExtensionType: (*AliasInfo)(nil),
|
||||
Field: 85557,
|
||||
Name: "controller.custom_options.v1.aliasable",
|
||||
Tag: "bytes,85557,opt,name=aliasable",
|
||||
Filename: "controller/custom_options/v1/options.proto",
|
||||
},
|
||||
{
|
||||
ExtendedType: (*descriptorpb.FileOptions)(nil),
|
||||
ExtensionType: (*string)(nil),
|
||||
@@ -148,6 +289,13 @@ var (
|
||||
//
|
||||
// optional bool subtype_source_id = 85556;
|
||||
E_SubtypeSourceId = &file_controller_custom_options_v1_options_proto_extTypes[3]
|
||||
// aliasable_field is used to indicate that a field is aliasable. Fields with
|
||||
// this option attached will have their values checked for a possible alias
|
||||
// value at request time and will be replaced with the destination id
|
||||
// associated with the alias if found.
|
||||
//
|
||||
// optional controller.custom_options.v1.AliasInfo aliasable = 85557;
|
||||
E_Aliasable = &file_controller_custom_options_v1_options_proto_extTypes[4]
|
||||
)
|
||||
|
||||
// Extension fields to descriptorpb.FileOptions.
|
||||
@@ -155,7 +303,7 @@ var (
|
||||
// domain is used to associate the messages in a file with a domain package.
|
||||
//
|
||||
// optional string domain = 85556;
|
||||
E_Domain = &file_controller_custom_options_v1_options_proto_extTypes[4]
|
||||
E_Domain = &file_controller_custom_options_v1_options_proto_extTypes[5]
|
||||
)
|
||||
|
||||
var File_controller_custom_options_v1_options_proto protoreflect.FileDescriptor
|
||||
@@ -171,36 +319,54 @@ var file_controller_custom_options_v1_options_proto_rawDesc = []byte{
|
||||
0x4d, 0x61, 0x73, 0x6b, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x74,
|
||||
0x68, 0x69, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x68, 0x69, 0x73, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x74, 0x68, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74,
|
||||
0x68, 0x61, 0x74, 0x3a, 0x6d, 0x0a, 0x0c, 0x6d, 0x61, 0x73, 0x6b, 0x5f, 0x6d, 0x61, 0x70, 0x70,
|
||||
0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x18, 0xd8, 0x9b, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6f,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x73, 0x6b, 0x4d, 0x61,
|
||||
0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x6d, 0x61, 0x73, 0x6b, 0x4d, 0x61, 0x70, 0x70, 0x69,
|
||||
0x6e, 0x67, 0x3a, 0x4f, 0x0a, 0x13, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73,
|
||||
0x64, 0x6b, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x68, 0x61, 0x74, 0x22, 0x85, 0x01, 0x0a, 0x09, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x49, 0x6e, 0x66,
|
||||
0x6f, 0x12, 0x18, 0x0a, 0x06, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x08, 0x48, 0x00, 0x52, 0x06, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x12, 0x51, 0x0a, 0x0a, 0x75,
|
||||
0x6e, 0x6c, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x30, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x63, 0x75, 0x73,
|
||||
0x74, 0x6f, 0x6d, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41,
|
||||
0x6c, 0x69, 0x61, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x6e, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x65,
|
||||
0x74, 0x48, 0x00, 0x52, 0x09, 0x75, 0x6e, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x65, 0x74, 0x42, 0x0b,
|
||||
0x0a, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x2c, 0x0a, 0x12, 0x41,
|
||||
0x6c, 0x69, 0x61, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x6e, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x65,
|
||||
0x74, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x3a, 0x6d, 0x0a, 0x0c, 0x6d, 0x61, 0x73,
|
||||
0x6b, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c,
|
||||
0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa4, 0x9b, 0x05, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x11, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x64, 0x6b, 0x4f, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x3a, 0x39, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d,
|
||||
0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xd8, 0x9b, 0x05, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x29, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2e, 0x63, 0x75,
|
||||
0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x4d, 0x61, 0x73, 0x6b, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x6d, 0x61, 0x73,
|
||||
0x6b, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x3a, 0x4f, 0x0a, 0x13, 0x67, 0x65, 0x6e, 0x65,
|
||||
0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x64, 0x6b, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa4,
|
||||
0x9b, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
|
||||
0x53, 0x64, 0x6b, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x39, 0x0a, 0x07, 0x73, 0x75, 0x62,
|
||||
0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x18, 0xb3, 0x9c, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62,
|
||||
0x74, 0x79, 0x70, 0x65, 0x3a, 0x4b, 0x0a, 0x11, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x5f,
|
||||
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c,
|
||||
0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb4, 0x9c, 0x05, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x0f, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49,
|
||||
0x64, 0x3a, 0x66, 0x0a, 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x1d,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb3, 0x9c,
|
||||
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x4b,
|
||||
0x0a, 0x11, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x5f, 0x69, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x18, 0xb4, 0x9c, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x74,
|
||||
0x79, 0x70, 0x65, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x3a, 0x36, 0x0a, 0x06, 0x64,
|
||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x18, 0xb4, 0x9c, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x42, 0x4c, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e,
|
||||
0x64, 0x61, 0x72, 0x79, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x73, 0x2f, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6f, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb5, 0x9c,
|
||||
0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c,
|
||||
0x65, 0x72, 0x2e, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09,
|
||||
0x61, 0x6c, 0x69, 0x61, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x3a, 0x36, 0x0a, 0x06, 0x64, 0x6f, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x18, 0xb4, 0x9c, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69,
|
||||
0x6e, 0x42, 0x4c, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x61,
|
||||
0x72, 0x79, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x70, 0x62, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -215,24 +381,29 @@ func file_controller_custom_options_v1_options_proto_rawDescGZIP() []byte {
|
||||
return file_controller_custom_options_v1_options_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_controller_custom_options_v1_options_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_controller_custom_options_v1_options_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_controller_custom_options_v1_options_proto_goTypes = []interface{}{
|
||||
(*MaskMapping)(nil), // 0: controller.custom_options.v1.MaskMapping
|
||||
(*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions
|
||||
(*descriptorpb.FileOptions)(nil), // 2: google.protobuf.FileOptions
|
||||
(*AliasInfo)(nil), // 1: controller.custom_options.v1.AliasInfo
|
||||
(*AliasableUnlessSet)(nil), // 2: controller.custom_options.v1.AliasableUnlessSet
|
||||
(*descriptorpb.FieldOptions)(nil), // 3: google.protobuf.FieldOptions
|
||||
(*descriptorpb.FileOptions)(nil), // 4: google.protobuf.FileOptions
|
||||
}
|
||||
var file_controller_custom_options_v1_options_proto_depIdxs = []int32{
|
||||
1, // 0: controller.custom_options.v1.mask_mapping:extendee -> google.protobuf.FieldOptions
|
||||
1, // 1: controller.custom_options.v1.generate_sdk_option:extendee -> google.protobuf.FieldOptions
|
||||
1, // 2: controller.custom_options.v1.subtype:extendee -> google.protobuf.FieldOptions
|
||||
1, // 3: controller.custom_options.v1.subtype_source_id:extendee -> google.protobuf.FieldOptions
|
||||
2, // 4: controller.custom_options.v1.domain:extendee -> google.protobuf.FileOptions
|
||||
0, // 5: controller.custom_options.v1.mask_mapping:type_name -> controller.custom_options.v1.MaskMapping
|
||||
6, // [6:6] is the sub-list for method output_type
|
||||
6, // [6:6] is the sub-list for method input_type
|
||||
5, // [5:6] is the sub-list for extension type_name
|
||||
0, // [0:5] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
2, // 0: controller.custom_options.v1.AliasInfo.unless_set:type_name -> controller.custom_options.v1.AliasableUnlessSet
|
||||
3, // 1: controller.custom_options.v1.mask_mapping:extendee -> google.protobuf.FieldOptions
|
||||
3, // 2: controller.custom_options.v1.generate_sdk_option:extendee -> google.protobuf.FieldOptions
|
||||
3, // 3: controller.custom_options.v1.subtype:extendee -> google.protobuf.FieldOptions
|
||||
3, // 4: controller.custom_options.v1.subtype_source_id:extendee -> google.protobuf.FieldOptions
|
||||
3, // 5: controller.custom_options.v1.aliasable:extendee -> google.protobuf.FieldOptions
|
||||
4, // 6: controller.custom_options.v1.domain:extendee -> google.protobuf.FileOptions
|
||||
0, // 7: controller.custom_options.v1.mask_mapping:type_name -> controller.custom_options.v1.MaskMapping
|
||||
1, // 8: controller.custom_options.v1.aliasable:type_name -> controller.custom_options.v1.AliasInfo
|
||||
9, // [9:9] is the sub-list for method output_type
|
||||
9, // [9:9] is the sub-list for method input_type
|
||||
7, // [7:9] is the sub-list for extension type_name
|
||||
1, // [1:7] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_controller_custom_options_v1_options_proto_init() }
|
||||
@@ -253,6 +424,34 @@ func file_controller_custom_options_v1_options_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_controller_custom_options_v1_options_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AliasInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_controller_custom_options_v1_options_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AliasableUnlessSet); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_controller_custom_options_v1_options_proto_msgTypes[1].OneofWrappers = []interface{}{
|
||||
(*AliasInfo_Always)(nil),
|
||||
(*AliasInfo_UnlessSet)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
@@ -260,8 +459,8 @@ func file_controller_custom_options_v1_options_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_controller_custom_options_v1_options_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 5,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 6,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_controller_custom_options_v1_options_proto_goTypes,
|
||||
|
||||
Reference in new issue
Block a user