From 75f9f9326990d25fceb25bd9b8cbc80155be30bb Mon Sep 17 00:00:00 2001 From: Kush Sharma Date: Sat, 2 Sep 2023 16:16:02 +0530 Subject: [PATCH] fixed postgres repositories to use namespace id Signed-off-by: Kush Sharma --- .dockerignore | 7 + .github/workflows/main.yml | 31 + Dockerfile.dev | 24 + Makefile | 6 +- api/handler/v1beta1/grpc.go | 27 +- api/handler/v1beta1/grpc_test.go | 19 +- api/handler/v1beta1/mocks/namespaceService.go | 233 +++ api/handler/v1beta1/namespace.go | 84 + .../raystack/guardian/v1beta1/guardian.pb.go | 1724 ++++++++++++----- .../guardian/v1beta1/guardian.pb.gw.go | 730 ++++--- .../guardian/v1beta1/guardian.swagger.json | 302 ++- .../guardian/v1beta1/guardian_grpc.pb.go | 150 +- cli/server.go | 2 +- core/namespace/service.go | 37 + domain/namespace.go | 15 + go.mod | 21 +- go.sum | 53 +- internal/server/config.go | 11 +- internal/server/server.go | 32 +- internal/server/services.go | 34 +- .../store/postgres/activity_repository.go | 69 +- .../postgres/activity_repository_test.go | 6 +- internal/store/postgres/appeal_repository.go | 138 +- .../store/postgres/appeal_repository_test.go | 8 +- .../store/postgres/approval_repository.go | 99 +- .../postgres/approval_repository_test.go | 10 +- internal/store/postgres/grant_repository.go | 127 +- .../store/postgres/grant_repository_test.go | 10 +- ...table_and_add_namespace_in_tables.down.sql | 15 +- ...e_table_and_add_namespace_in_tables.up.sql | 48 +- ...ble_row_level_security_all_tables.down.sql | 6 +- ...nable_row_level_security_all_tables.up.sql | 10 +- internal/store/postgres/model/activity.go | 2 +- internal/store/postgres/model/appeal.go | 1 + internal/store/postgres/model/approval.go | 1 + internal/store/postgres/model/approver.go | 9 +- internal/store/postgres/model/grant.go | 1 + internal/store/postgres/model/namespace.go | 65 + internal/store/postgres/model/policy.go | 7 +- internal/store/postgres/model/provider.go | 17 +- internal/store/postgres/model/resource.go | 10 +- .../store/postgres/namespace_repository.go | 79 + internal/store/postgres/policy_repository.go | 15 +- .../store/postgres/policy_repository_test.go | 2 +- .../store/postgres/provider_repository.go | 37 +- .../postgres/provider_repository_test.go | 6 +- .../store/postgres/resource_repository.go | 100 +- .../postgres/resource_repository_test.go | 4 +- internal/store/postgres/store.go | 35 + pkg/auth/frontier.go | 53 + 50 files changed, 3299 insertions(+), 1233 deletions(-) create mode 100644 .dockerignore create mode 100644 .github/workflows/main.yml create mode 100644 Dockerfile.dev create mode 100644 api/handler/v1beta1/mocks/namespaceService.go create mode 100644 api/handler/v1beta1/namespace.go create mode 100644 core/namespace/service.go create mode 100644 domain/namespace.go create mode 100644 internal/store/postgres/model/namespace.go create mode 100644 internal/store/postgres/namespace_repository.go create mode 100644 pkg/auth/frontier.go diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..35ed1dc4d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +tmp +guardian.yml +guardian.yaml +config.yaml +config.yml +.git +.github diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..0bf5e5fe8 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +name: Main +on: + push: + branches: + - main + +jobs: + dev: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: "1.20" + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + registry: docker.io + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Publish dev image + id: docker_dev_build + uses: docker/build-push-action@v2 + with: + push: true + file: "./Dockerfile.dev" + tags: raystack/guardian:dev diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 000000000..d9ff96589 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,24 @@ +FROM golang:1.20-alpine3.17 as builder + +RUN apk add make + +WORKDIR /go/src/app + +COPY go.mod go.sum ./ +RUN go mod download + +COPY . . + +RUN make build + +FROM alpine:3.17 +COPY --from=builder /go/src/app/dist /usr/bin/ +RUN apk update +RUN apk add ca-certificates + +# glibc compatibility library, since go binaries +# don't work well with musl libc that alpine uses +RUN apk add libc6-compat + +EXPOSE 8080 +ENTRYPOINT ["./guardian"] \ No newline at end of file diff --git a/Makefile b/Makefile index 58edec0af..6521eb60a 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ COMMIT := $(shell git rev-parse --short HEAD) TAG := "$(shell git rev-list --tags --max-count=1)" VERSION := "$(shell git describe --tags ${TAG})-next" BUILD_DIR=dist -PROTON_COMMIT := "ccbf219312db35a934361ebad895cb40145ca235" +PROTON_COMMIT := "95140abe54e3c27f0bf4f06bc780a289f41aadf1" .PHONY: all build clean test tidy vet proto setup format generate @@ -25,6 +25,10 @@ lint: ## Lint checker @echo "Running lint checks using golangci-lint..." @golangci-lint run +lintf: ## Lint checker and fix + @echo "Running lint checks using golangci-lint..." + @golangci-lint run --fix + clean: tidy ## Clean the build artifacts @echo "Cleaning up build directories..." @rm -rf $coverage.out ${BUILD_DIR} diff --git a/api/handler/v1beta1/grpc.go b/api/handler/v1beta1/grpc.go index b1a9cc418..f3bf2e9be 100644 --- a/api/handler/v1beta1/grpc.go +++ b/api/handler/v1beta1/grpc.go @@ -108,15 +108,24 @@ type grantService interface { ImportFromProvider(ctx context.Context, criteria grant.ImportFromProviderCriteria) ([]*domain.Grant, error) } +//go:generate mockery --name=namespaceService --exported --with-expecter +type namespaceService interface { + Get(ctx context.Context, id string) (*domain.Namespace, error) + Create(ctx context.Context, namespace *domain.Namespace) error + Update(ctx context.Context, namespace *domain.Namespace) error + List(ctx context.Context, filter domain.NamespaceFilter) ([]*domain.Namespace, error) +} + type GRPCServer struct { - resourceService resourceService - activityService activityService - providerService providerService - policyService policyService - appealService appealService - approvalService approvalService - grantService grantService - adapter ProtoAdapter + resourceService resourceService + activityService activityService + providerService providerService + policyService policyService + appealService appealService + approvalService approvalService + grantService grantService + namespaceService namespaceService + adapter ProtoAdapter authenticatedUserContextKey interface{} @@ -131,6 +140,7 @@ func NewGRPCServer( appealService appealService, approvalService approvalService, grantService grantService, + namespaceService namespaceService, adapter ProtoAdapter, authenticatedUserContextKey interface{}, ) *GRPCServer { @@ -142,6 +152,7 @@ func NewGRPCServer( appealService: appealService, approvalService: approvalService, grantService: grantService, + namespaceService: namespaceService, adapter: adapter, authenticatedUserContextKey: authenticatedUserContextKey, } diff --git a/api/handler/v1beta1/grpc_test.go b/api/handler/v1beta1/grpc_test.go index e325dcb12..0b292b87c 100644 --- a/api/handler/v1beta1/grpc_test.go +++ b/api/handler/v1beta1/grpc_test.go @@ -13,14 +13,15 @@ type authEmailTestContextKey struct{} type GrpcHandlersSuite struct { suite.Suite - resourceService *mocks.ResourceService - activityService *mocks.ActivityService - providerService *mocks.ProviderService - policyService *mocks.PolicyService - appealService *mocks.AppealService - approvalService *mocks.ApprovalService - grantService *mocks.GrantService - grpcServer *v1beta1.GRPCServer + resourceService *mocks.ResourceService + activityService *mocks.ActivityService + providerService *mocks.ProviderService + policyService *mocks.PolicyService + appealService *mocks.AppealService + approvalService *mocks.ApprovalService + grantService *mocks.GrantService + namespaceService *mocks.NamespaceService + grpcServer *v1beta1.GRPCServer } func TestGrpcHandler(t *testing.T) { @@ -35,6 +36,7 @@ func (s *GrpcHandlersSuite) setup() { s.appealService = new(mocks.AppealService) s.approvalService = new(mocks.ApprovalService) s.grantService = new(mocks.GrantService) + s.namespaceService = new(mocks.NamespaceService) s.grpcServer = v1beta1.NewGRPCServer( s.resourceService, s.activityService, @@ -43,6 +45,7 @@ func (s *GrpcHandlersSuite) setup() { s.appealService, s.approvalService, s.grantService, + s.namespaceService, v1beta1.NewAdapter(), authEmailTestContextKey{}, ) diff --git a/api/handler/v1beta1/mocks/namespaceService.go b/api/handler/v1beta1/mocks/namespaceService.go new file mode 100644 index 000000000..ffc6a165f --- /dev/null +++ b/api/handler/v1beta1/mocks/namespaceService.go @@ -0,0 +1,233 @@ +// Code generated by mockery v2.32.4. DO NOT EDIT. + +package mocks + +import ( + context "context" + + domain "github.com/raystack/guardian/domain" + mock "github.com/stretchr/testify/mock" +) + +// NamespaceService is an autogenerated mock type for the namespaceService type +type NamespaceService struct { + mock.Mock +} + +type NamespaceService_Expecter struct { + mock *mock.Mock +} + +func (_m *NamespaceService) EXPECT() *NamespaceService_Expecter { + return &NamespaceService_Expecter{mock: &_m.Mock} +} + +// Create provides a mock function with given fields: ctx, namespace +func (_m *NamespaceService) Create(ctx context.Context, namespace *domain.Namespace) error { + ret := _m.Called(ctx, namespace) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *domain.Namespace) error); ok { + r0 = rf(ctx, namespace) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// NamespaceService_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' +type NamespaceService_Create_Call struct { + *mock.Call +} + +// Create is a helper method to define mock.On call +// - ctx context.Context +// - namespace *domain.Namespace +func (_e *NamespaceService_Expecter) Create(ctx interface{}, namespace interface{}) *NamespaceService_Create_Call { + return &NamespaceService_Create_Call{Call: _e.mock.On("Create", ctx, namespace)} +} + +func (_c *NamespaceService_Create_Call) Run(run func(ctx context.Context, namespace *domain.Namespace)) *NamespaceService_Create_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*domain.Namespace)) + }) + return _c +} + +func (_c *NamespaceService_Create_Call) Return(_a0 error) *NamespaceService_Create_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *NamespaceService_Create_Call) RunAndReturn(run func(context.Context, *domain.Namespace) error) *NamespaceService_Create_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: ctx, id +func (_m *NamespaceService) Get(ctx context.Context, id string) (*domain.Namespace, error) { + ret := _m.Called(ctx, id) + + var r0 *domain.Namespace + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*domain.Namespace, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, string) *domain.Namespace); ok { + r0 = rf(ctx, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*domain.Namespace) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// NamespaceService_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type NamespaceService_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - ctx context.Context +// - id string +func (_e *NamespaceService_Expecter) Get(ctx interface{}, id interface{}) *NamespaceService_Get_Call { + return &NamespaceService_Get_Call{Call: _e.mock.On("Get", ctx, id)} +} + +func (_c *NamespaceService_Get_Call) Run(run func(ctx context.Context, id string)) *NamespaceService_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(string)) + }) + return _c +} + +func (_c *NamespaceService_Get_Call) Return(_a0 *domain.Namespace, _a1 error) *NamespaceService_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *NamespaceService_Get_Call) RunAndReturn(run func(context.Context, string) (*domain.Namespace, error)) *NamespaceService_Get_Call { + _c.Call.Return(run) + return _c +} + +// List provides a mock function with given fields: ctx, filter +func (_m *NamespaceService) List(ctx context.Context, filter domain.NamespaceFilter) ([]*domain.Namespace, error) { + ret := _m.Called(ctx, filter) + + var r0 []*domain.Namespace + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, domain.NamespaceFilter) ([]*domain.Namespace, error)); ok { + return rf(ctx, filter) + } + if rf, ok := ret.Get(0).(func(context.Context, domain.NamespaceFilter) []*domain.Namespace); ok { + r0 = rf(ctx, filter) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*domain.Namespace) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, domain.NamespaceFilter) error); ok { + r1 = rf(ctx, filter) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// NamespaceService_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' +type NamespaceService_List_Call struct { + *mock.Call +} + +// List is a helper method to define mock.On call +// - ctx context.Context +// - filter domain.NamespaceFilter +func (_e *NamespaceService_Expecter) List(ctx interface{}, filter interface{}) *NamespaceService_List_Call { + return &NamespaceService_List_Call{Call: _e.mock.On("List", ctx, filter)} +} + +func (_c *NamespaceService_List_Call) Run(run func(ctx context.Context, filter domain.NamespaceFilter)) *NamespaceService_List_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(domain.NamespaceFilter)) + }) + return _c +} + +func (_c *NamespaceService_List_Call) Return(_a0 []*domain.Namespace, _a1 error) *NamespaceService_List_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *NamespaceService_List_Call) RunAndReturn(run func(context.Context, domain.NamespaceFilter) ([]*domain.Namespace, error)) *NamespaceService_List_Call { + _c.Call.Return(run) + return _c +} + +// Update provides a mock function with given fields: ctx, namespace +func (_m *NamespaceService) Update(ctx context.Context, namespace *domain.Namespace) error { + ret := _m.Called(ctx, namespace) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *domain.Namespace) error); ok { + r0 = rf(ctx, namespace) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// NamespaceService_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' +type NamespaceService_Update_Call struct { + *mock.Call +} + +// Update is a helper method to define mock.On call +// - ctx context.Context +// - namespace *domain.Namespace +func (_e *NamespaceService_Expecter) Update(ctx interface{}, namespace interface{}) *NamespaceService_Update_Call { + return &NamespaceService_Update_Call{Call: _e.mock.On("Update", ctx, namespace)} +} + +func (_c *NamespaceService_Update_Call) Run(run func(ctx context.Context, namespace *domain.Namespace)) *NamespaceService_Update_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(context.Context), args[1].(*domain.Namespace)) + }) + return _c +} + +func (_c *NamespaceService_Update_Call) Return(_a0 error) *NamespaceService_Update_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *NamespaceService_Update_Call) RunAndReturn(run func(context.Context, *domain.Namespace) error) *NamespaceService_Update_Call { + _c.Call.Return(run) + return _c +} + +// NewNamespaceService creates a new instance of NamespaceService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewNamespaceService(t interface { + mock.TestingT + Cleanup(func()) +}) *NamespaceService { + mock := &NamespaceService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/api/handler/v1beta1/namespace.go b/api/handler/v1beta1/namespace.go new file mode 100644 index 000000000..71d0013b7 --- /dev/null +++ b/api/handler/v1beta1/namespace.go @@ -0,0 +1,84 @@ +package v1beta1 + +import ( + "context" + + guardianv1beta1 "github.com/raystack/guardian/api/proto/raystack/guardian/v1beta1" + "github.com/raystack/guardian/domain" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/structpb" +) + +func (s *GRPCServer) CreateNamespace(ctx context.Context, req *guardianv1beta1.CreateNamespaceRequest) (*guardianv1beta1.CreateNamespaceResponse, error) { + metadata := map[string]any{} + if req.GetNamespace().GetMetadata() != nil { + metadata = req.GetNamespace().GetMetadata().AsMap() + } + if err := s.namespaceService.Create(ctx, &domain.Namespace{ + ID: req.GetNamespace().GetId(), + Name: req.GetNamespace().GetName(), + State: req.GetNamespace().GetState(), + Metadata: metadata, + }); err != nil { + return nil, status.Errorf(codes.Internal, "failed to create namespace: %v", err) + } + return &guardianv1beta1.CreateNamespaceResponse{}, nil +} + +func (s *GRPCServer) UpdateNamespace(ctx context.Context, req *guardianv1beta1.UpdateNamespaceRequest) (*guardianv1beta1.UpdateNamespaceResponse, error) { + metadata := map[string]any{} + if req.GetNamespace().GetMetadata() != nil { + metadata = req.GetNamespace().GetMetadata().AsMap() + } + if err := s.namespaceService.Update(ctx, &domain.Namespace{ + Name: req.GetNamespace().GetName(), + State: req.GetNamespace().GetState(), + Metadata: metadata, + }); err != nil { + return nil, status.Errorf(codes.Internal, "failed to update namespace: %v", err) + } + return &guardianv1beta1.UpdateNamespaceResponse{}, nil +} + +func (s *GRPCServer) GetNamespace(ctx context.Context, req *guardianv1beta1.GetNamespaceRequest) (*guardianv1beta1.GetNamespaceResponse, error) { + ns, err := s.namespaceService.Get(ctx, req.GetId()) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to get namespace: %v", err) + } + md, err := structpb.NewStruct(ns.Metadata) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to get namespace: %v", err) + } + return &guardianv1beta1.GetNamespaceResponse{ + Namespace: &guardianv1beta1.Namespace{ + Id: ns.ID, + Name: ns.Name, + State: ns.State, + Metadata: md, + }, + }, nil +} + +func (s *GRPCServer) ListNamespaces(ctx context.Context, req *guardianv1beta1.ListNamespacesRequest) (*guardianv1beta1.ListNamespacesResponse, error) { + nss, err := s.namespaceService.List(ctx, domain.NamespaceFilter{}) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to list namespaces: %v", err) + } + var namespaces []*guardianv1beta1.Namespace + for _, ns := range nss { + md, err := structpb.NewStruct(ns.Metadata) + if err != nil { + return nil, status.Errorf(codes.Internal, "failed to list namespaces: %v", err) + } + namespaces = append(namespaces, &guardianv1beta1.Namespace{ + Id: ns.ID, + Name: ns.Name, + State: ns.State, + Metadata: md, + }) + } + return &guardianv1beta1.ListNamespacesResponse{ + Namespaces: namespaces, + }, nil +} diff --git a/api/proto/raystack/guardian/v1beta1/guardian.pb.go b/api/proto/raystack/guardian/v1beta1/guardian.pb.go index 2520cc273..7b6cc8e4d 100644 --- a/api/proto/raystack/guardian/v1beta1/guardian.pb.go +++ b/api/proto/raystack/guardian/v1beta1/guardian.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 +// protoc-gen-go v1.26.0 // protoc (unknown) // source: raystack/guardian/v1beta1/guardian.proto @@ -5839,6 +5839,450 @@ func (x *ProviderActivity) GetRelatedPermissions() []string { return nil } +type Namespace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` + Metadata *structpb.Struct `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` +} + +func (x *Namespace) Reset() { + *x = Namespace{} + if protoimpl.UnsafeEnabled { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[90] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Namespace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Namespace) ProtoMessage() {} + +func (x *Namespace) ProtoReflect() protoreflect.Message { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[90] + 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 Namespace.ProtoReflect.Descriptor instead. +func (*Namespace) Descriptor() ([]byte, []int) { + return file_raystack_guardian_v1beta1_guardian_proto_rawDescGZIP(), []int{90} +} + +func (x *Namespace) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Namespace) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Namespace) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *Namespace) GetMetadata() *structpb.Struct { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Namespace) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Namespace) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type CreateNamespaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` +} + +func (x *CreateNamespaceRequest) Reset() { + *x = CreateNamespaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[91] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNamespaceRequest) ProtoMessage() {} + +func (x *CreateNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[91] + 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 CreateNamespaceRequest.ProtoReflect.Descriptor instead. +func (*CreateNamespaceRequest) Descriptor() ([]byte, []int) { + return file_raystack_guardian_v1beta1_guardian_proto_rawDescGZIP(), []int{91} +} + +func (x *CreateNamespaceRequest) GetNamespace() *Namespace { + if x != nil { + return x.Namespace + } + return nil +} + +type CreateNamespaceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateNamespaceResponse) Reset() { + *x = CreateNamespaceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[92] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNamespaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNamespaceResponse) ProtoMessage() {} + +func (x *CreateNamespaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[92] + 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 CreateNamespaceResponse.ProtoReflect.Descriptor instead. +func (*CreateNamespaceResponse) Descriptor() ([]byte, []int) { + return file_raystack_guardian_v1beta1_guardian_proto_rawDescGZIP(), []int{92} +} + +type GetNamespaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetNamespaceRequest) Reset() { + *x = GetNamespaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[93] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNamespaceRequest) ProtoMessage() {} + +func (x *GetNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[93] + 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 GetNamespaceRequest.ProtoReflect.Descriptor instead. +func (*GetNamespaceRequest) Descriptor() ([]byte, []int) { + return file_raystack_guardian_v1beta1_guardian_proto_rawDescGZIP(), []int{93} +} + +func (x *GetNamespaceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetNamespaceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` +} + +func (x *GetNamespaceResponse) Reset() { + *x = GetNamespaceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[94] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNamespaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNamespaceResponse) ProtoMessage() {} + +func (x *GetNamespaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[94] + 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 GetNamespaceResponse.ProtoReflect.Descriptor instead. +func (*GetNamespaceResponse) Descriptor() ([]byte, []int) { + return file_raystack_guardian_v1beta1_guardian_proto_rawDescGZIP(), []int{94} +} + +func (x *GetNamespaceResponse) GetNamespace() *Namespace { + if x != nil { + return x.Namespace + } + return nil +} + +type ListNamespacesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListNamespacesRequest) Reset() { + *x = ListNamespacesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[95] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNamespacesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNamespacesRequest) ProtoMessage() {} + +func (x *ListNamespacesRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[95] + 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 ListNamespacesRequest.ProtoReflect.Descriptor instead. +func (*ListNamespacesRequest) Descriptor() ([]byte, []int) { + return file_raystack_guardian_v1beta1_guardian_proto_rawDescGZIP(), []int{95} +} + +type ListNamespacesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespaces []*Namespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"` +} + +func (x *ListNamespacesResponse) Reset() { + *x = ListNamespacesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[96] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNamespacesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNamespacesResponse) ProtoMessage() {} + +func (x *ListNamespacesResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[96] + 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 ListNamespacesResponse.ProtoReflect.Descriptor instead. +func (*ListNamespacesResponse) Descriptor() ([]byte, []int) { + return file_raystack_guardian_v1beta1_guardian_proto_rawDescGZIP(), []int{96} +} + +func (x *ListNamespacesResponse) GetNamespaces() []*Namespace { + if x != nil { + return x.Namespaces + } + return nil +} + +type UpdateNamespaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Namespace *Namespace `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` +} + +func (x *UpdateNamespaceRequest) Reset() { + *x = UpdateNamespaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[97] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNamespaceRequest) ProtoMessage() {} + +func (x *UpdateNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[97] + 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 UpdateNamespaceRequest.ProtoReflect.Descriptor instead. +func (*UpdateNamespaceRequest) Descriptor() ([]byte, []int) { + return file_raystack_guardian_v1beta1_guardian_proto_rawDescGZIP(), []int{97} +} + +func (x *UpdateNamespaceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateNamespaceRequest) GetNamespace() *Namespace { + if x != nil { + return x.Namespace + } + return nil +} + +type UpdateNamespaceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UpdateNamespaceResponse) Reset() { + *x = UpdateNamespaceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[98] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNamespaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNamespaceResponse) ProtoMessage() {} + +func (x *UpdateNamespaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[98] + 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 UpdateNamespaceResponse.ProtoReflect.Descriptor instead. +func (*UpdateNamespaceResponse) Descriptor() ([]byte, []int) { + return file_raystack_guardian_v1beta1_guardian_proto_rawDescGZIP(), []int{98} +} + type RevokeAppealRequest_Reason struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -5850,7 +6294,7 @@ type RevokeAppealRequest_Reason struct { func (x *RevokeAppealRequest_Reason) Reset() { *x = RevokeAppealRequest_Reason{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[90] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5863,7 +6307,7 @@ func (x *RevokeAppealRequest_Reason) String() string { func (*RevokeAppealRequest_Reason) ProtoMessage() {} func (x *RevokeAppealRequest_Reason) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[90] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[99] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5900,7 +6344,7 @@ type CreateAppealRequest_Resource struct { func (x *CreateAppealRequest_Resource) Reset() { *x = CreateAppealRequest_Resource{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[91] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5913,7 +6357,7 @@ func (x *CreateAppealRequest_Resource) String() string { func (*CreateAppealRequest_Resource) ProtoMessage() {} func (x *CreateAppealRequest_Resource) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[91] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[100] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5969,7 +6413,7 @@ type UpdateApprovalRequest_Action struct { func (x *UpdateApprovalRequest_Action) Reset() { *x = UpdateApprovalRequest_Action{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[92] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5982,7 +6426,7 @@ func (x *UpdateApprovalRequest_Action) String() string { func (*UpdateApprovalRequest_Action) ProtoMessage() {} func (x *UpdateApprovalRequest_Action) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[92] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[101] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6024,7 +6468,7 @@ type ProviderConfig_AppealConfig struct { func (x *ProviderConfig_AppealConfig) Reset() { *x = ProviderConfig_AppealConfig{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[94] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6037,7 +6481,7 @@ func (x *ProviderConfig_AppealConfig) String() string { func (*ProviderConfig_AppealConfig) ProtoMessage() {} func (x *ProviderConfig_AppealConfig) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[94] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[103] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6081,7 +6525,7 @@ type ProviderConfig_ResourceConfig struct { func (x *ProviderConfig_ResourceConfig) Reset() { *x = ProviderConfig_ResourceConfig{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[95] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6094,7 +6538,7 @@ func (x *ProviderConfig_ResourceConfig) String() string { func (*ProviderConfig_ResourceConfig) ProtoMessage() {} func (x *ProviderConfig_ResourceConfig) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[95] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[104] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6152,7 +6596,7 @@ type ProviderConfig_ProviderParameter struct { func (x *ProviderConfig_ProviderParameter) Reset() { *x = ProviderConfig_ProviderParameter{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[96] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[105] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6165,7 +6609,7 @@ func (x *ProviderConfig_ProviderParameter) String() string { func (*ProviderConfig_ProviderParameter) ProtoMessage() {} func (x *ProviderConfig_ProviderParameter) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[96] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[105] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6220,7 +6664,7 @@ type Condition_MatchCondition struct { func (x *Condition_MatchCondition) Reset() { *x = Condition_MatchCondition{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[97] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[106] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6233,7 +6677,7 @@ func (x *Condition_MatchCondition) String() string { func (*Condition_MatchCondition) ProtoMessage() {} func (x *Condition_MatchCondition) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[97] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[106] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6268,7 +6712,7 @@ type PolicyAppealConfig_DurationOptions struct { func (x *PolicyAppealConfig_DurationOptions) Reset() { *x = PolicyAppealConfig_DurationOptions{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[98] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[107] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6281,7 +6725,7 @@ func (x *PolicyAppealConfig_DurationOptions) String() string { func (*PolicyAppealConfig_DurationOptions) ProtoMessage() {} func (x *PolicyAppealConfig_DurationOptions) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[98] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[107] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6325,7 +6769,7 @@ type PolicyAppealConfig_Question struct { func (x *PolicyAppealConfig_Question) Reset() { *x = PolicyAppealConfig_Question{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[99] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[108] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6338,7 +6782,7 @@ func (x *PolicyAppealConfig_Question) String() string { func (*PolicyAppealConfig_Question) ProtoMessage() {} func (x *PolicyAppealConfig_Question) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[99] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[108] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6400,7 +6844,7 @@ type Policy_ApprovalStep struct { func (x *Policy_ApprovalStep) Reset() { *x = Policy_ApprovalStep{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[100] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[109] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6413,7 +6857,7 @@ func (x *Policy_ApprovalStep) String() string { func (*Policy_ApprovalStep) ProtoMessage() {} func (x *Policy_ApprovalStep) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[100] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[109] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6497,7 +6941,7 @@ type Policy_Requirement struct { func (x *Policy_Requirement) Reset() { *x = Policy_Requirement{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[102] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6510,7 +6954,7 @@ func (x *Policy_Requirement) String() string { func (*Policy_Requirement) ProtoMessage() {} func (x *Policy_Requirement) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[102] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[111] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6553,7 +6997,7 @@ type Policy_IAM struct { func (x *Policy_IAM) Reset() { *x = Policy_IAM{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[103] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[112] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6566,7 +7010,7 @@ func (x *Policy_IAM) String() string { func (*Policy_IAM) ProtoMessage() {} func (x *Policy_IAM) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[103] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[112] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6620,7 +7064,7 @@ type Policy_Requirement_RequirementTrigger struct { func (x *Policy_Requirement_RequirementTrigger) Reset() { *x = Policy_Requirement_RequirementTrigger{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[104] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[113] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6633,7 +7077,7 @@ func (x *Policy_Requirement_RequirementTrigger) String() string { func (*Policy_Requirement_RequirementTrigger) ProtoMessage() {} func (x *Policy_Requirement_RequirementTrigger) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[104] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[113] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6712,7 +7156,7 @@ type Policy_Requirement_AdditionalAppeal struct { func (x *Policy_Requirement_AdditionalAppeal) Reset() { *x = Policy_Requirement_AdditionalAppeal{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[105] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[114] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6725,7 +7169,7 @@ func (x *Policy_Requirement_AdditionalAppeal) String() string { func (*Policy_Requirement_AdditionalAppeal) ProtoMessage() {} func (x *Policy_Requirement_AdditionalAppeal) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[105] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[114] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6784,7 +7228,7 @@ type Policy_Requirement_AdditionalAppeal_ResourceIdentifier struct { func (x *Policy_Requirement_AdditionalAppeal_ResourceIdentifier) Reset() { *x = Policy_Requirement_AdditionalAppeal_ResourceIdentifier{} if protoimpl.UnsafeEnabled { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[106] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[115] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6797,7 +7241,7 @@ func (x *Policy_Requirement_AdditionalAppeal_ResourceIdentifier) String() string func (*Policy_Requirement_AdditionalAppeal_ResourceIdentifier) ProtoMessage() {} func (x *Policy_Requirement_AdditionalAppeal_ResourceIdentifier) ProtoReflect() protoreflect.Message { - mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[106] + mi := &file_raystack_guardian_v1beta1_guardian_proto_msgTypes[115] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7899,366 +8343,452 @@ var file_raystack_guardian_v1beta1_guardian_proto_rawDesc = []byte{ 0x74, 0x79, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xa2, 0x2c, 0x0a, 0x0f, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x0d, 0x4c, 0x69, - 0x73, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x2e, 0x72, 0x61, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xf0, 0x01, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 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, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x5c, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x42, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x25, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x42, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5e, 0x0a, + 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x22, 0x6c, 0x0a, + 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x42, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x72, 0x61, 0x79, + 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x86, 0x31, 0x0a, 0x0f, 0x47, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x0d, 0x4c, + 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, + 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x0b, + 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2d, 0x2e, 0x72, 0x61, + 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x10, 0x47, - 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, - 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, - 0x12, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x99, 0x01, 0x0a, 0x0e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x30, 0x2e, - 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x3a, 0x06, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0xd7, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, - 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, - 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x60, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5a, 0x1a, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, - 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5a, 0x37, 0x1a, 0x2d, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x12, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x99, 0x01, 0x0a, 0x0e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x30, + 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x06, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x22, 0x12, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0xd7, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, + 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, + 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x60, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5a, 0x3a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5a, + 0x37, 0x3a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x2d, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2e, 0x75, 0x72, 0x6e, 0x7d, 0x3a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x96, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, - 0x2a, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xa7, 0x01, 0x0a, 0x09, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x66, 0x69, 0x67, 0x2e, 0x75, 0x72, 0x6e, 0x7d, 0x1a, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x12, 0x96, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x72, 0x6f, - 0x6c, 0x65, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x10, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x19, 0x2a, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xa7, 0x01, 0x0a, 0x09, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, - 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x69, - 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x8e, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x2f, + 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x7d, 0x2f, 0x72, + 0x6f, 0x6c, 0x65, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x10, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, + 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, + 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x8e, 0x01, 0x0a, 0x0b, 0x47, 0x65, + 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, - 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, - 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x0e, 0x4c, 0x69, - 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x72, - 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, - 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x8a, - 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, - 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, + 0x12, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x69, 0x74, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x0e, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x30, 0x2e, + 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, + 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x99, 0x01, 0x0a, 0x09, - 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2b, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x8a, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, + 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x99, 0x01, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2b, 0x2e, 0x72, 0x61, 0x79, + 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, - 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1b, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x97, 0x01, 0x0a, - 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, 0x2e, - 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, - 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x1a, 0x16, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x06, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0xc6, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, - 0x36, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1b, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x12, 0x97, 0x01, + 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2e, + 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, + 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x1a, + 0x16, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, + 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xc6, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, - 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x7d, 0x2f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, - 0x8e, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x12, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, + 0x12, 0x36, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, + 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x12, 0x35, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, + 0x12, 0x8e, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x12, 0xa0, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x23, 0x3a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x17, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, + 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x96, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x95, 0x01, + 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, + 0x73, 0x12, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, + 0x12, 0x13, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x2f, 0x61, 0x70, + 0x70, 0x65, 0x61, 0x6c, 0x73, 0x12, 0x86, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, + 0x70, 0x65, 0x61, 0x6c, 0x73, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x12, 0x85, + 0x01, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x12, 0x2b, 0x2e, 0x72, + 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x70, 0x70, 0x65, + 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x72, 0x61, 0x79, 0x73, + 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, + 0x15, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, + 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x95, 0x01, 0x0a, 0x0c, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, + 0x1a, 0x1c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x61, + 0x6c, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x8c, + 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, - 0x12, 0xa0, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, + 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x12, 0x9d, 0x01, + 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, + 0x61, 0x6c, 0x73, 0x12, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, - 0x1a, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x96, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, + 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x95, 0x01, 0x0a, - 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, - 0x12, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x70, 0x70, + 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x6d, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x8e, 0x01, + 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x12, + 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, + 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x12, 0xb6, + 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, + 0x6c, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, - 0x13, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x2f, 0x61, 0x70, 0x70, - 0x65, 0x61, 0x6c, 0x73, 0x12, 0x86, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, - 0x65, 0x61, 0x6c, 0x73, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x3a, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x70, + 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, + 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x41, + 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x49, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x3a, 0x01, + 0x2a, 0x22, 0x3e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x65, + 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x61, 0x70, 0x70, 0x72, 0x6f, + 0x76, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, + 0x73, 0x12, 0xc5, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x72, + 0x6f, 0x76, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x48, 0x2a, 0x46, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x65, + 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, + 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x61, 0x70, 0x70, 0x72, 0x6f, + 0x76, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, + 0x73, 0x2f, 0x7b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x0a, 0x4c, 0x69, + 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, + 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x91, + 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x61, 0x6e, 0x74, + 0x73, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, + 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x12, 0x85, 0x01, - 0x0a, 0x09, 0x47, 0x65, 0x74, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x12, 0x2b, 0x2e, 0x72, 0x61, + 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x2f, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, + 0x2a, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, + 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x70, 0x70, 0x65, 0x61, - 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, - 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x95, 0x01, 0x0a, 0x0c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, + 0x12, 0x14, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, + 0x32, 0x14, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x1a, - 0x1c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, - 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x8c, 0x01, - 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x12, 0x2e, + 0x61, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, + 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, + 0x1a, 0x1b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x92, 0x01, + 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x41, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x9d, 0x01, 0x0a, - 0x11, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, - 0x6c, 0x73, 0x12, 0x33, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, + 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x1a, 0x16, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x72, 0x65, 0x76, 0x6f, + 0x6b, 0x65, 0x12, 0xb6, 0x01, 0x0a, 0x18, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x47, 0x72, 0x61, + 0x6e, 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, + 0x3a, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, + 0x72, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x72, 0x61, + 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x47, 0x72, + 0x61, 0x6e, 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, + 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x98, 0x01, 0x0a, 0x0f, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, + 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01, + 0x2a, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x91, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x41, 0x70, 0x70, 0x72, - 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x6d, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x8e, 0x01, 0x0a, - 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x12, 0x2f, - 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x12, 0xb6, 0x01, - 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, - 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x22, 0x2f, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x2f, - 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x2f, 0x7b, - 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x06, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0xb7, 0x01, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x41, 0x70, - 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x49, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x22, 0x3e, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x73, 0x2f, - 0x7b, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x70, 0x70, 0x72, - 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x5f, - 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, - 0x12, 0xc5, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, - 0x76, 0x65, 0x72, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, - 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, - 0x2a, 0x46, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x70, 0x70, 0x65, 0x61, - 0x6c, 0x73, 0x2f, 0x7b, 0x61, 0x70, 0x70, 0x65, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x61, - 0x70, 0x70, 0x72, 0x6f, 0x76, 0x61, 0x6c, 0x73, 0x2f, 0x7b, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, - 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x76, 0x65, 0x72, 0x73, - 0x2f, 0x7b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, - 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, + 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x91, 0x01, - 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, - 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6d, 0x65, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x73, 0x12, 0x81, 0x01, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x2a, - 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x72, 0x61, 0x79, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, - 0x14, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, - 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x32, 0x14, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x2d, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, - 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, - 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x1a, 0x1b, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x92, 0x01, 0x0a, - 0x0c, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2e, 0x2e, - 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, + 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, + 0x12, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x0e, 0x4c, + 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x30, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x1a, 0x16, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x72, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x3a, 0x01, - 0x2a, 0x12, 0xb6, 0x01, 0x0a, 0x18, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x3a, - 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, - 0x74, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x72, 0x61, 0x79, - 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x22, - 0x16, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x2f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x3a, 0x01, 0x2a, 0x42, 0x4c, 0x5a, 0x3b, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, - 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, - 0x61, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x92, 0x41, 0x0c, 0x12, 0x07, 0x32, 0x05, - 0x30, 0x2e, 0x31, 0x2e, 0x30, 0x2a, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, + 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, + 0x9d, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x31, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x72, 0x61, 0x79, 0x73, 0x74, 0x61, 0x63, + 0x6b, 0x2e, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x1a, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, + 0x4c, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x61, + 0x79, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x67, 0x75, + 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x67, + 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x92, 0x41, + 0x0c, 0x12, 0x07, 0x32, 0x05, 0x30, 0x2e, 0x31, 0x2e, 0x30, 0x2a, 0x01, 0x01, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8273,7 +8803,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_rawDescGZIP() []byte { return file_raystack_guardian_v1beta1_guardian_proto_rawDescData } -var file_raystack_guardian_v1beta1_guardian_proto_msgTypes = make([]protoimpl.MessageInfo, 110) +var file_raystack_guardian_v1beta1_guardian_proto_msgTypes = make([]protoimpl.MessageInfo, 119) var file_raystack_guardian_v1beta1_guardian_proto_goTypes = []interface{}{ (*ListProvidersRequest)(nil), // 0: raystack.guardian.v1beta1.ListProvidersRequest (*ListProvidersResponse)(nil), // 1: raystack.guardian.v1beta1.ListProvidersResponse @@ -8365,29 +8895,38 @@ var file_raystack_guardian_v1beta1_guardian_proto_goTypes = []interface{}{ (*Resource)(nil), // 87: raystack.guardian.v1beta1.Resource (*Grant)(nil), // 88: raystack.guardian.v1beta1.Grant (*ProviderActivity)(nil), // 89: raystack.guardian.v1beta1.ProviderActivity - (*RevokeAppealRequest_Reason)(nil), // 90: raystack.guardian.v1beta1.RevokeAppealRequest.Reason - (*CreateAppealRequest_Resource)(nil), // 91: raystack.guardian.v1beta1.CreateAppealRequest.Resource - (*UpdateApprovalRequest_Action)(nil), // 92: raystack.guardian.v1beta1.UpdateApprovalRequest.Action - nil, // 93: raystack.guardian.v1beta1.ProviderConfig.LabelsEntry - (*ProviderConfig_AppealConfig)(nil), // 94: raystack.guardian.v1beta1.ProviderConfig.AppealConfig - (*ProviderConfig_ResourceConfig)(nil), // 95: raystack.guardian.v1beta1.ProviderConfig.ResourceConfig - (*ProviderConfig_ProviderParameter)(nil), // 96: raystack.guardian.v1beta1.ProviderConfig.ProviderParameter - (*Condition_MatchCondition)(nil), // 97: raystack.guardian.v1beta1.Condition.MatchCondition - (*PolicyAppealConfig_DurationOptions)(nil), // 98: raystack.guardian.v1beta1.PolicyAppealConfig.DurationOptions - (*PolicyAppealConfig_Question)(nil), // 99: raystack.guardian.v1beta1.PolicyAppealConfig.Question - (*Policy_ApprovalStep)(nil), // 100: raystack.guardian.v1beta1.Policy.ApprovalStep - nil, // 101: raystack.guardian.v1beta1.Policy.LabelsEntry - (*Policy_Requirement)(nil), // 102: raystack.guardian.v1beta1.Policy.Requirement - (*Policy_IAM)(nil), // 103: raystack.guardian.v1beta1.Policy.IAM - (*Policy_Requirement_RequirementTrigger)(nil), // 104: raystack.guardian.v1beta1.Policy.Requirement.RequirementTrigger - (*Policy_Requirement_AdditionalAppeal)(nil), // 105: raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal - (*Policy_Requirement_AdditionalAppeal_ResourceIdentifier)(nil), // 106: raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal.ResourceIdentifier - nil, // 107: raystack.guardian.v1beta1.Policy.IAM.SchemaEntry - nil, // 108: raystack.guardian.v1beta1.Appeal.LabelsEntry - nil, // 109: raystack.guardian.v1beta1.Resource.LabelsEntry - (*timestamppb.Timestamp)(nil), // 110: google.protobuf.Timestamp - (*structpb.Value)(nil), // 111: google.protobuf.Value - (*structpb.Struct)(nil), // 112: google.protobuf.Struct + (*Namespace)(nil), // 90: raystack.guardian.v1beta1.Namespace + (*CreateNamespaceRequest)(nil), // 91: raystack.guardian.v1beta1.CreateNamespaceRequest + (*CreateNamespaceResponse)(nil), // 92: raystack.guardian.v1beta1.CreateNamespaceResponse + (*GetNamespaceRequest)(nil), // 93: raystack.guardian.v1beta1.GetNamespaceRequest + (*GetNamespaceResponse)(nil), // 94: raystack.guardian.v1beta1.GetNamespaceResponse + (*ListNamespacesRequest)(nil), // 95: raystack.guardian.v1beta1.ListNamespacesRequest + (*ListNamespacesResponse)(nil), // 96: raystack.guardian.v1beta1.ListNamespacesResponse + (*UpdateNamespaceRequest)(nil), // 97: raystack.guardian.v1beta1.UpdateNamespaceRequest + (*UpdateNamespaceResponse)(nil), // 98: raystack.guardian.v1beta1.UpdateNamespaceResponse + (*RevokeAppealRequest_Reason)(nil), // 99: raystack.guardian.v1beta1.RevokeAppealRequest.Reason + (*CreateAppealRequest_Resource)(nil), // 100: raystack.guardian.v1beta1.CreateAppealRequest.Resource + (*UpdateApprovalRequest_Action)(nil), // 101: raystack.guardian.v1beta1.UpdateApprovalRequest.Action + nil, // 102: raystack.guardian.v1beta1.ProviderConfig.LabelsEntry + (*ProviderConfig_AppealConfig)(nil), // 103: raystack.guardian.v1beta1.ProviderConfig.AppealConfig + (*ProviderConfig_ResourceConfig)(nil), // 104: raystack.guardian.v1beta1.ProviderConfig.ResourceConfig + (*ProviderConfig_ProviderParameter)(nil), // 105: raystack.guardian.v1beta1.ProviderConfig.ProviderParameter + (*Condition_MatchCondition)(nil), // 106: raystack.guardian.v1beta1.Condition.MatchCondition + (*PolicyAppealConfig_DurationOptions)(nil), // 107: raystack.guardian.v1beta1.PolicyAppealConfig.DurationOptions + (*PolicyAppealConfig_Question)(nil), // 108: raystack.guardian.v1beta1.PolicyAppealConfig.Question + (*Policy_ApprovalStep)(nil), // 109: raystack.guardian.v1beta1.Policy.ApprovalStep + nil, // 110: raystack.guardian.v1beta1.Policy.LabelsEntry + (*Policy_Requirement)(nil), // 111: raystack.guardian.v1beta1.Policy.Requirement + (*Policy_IAM)(nil), // 112: raystack.guardian.v1beta1.Policy.IAM + (*Policy_Requirement_RequirementTrigger)(nil), // 113: raystack.guardian.v1beta1.Policy.Requirement.RequirementTrigger + (*Policy_Requirement_AdditionalAppeal)(nil), // 114: raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal + (*Policy_Requirement_AdditionalAppeal_ResourceIdentifier)(nil), // 115: raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal.ResourceIdentifier + nil, // 116: raystack.guardian.v1beta1.Policy.IAM.SchemaEntry + nil, // 117: raystack.guardian.v1beta1.Appeal.LabelsEntry + nil, // 118: raystack.guardian.v1beta1.Resource.LabelsEntry + (*timestamppb.Timestamp)(nil), // 119: google.protobuf.Timestamp + (*structpb.Value)(nil), // 120: google.protobuf.Value + (*structpb.Struct)(nil), // 121: google.protobuf.Struct } var file_raystack_guardian_v1beta1_guardian_proto_depIdxs = []int32{ 79, // 0: raystack.guardian.v1beta1.ListProvidersResponse.providers:type_name -> raystack.guardian.v1beta1.Provider @@ -8399,12 +8938,12 @@ var file_raystack_guardian_v1beta1_guardian_proto_depIdxs = []int32{ 79, // 6: raystack.guardian.v1beta1.UpdateProviderResponse.provider:type_name -> raystack.guardian.v1beta1.Provider 88, // 7: raystack.guardian.v1beta1.ImportGrantsFromProviderResponse.grants:type_name -> raystack.guardian.v1beta1.Grant 76, // 8: raystack.guardian.v1beta1.ListRolesResponse.roles:type_name -> raystack.guardian.v1beta1.Role - 110, // 9: raystack.guardian.v1beta1.ImportActivitiesRequest.timestamp_gte:type_name -> google.protobuf.Timestamp - 110, // 10: raystack.guardian.v1beta1.ImportActivitiesRequest.timestamp_lte:type_name -> google.protobuf.Timestamp + 119, // 9: raystack.guardian.v1beta1.ImportActivitiesRequest.timestamp_gte:type_name -> google.protobuf.Timestamp + 119, // 10: raystack.guardian.v1beta1.ImportActivitiesRequest.timestamp_lte:type_name -> google.protobuf.Timestamp 89, // 11: raystack.guardian.v1beta1.ImportActivitiesResponse.activities:type_name -> raystack.guardian.v1beta1.ProviderActivity 89, // 12: raystack.guardian.v1beta1.GetActivityResponse.activity:type_name -> raystack.guardian.v1beta1.ProviderActivity - 110, // 13: raystack.guardian.v1beta1.ListActivitiesRequest.timestamp_gte:type_name -> google.protobuf.Timestamp - 110, // 14: raystack.guardian.v1beta1.ListActivitiesRequest.timestamp_lte:type_name -> google.protobuf.Timestamp + 119, // 13: raystack.guardian.v1beta1.ListActivitiesRequest.timestamp_gte:type_name -> google.protobuf.Timestamp + 119, // 14: raystack.guardian.v1beta1.ListActivitiesRequest.timestamp_lte:type_name -> google.protobuf.Timestamp 89, // 15: raystack.guardian.v1beta1.ListActivitiesResponse.activities:type_name -> raystack.guardian.v1beta1.ProviderActivity 83, // 16: raystack.guardian.v1beta1.ListPoliciesResponse.policies:type_name -> raystack.guardian.v1beta1.Policy 82, // 17: raystack.guardian.v1beta1.GetPolicyPreferencesResponse.appeal:type_name -> raystack.guardian.v1beta1.PolicyAppealConfig @@ -8421,14 +8960,14 @@ var file_raystack_guardian_v1beta1_guardian_proto_depIdxs = []int32{ 85, // 28: raystack.guardian.v1beta1.ListAppealsResponse.appeals:type_name -> raystack.guardian.v1beta1.Appeal 85, // 29: raystack.guardian.v1beta1.GetAppealResponse.appeal:type_name -> raystack.guardian.v1beta1.Appeal 85, // 30: raystack.guardian.v1beta1.CancelAppealResponse.appeal:type_name -> raystack.guardian.v1beta1.Appeal - 90, // 31: raystack.guardian.v1beta1.RevokeAppealRequest.reason:type_name -> raystack.guardian.v1beta1.RevokeAppealRequest.Reason + 99, // 31: raystack.guardian.v1beta1.RevokeAppealRequest.reason:type_name -> raystack.guardian.v1beta1.RevokeAppealRequest.Reason 85, // 32: raystack.guardian.v1beta1.RevokeAppealResponse.appeal:type_name -> raystack.guardian.v1beta1.Appeal 85, // 33: raystack.guardian.v1beta1.RevokeAppealsResponse.appeals:type_name -> raystack.guardian.v1beta1.Appeal - 91, // 34: raystack.guardian.v1beta1.CreateAppealRequest.resources:type_name -> raystack.guardian.v1beta1.CreateAppealRequest.Resource + 100, // 34: raystack.guardian.v1beta1.CreateAppealRequest.resources:type_name -> raystack.guardian.v1beta1.CreateAppealRequest.Resource 85, // 35: raystack.guardian.v1beta1.CreateAppealResponse.appeals:type_name -> raystack.guardian.v1beta1.Appeal 86, // 36: raystack.guardian.v1beta1.ListUserApprovalsResponse.approvals:type_name -> raystack.guardian.v1beta1.Approval 86, // 37: raystack.guardian.v1beta1.ListApprovalsResponse.approvals:type_name -> raystack.guardian.v1beta1.Approval - 92, // 38: raystack.guardian.v1beta1.UpdateApprovalRequest.action:type_name -> raystack.guardian.v1beta1.UpdateApprovalRequest.Action + 101, // 38: raystack.guardian.v1beta1.UpdateApprovalRequest.action:type_name -> raystack.guardian.v1beta1.UpdateApprovalRequest.Action 85, // 39: raystack.guardian.v1beta1.UpdateApprovalResponse.appeal:type_name -> raystack.guardian.v1beta1.Appeal 85, // 40: raystack.guardian.v1beta1.AddApproverResponse.appeal:type_name -> raystack.guardian.v1beta1.Appeal 85, // 41: raystack.guardian.v1beta1.DeleteApproverResponse.appeal:type_name -> raystack.guardian.v1beta1.Appeal @@ -8438,144 +8977,159 @@ var file_raystack_guardian_v1beta1_guardian_proto_depIdxs = []int32{ 88, // 45: raystack.guardian.v1beta1.UpdateGrantResponse.grant:type_name -> raystack.guardian.v1beta1.Grant 88, // 46: raystack.guardian.v1beta1.RevokeGrantResponse.grant:type_name -> raystack.guardian.v1beta1.Grant 88, // 47: raystack.guardian.v1beta1.RevokeGrantsResponse.grants:type_name -> raystack.guardian.v1beta1.Grant - 111, // 48: raystack.guardian.v1beta1.Role.permissions:type_name -> google.protobuf.Value - 93, // 49: raystack.guardian.v1beta1.ProviderConfig.labels:type_name -> raystack.guardian.v1beta1.ProviderConfig.LabelsEntry - 111, // 50: raystack.guardian.v1beta1.ProviderConfig.credentials:type_name -> google.protobuf.Value - 94, // 51: raystack.guardian.v1beta1.ProviderConfig.appeal:type_name -> raystack.guardian.v1beta1.ProviderConfig.AppealConfig - 95, // 52: raystack.guardian.v1beta1.ProviderConfig.resources:type_name -> raystack.guardian.v1beta1.ProviderConfig.ResourceConfig - 96, // 53: raystack.guardian.v1beta1.ProviderConfig.parameters:type_name -> raystack.guardian.v1beta1.ProviderConfig.ProviderParameter + 120, // 48: raystack.guardian.v1beta1.Role.permissions:type_name -> google.protobuf.Value + 102, // 49: raystack.guardian.v1beta1.ProviderConfig.labels:type_name -> raystack.guardian.v1beta1.ProviderConfig.LabelsEntry + 120, // 50: raystack.guardian.v1beta1.ProviderConfig.credentials:type_name -> google.protobuf.Value + 103, // 51: raystack.guardian.v1beta1.ProviderConfig.appeal:type_name -> raystack.guardian.v1beta1.ProviderConfig.AppealConfig + 104, // 52: raystack.guardian.v1beta1.ProviderConfig.resources:type_name -> raystack.guardian.v1beta1.ProviderConfig.ResourceConfig + 105, // 53: raystack.guardian.v1beta1.ProviderConfig.parameters:type_name -> raystack.guardian.v1beta1.ProviderConfig.ProviderParameter 78, // 54: raystack.guardian.v1beta1.Provider.config:type_name -> raystack.guardian.v1beta1.ProviderConfig - 110, // 55: raystack.guardian.v1beta1.Provider.created_at:type_name -> google.protobuf.Timestamp - 110, // 56: raystack.guardian.v1beta1.Provider.updated_at:type_name -> google.protobuf.Timestamp - 97, // 57: raystack.guardian.v1beta1.Condition.match:type_name -> raystack.guardian.v1beta1.Condition.MatchCondition - 98, // 58: raystack.guardian.v1beta1.PolicyAppealConfig.duration_options:type_name -> raystack.guardian.v1beta1.PolicyAppealConfig.DurationOptions - 99, // 59: raystack.guardian.v1beta1.PolicyAppealConfig.questions:type_name -> raystack.guardian.v1beta1.PolicyAppealConfig.Question - 100, // 60: raystack.guardian.v1beta1.Policy.steps:type_name -> raystack.guardian.v1beta1.Policy.ApprovalStep - 101, // 61: raystack.guardian.v1beta1.Policy.labels:type_name -> raystack.guardian.v1beta1.Policy.LabelsEntry - 110, // 62: raystack.guardian.v1beta1.Policy.created_at:type_name -> google.protobuf.Timestamp - 110, // 63: raystack.guardian.v1beta1.Policy.updated_at:type_name -> google.protobuf.Timestamp - 102, // 64: raystack.guardian.v1beta1.Policy.requirements:type_name -> raystack.guardian.v1beta1.Policy.Requirement - 103, // 65: raystack.guardian.v1beta1.Policy.iam:type_name -> raystack.guardian.v1beta1.Policy.IAM + 119, // 55: raystack.guardian.v1beta1.Provider.created_at:type_name -> google.protobuf.Timestamp + 119, // 56: raystack.guardian.v1beta1.Provider.updated_at:type_name -> google.protobuf.Timestamp + 106, // 57: raystack.guardian.v1beta1.Condition.match:type_name -> raystack.guardian.v1beta1.Condition.MatchCondition + 107, // 58: raystack.guardian.v1beta1.PolicyAppealConfig.duration_options:type_name -> raystack.guardian.v1beta1.PolicyAppealConfig.DurationOptions + 108, // 59: raystack.guardian.v1beta1.PolicyAppealConfig.questions:type_name -> raystack.guardian.v1beta1.PolicyAppealConfig.Question + 109, // 60: raystack.guardian.v1beta1.Policy.steps:type_name -> raystack.guardian.v1beta1.Policy.ApprovalStep + 110, // 61: raystack.guardian.v1beta1.Policy.labels:type_name -> raystack.guardian.v1beta1.Policy.LabelsEntry + 119, // 62: raystack.guardian.v1beta1.Policy.created_at:type_name -> google.protobuf.Timestamp + 119, // 63: raystack.guardian.v1beta1.Policy.updated_at:type_name -> google.protobuf.Timestamp + 111, // 64: raystack.guardian.v1beta1.Policy.requirements:type_name -> raystack.guardian.v1beta1.Policy.Requirement + 112, // 65: raystack.guardian.v1beta1.Policy.iam:type_name -> raystack.guardian.v1beta1.Policy.IAM 82, // 66: raystack.guardian.v1beta1.Policy.appeal:type_name -> raystack.guardian.v1beta1.PolicyAppealConfig - 110, // 67: raystack.guardian.v1beta1.AppealOptions.expiration_date:type_name -> google.protobuf.Timestamp + 119, // 67: raystack.guardian.v1beta1.AppealOptions.expiration_date:type_name -> google.protobuf.Timestamp 84, // 68: raystack.guardian.v1beta1.Appeal.options:type_name -> raystack.guardian.v1beta1.AppealOptions - 108, // 69: raystack.guardian.v1beta1.Appeal.labels:type_name -> raystack.guardian.v1beta1.Appeal.LabelsEntry + 117, // 69: raystack.guardian.v1beta1.Appeal.labels:type_name -> raystack.guardian.v1beta1.Appeal.LabelsEntry 87, // 70: raystack.guardian.v1beta1.Appeal.resource:type_name -> raystack.guardian.v1beta1.Resource 86, // 71: raystack.guardian.v1beta1.Appeal.approvals:type_name -> raystack.guardian.v1beta1.Approval - 110, // 72: raystack.guardian.v1beta1.Appeal.created_at:type_name -> google.protobuf.Timestamp - 110, // 73: raystack.guardian.v1beta1.Appeal.updated_at:type_name -> google.protobuf.Timestamp - 112, // 74: raystack.guardian.v1beta1.Appeal.details:type_name -> google.protobuf.Struct - 111, // 75: raystack.guardian.v1beta1.Appeal.creator:type_name -> google.protobuf.Value + 119, // 72: raystack.guardian.v1beta1.Appeal.created_at:type_name -> google.protobuf.Timestamp + 119, // 73: raystack.guardian.v1beta1.Appeal.updated_at:type_name -> google.protobuf.Timestamp + 121, // 74: raystack.guardian.v1beta1.Appeal.details:type_name -> google.protobuf.Struct + 120, // 75: raystack.guardian.v1beta1.Appeal.creator:type_name -> google.protobuf.Value 88, // 76: raystack.guardian.v1beta1.Appeal.grant:type_name -> raystack.guardian.v1beta1.Grant 85, // 77: raystack.guardian.v1beta1.Approval.appeal:type_name -> raystack.guardian.v1beta1.Appeal - 110, // 78: raystack.guardian.v1beta1.Approval.created_at:type_name -> google.protobuf.Timestamp - 110, // 79: raystack.guardian.v1beta1.Approval.updated_at:type_name -> google.protobuf.Timestamp - 112, // 80: raystack.guardian.v1beta1.Resource.details:type_name -> google.protobuf.Struct - 109, // 81: raystack.guardian.v1beta1.Resource.labels:type_name -> raystack.guardian.v1beta1.Resource.LabelsEntry - 110, // 82: raystack.guardian.v1beta1.Resource.created_at:type_name -> google.protobuf.Timestamp - 110, // 83: raystack.guardian.v1beta1.Resource.updated_at:type_name -> google.protobuf.Timestamp + 119, // 78: raystack.guardian.v1beta1.Approval.created_at:type_name -> google.protobuf.Timestamp + 119, // 79: raystack.guardian.v1beta1.Approval.updated_at:type_name -> google.protobuf.Timestamp + 121, // 80: raystack.guardian.v1beta1.Resource.details:type_name -> google.protobuf.Struct + 118, // 81: raystack.guardian.v1beta1.Resource.labels:type_name -> raystack.guardian.v1beta1.Resource.LabelsEntry + 119, // 82: raystack.guardian.v1beta1.Resource.created_at:type_name -> google.protobuf.Timestamp + 119, // 83: raystack.guardian.v1beta1.Resource.updated_at:type_name -> google.protobuf.Timestamp 87, // 84: raystack.guardian.v1beta1.Resource.children:type_name -> raystack.guardian.v1beta1.Resource - 110, // 85: raystack.guardian.v1beta1.Grant.expiration_date:type_name -> google.protobuf.Timestamp - 110, // 86: raystack.guardian.v1beta1.Grant.revoked_at:type_name -> google.protobuf.Timestamp - 110, // 87: raystack.guardian.v1beta1.Grant.created_at:type_name -> google.protobuf.Timestamp - 110, // 88: raystack.guardian.v1beta1.Grant.updated_at:type_name -> google.protobuf.Timestamp + 119, // 85: raystack.guardian.v1beta1.Grant.expiration_date:type_name -> google.protobuf.Timestamp + 119, // 86: raystack.guardian.v1beta1.Grant.revoked_at:type_name -> google.protobuf.Timestamp + 119, // 87: raystack.guardian.v1beta1.Grant.created_at:type_name -> google.protobuf.Timestamp + 119, // 88: raystack.guardian.v1beta1.Grant.updated_at:type_name -> google.protobuf.Timestamp 87, // 89: raystack.guardian.v1beta1.Grant.resource:type_name -> raystack.guardian.v1beta1.Resource 85, // 90: raystack.guardian.v1beta1.Grant.appeal:type_name -> raystack.guardian.v1beta1.Appeal - 110, // 91: raystack.guardian.v1beta1.ProviderActivity.timestamp:type_name -> google.protobuf.Timestamp - 112, // 92: raystack.guardian.v1beta1.ProviderActivity.metadata:type_name -> google.protobuf.Struct - 110, // 93: raystack.guardian.v1beta1.ProviderActivity.created_at:type_name -> google.protobuf.Timestamp + 119, // 91: raystack.guardian.v1beta1.ProviderActivity.timestamp:type_name -> google.protobuf.Timestamp + 121, // 92: raystack.guardian.v1beta1.ProviderActivity.metadata:type_name -> google.protobuf.Struct + 119, // 93: raystack.guardian.v1beta1.ProviderActivity.created_at:type_name -> google.protobuf.Timestamp 79, // 94: raystack.guardian.v1beta1.ProviderActivity.provider:type_name -> raystack.guardian.v1beta1.Provider 87, // 95: raystack.guardian.v1beta1.ProviderActivity.resource:type_name -> raystack.guardian.v1beta1.Resource - 112, // 96: raystack.guardian.v1beta1.CreateAppealRequest.Resource.options:type_name -> google.protobuf.Struct - 112, // 97: raystack.guardian.v1beta1.CreateAppealRequest.Resource.details:type_name -> google.protobuf.Struct - 77, // 98: raystack.guardian.v1beta1.ProviderConfig.ResourceConfig.policy:type_name -> raystack.guardian.v1beta1.PolicyConfig - 76, // 99: raystack.guardian.v1beta1.ProviderConfig.ResourceConfig.roles:type_name -> raystack.guardian.v1beta1.Role - 111, // 100: raystack.guardian.v1beta1.Condition.MatchCondition.eq:type_name -> google.protobuf.Value - 104, // 101: raystack.guardian.v1beta1.Policy.Requirement.on:type_name -> raystack.guardian.v1beta1.Policy.Requirement.RequirementTrigger - 105, // 102: raystack.guardian.v1beta1.Policy.Requirement.appeals:type_name -> raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal - 111, // 103: raystack.guardian.v1beta1.Policy.IAM.config:type_name -> google.protobuf.Value - 107, // 104: raystack.guardian.v1beta1.Policy.IAM.schema:type_name -> raystack.guardian.v1beta1.Policy.IAM.SchemaEntry - 81, // 105: raystack.guardian.v1beta1.Policy.Requirement.RequirementTrigger.conditions:type_name -> raystack.guardian.v1beta1.Condition - 106, // 106: raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal.resource:type_name -> raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal.ResourceIdentifier - 84, // 107: raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal.options:type_name -> raystack.guardian.v1beta1.AppealOptions - 77, // 108: raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal.policy:type_name -> raystack.guardian.v1beta1.PolicyConfig - 0, // 109: raystack.guardian.v1beta1.GuardianService.ListProviders:input_type -> raystack.guardian.v1beta1.ListProvidersRequest - 2, // 110: raystack.guardian.v1beta1.GuardianService.GetProvider:input_type -> raystack.guardian.v1beta1.GetProviderRequest - 4, // 111: raystack.guardian.v1beta1.GuardianService.GetProviderTypes:input_type -> raystack.guardian.v1beta1.GetProviderTypesRequest - 6, // 112: raystack.guardian.v1beta1.GuardianService.CreateProvider:input_type -> raystack.guardian.v1beta1.CreateProviderRequest - 8, // 113: raystack.guardian.v1beta1.GuardianService.UpdateProvider:input_type -> raystack.guardian.v1beta1.UpdateProviderRequest - 10, // 114: raystack.guardian.v1beta1.GuardianService.DeleteProvider:input_type -> raystack.guardian.v1beta1.DeleteProviderRequest - 14, // 115: raystack.guardian.v1beta1.GuardianService.ListRoles:input_type -> raystack.guardian.v1beta1.ListRolesRequest - 16, // 116: raystack.guardian.v1beta1.GuardianService.ImportActivities:input_type -> raystack.guardian.v1beta1.ImportActivitiesRequest - 18, // 117: raystack.guardian.v1beta1.GuardianService.GetActivity:input_type -> raystack.guardian.v1beta1.GetActivityRequest - 20, // 118: raystack.guardian.v1beta1.GuardianService.ListActivities:input_type -> raystack.guardian.v1beta1.ListActivitiesRequest - 22, // 119: raystack.guardian.v1beta1.GuardianService.ListPolicies:input_type -> raystack.guardian.v1beta1.ListPoliciesRequest - 24, // 120: raystack.guardian.v1beta1.GuardianService.GetPolicy:input_type -> raystack.guardian.v1beta1.GetPolicyRequest - 28, // 121: raystack.guardian.v1beta1.GuardianService.CreatePolicy:input_type -> raystack.guardian.v1beta1.CreatePolicyRequest - 30, // 122: raystack.guardian.v1beta1.GuardianService.UpdatePolicy:input_type -> raystack.guardian.v1beta1.UpdatePolicyRequest - 25, // 123: raystack.guardian.v1beta1.GuardianService.GetPolicyPreferences:input_type -> raystack.guardian.v1beta1.GetPolicyPreferencesRequest - 32, // 124: raystack.guardian.v1beta1.GuardianService.ListResources:input_type -> raystack.guardian.v1beta1.ListResourcesRequest - 34, // 125: raystack.guardian.v1beta1.GuardianService.GetResource:input_type -> raystack.guardian.v1beta1.GetResourceRequest - 36, // 126: raystack.guardian.v1beta1.GuardianService.UpdateResource:input_type -> raystack.guardian.v1beta1.UpdateResourceRequest - 38, // 127: raystack.guardian.v1beta1.GuardianService.DeleteResource:input_type -> raystack.guardian.v1beta1.DeleteResourceRequest - 40, // 128: raystack.guardian.v1beta1.GuardianService.ListUserAppeals:input_type -> raystack.guardian.v1beta1.ListUserAppealsRequest - 42, // 129: raystack.guardian.v1beta1.GuardianService.ListAppeals:input_type -> raystack.guardian.v1beta1.ListAppealsRequest - 44, // 130: raystack.guardian.v1beta1.GuardianService.GetAppeal:input_type -> raystack.guardian.v1beta1.GetAppealRequest - 46, // 131: raystack.guardian.v1beta1.GuardianService.CancelAppeal:input_type -> raystack.guardian.v1beta1.CancelAppealRequest - 52, // 132: raystack.guardian.v1beta1.GuardianService.CreateAppeal:input_type -> raystack.guardian.v1beta1.CreateAppealRequest - 54, // 133: raystack.guardian.v1beta1.GuardianService.ListUserApprovals:input_type -> raystack.guardian.v1beta1.ListUserApprovalsRequest - 56, // 134: raystack.guardian.v1beta1.GuardianService.ListApprovals:input_type -> raystack.guardian.v1beta1.ListApprovalsRequest - 58, // 135: raystack.guardian.v1beta1.GuardianService.UpdateApproval:input_type -> raystack.guardian.v1beta1.UpdateApprovalRequest - 60, // 136: raystack.guardian.v1beta1.GuardianService.AddApprover:input_type -> raystack.guardian.v1beta1.AddApproverRequest - 62, // 137: raystack.guardian.v1beta1.GuardianService.DeleteApprover:input_type -> raystack.guardian.v1beta1.DeleteApproverRequest - 64, // 138: raystack.guardian.v1beta1.GuardianService.ListGrants:input_type -> raystack.guardian.v1beta1.ListGrantsRequest - 66, // 139: raystack.guardian.v1beta1.GuardianService.ListUserGrants:input_type -> raystack.guardian.v1beta1.ListUserGrantsRequest - 68, // 140: raystack.guardian.v1beta1.GuardianService.GetGrant:input_type -> raystack.guardian.v1beta1.GetGrantRequest - 70, // 141: raystack.guardian.v1beta1.GuardianService.UpdateGrant:input_type -> raystack.guardian.v1beta1.UpdateGrantRequest - 72, // 142: raystack.guardian.v1beta1.GuardianService.RevokeGrant:input_type -> raystack.guardian.v1beta1.RevokeGrantRequest - 74, // 143: raystack.guardian.v1beta1.GuardianService.RevokeGrants:input_type -> raystack.guardian.v1beta1.RevokeGrantsRequest - 12, // 144: raystack.guardian.v1beta1.GuardianService.ImportGrantsFromProvider:input_type -> raystack.guardian.v1beta1.ImportGrantsFromProviderRequest - 1, // 145: raystack.guardian.v1beta1.GuardianService.ListProviders:output_type -> raystack.guardian.v1beta1.ListProvidersResponse - 3, // 146: raystack.guardian.v1beta1.GuardianService.GetProvider:output_type -> raystack.guardian.v1beta1.GetProviderResponse - 5, // 147: raystack.guardian.v1beta1.GuardianService.GetProviderTypes:output_type -> raystack.guardian.v1beta1.GetProviderTypesResponse - 7, // 148: raystack.guardian.v1beta1.GuardianService.CreateProvider:output_type -> raystack.guardian.v1beta1.CreateProviderResponse - 9, // 149: raystack.guardian.v1beta1.GuardianService.UpdateProvider:output_type -> raystack.guardian.v1beta1.UpdateProviderResponse - 11, // 150: raystack.guardian.v1beta1.GuardianService.DeleteProvider:output_type -> raystack.guardian.v1beta1.DeleteProviderResponse - 15, // 151: raystack.guardian.v1beta1.GuardianService.ListRoles:output_type -> raystack.guardian.v1beta1.ListRolesResponse - 17, // 152: raystack.guardian.v1beta1.GuardianService.ImportActivities:output_type -> raystack.guardian.v1beta1.ImportActivitiesResponse - 19, // 153: raystack.guardian.v1beta1.GuardianService.GetActivity:output_type -> raystack.guardian.v1beta1.GetActivityResponse - 21, // 154: raystack.guardian.v1beta1.GuardianService.ListActivities:output_type -> raystack.guardian.v1beta1.ListActivitiesResponse - 23, // 155: raystack.guardian.v1beta1.GuardianService.ListPolicies:output_type -> raystack.guardian.v1beta1.ListPoliciesResponse - 27, // 156: raystack.guardian.v1beta1.GuardianService.GetPolicy:output_type -> raystack.guardian.v1beta1.GetPolicyResponse - 29, // 157: raystack.guardian.v1beta1.GuardianService.CreatePolicy:output_type -> raystack.guardian.v1beta1.CreatePolicyResponse - 31, // 158: raystack.guardian.v1beta1.GuardianService.UpdatePolicy:output_type -> raystack.guardian.v1beta1.UpdatePolicyResponse - 26, // 159: raystack.guardian.v1beta1.GuardianService.GetPolicyPreferences:output_type -> raystack.guardian.v1beta1.GetPolicyPreferencesResponse - 33, // 160: raystack.guardian.v1beta1.GuardianService.ListResources:output_type -> raystack.guardian.v1beta1.ListResourcesResponse - 35, // 161: raystack.guardian.v1beta1.GuardianService.GetResource:output_type -> raystack.guardian.v1beta1.GetResourceResponse - 37, // 162: raystack.guardian.v1beta1.GuardianService.UpdateResource:output_type -> raystack.guardian.v1beta1.UpdateResourceResponse - 39, // 163: raystack.guardian.v1beta1.GuardianService.DeleteResource:output_type -> raystack.guardian.v1beta1.DeleteResourceResponse - 41, // 164: raystack.guardian.v1beta1.GuardianService.ListUserAppeals:output_type -> raystack.guardian.v1beta1.ListUserAppealsResponse - 43, // 165: raystack.guardian.v1beta1.GuardianService.ListAppeals:output_type -> raystack.guardian.v1beta1.ListAppealsResponse - 45, // 166: raystack.guardian.v1beta1.GuardianService.GetAppeal:output_type -> raystack.guardian.v1beta1.GetAppealResponse - 47, // 167: raystack.guardian.v1beta1.GuardianService.CancelAppeal:output_type -> raystack.guardian.v1beta1.CancelAppealResponse - 53, // 168: raystack.guardian.v1beta1.GuardianService.CreateAppeal:output_type -> raystack.guardian.v1beta1.CreateAppealResponse - 55, // 169: raystack.guardian.v1beta1.GuardianService.ListUserApprovals:output_type -> raystack.guardian.v1beta1.ListUserApprovalsResponse - 57, // 170: raystack.guardian.v1beta1.GuardianService.ListApprovals:output_type -> raystack.guardian.v1beta1.ListApprovalsResponse - 59, // 171: raystack.guardian.v1beta1.GuardianService.UpdateApproval:output_type -> raystack.guardian.v1beta1.UpdateApprovalResponse - 61, // 172: raystack.guardian.v1beta1.GuardianService.AddApprover:output_type -> raystack.guardian.v1beta1.AddApproverResponse - 63, // 173: raystack.guardian.v1beta1.GuardianService.DeleteApprover:output_type -> raystack.guardian.v1beta1.DeleteApproverResponse - 65, // 174: raystack.guardian.v1beta1.GuardianService.ListGrants:output_type -> raystack.guardian.v1beta1.ListGrantsResponse - 67, // 175: raystack.guardian.v1beta1.GuardianService.ListUserGrants:output_type -> raystack.guardian.v1beta1.ListUserGrantsResponse - 69, // 176: raystack.guardian.v1beta1.GuardianService.GetGrant:output_type -> raystack.guardian.v1beta1.GetGrantResponse - 71, // 177: raystack.guardian.v1beta1.GuardianService.UpdateGrant:output_type -> raystack.guardian.v1beta1.UpdateGrantResponse - 73, // 178: raystack.guardian.v1beta1.GuardianService.RevokeGrant:output_type -> raystack.guardian.v1beta1.RevokeGrantResponse - 75, // 179: raystack.guardian.v1beta1.GuardianService.RevokeGrants:output_type -> raystack.guardian.v1beta1.RevokeGrantsResponse - 13, // 180: raystack.guardian.v1beta1.GuardianService.ImportGrantsFromProvider:output_type -> raystack.guardian.v1beta1.ImportGrantsFromProviderResponse - 145, // [145:181] is the sub-list for method output_type - 109, // [109:145] is the sub-list for method input_type - 109, // [109:109] is the sub-list for extension type_name - 109, // [109:109] is the sub-list for extension extendee - 0, // [0:109] is the sub-list for field type_name + 121, // 96: raystack.guardian.v1beta1.Namespace.metadata:type_name -> google.protobuf.Struct + 119, // 97: raystack.guardian.v1beta1.Namespace.created_at:type_name -> google.protobuf.Timestamp + 119, // 98: raystack.guardian.v1beta1.Namespace.updated_at:type_name -> google.protobuf.Timestamp + 90, // 99: raystack.guardian.v1beta1.CreateNamespaceRequest.namespace:type_name -> raystack.guardian.v1beta1.Namespace + 90, // 100: raystack.guardian.v1beta1.GetNamespaceResponse.namespace:type_name -> raystack.guardian.v1beta1.Namespace + 90, // 101: raystack.guardian.v1beta1.ListNamespacesResponse.namespaces:type_name -> raystack.guardian.v1beta1.Namespace + 90, // 102: raystack.guardian.v1beta1.UpdateNamespaceRequest.namespace:type_name -> raystack.guardian.v1beta1.Namespace + 121, // 103: raystack.guardian.v1beta1.CreateAppealRequest.Resource.options:type_name -> google.protobuf.Struct + 121, // 104: raystack.guardian.v1beta1.CreateAppealRequest.Resource.details:type_name -> google.protobuf.Struct + 77, // 105: raystack.guardian.v1beta1.ProviderConfig.ResourceConfig.policy:type_name -> raystack.guardian.v1beta1.PolicyConfig + 76, // 106: raystack.guardian.v1beta1.ProviderConfig.ResourceConfig.roles:type_name -> raystack.guardian.v1beta1.Role + 120, // 107: raystack.guardian.v1beta1.Condition.MatchCondition.eq:type_name -> google.protobuf.Value + 113, // 108: raystack.guardian.v1beta1.Policy.Requirement.on:type_name -> raystack.guardian.v1beta1.Policy.Requirement.RequirementTrigger + 114, // 109: raystack.guardian.v1beta1.Policy.Requirement.appeals:type_name -> raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal + 120, // 110: raystack.guardian.v1beta1.Policy.IAM.config:type_name -> google.protobuf.Value + 116, // 111: raystack.guardian.v1beta1.Policy.IAM.schema:type_name -> raystack.guardian.v1beta1.Policy.IAM.SchemaEntry + 81, // 112: raystack.guardian.v1beta1.Policy.Requirement.RequirementTrigger.conditions:type_name -> raystack.guardian.v1beta1.Condition + 115, // 113: raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal.resource:type_name -> raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal.ResourceIdentifier + 84, // 114: raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal.options:type_name -> raystack.guardian.v1beta1.AppealOptions + 77, // 115: raystack.guardian.v1beta1.Policy.Requirement.AdditionalAppeal.policy:type_name -> raystack.guardian.v1beta1.PolicyConfig + 0, // 116: raystack.guardian.v1beta1.GuardianService.ListProviders:input_type -> raystack.guardian.v1beta1.ListProvidersRequest + 2, // 117: raystack.guardian.v1beta1.GuardianService.GetProvider:input_type -> raystack.guardian.v1beta1.GetProviderRequest + 4, // 118: raystack.guardian.v1beta1.GuardianService.GetProviderTypes:input_type -> raystack.guardian.v1beta1.GetProviderTypesRequest + 6, // 119: raystack.guardian.v1beta1.GuardianService.CreateProvider:input_type -> raystack.guardian.v1beta1.CreateProviderRequest + 8, // 120: raystack.guardian.v1beta1.GuardianService.UpdateProvider:input_type -> raystack.guardian.v1beta1.UpdateProviderRequest + 10, // 121: raystack.guardian.v1beta1.GuardianService.DeleteProvider:input_type -> raystack.guardian.v1beta1.DeleteProviderRequest + 14, // 122: raystack.guardian.v1beta1.GuardianService.ListRoles:input_type -> raystack.guardian.v1beta1.ListRolesRequest + 16, // 123: raystack.guardian.v1beta1.GuardianService.ImportActivities:input_type -> raystack.guardian.v1beta1.ImportActivitiesRequest + 18, // 124: raystack.guardian.v1beta1.GuardianService.GetActivity:input_type -> raystack.guardian.v1beta1.GetActivityRequest + 20, // 125: raystack.guardian.v1beta1.GuardianService.ListActivities:input_type -> raystack.guardian.v1beta1.ListActivitiesRequest + 22, // 126: raystack.guardian.v1beta1.GuardianService.ListPolicies:input_type -> raystack.guardian.v1beta1.ListPoliciesRequest + 24, // 127: raystack.guardian.v1beta1.GuardianService.GetPolicy:input_type -> raystack.guardian.v1beta1.GetPolicyRequest + 28, // 128: raystack.guardian.v1beta1.GuardianService.CreatePolicy:input_type -> raystack.guardian.v1beta1.CreatePolicyRequest + 30, // 129: raystack.guardian.v1beta1.GuardianService.UpdatePolicy:input_type -> raystack.guardian.v1beta1.UpdatePolicyRequest + 25, // 130: raystack.guardian.v1beta1.GuardianService.GetPolicyPreferences:input_type -> raystack.guardian.v1beta1.GetPolicyPreferencesRequest + 32, // 131: raystack.guardian.v1beta1.GuardianService.ListResources:input_type -> raystack.guardian.v1beta1.ListResourcesRequest + 34, // 132: raystack.guardian.v1beta1.GuardianService.GetResource:input_type -> raystack.guardian.v1beta1.GetResourceRequest + 36, // 133: raystack.guardian.v1beta1.GuardianService.UpdateResource:input_type -> raystack.guardian.v1beta1.UpdateResourceRequest + 38, // 134: raystack.guardian.v1beta1.GuardianService.DeleteResource:input_type -> raystack.guardian.v1beta1.DeleteResourceRequest + 40, // 135: raystack.guardian.v1beta1.GuardianService.ListUserAppeals:input_type -> raystack.guardian.v1beta1.ListUserAppealsRequest + 42, // 136: raystack.guardian.v1beta1.GuardianService.ListAppeals:input_type -> raystack.guardian.v1beta1.ListAppealsRequest + 44, // 137: raystack.guardian.v1beta1.GuardianService.GetAppeal:input_type -> raystack.guardian.v1beta1.GetAppealRequest + 46, // 138: raystack.guardian.v1beta1.GuardianService.CancelAppeal:input_type -> raystack.guardian.v1beta1.CancelAppealRequest + 52, // 139: raystack.guardian.v1beta1.GuardianService.CreateAppeal:input_type -> raystack.guardian.v1beta1.CreateAppealRequest + 54, // 140: raystack.guardian.v1beta1.GuardianService.ListUserApprovals:input_type -> raystack.guardian.v1beta1.ListUserApprovalsRequest + 56, // 141: raystack.guardian.v1beta1.GuardianService.ListApprovals:input_type -> raystack.guardian.v1beta1.ListApprovalsRequest + 58, // 142: raystack.guardian.v1beta1.GuardianService.UpdateApproval:input_type -> raystack.guardian.v1beta1.UpdateApprovalRequest + 60, // 143: raystack.guardian.v1beta1.GuardianService.AddApprover:input_type -> raystack.guardian.v1beta1.AddApproverRequest + 62, // 144: raystack.guardian.v1beta1.GuardianService.DeleteApprover:input_type -> raystack.guardian.v1beta1.DeleteApproverRequest + 64, // 145: raystack.guardian.v1beta1.GuardianService.ListGrants:input_type -> raystack.guardian.v1beta1.ListGrantsRequest + 66, // 146: raystack.guardian.v1beta1.GuardianService.ListUserGrants:input_type -> raystack.guardian.v1beta1.ListUserGrantsRequest + 68, // 147: raystack.guardian.v1beta1.GuardianService.GetGrant:input_type -> raystack.guardian.v1beta1.GetGrantRequest + 70, // 148: raystack.guardian.v1beta1.GuardianService.UpdateGrant:input_type -> raystack.guardian.v1beta1.UpdateGrantRequest + 72, // 149: raystack.guardian.v1beta1.GuardianService.RevokeGrant:input_type -> raystack.guardian.v1beta1.RevokeGrantRequest + 74, // 150: raystack.guardian.v1beta1.GuardianService.RevokeGrants:input_type -> raystack.guardian.v1beta1.RevokeGrantsRequest + 12, // 151: raystack.guardian.v1beta1.GuardianService.ImportGrantsFromProvider:input_type -> raystack.guardian.v1beta1.ImportGrantsFromProviderRequest + 91, // 152: raystack.guardian.v1beta1.GuardianService.CreateNamespace:input_type -> raystack.guardian.v1beta1.CreateNamespaceRequest + 93, // 153: raystack.guardian.v1beta1.GuardianService.GetNamespace:input_type -> raystack.guardian.v1beta1.GetNamespaceRequest + 95, // 154: raystack.guardian.v1beta1.GuardianService.ListNamespaces:input_type -> raystack.guardian.v1beta1.ListNamespacesRequest + 97, // 155: raystack.guardian.v1beta1.GuardianService.UpdateNamespace:input_type -> raystack.guardian.v1beta1.UpdateNamespaceRequest + 1, // 156: raystack.guardian.v1beta1.GuardianService.ListProviders:output_type -> raystack.guardian.v1beta1.ListProvidersResponse + 3, // 157: raystack.guardian.v1beta1.GuardianService.GetProvider:output_type -> raystack.guardian.v1beta1.GetProviderResponse + 5, // 158: raystack.guardian.v1beta1.GuardianService.GetProviderTypes:output_type -> raystack.guardian.v1beta1.GetProviderTypesResponse + 7, // 159: raystack.guardian.v1beta1.GuardianService.CreateProvider:output_type -> raystack.guardian.v1beta1.CreateProviderResponse + 9, // 160: raystack.guardian.v1beta1.GuardianService.UpdateProvider:output_type -> raystack.guardian.v1beta1.UpdateProviderResponse + 11, // 161: raystack.guardian.v1beta1.GuardianService.DeleteProvider:output_type -> raystack.guardian.v1beta1.DeleteProviderResponse + 15, // 162: raystack.guardian.v1beta1.GuardianService.ListRoles:output_type -> raystack.guardian.v1beta1.ListRolesResponse + 17, // 163: raystack.guardian.v1beta1.GuardianService.ImportActivities:output_type -> raystack.guardian.v1beta1.ImportActivitiesResponse + 19, // 164: raystack.guardian.v1beta1.GuardianService.GetActivity:output_type -> raystack.guardian.v1beta1.GetActivityResponse + 21, // 165: raystack.guardian.v1beta1.GuardianService.ListActivities:output_type -> raystack.guardian.v1beta1.ListActivitiesResponse + 23, // 166: raystack.guardian.v1beta1.GuardianService.ListPolicies:output_type -> raystack.guardian.v1beta1.ListPoliciesResponse + 27, // 167: raystack.guardian.v1beta1.GuardianService.GetPolicy:output_type -> raystack.guardian.v1beta1.GetPolicyResponse + 29, // 168: raystack.guardian.v1beta1.GuardianService.CreatePolicy:output_type -> raystack.guardian.v1beta1.CreatePolicyResponse + 31, // 169: raystack.guardian.v1beta1.GuardianService.UpdatePolicy:output_type -> raystack.guardian.v1beta1.UpdatePolicyResponse + 26, // 170: raystack.guardian.v1beta1.GuardianService.GetPolicyPreferences:output_type -> raystack.guardian.v1beta1.GetPolicyPreferencesResponse + 33, // 171: raystack.guardian.v1beta1.GuardianService.ListResources:output_type -> raystack.guardian.v1beta1.ListResourcesResponse + 35, // 172: raystack.guardian.v1beta1.GuardianService.GetResource:output_type -> raystack.guardian.v1beta1.GetResourceResponse + 37, // 173: raystack.guardian.v1beta1.GuardianService.UpdateResource:output_type -> raystack.guardian.v1beta1.UpdateResourceResponse + 39, // 174: raystack.guardian.v1beta1.GuardianService.DeleteResource:output_type -> raystack.guardian.v1beta1.DeleteResourceResponse + 41, // 175: raystack.guardian.v1beta1.GuardianService.ListUserAppeals:output_type -> raystack.guardian.v1beta1.ListUserAppealsResponse + 43, // 176: raystack.guardian.v1beta1.GuardianService.ListAppeals:output_type -> raystack.guardian.v1beta1.ListAppealsResponse + 45, // 177: raystack.guardian.v1beta1.GuardianService.GetAppeal:output_type -> raystack.guardian.v1beta1.GetAppealResponse + 47, // 178: raystack.guardian.v1beta1.GuardianService.CancelAppeal:output_type -> raystack.guardian.v1beta1.CancelAppealResponse + 53, // 179: raystack.guardian.v1beta1.GuardianService.CreateAppeal:output_type -> raystack.guardian.v1beta1.CreateAppealResponse + 55, // 180: raystack.guardian.v1beta1.GuardianService.ListUserApprovals:output_type -> raystack.guardian.v1beta1.ListUserApprovalsResponse + 57, // 181: raystack.guardian.v1beta1.GuardianService.ListApprovals:output_type -> raystack.guardian.v1beta1.ListApprovalsResponse + 59, // 182: raystack.guardian.v1beta1.GuardianService.UpdateApproval:output_type -> raystack.guardian.v1beta1.UpdateApprovalResponse + 61, // 183: raystack.guardian.v1beta1.GuardianService.AddApprover:output_type -> raystack.guardian.v1beta1.AddApproverResponse + 63, // 184: raystack.guardian.v1beta1.GuardianService.DeleteApprover:output_type -> raystack.guardian.v1beta1.DeleteApproverResponse + 65, // 185: raystack.guardian.v1beta1.GuardianService.ListGrants:output_type -> raystack.guardian.v1beta1.ListGrantsResponse + 67, // 186: raystack.guardian.v1beta1.GuardianService.ListUserGrants:output_type -> raystack.guardian.v1beta1.ListUserGrantsResponse + 69, // 187: raystack.guardian.v1beta1.GuardianService.GetGrant:output_type -> raystack.guardian.v1beta1.GetGrantResponse + 71, // 188: raystack.guardian.v1beta1.GuardianService.UpdateGrant:output_type -> raystack.guardian.v1beta1.UpdateGrantResponse + 73, // 189: raystack.guardian.v1beta1.GuardianService.RevokeGrant:output_type -> raystack.guardian.v1beta1.RevokeGrantResponse + 75, // 190: raystack.guardian.v1beta1.GuardianService.RevokeGrants:output_type -> raystack.guardian.v1beta1.RevokeGrantsResponse + 13, // 191: raystack.guardian.v1beta1.GuardianService.ImportGrantsFromProvider:output_type -> raystack.guardian.v1beta1.ImportGrantsFromProviderResponse + 92, // 192: raystack.guardian.v1beta1.GuardianService.CreateNamespace:output_type -> raystack.guardian.v1beta1.CreateNamespaceResponse + 94, // 193: raystack.guardian.v1beta1.GuardianService.GetNamespace:output_type -> raystack.guardian.v1beta1.GetNamespaceResponse + 96, // 194: raystack.guardian.v1beta1.GuardianService.ListNamespaces:output_type -> raystack.guardian.v1beta1.ListNamespacesResponse + 98, // 195: raystack.guardian.v1beta1.GuardianService.UpdateNamespace:output_type -> raystack.guardian.v1beta1.UpdateNamespaceResponse + 156, // [156:196] is the sub-list for method output_type + 116, // [116:156] is the sub-list for method input_type + 116, // [116:116] is the sub-list for extension type_name + 116, // [116:116] is the sub-list for extension extendee + 0, // [0:116] is the sub-list for field type_name } func init() { file_raystack_guardian_v1beta1_guardian_proto_init() } @@ -9665,7 +10219,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { } } file_raystack_guardian_v1beta1_guardian_proto_msgTypes[90].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RevokeAppealRequest_Reason); i { + switch v := v.(*Namespace); i { case 0: return &v.state case 1: @@ -9677,7 +10231,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { } } file_raystack_guardian_v1beta1_guardian_proto_msgTypes[91].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateAppealRequest_Resource); i { + switch v := v.(*CreateNamespaceRequest); i { case 0: return &v.state case 1: @@ -9689,7 +10243,19 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { } } file_raystack_guardian_v1beta1_guardian_proto_msgTypes[92].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateApprovalRequest_Action); i { + switch v := v.(*CreateNamespaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[93].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNamespaceRequest); i { case 0: return &v.state case 1: @@ -9701,7 +10267,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { } } file_raystack_guardian_v1beta1_guardian_proto_msgTypes[94].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProviderConfig_AppealConfig); i { + switch v := v.(*GetNamespaceResponse); i { case 0: return &v.state case 1: @@ -9713,7 +10279,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { } } file_raystack_guardian_v1beta1_guardian_proto_msgTypes[95].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProviderConfig_ResourceConfig); i { + switch v := v.(*ListNamespacesRequest); i { case 0: return &v.state case 1: @@ -9725,7 +10291,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { } } file_raystack_guardian_v1beta1_guardian_proto_msgTypes[96].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProviderConfig_ProviderParameter); i { + switch v := v.(*ListNamespacesResponse); i { case 0: return &v.state case 1: @@ -9737,7 +10303,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { } } file_raystack_guardian_v1beta1_guardian_proto_msgTypes[97].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Condition_MatchCondition); i { + switch v := v.(*UpdateNamespaceRequest); i { case 0: return &v.state case 1: @@ -9749,7 +10315,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { } } file_raystack_guardian_v1beta1_guardian_proto_msgTypes[98].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PolicyAppealConfig_DurationOptions); i { + switch v := v.(*UpdateNamespaceResponse); i { case 0: return &v.state case 1: @@ -9761,7 +10327,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { } } file_raystack_guardian_v1beta1_guardian_proto_msgTypes[99].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PolicyAppealConfig_Question); i { + switch v := v.(*RevokeAppealRequest_Reason); i { case 0: return &v.state case 1: @@ -9773,6 +10339,102 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { } } file_raystack_guardian_v1beta1_guardian_proto_msgTypes[100].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateAppealRequest_Resource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[101].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateApprovalRequest_Action); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProviderConfig_AppealConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProviderConfig_ResourceConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProviderConfig_ProviderParameter); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Condition_MatchCondition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[107].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PolicyAppealConfig_DurationOptions); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[108].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PolicyAppealConfig_Question); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[109].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Policy_ApprovalStep); i { case 0: return &v.state @@ -9784,7 +10446,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { return nil } } - file_raystack_guardian_v1beta1_guardian_proto_msgTypes[102].Exporter = func(v interface{}, i int) interface{} { + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[111].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Policy_Requirement); i { case 0: return &v.state @@ -9796,7 +10458,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { return nil } } - file_raystack_guardian_v1beta1_guardian_proto_msgTypes[103].Exporter = func(v interface{}, i int) interface{} { + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[112].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Policy_IAM); i { case 0: return &v.state @@ -9808,7 +10470,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { return nil } } - file_raystack_guardian_v1beta1_guardian_proto_msgTypes[104].Exporter = func(v interface{}, i int) interface{} { + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[113].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Policy_Requirement_RequirementTrigger); i { case 0: return &v.state @@ -9820,7 +10482,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { return nil } } - file_raystack_guardian_v1beta1_guardian_proto_msgTypes[105].Exporter = func(v interface{}, i int) interface{} { + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[114].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Policy_Requirement_AdditionalAppeal); i { case 0: return &v.state @@ -9832,7 +10494,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { return nil } } - file_raystack_guardian_v1beta1_guardian_proto_msgTypes[106].Exporter = func(v interface{}, i int) interface{} { + file_raystack_guardian_v1beta1_guardian_proto_msgTypes[115].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Policy_Requirement_AdditionalAppeal_ResourceIdentifier); i { case 0: return &v.state @@ -9851,7 +10513,7 @@ func file_raystack_guardian_v1beta1_guardian_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_raystack_guardian_v1beta1_guardian_proto_rawDesc, NumEnums: 0, - NumMessages: 110, + NumMessages: 119, NumExtensions: 0, NumServices: 1, }, diff --git a/api/proto/raystack/guardian/v1beta1/guardian.pb.gw.go b/api/proto/raystack/guardian/v1beta1/guardian.pb.gw.go index e19df3ad7..d8bb2dfa8 100644 --- a/api/proto/raystack/guardian/v1beta1/guardian.pb.gw.go +++ b/api/proto/raystack/guardian/v1beta1/guardian.pb.gw.go @@ -1995,6 +1995,178 @@ func local_request_GuardianService_ImportGrantsFromProvider_0(ctx context.Contex } +func request_GuardianService_CreateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client GuardianServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateNamespaceRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GuardianService_CreateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server GuardianServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateNamespaceRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateNamespace(ctx, &protoReq) + return msg, metadata, err + +} + +func request_GuardianService_GetNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client GuardianServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNamespaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GuardianService_GetNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server GuardianServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNamespaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetNamespace(ctx, &protoReq) + return msg, metadata, err + +} + +func request_GuardianService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, client GuardianServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListNamespacesRequest + var metadata runtime.ServerMetadata + + msg, err := client.ListNamespaces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GuardianService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, server GuardianServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListNamespacesRequest + var metadata runtime.ServerMetadata + + msg, err := server.ListNamespaces(ctx, &protoReq) + return msg, metadata, err + +} + +func request_GuardianService_UpdateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client GuardianServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateNamespaceRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.UpdateNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_GuardianService_UpdateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server GuardianServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateNamespaceRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.UpdateNamespace(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterGuardianServiceHandlerServer registers the http handlers for service GuardianService to "mux". // UnaryRPC :call GuardianServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -2007,13 +2179,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListProviders", runtime.WithHTTPPathPattern("/v1beta1/providers")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListProviders") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_ListProviders_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_ListProviders_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2031,13 +2202,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetProvider", runtime.WithHTTPPathPattern("/v1beta1/providers/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetProvider") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_GetProvider_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_GetProvider_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2055,13 +2225,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetProviderTypes", runtime.WithHTTPPathPattern("/v1beta1/providers/types")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetProviderTypes") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_GetProviderTypes_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_GetProviderTypes_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2079,13 +2248,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreateProvider", runtime.WithHTTPPathPattern("/v1beta1/providers")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreateProvider") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_CreateProvider_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_CreateProvider_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2103,13 +2271,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateProvider", runtime.WithHTTPPathPattern("/v1beta1/providers/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateProvider") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_UpdateProvider_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_UpdateProvider_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2127,13 +2294,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateProvider", runtime.WithHTTPPathPattern("/v1beta1/providers/{config.type}/{config.urn}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateProvider") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_UpdateProvider_1(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_UpdateProvider_1(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2151,13 +2317,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/DeleteProvider", runtime.WithHTTPPathPattern("/v1beta1/providers/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/DeleteProvider") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_DeleteProvider_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_DeleteProvider_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2175,13 +2340,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListRoles", runtime.WithHTTPPathPattern("/v1beta1/providers/{id}/resources/{resource_type}/roles")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListRoles") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_ListRoles_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_ListRoles_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2199,13 +2363,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ImportActivities", runtime.WithHTTPPathPattern("/v1beta1/activities/import")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ImportActivities") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_ImportActivities_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_ImportActivities_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2223,13 +2386,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetActivity", runtime.WithHTTPPathPattern("/v1beta1/activities/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetActivity") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_GetActivity_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_GetActivity_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2247,13 +2409,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListActivities", runtime.WithHTTPPathPattern("/v1beta1/activities")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListActivities") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_ListActivities_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_ListActivities_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2271,13 +2432,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListPolicies", runtime.WithHTTPPathPattern("/v1beta1/policies")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListPolicies") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_ListPolicies_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_ListPolicies_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2295,13 +2455,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetPolicy", runtime.WithHTTPPathPattern("/v1beta1/policies/{id}/versions/{version}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetPolicy") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_GetPolicy_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_GetPolicy_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2319,13 +2478,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreatePolicy", runtime.WithHTTPPathPattern("/v1beta1/policies")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreatePolicy") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_CreatePolicy_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_CreatePolicy_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2343,13 +2501,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdatePolicy", runtime.WithHTTPPathPattern("/v1beta1/policies/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdatePolicy") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_UpdatePolicy_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_UpdatePolicy_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2367,13 +2524,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetPolicyPreferences", runtime.WithHTTPPathPattern("/v1beta1/policies/{id}/versions/{version}/preferences")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetPolicyPreferences") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_GetPolicyPreferences_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_GetPolicyPreferences_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2391,13 +2547,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListResources", runtime.WithHTTPPathPattern("/v1beta1/resources")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListResources") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_ListResources_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_ListResources_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2415,13 +2570,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetResource", runtime.WithHTTPPathPattern("/v1beta1/resources/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetResource") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_GetResource_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_GetResource_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2439,13 +2593,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateResource", runtime.WithHTTPPathPattern("/v1beta1/resources/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateResource") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_UpdateResource_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_UpdateResource_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2463,13 +2616,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/DeleteResource", runtime.WithHTTPPathPattern("/v1beta1/resources/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/DeleteResource") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_DeleteResource_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_DeleteResource_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2487,13 +2639,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListUserAppeals", runtime.WithHTTPPathPattern("/v1beta1/me/appeals")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListUserAppeals") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_ListUserAppeals_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_ListUserAppeals_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2511,13 +2662,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListAppeals", runtime.WithHTTPPathPattern("/v1beta1/appeals")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListAppeals") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_ListAppeals_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_ListAppeals_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2535,13 +2685,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetAppeal", runtime.WithHTTPPathPattern("/v1beta1/appeals/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetAppeal") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_GetAppeal_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_GetAppeal_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2559,13 +2708,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CancelAppeal", runtime.WithHTTPPathPattern("/v1beta1/appeals/{id}/cancel")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CancelAppeal") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_CancelAppeal_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_CancelAppeal_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2583,13 +2731,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreateAppeal", runtime.WithHTTPPathPattern("/v1beta1/appeals")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreateAppeal") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_CreateAppeal_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_CreateAppeal_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2607,13 +2754,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListUserApprovals", runtime.WithHTTPPathPattern("/v1beta1/me/approvals")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListUserApprovals") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_ListUserApprovals_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_ListUserApprovals_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2631,13 +2777,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListApprovals", runtime.WithHTTPPathPattern("/v1beta1/approvals")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListApprovals") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_ListApprovals_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_ListApprovals_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2655,13 +2800,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateApproval", runtime.WithHTTPPathPattern("/v1beta1/appeals/{id}/approvals/{approval_name}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateApproval") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_UpdateApproval_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_UpdateApproval_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2679,13 +2823,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/AddApprover", runtime.WithHTTPPathPattern("/v1beta1/appeals/{appeal_id}/approvals/{approval_id}/approvers")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/AddApprover") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_AddApprover_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_AddApprover_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2703,13 +2846,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/DeleteApprover", runtime.WithHTTPPathPattern("/v1beta1/appeals/{appeal_id}/approvals/{approval_id}/approvers/{email}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/DeleteApprover") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_DeleteApprover_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_DeleteApprover_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2727,13 +2869,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListGrants", runtime.WithHTTPPathPattern("/v1beta1/grants")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListGrants") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_ListGrants_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_ListGrants_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2751,13 +2892,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListUserGrants", runtime.WithHTTPPathPattern("/v1beta1/me/grants")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListUserGrants") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_ListUserGrants_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_ListUserGrants_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2775,13 +2915,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetGrant", runtime.WithHTTPPathPattern("/v1beta1/grants/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetGrant") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_GetGrant_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_GetGrant_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2799,13 +2938,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateGrant", runtime.WithHTTPPathPattern("/v1beta1/grants/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateGrant") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_UpdateGrant_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_UpdateGrant_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2823,13 +2961,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/RevokeGrant", runtime.WithHTTPPathPattern("/v1beta1/grants/{id}/revoke")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/RevokeGrant") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_RevokeGrant_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_RevokeGrant_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2847,13 +2984,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/RevokeGrants", runtime.WithHTTPPathPattern("/v1beta1/grants/revoke")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/RevokeGrants") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_RevokeGrants_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_RevokeGrants_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2871,13 +3007,12 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ImportGrantsFromProvider", runtime.WithHTTPPathPattern("/v1beta1/grants/import")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ImportGrantsFromProvider") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_GuardianService_ImportGrantsFromProvider_0(ctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_GuardianService_ImportGrantsFromProvider_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -2889,6 +3024,98 @@ func RegisterGuardianServiceHandlerServer(ctx context.Context, mux *runtime.Serv }) + mux.Handle("POST", pattern_GuardianService_CreateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreateNamespace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GuardianService_CreateNamespace_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GuardianService_CreateNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_GuardianService_GetNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetNamespace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GuardianService_GetNamespace_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GuardianService_GetNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_GuardianService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListNamespaces") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GuardianService_ListNamespaces_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GuardianService_ListNamespaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_GuardianService_UpdateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateNamespace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_GuardianService_UpdateNamespace_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GuardianService_UpdateNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -2934,13 +3161,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListProviders", runtime.WithHTTPPathPattern("/v1beta1/providers")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListProviders") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_ListProviders_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_ListProviders_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2955,13 +3181,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetProvider", runtime.WithHTTPPathPattern("/v1beta1/providers/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetProvider") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_GetProvider_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_GetProvider_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2976,13 +3201,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetProviderTypes", runtime.WithHTTPPathPattern("/v1beta1/providers/types")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetProviderTypes") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_GetProviderTypes_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_GetProviderTypes_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -2997,13 +3221,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreateProvider", runtime.WithHTTPPathPattern("/v1beta1/providers")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreateProvider") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_CreateProvider_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_CreateProvider_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3018,13 +3241,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateProvider", runtime.WithHTTPPathPattern("/v1beta1/providers/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateProvider") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_UpdateProvider_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_UpdateProvider_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3039,13 +3261,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateProvider", runtime.WithHTTPPathPattern("/v1beta1/providers/{config.type}/{config.urn}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateProvider") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_UpdateProvider_1(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_UpdateProvider_1(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3060,13 +3281,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/DeleteProvider", runtime.WithHTTPPathPattern("/v1beta1/providers/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/DeleteProvider") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_DeleteProvider_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_DeleteProvider_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3081,13 +3301,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListRoles", runtime.WithHTTPPathPattern("/v1beta1/providers/{id}/resources/{resource_type}/roles")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListRoles") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_ListRoles_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_ListRoles_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3102,13 +3321,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ImportActivities", runtime.WithHTTPPathPattern("/v1beta1/activities/import")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ImportActivities") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_ImportActivities_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_ImportActivities_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3123,13 +3341,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetActivity", runtime.WithHTTPPathPattern("/v1beta1/activities/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetActivity") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_GetActivity_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_GetActivity_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3144,13 +3361,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListActivities", runtime.WithHTTPPathPattern("/v1beta1/activities")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListActivities") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_ListActivities_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_ListActivities_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3165,13 +3381,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListPolicies", runtime.WithHTTPPathPattern("/v1beta1/policies")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListPolicies") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_ListPolicies_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_ListPolicies_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3186,13 +3401,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetPolicy", runtime.WithHTTPPathPattern("/v1beta1/policies/{id}/versions/{version}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetPolicy") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_GetPolicy_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_GetPolicy_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3207,13 +3421,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreatePolicy", runtime.WithHTTPPathPattern("/v1beta1/policies")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreatePolicy") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_CreatePolicy_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_CreatePolicy_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3228,13 +3441,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdatePolicy", runtime.WithHTTPPathPattern("/v1beta1/policies/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdatePolicy") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_UpdatePolicy_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_UpdatePolicy_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3249,13 +3461,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetPolicyPreferences", runtime.WithHTTPPathPattern("/v1beta1/policies/{id}/versions/{version}/preferences")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetPolicyPreferences") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_GetPolicyPreferences_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_GetPolicyPreferences_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3270,13 +3481,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListResources", runtime.WithHTTPPathPattern("/v1beta1/resources")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListResources") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_ListResources_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_ListResources_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3291,13 +3501,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetResource", runtime.WithHTTPPathPattern("/v1beta1/resources/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetResource") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_GetResource_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_GetResource_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3312,13 +3521,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateResource", runtime.WithHTTPPathPattern("/v1beta1/resources/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateResource") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_UpdateResource_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_UpdateResource_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3333,13 +3541,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/DeleteResource", runtime.WithHTTPPathPattern("/v1beta1/resources/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/DeleteResource") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_DeleteResource_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_DeleteResource_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3354,13 +3561,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListUserAppeals", runtime.WithHTTPPathPattern("/v1beta1/me/appeals")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListUserAppeals") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_ListUserAppeals_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_ListUserAppeals_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3375,13 +3581,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListAppeals", runtime.WithHTTPPathPattern("/v1beta1/appeals")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListAppeals") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_ListAppeals_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_ListAppeals_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3396,13 +3601,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetAppeal", runtime.WithHTTPPathPattern("/v1beta1/appeals/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetAppeal") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_GetAppeal_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_GetAppeal_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3417,13 +3621,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CancelAppeal", runtime.WithHTTPPathPattern("/v1beta1/appeals/{id}/cancel")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CancelAppeal") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_CancelAppeal_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_CancelAppeal_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3438,13 +3641,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreateAppeal", runtime.WithHTTPPathPattern("/v1beta1/appeals")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreateAppeal") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_CreateAppeal_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_CreateAppeal_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3459,13 +3661,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListUserApprovals", runtime.WithHTTPPathPattern("/v1beta1/me/approvals")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListUserApprovals") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_ListUserApprovals_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_ListUserApprovals_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3480,13 +3681,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListApprovals", runtime.WithHTTPPathPattern("/v1beta1/approvals")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListApprovals") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_ListApprovals_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_ListApprovals_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3501,13 +3701,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateApproval", runtime.WithHTTPPathPattern("/v1beta1/appeals/{id}/approvals/{approval_name}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateApproval") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_UpdateApproval_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_UpdateApproval_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3522,13 +3721,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/AddApprover", runtime.WithHTTPPathPattern("/v1beta1/appeals/{appeal_id}/approvals/{approval_id}/approvers")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/AddApprover") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_AddApprover_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_AddApprover_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3543,13 +3741,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/DeleteApprover", runtime.WithHTTPPathPattern("/v1beta1/appeals/{appeal_id}/approvals/{approval_id}/approvers/{email}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/DeleteApprover") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_DeleteApprover_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_DeleteApprover_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3564,13 +3761,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListGrants", runtime.WithHTTPPathPattern("/v1beta1/grants")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListGrants") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_ListGrants_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_ListGrants_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3585,13 +3781,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListUserGrants", runtime.WithHTTPPathPattern("/v1beta1/me/grants")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListUserGrants") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_ListUserGrants_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_ListUserGrants_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3606,13 +3801,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetGrant", runtime.WithHTTPPathPattern("/v1beta1/grants/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetGrant") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_GetGrant_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_GetGrant_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3627,13 +3821,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateGrant", runtime.WithHTTPPathPattern("/v1beta1/grants/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateGrant") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_UpdateGrant_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_UpdateGrant_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3648,13 +3841,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/RevokeGrant", runtime.WithHTTPPathPattern("/v1beta1/grants/{id}/revoke")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/RevokeGrant") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_RevokeGrant_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_RevokeGrant_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3669,13 +3861,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/RevokeGrants", runtime.WithHTTPPathPattern("/v1beta1/grants/revoke")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/RevokeGrants") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_RevokeGrants_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_RevokeGrants_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3690,13 +3881,12 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ImportGrantsFromProvider", runtime.WithHTTPPathPattern("/v1beta1/grants/import")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ImportGrantsFromProvider") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_GuardianService_ImportGrantsFromProvider_0(ctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_GuardianService_ImportGrantsFromProvider_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -3707,6 +3897,86 @@ func RegisterGuardianServiceHandlerClient(ctx context.Context, mux *runtime.Serv }) + mux.Handle("POST", pattern_GuardianService_CreateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/CreateNamespace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GuardianService_CreateNamespace_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GuardianService_CreateNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_GuardianService_GetNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/GetNamespace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GuardianService_GetNamespace_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GuardianService_GetNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_GuardianService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/ListNamespaces") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GuardianService_ListNamespaces_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GuardianService_ListNamespaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_GuardianService_UpdateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/raystack.guardian.v1beta1.GuardianService/UpdateNamespace") + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_GuardianService_UpdateNamespace_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_GuardianService_UpdateNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -3784,6 +4054,14 @@ var ( pattern_GuardianService_RevokeGrants_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1beta1", "grants", "revoke"}, "")) pattern_GuardianService_ImportGrantsFromProvider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1beta1", "grants", "import"}, "")) + + pattern_GuardianService_CreateNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "namespaces"}, "")) + + pattern_GuardianService_GetNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1beta1", "namespaces", "id"}, "")) + + pattern_GuardianService_ListNamespaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "namespaces"}, "")) + + pattern_GuardianService_UpdateNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1beta1", "namespaces", "id"}, "")) ) var ( @@ -3860,4 +4138,12 @@ var ( forward_GuardianService_RevokeGrants_0 = runtime.ForwardResponseMessage forward_GuardianService_ImportGrantsFromProvider_0 = runtime.ForwardResponseMessage + + forward_GuardianService_CreateNamespace_0 = runtime.ForwardResponseMessage + + forward_GuardianService_GetNamespace_0 = runtime.ForwardResponseMessage + + forward_GuardianService_ListNamespaces_0 = runtime.ForwardResponseMessage + + forward_GuardianService_UpdateNamespace_0 = runtime.ForwardResponseMessage ) diff --git a/api/proto/raystack/guardian/v1beta1/guardian.swagger.json b/api/proto/raystack/guardian/v1beta1/guardian.swagger.json index cd80619e0..4fa5e7f28 100644 --- a/api/proto/raystack/guardian/v1beta1/guardian.swagger.json +++ b/api/proto/raystack/guardian/v1beta1/guardian.swagger.json @@ -326,12 +326,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "email": { - "type": "string" - } - } + "$ref": "#/definitions/v1beta1AddApproverRequest" } } ], @@ -443,7 +438,7 @@ "type": "string" }, { - "name": "action", + "name": "body", "in": "body", "required": true, "schema": { @@ -823,12 +818,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "owner": { - "type": "string" - } - } + "$ref": "#/definitions/v1beta1UpdateGrantRequest" } } ], @@ -866,12 +856,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "reason": { - "type": "string" - } - } + "$ref": "#/definitions/v1beta1RevokeGrantRequest" } } ], @@ -1168,6 +1153,125 @@ ] } }, + "/v1beta1/namespaces": { + "get": { + "operationId": "GuardianService_ListNamespaces", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ListNamespacesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "GuardianService" + ] + }, + "post": { + "summary": "Namespace contains information about a tenant", + "operationId": "GuardianService_CreateNamespace", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1CreateNamespaceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1CreateNamespaceRequest" + } + } + ], + "tags": [ + "GuardianService" + ] + } + }, + "/v1beta1/namespaces/{id}": { + "get": { + "operationId": "GuardianService_GetNamespace", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1GetNamespaceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "GuardianService" + ] + }, + "put": { + "operationId": "GuardianService_UpdateNamespace", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1UpdateNamespaceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1UpdateNamespaceRequest" + } + } + ], + "tags": [ + "GuardianService" + ] + } + }, "/v1beta1/policies": { "get": { "operationId": "GuardianService_ListPolicies", @@ -1207,7 +1311,7 @@ }, "parameters": [ { - "name": "policy", + "name": "body", "in": "body", "required": true, "schema": { @@ -1251,7 +1355,7 @@ "type": "string" }, { - "name": "policy", + "name": "body", "in": "body", "required": true, "schema": { @@ -1383,7 +1487,7 @@ }, "parameters": [ { - "name": "config", + "name": "body", "in": "body", "required": true, "schema": { @@ -1455,43 +1559,11 @@ "type": "string" }, { - "name": "config", + "name": "body", "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "labels": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "credentials": { - "type": "object" - }, - "appeal": { - "$ref": "#/definitions/ProviderConfigAppealConfig" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderConfigResourceConfig" - } - }, - "allowedAccountTypes": { - "type": "array", - "items": { - "type": "string" - } - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/definitions/ProviderConfigProviderParameter" - } - } - } + "$ref": "#/definitions/v1beta1ProviderConfig" } }, { @@ -1593,7 +1665,7 @@ "type": "string" }, { - "name": "config", + "name": "body", "in": "body", "required": true, "schema": { @@ -1799,7 +1871,7 @@ "type": "string" }, { - "name": "resource", + "name": "body", "in": "body", "required": true, "schema": { @@ -2094,11 +2166,14 @@ "protobufAny": { "type": "object", "properties": { - "@type": { + "typeUrl": { "type": "string" + }, + "value": { + "type": "string", + "format": "byte" } - }, - "additionalProperties": {} + } }, "protobufNullValue": { "type": "string", @@ -2126,6 +2201,20 @@ } } }, + "v1beta1AddApproverRequest": { + "type": "object", + "properties": { + "appealId": { + "type": "string" + }, + "approvalId": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, "v1beta1AddApproverResponse": { "type": "object", "properties": { @@ -2339,6 +2428,17 @@ } } }, + "v1beta1CreateNamespaceRequest": { + "type": "object", + "properties": { + "namespace": { + "$ref": "#/definitions/v1beta1Namespace" + } + } + }, + "v1beta1CreateNamespaceResponse": { + "type": "object" + }, "v1beta1CreatePolicyResponse": { "type": "object", "properties": { @@ -2393,6 +2493,14 @@ } } }, + "v1beta1GetNamespaceResponse": { + "type": "object", + "properties": { + "namespace": { + "$ref": "#/definitions/v1beta1Namespace" + } + } + }, "v1beta1GetPolicyPreferencesResponse": { "type": "object", "properties": { @@ -2631,6 +2739,17 @@ } } }, + "v1beta1ListNamespacesResponse": { + "type": "object", + "properties": { + "namespaces": { + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1Namespace" + } + } + } + }, "v1beta1ListPoliciesResponse": { "type": "object", "properties": { @@ -2708,6 +2827,31 @@ } } }, + "v1beta1Namespace": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "metadata": { + "type": "object" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, "v1beta1Policy": { "type": "object", "properties": { @@ -2933,6 +3077,17 @@ } } }, + "v1beta1RevokeGrantRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "reason": { + "type": "string" + } + } + }, "v1beta1RevokeGrantResponse": { "type": "object", "properties": { @@ -3018,6 +3173,17 @@ } } }, + "v1beta1UpdateGrantRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "owner": { + "type": "string" + } + } + }, "v1beta1UpdateGrantResponse": { "type": "object", "properties": { @@ -3026,6 +3192,20 @@ } } }, + "v1beta1UpdateNamespaceRequest": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "namespace": { + "$ref": "#/definitions/v1beta1Namespace" + } + } + }, + "v1beta1UpdateNamespaceResponse": { + "type": "object" + }, "v1beta1UpdatePolicyResponse": { "type": "object", "properties": { diff --git a/api/proto/raystack/guardian/v1beta1/guardian_grpc.pb.go b/api/proto/raystack/guardian/v1beta1/guardian_grpc.pb.go index e7d735318..f3ac628ca 100644 --- a/api/proto/raystack/guardian/v1beta1/guardian_grpc.pb.go +++ b/api/proto/raystack/guardian/v1beta1/guardian_grpc.pb.go @@ -1,8 +1,4 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: raystack/guardian/v1beta1/guardian.proto package guardianv1beta1 @@ -58,6 +54,11 @@ type GuardianServiceClient interface { RevokeGrant(ctx context.Context, in *RevokeGrantRequest, opts ...grpc.CallOption) (*RevokeGrantResponse, error) RevokeGrants(ctx context.Context, in *RevokeGrantsRequest, opts ...grpc.CallOption) (*RevokeGrantsResponse, error) ImportGrantsFromProvider(ctx context.Context, in *ImportGrantsFromProviderRequest, opts ...grpc.CallOption) (*ImportGrantsFromProviderResponse, error) + // Namespace contains information about a tenant + CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error) + GetNamespace(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) + ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) + UpdateNamespace(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error) } type guardianServiceClient struct { @@ -392,6 +393,42 @@ func (c *guardianServiceClient) ImportGrantsFromProvider(ctx context.Context, in return out, nil } +func (c *guardianServiceClient) CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error) { + out := new(CreateNamespaceResponse) + err := c.cc.Invoke(ctx, "/raystack.guardian.v1beta1.GuardianService/CreateNamespace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *guardianServiceClient) GetNamespace(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) { + out := new(GetNamespaceResponse) + err := c.cc.Invoke(ctx, "/raystack.guardian.v1beta1.GuardianService/GetNamespace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *guardianServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) { + out := new(ListNamespacesResponse) + err := c.cc.Invoke(ctx, "/raystack.guardian.v1beta1.GuardianService/ListNamespaces", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *guardianServiceClient) UpdateNamespace(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error) { + out := new(UpdateNamespaceResponse) + err := c.cc.Invoke(ctx, "/raystack.guardian.v1beta1.GuardianService/UpdateNamespace", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // GuardianServiceServer is the server API for GuardianService service. // All implementations must embed UnimplementedGuardianServiceServer // for forward compatibility @@ -432,6 +469,11 @@ type GuardianServiceServer interface { RevokeGrant(context.Context, *RevokeGrantRequest) (*RevokeGrantResponse, error) RevokeGrants(context.Context, *RevokeGrantsRequest) (*RevokeGrantsResponse, error) ImportGrantsFromProvider(context.Context, *ImportGrantsFromProviderRequest) (*ImportGrantsFromProviderResponse, error) + // Namespace contains information about a tenant + CreateNamespace(context.Context, *CreateNamespaceRequest) (*CreateNamespaceResponse, error) + GetNamespace(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error) + ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) + UpdateNamespace(context.Context, *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error) mustEmbedUnimplementedGuardianServiceServer() } @@ -547,6 +589,18 @@ func (UnimplementedGuardianServiceServer) RevokeGrants(context.Context, *RevokeG func (UnimplementedGuardianServiceServer) ImportGrantsFromProvider(context.Context, *ImportGrantsFromProviderRequest) (*ImportGrantsFromProviderResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ImportGrantsFromProvider not implemented") } +func (UnimplementedGuardianServiceServer) CreateNamespace(context.Context, *CreateNamespaceRequest) (*CreateNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateNamespace not implemented") +} +func (UnimplementedGuardianServiceServer) GetNamespace(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNamespace not implemented") +} +func (UnimplementedGuardianServiceServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented") +} +func (UnimplementedGuardianServiceServer) UpdateNamespace(context.Context, *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateNamespace not implemented") +} func (UnimplementedGuardianServiceServer) mustEmbedUnimplementedGuardianServiceServer() {} // UnsafeGuardianServiceServer may be embedded to opt out of forward compatibility for this service. @@ -1208,6 +1262,78 @@ func _GuardianService_ImportGrantsFromProvider_Handler(srv interface{}, ctx cont return interceptor(ctx, in, info, handler) } +func _GuardianService_CreateNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuardianServiceServer).CreateNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/raystack.guardian.v1beta1.GuardianService/CreateNamespace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuardianServiceServer).CreateNamespace(ctx, req.(*CreateNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GuardianService_GetNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuardianServiceServer).GetNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/raystack.guardian.v1beta1.GuardianService/GetNamespace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuardianServiceServer).GetNamespace(ctx, req.(*GetNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GuardianService_ListNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNamespacesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuardianServiceServer).ListNamespaces(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/raystack.guardian.v1beta1.GuardianService/ListNamespaces", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuardianServiceServer).ListNamespaces(ctx, req.(*ListNamespacesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _GuardianService_UpdateNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GuardianServiceServer).UpdateNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/raystack.guardian.v1beta1.GuardianService/UpdateNamespace", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GuardianServiceServer).UpdateNamespace(ctx, req.(*UpdateNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + // GuardianService_ServiceDesc is the grpc.ServiceDesc for GuardianService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -1359,6 +1485,22 @@ var GuardianService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ImportGrantsFromProvider", Handler: _GuardianService_ImportGrantsFromProvider_Handler, }, + { + MethodName: "CreateNamespace", + Handler: _GuardianService_CreateNamespace_Handler, + }, + { + MethodName: "GetNamespace", + Handler: _GuardianService_GetNamespace_Handler, + }, + { + MethodName: "ListNamespaces", + Handler: _GuardianService_ListNamespaces_Handler, + }, + { + MethodName: "UpdateNamespace", + Handler: _GuardianService_UpdateNamespace_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "raystack/guardian/v1beta1/guardian.proto", diff --git a/cli/server.go b/cli/server.go index 90f6533f5..5f0fe35e4 100644 --- a/cli/server.go +++ b/cli/server.go @@ -57,7 +57,7 @@ func migrateCommand() *cobra.Command { if err != nil { return err } - return server.Migrate(&cfg) + return server.Migrate(cmd.Context(), &cfg) }, } diff --git a/core/namespace/service.go b/core/namespace/service.go new file mode 100644 index 000000000..fb9e0da25 --- /dev/null +++ b/core/namespace/service.go @@ -0,0 +1,37 @@ +package namespace + +import ( + "context" + + "github.com/raystack/guardian/domain" +) + +type Repository interface { + BulkUpsert(ctx context.Context, namespaces []*domain.Namespace) error + List(ctx context.Context) ([]*domain.Namespace, error) + GetOne(ctx context.Context, id string) (*domain.Namespace, error) +} + +type Service struct { + repository Repository +} + +func NewService(repository Repository) *Service { + return &Service{repository: repository} +} + +func (s *Service) List(ctx context.Context, flt domain.NamespaceFilter) ([]*domain.Namespace, error) { + return s.repository.List(ctx) +} + +func (s *Service) Get(ctx context.Context, id string) (*domain.Namespace, error) { + return s.repository.GetOne(ctx, id) +} + +func (s *Service) Create(ctx context.Context, namespaces *domain.Namespace) error { + return s.repository.BulkUpsert(ctx, []*domain.Namespace{namespaces}) +} + +func (s *Service) Update(ctx context.Context, namespaces *domain.Namespace) error { + return s.repository.BulkUpsert(ctx, []*domain.Namespace{namespaces}) +} diff --git a/domain/namespace.go b/domain/namespace.go new file mode 100644 index 000000000..deb6b3d66 --- /dev/null +++ b/domain/namespace.go @@ -0,0 +1,15 @@ +package domain + +import "time" + +type Namespace struct { + ID string + Name string + State string + Metadata map[string]interface{} + CreatedAt time.Time + UpdatedAt time.Time +} + +type NamespaceFilter struct { +} diff --git a/go.mod b/go.mod index 79bbd1e12..81c6fa89d 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,7 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 github.com/imdario/mergo v0.3.12 + github.com/lestrrat-go/jwx/v2 v2.0.12 github.com/lib/pq v1.10.0 github.com/mcuadros/go-defaults v1.2.0 github.com/mcuadros/go-lookup v0.0.0-20200831155250-80f87a4fa5ee @@ -30,7 +31,7 @@ require ( github.com/sergi/go-diff v1.0.0 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.6.1 - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.4 github.com/uptrace/opentelemetry-go-extra/otelgorm v0.1.17 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.37.0 @@ -38,7 +39,7 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0 go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.11.2 go.opentelemetry.io/otel/sdk v1.14.0 - golang.org/x/net v0.8.0 + golang.org/x/net v0.10.0 golang.org/x/oauth2 v0.1.0 golang.org/x/sync v0.1.0 google.golang.org/api v0.84.0 @@ -68,6 +69,7 @@ require ( github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/dlclark/regexp2 v1.2.0 // indirect github.com/docker/cli v23.0.1+incompatible // indirect github.com/docker/docker v23.0.1+incompatible // indirect @@ -80,6 +82,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-playground/locales v0.13.0 // indirect github.com/go-playground/universal-translator v0.17.0 // indirect + github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect @@ -103,6 +106,11 @@ require ( github.com/jmoiron/sqlx v1.3.5 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/leodido/go-urn v1.2.0 // indirect + github.com/lestrrat-go/blackmagic v1.0.1 // indirect + github.com/lestrrat-go/httpcc v1.0.1 // indirect + github.com/lestrrat-go/httprc v1.0.4 // indirect + github.com/lestrrat-go/iter v1.0.2 // indirect + github.com/lestrrat-go/option v1.0.1 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/magiconair/properties v1.8.5 // indirect github.com/mattn/go-colorable v0.1.12 // indirect @@ -124,6 +132,7 @@ require ( github.com/rivo/uniseg v0.2.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/schollz/progressbar/v3 v3.8.5 // indirect + github.com/segmentio/asm v1.2.0 // indirect github.com/spf13/afero v1.9.2 // indirect github.com/spf13/cast v1.3.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -146,11 +155,11 @@ require ( go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.10.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.7.0 // indirect + golang.org/x/crypto v0.12.0 // indirect golang.org/x/mod v0.9.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/term v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect golang.org/x/tools v0.7.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index 129d11b65..348b9cf07 100644 --- a/go.sum +++ b/go.sum @@ -411,6 +411,9 @@ github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/denisenkom/go-mssqldb v0.10.0 h1:QykgLZBorFE95+gO3u9esLd0BmbvpWp0/waNNZfHBM8= github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= @@ -574,6 +577,8 @@ github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWe github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gocql/gocql v0.0.0-20210515062232-b7ef815b4556/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= @@ -918,6 +923,19 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/ktrysmt/go-bitbucket v0.6.4/go.mod h1:9u0v3hsd2rqCHRIpbir1oP7F58uo5dq19sBYvuMoyQ4= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/lestrrat-go/blackmagic v1.0.1 h1:lS5Zts+5HIC/8og6cGHb0uCcNCa3OUt1ygh3Qz2Fe80= +github.com/lestrrat-go/blackmagic v1.0.1/go.mod h1:UrEqBzIR2U6CnzVyUtfM6oZNMt/7O7Vohk2J0OGSAtU= +github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE= +github.com/lestrrat-go/httpcc v1.0.1/go.mod h1:qiltp3Mt56+55GPVCbTdM9MlqhvzyuL6W/NMDA8vA5E= +github.com/lestrrat-go/httprc v1.0.4 h1:bAZymwoZQb+Oq8MEbyipag7iSq6YIga8Wj6GOiJGdI8= +github.com/lestrrat-go/httprc v1.0.4/go.mod h1:mwwz3JMTPBjHUkkDv/IGJ39aALInZLrhBp0X7KGUZlo= +github.com/lestrrat-go/iter v1.0.2 h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI= +github.com/lestrrat-go/iter v1.0.2/go.mod h1:Momfcq3AnRlRjI5b5O8/G5/BvpzrhoFTZcn06fEOPt4= +github.com/lestrrat-go/jwx/v2 v2.0.12 h1:3d589+5w/b9b7S3DneICPW16AqTyYXB7VRjgluSDWeA= +github.com/lestrrat-go/jwx/v2 v2.0.12/go.mod h1:Mq4KN1mM7bp+5z/W5HS8aCNs5RKZ911G/0y2qUjAQuQ= +github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= +github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU= +github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -1201,6 +1219,8 @@ github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24 github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= +github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= @@ -1275,8 +1295,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -1447,8 +1467,8 @@ golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1497,6 +1517,7 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1577,8 +1598,9 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220812174116-3211cb980234/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20220919232410-f2f64ebce3c1/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1764,8 +1786,10 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220818161305-2296e01440c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1773,8 +1797,10 @@ golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4 golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1786,8 +1812,10 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1877,6 +1905,7 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/internal/server/config.go b/internal/server/config.go index 93f0862b9..62b32f637 100644 --- a/internal/server/config.go +++ b/internal/server/config.go @@ -19,9 +19,10 @@ type DefaultAuth struct { } type Auth struct { - Provider string `mapstructure:"provider" default:"default"` - Default DefaultAuth `mapstructure:"default"` - OIDC auth.OIDCAuth `mapstructure:"oidc"` + Provider string `mapstructure:"provider" default:"default"` + Default DefaultAuth `mapstructure:"default"` + OIDC auth.OIDCAuth `mapstructure:"oidc"` + Frontier auth.FrontierConfig `mapstructure:"frontier"` } type Jobs struct { @@ -87,5 +88,9 @@ func LoadConfig(serverConfigFileFromFlag string) (Config, error) { cfg.Auth.Default.HeaderKey = cfg.AuthenticatedUserHeaderKey } + // fail if encryption secret key is not set + if cfg.EncryptionSecretKeyKey == "" { + fmt.Println("WARNING: encryption_secret_key is not set") + } return cfg, nil } diff --git a/internal/server/server.go b/internal/server/server.go index 68b943508..d27e9bbf9 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -8,6 +8,9 @@ import ( "strings" "time" + "github.com/google/uuid" + "github.com/raystack/guardian/domain" + "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -124,6 +127,7 @@ func RunServer(config *Config) error { ), grpc_logrus.UnaryServerInterceptor(logrusEntry), authInterceptor, + auth.FrontierJWTInterceptor(config.Auth.Frontier), withLogrusContext(), otelgrpc.UnaryServerInterceptor(), )), @@ -143,6 +147,7 @@ func RunServer(config *Config) error { services.AppealService, services.ApprovalService, services.GrantService, + services.NamespaceService, protoAdapter, authUserContextKey[config.Auth.Provider], )) @@ -192,7 +197,7 @@ func RunServer(config *Config) error { }) baseMux.Handle("/api/", http.StripPrefix("/api", gwmux)) - logger.Info(fmt.Sprintf("server running on %s", address)) + logger.Info(fmt.Sprintf("server running on %s(rest) and %s(grpc)", address, grpcAddress)) return mux.Serve( runtimeCtx, @@ -208,7 +213,7 @@ func RunServer(config *Config) error { } // Migrate runs the schema migration scripts -func Migrate(c *Config) error { +func Migrate(ctx context.Context, c *Config) error { store, err := getStore(c) if err != nil { return err @@ -217,11 +222,30 @@ func Migrate(c *Config) error { sqldb, _ := store.DB().DB() auditRepository := audit_repos.NewPostgresRepository(sqldb) - if err := auditRepository.Init(context.Background()); err != nil { + if err := auditRepository.Init(ctx); err != nil { return fmt.Errorf("initializing audit repository: %w", err) } - return store.Migrate() + if err := store.Migrate(); err != nil { + return fmt.Errorf("migrating database: %w", err) + } + namespaceRepo := postgres.NewNamespaceRepository(store) + if _, err := namespaceRepo.GetOne(ctx, uuid.Nil.String()); err != nil { + fmt.Println("> migrating default namespace") + if err := namespaceRepo.BulkUpsert(ctx, []*domain.Namespace{ + { + ID: uuid.Nil.String(), + Name: "default", + State: "active", + }, + }); err != nil { + return fmt.Errorf("creating default namespace failed: %w", err) + } + fmt.Println("> default namespace migrated successfully") + } + + fmt.Println("> migration completed successfully") + return nil } func getStore(c *Config) (*postgres.Store, error) { diff --git a/internal/server/services.go b/internal/server/services.go index 1ccfa2aab..124fcd1f8 100644 --- a/internal/server/services.go +++ b/internal/server/services.go @@ -3,6 +3,8 @@ package server import ( "context" + "github.com/raystack/guardian/core/namespace" + "github.com/raystack/guardian/plugins/providers/dataplex" "github.com/go-playground/validator/v10" @@ -35,13 +37,14 @@ import ( ) type Services struct { - ResourceService *resource.Service - ActivityService *activity.Service - ProviderService *provider.Service - PolicyService *policy.Service - ApprovalService *approval.Service - AppealService *appeal.Service - GrantService *grant.Service + ResourceService *resource.Service + ActivityService *activity.Service + ProviderService *provider.Service + PolicyService *policy.Service + ApprovalService *approval.Service + AppealService *appeal.Service + GrantService *grant.Service + NamespaceService *namespace.Service } type ServiceDeps struct { @@ -94,13 +97,14 @@ func InitServices(deps ServiceDeps) (*Services, error) { actorExtractor, ) - activityRepository := postgres.NewActivityRepository(store.DB()) - providerRepository := postgres.NewProviderRepository(store.DB()) - policyRepository := postgres.NewPolicyRepository(store.DB()) - resourceRepository := postgres.NewResourceRepository(store.DB()) - appealRepository := postgres.NewAppealRepository(store.DB()) - approvalRepository := postgres.NewApprovalRepository(store.DB()) - grantRepository := postgres.NewGrantRepository(store.DB()) + activityRepository := postgres.NewActivityRepository(store) + providerRepository := postgres.NewProviderRepository(store) + policyRepository := postgres.NewPolicyRepository(store) + resourceRepository := postgres.NewResourceRepository(store) + appealRepository := postgres.NewAppealRepository(store) + approvalRepository := postgres.NewApprovalRepository(store) + grantRepository := postgres.NewGrantRepository(store) + namespaceRepository := postgres.NewNamespaceRepository(store) providerClients := []provider.Client{ bigquery.NewProvider(domain.ProviderTypeBigQuery, deps.Crypto, deps.Logger), @@ -154,6 +158,7 @@ func InitServices(deps ServiceDeps) (*Services, error) { Validator: deps.Validator, AuditLogger: auditLogger, }) + namespaceService := namespace.NewService(namespaceRepository) approvalService := approval.NewService(approval.ServiceDeps{ Repository: approvalRepository, PolicyService: policyService, @@ -180,6 +185,7 @@ func InitServices(deps ServiceDeps) (*Services, error) { approvalService, appealService, grantService, + namespaceService, }, nil } diff --git a/internal/store/postgres/activity_repository.go b/internal/store/postgres/activity_repository.go index 8c34dd43e..1c1c3ba61 100644 --- a/internal/store/postgres/activity_repository.go +++ b/internal/store/postgres/activity_repository.go @@ -5,43 +5,47 @@ import ( "errors" "fmt" + "gorm.io/gorm/clause" + "github.com/raystack/guardian/core/activity" "github.com/raystack/guardian/domain" "github.com/raystack/guardian/internal/store/postgres/model" "gorm.io/gorm" - "gorm.io/gorm/clause" ) type ActivityRepository struct { - db *gorm.DB + store *Store } -func NewActivityRepository(db *gorm.DB) *ActivityRepository { - return &ActivityRepository{db} +func NewActivityRepository(store *Store) *ActivityRepository { + return &ActivityRepository{ + store: store, + } } func (r *ActivityRepository) Find(ctx context.Context, filter domain.ListProviderActivitiesFilter) ([]*domain.Activity, error) { var activities []*model.Activity - db := r.db.WithContext(ctx) - if filter.ProviderIDs != nil { - db = db.Where(`"provider_id" IN ?`, filter.ProviderIDs) - } - if filter.ResourceIDs != nil { - db = db.Where(`"resource_id" IN ?`, filter.ResourceIDs) - } - if filter.AccountIDs != nil { - db = db.Where(`"account_id" IN ?`, filter.AccountIDs) - } - if filter.Types != nil { - db = db.Where(`"type" IN ?`, filter.Types) - } - if filter.TimestampGte != nil { - db = db.Where(`"timestamp" >= ?`, *filter.TimestampGte) - } - if filter.TimestampLte != nil { - db = db.Where(`"timestamp" <= ?`, *filter.TimestampLte) - } - if err := db.Find(&activities).Error; err != nil { + if err := r.store.Tx(ctx, func(tx *gorm.DB) error { + if filter.ProviderIDs != nil { + tx = tx.Where(`"provider_id" IN ?`, filter.ProviderIDs) + } + if filter.ResourceIDs != nil { + tx = tx.Where(`"resource_id" IN ?`, filter.ResourceIDs) + } + if filter.AccountIDs != nil { + tx = tx.Where(`"account_id" IN ?`, filter.AccountIDs) + } + if filter.Types != nil { + tx = tx.Where(`"type" IN ?`, filter.Types) + } + if filter.TimestampGte != nil { + tx = tx.Where(`"timestamp" >= ?`, *filter.TimestampGte) + } + if filter.TimestampLte != nil { + tx = tx.Where(`"timestamp" <= ?`, *filter.TimestampLte) + } + return tx.Find(&activities).Error + }); err != nil { return nil, err } @@ -58,12 +62,12 @@ func (r *ActivityRepository) Find(ctx context.Context, filter domain.ListProvide func (r *ActivityRepository) GetOne(ctx context.Context, id string) (*domain.Activity, error) { var m model.Activity - if err := r.db. - WithContext(ctx). - Joins("Provider"). - Joins("Resource"). - Where(`"activities"."id" = ?`, id). - First(&m).Error; err != nil { + if err := r.store.Tx(ctx, func(tx *gorm.DB) error { + return tx.Joins("Provider"). + Joins("Resource"). + Where(`"activities"."id" = ?`, id). + First(&m).Error + }); err != nil { if errors.Is(err, gorm.ErrRecordNotFound) { return nil, activity.ErrNotFound } @@ -91,6 +95,7 @@ func (r *ActivityRepository) BulkUpsert(ctx context.Context, activities []*domai if err := activityModels[i].FromDomain(a); err != nil { return fmt.Errorf("failed to convert domain to model: %w", err) } + activityModels[i].NamespaceID = namespaceFromContext(ctx) // use single resource reference for activities with same resource if r := activityModels[i].Resource; r != nil { @@ -103,10 +108,11 @@ func (r *ActivityRepository) BulkUpsert(ctx context.Context, activities []*domai } } - return r.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + return r.store.Tx(ctx, func(tx *gorm.DB) error { // upsert resources separately to avoid resource upsertion duplicate issue var resources []*model.Resource for _, r := range uniqueResourcesMap { + r.NamespaceID = namespaceFromContext(ctx) resources = append(resources, r) } if len(resources) > 0 { @@ -124,6 +130,7 @@ func (r *ActivityRepository) BulkUpsert(ctx context.Context, activities []*domai if err := tx.Omit("Resource"). Clauses(clause.OnConflict{ Columns: []clause.Column{ + {Name: "namespace_id"}, {Name: "provider_id"}, {Name: "provider_activity_id"}, }, diff --git a/internal/store/postgres/activity_repository_test.go b/internal/store/postgres/activity_repository_test.go index 4c3469df7..82b9c3231 100644 --- a/internal/store/postgres/activity_repository_test.go +++ b/internal/store/postgres/activity_repository_test.go @@ -42,9 +42,9 @@ func (s *ActivityRepositoryTestSuite) SetupSuite() { s.T().Fatal(err) } s.store = store - s.repository = postgres.NewActivityRepository(store.DB()) - s.providerRepository = postgres.NewProviderRepository(store.DB()) - s.resourceRepository = postgres.NewResourceRepository(store.DB()) + s.repository = postgres.NewActivityRepository(store) + s.providerRepository = postgres.NewProviderRepository(store) + s.resourceRepository = postgres.NewResourceRepository(store) s.T().Cleanup(func() { db, err := s.store.DB().DB() diff --git a/internal/store/postgres/appeal_repository.go b/internal/store/postgres/appeal_repository.go index 08dbeadde..c9e69068e 100644 --- a/internal/store/postgres/appeal_repository.go +++ b/internal/store/postgres/appeal_repository.go @@ -24,27 +24,30 @@ var ( // AppealRepository talks to the store to read or insert data type AppealRepository struct { - db *gorm.DB + store *Store } // NewAppealRepository returns repository struct -func NewAppealRepository(db *gorm.DB) *AppealRepository { - return &AppealRepository{db} +func NewAppealRepository(store *Store) *AppealRepository { + return &AppealRepository{ + store: store, + } } // GetByID returns appeal record by id along with the approvals and the approvers func (r *AppealRepository) GetByID(ctx context.Context, id string) (*domain.Appeal, error) { m := new(model.Appeal) - if err := r.db. - WithContext(ctx). - Preload("Approvals", func(db *gorm.DB) *gorm.DB { - return db.Order("Approvals.index ASC") - }). - Preload("Approvals.Approvers"). - Preload("Resource"). - Preload("Grant"). - First(&m, "id = ?", id). - Error; err != nil { + if err := r.store.Tx(ctx, func(tx *gorm.DB) error { + return tx. + Preload("Approvals", func(db *gorm.DB) *gorm.DB { + return db.Order("Approvals.index ASC") + }). + Preload("Approvals.Approvers"). + Preload("Resource"). + Preload("Grant"). + First(&m, "id = ?", id). + Error + }); err != nil { if errors.Is(err, gorm.ErrRecordNotFound) { return nil, appeal.ErrAppealNotFound } @@ -63,59 +66,62 @@ func (r *AppealRepository) Find(ctx context.Context, filters *domain.ListAppeals if err := utils.ValidateStruct(filters); err != nil { return nil, err } + var models []*model.Appeal - db := r.db.WithContext(ctx) - if filters.CreatedBy != "" { - db = db.Where(`"appeals"."created_by" = ?`, filters.CreatedBy) - } - accounts := make([]string, 0) - if filters.AccountID != "" { - accounts = append(accounts, filters.AccountID) - } - if filters.AccountIDs != nil { - accounts = append(accounts, filters.AccountIDs...) - } - if len(accounts) > 0 { - db = db.Where(`"appeals"."account_id" IN ?`, accounts) - } - if filters.Statuses != nil { - db = db.Where(`"appeals"."status" IN ?`, filters.Statuses) - } - if filters.ResourceID != "" { - db = db.Where(`"appeals"."resource_id" = ?`, filters.ResourceID) - } - if filters.Role != "" { - db = db.Where(`"appeals"."role" = ?`, filters.Role) - } - if !filters.ExpirationDateLessThan.IsZero() { - db = db.Where(`"options" -> 'expiration_date' < ?`, filters.ExpirationDateLessThan) - } - if !filters.ExpirationDateGreaterThan.IsZero() { - db = db.Where(`"options" -> 'expiration_date' > ?`, filters.ExpirationDateGreaterThan) - } - if filters.OrderBy != nil { - db = addOrderByClause(db, filters.OrderBy, addOrderByClauseOptions{ - statusColumnName: `"appeals"."status"`, - statusesOrder: AppealStatusDefaultSort, - }) - } + err := r.store.Tx(ctx, func(tx *gorm.DB) error { + db := tx + if filters.CreatedBy != "" { + db = db.Where(`"appeals"."created_by" = ?`, filters.CreatedBy) + } + accounts := make([]string, 0) + if filters.AccountID != "" { + accounts = append(accounts, filters.AccountID) + } + if filters.AccountIDs != nil { + accounts = append(accounts, filters.AccountIDs...) + } + if len(accounts) > 0 { + db = db.Where(`"appeals"."account_id" IN ?`, accounts) + } + if filters.Statuses != nil { + db = db.Where(`"appeals"."status" IN ?`, filters.Statuses) + } + if filters.ResourceID != "" { + db = db.Where(`"appeals"."resource_id" = ?`, filters.ResourceID) + } + if filters.Role != "" { + db = db.Where(`"appeals"."role" = ?`, filters.Role) + } + if !filters.ExpirationDateLessThan.IsZero() { + db = db.Where(`"options" -> 'expiration_date' < ?`, filters.ExpirationDateLessThan) + } + if !filters.ExpirationDateGreaterThan.IsZero() { + db = db.Where(`"options" -> 'expiration_date' > ?`, filters.ExpirationDateGreaterThan) + } + if filters.OrderBy != nil { + db = addOrderByClause(db, filters.OrderBy, addOrderByClauseOptions{ + statusColumnName: `"appeals"."status"`, + statusesOrder: AppealStatusDefaultSort, + }) + } - db = db.Joins("Resource") - if filters.ProviderTypes != nil { - db = db.Where(`"Resource"."provider_type" IN ?`, filters.ProviderTypes) - } - if filters.ProviderURNs != nil { - db = db.Where(`"Resource"."provider_urn" IN ?`, filters.ProviderURNs) - } - if filters.ResourceTypes != nil { - db = db.Where(`"Resource"."type" IN ?`, filters.ResourceTypes) - } - if filters.ResourceURNs != nil { - db = db.Where(`"Resource"."urn" IN ?`, filters.ResourceURNs) - } + db = db.Joins("Resource") + if filters.ProviderTypes != nil { + db = db.Where(`"Resource"."provider_type" IN ?`, filters.ProviderTypes) + } + if filters.ProviderURNs != nil { + db = db.Where(`"Resource"."provider_urn" IN ?`, filters.ProviderURNs) + } + if filters.ResourceTypes != nil { + db = db.Where(`"Resource"."type" IN ?`, filters.ResourceTypes) + } + if filters.ResourceURNs != nil { + db = db.Where(`"Resource"."urn" IN ?`, filters.ResourceURNs) + } - var models []*model.Appeal - if err := db.Joins("Grant").Find(&models).Error; err != nil { + return db.Joins("Grant").Find(&models).Error + }) + if err != nil { return nil, err } @@ -140,10 +146,11 @@ func (r *AppealRepository) BulkUpsert(ctx context.Context, appeals []*domain.App if err := m.FromDomain(a); err != nil { return err } + m.NamespaceID = namespaceFromContext(ctx) models = append(models, m) } - return r.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + return r.store.Tx(ctx, func(tx *gorm.DB) error { if err := tx. Clauses(clause.OnConflict{UpdateAll: true}). Create(models). @@ -170,8 +177,9 @@ func (r *AppealRepository) Update(ctx context.Context, a *domain.Appeal) error { if err := m.FromDomain(a); err != nil { return err } + m.NamespaceID = namespaceFromContext(ctx) - return r.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + return r.store.Tx(ctx, func(tx *gorm.DB) error { if err := tx.Omit("Approvals.Approvers").Session(&gorm.Session{FullSaveAssociations: true}).Save(&m).Error; err != nil { return err } diff --git a/internal/store/postgres/appeal_repository_test.go b/internal/store/postgres/appeal_repository_test.go index 8862c8620..3b1122960 100644 --- a/internal/store/postgres/appeal_repository_test.go +++ b/internal/store/postgres/appeal_repository_test.go @@ -38,13 +38,13 @@ func (s *AppealRepositoryTestSuite) SetupSuite() { ctx := context.Background() - s.repository = postgres.NewAppealRepository(s.store.DB()) + s.repository = postgres.NewAppealRepository(s.store) s.dummyPolicy = &domain.Policy{ ID: "policy_test", Version: 1, } - policyRepository := postgres.NewPolicyRepository(s.store.DB()) + policyRepository := postgres.NewPolicyRepository(s.store) err = policyRepository.Create(ctx, s.dummyPolicy) s.Require().NoError(err) @@ -63,7 +63,7 @@ func (s *AppealRepositoryTestSuite) SetupSuite() { }, }, } - providerRepository := postgres.NewProviderRepository(s.store.DB()) + providerRepository := postgres.NewProviderRepository(s.store) err = providerRepository.Create(ctx, s.dummyProvider) s.Require().NoError(err) @@ -74,7 +74,7 @@ func (s *AppealRepositoryTestSuite) SetupSuite() { URN: "resource_urn_test", Name: "resource_name_test", } - resourceRepository := postgres.NewResourceRepository(s.store.DB()) + resourceRepository := postgres.NewResourceRepository(s.store) err = resourceRepository.BulkUpsert(ctx, []*domain.Resource{s.dummyResource}) s.Require().NoError(err) } diff --git a/internal/store/postgres/approval_repository.go b/internal/store/postgres/approval_repository.go index 96cf1fd62..e57363b13 100644 --- a/internal/store/postgres/approval_repository.go +++ b/internal/store/postgres/approval_repository.go @@ -22,10 +22,10 @@ var ( ) type ApprovalRepository struct { - db *gorm.DB + store *Store } -func NewApprovalRepository(db *gorm.DB) *ApprovalRepository { +func NewApprovalRepository(db *Store) *ApprovalRepository { return &ApprovalRepository{db} } @@ -34,49 +34,50 @@ func (r *ApprovalRepository) ListApprovals(ctx context.Context, conditions *doma return nil, err } - records := []*domain.Approval{} - - db := r.db.WithContext(ctx) - db = db.Preload("Appeal.Resource") - db = db.Joins("Appeal") - db = db.Joins(`JOIN "approvers" ON "approvals"."id" = "approvers"."approval_id"`) + var models []*model.Approval + err := r.store.Tx(ctx, func(tx *gorm.DB) error { + tx = tx.Preload("Appeal.Resource") + tx = tx.Joins("Appeal") + tx = tx.Joins(`JOIN "approvers" ON "approvals"."id" = "approvers"."approval_id"`) - if conditions.CreatedBy != "" { - db = db.Where(`"approvers"."email" = ?`, conditions.CreatedBy) - } - if conditions.Statuses != nil { - db = db.Where(`"approvals"."status" IN ?`, conditions.Statuses) - } - if conditions.AccountID != "" { - db = db.Where(`"Appeal"."account_id" = ?`, conditions.AccountID) - } + if conditions.CreatedBy != "" { + tx = tx.Where(`"approvers"."email" = ?`, conditions.CreatedBy) + } + if conditions.Statuses != nil { + tx = tx.Where(`"approvals"."status" IN ?`, conditions.Statuses) + } + if conditions.AccountID != "" { + tx = tx.Where(`"Appeal"."account_id" = ?`, conditions.AccountID) + } - if len(conditions.AppealStatuses) == 0 { - db = db.Where(`"Appeal"."status" != ?`, domain.AppealStatusCanceled) - } else { - db = db.Where(`"Appeal"."status" IN ?`, conditions.AppealStatuses) - } + if len(conditions.AppealStatuses) == 0 { + tx = tx.Where(`"Appeal"."status" != ?`, domain.AppealStatusCanceled) + } else { + tx = tx.Where(`"Appeal"."status" IN ?`, conditions.AppealStatuses) + } - if conditions.OrderBy != nil { - db = addOrderByClause(db, conditions.OrderBy, addOrderByClauseOptions{ - statusColumnName: `"approvals"."status"`, - statusesOrder: AppealStatusDefaultSort, - }) - } + if conditions.OrderBy != nil { + tx = addOrderByClause(tx, conditions.OrderBy, addOrderByClauseOptions{ + statusColumnName: `"approvals"."status"`, + statusesOrder: AppealStatusDefaultSort, + }) + } - if conditions.Size > 0 { - db = db.Limit(conditions.Size) - } + if conditions.Size > 0 { + tx = tx.Limit(conditions.Size) + } - if conditions.Offset > 0 { - db = db.Offset(conditions.Offset) - } + if conditions.Offset > 0 { + tx = tx.Offset(conditions.Offset) + } - var models []*model.Approval - if err := db.Find(&models).Error; err != nil { + return tx.Find(&models).Error + }) + if err != nil { return nil, err } + records := []*domain.Approval{} for _, m := range models { approval, err := m.ToDomain() if err != nil { @@ -96,11 +97,11 @@ func (r *ApprovalRepository) BulkInsert(ctx context.Context, approvals []*domain if err := m.FromDomain(a); err != nil { return err } - + m.NamespaceID = namespaceFromContext(ctx) models = append(models, m) } - return r.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + return r.store.Tx(ctx, func(tx *gorm.DB) error { if err := tx.Create(models).Error; err != nil { return err } @@ -123,10 +124,12 @@ func (r *ApprovalRepository) AddApprover(ctx context.Context, approver *domain.A if err := m.FromDomain(approver); err != nil { return fmt.Errorf("parsing approver: %w", err) } - - result := r.db.Create(m) - if result.Error != nil { - return fmt.Errorf("inserting new approver: %w", result.Error) + m.NamespaceID = namespaceFromContext(ctx) + err := r.store.Tx(ctx, func(tx *gorm.DB) error { + return tx.Create(m).Error + }) + if err != nil { + return fmt.Errorf("inserting new approver: %w", err) } newApprover := m.ToDomain() @@ -135,11 +138,13 @@ func (r *ApprovalRepository) AddApprover(ctx context.Context, approver *domain.A } func (r *ApprovalRepository) DeleteApprover(ctx context.Context, approvalID, email string) error { - result := r.db. - WithContext(ctx). - Where("approval_id = ?", approvalID). - Where("email = ?", email). - Delete(&model.Approver{}) + var result *gorm.DB + _ = r.store.Tx(ctx, func(tx *gorm.DB) error { + result = tx.Where("approval_id = ?", approvalID). + Where("email = ?", email). + Delete(&model.Approver{}) + return nil + }) if result.Error != nil { return result.Error } diff --git a/internal/store/postgres/approval_repository_test.go b/internal/store/postgres/approval_repository_test.go index 6f940044e..a1bb8051e 100644 --- a/internal/store/postgres/approval_repository_test.go +++ b/internal/store/postgres/approval_repository_test.go @@ -42,7 +42,7 @@ func (s *ApprovalRepositoryTestSuite) SetupSuite() { s.T().Fatal(err) } - s.repository = postgres.NewApprovalRepository(s.store.DB()) + s.repository = postgres.NewApprovalRepository(s.store) ctx := context.Background() @@ -50,7 +50,7 @@ func (s *ApprovalRepositoryTestSuite) SetupSuite() { ID: "policy_test", Version: 1, } - policyRepository := postgres.NewPolicyRepository(s.store.DB()) + policyRepository := postgres.NewPolicyRepository(s.store) err = policyRepository.Create(ctx, s.dummyPolicy) s.Require().NoError(err) @@ -69,7 +69,7 @@ func (s *ApprovalRepositoryTestSuite) SetupSuite() { }, }, } - providerRepository := postgres.NewProviderRepository(s.store.DB()) + providerRepository := postgres.NewProviderRepository(s.store) err = providerRepository.Create(ctx, s.dummyProvider) s.Require().NoError(err) @@ -80,7 +80,7 @@ func (s *ApprovalRepositoryTestSuite) SetupSuite() { URN: "resource_urn_test", Name: "resource_name_test", } - resourceRepository := postgres.NewResourceRepository(s.store.DB()) + resourceRepository := postgres.NewResourceRepository(s.store) err = resourceRepository.BulkUpsert(ctx, []*domain.Resource{s.dummyResource}) s.Require().NoError(err) @@ -95,7 +95,7 @@ func (s *ApprovalRepositoryTestSuite) SetupSuite() { CreatedBy: "user@example.com", } - s.appealRepository = postgres.NewAppealRepository(s.store.DB()) + s.appealRepository = postgres.NewAppealRepository(s.store) err = s.appealRepository.BulkUpsert(ctx, []*domain.Appeal{s.dummyAppeal}) s.Require().NoError(err) } diff --git a/internal/store/postgres/grant_repository.go b/internal/store/postgres/grant_repository.go index 7603a2647..58478179e 100644 --- a/internal/store/postgres/grant_repository.go +++ b/internal/store/postgres/grant_repository.go @@ -21,68 +21,69 @@ var ( ) type GrantRepository struct { - db *gorm.DB + store *Store } -func NewGrantRepository(db *gorm.DB) *GrantRepository { +func NewGrantRepository(db *Store) *GrantRepository { return &GrantRepository{db} } func (r *GrantRepository) List(ctx context.Context, filter domain.ListGrantsFilter) ([]domain.Grant, error) { - db := r.db.WithContext(ctx) - if filter.AccountIDs != nil { - db = db.Where(`"grants"."account_id" IN ?`, filter.AccountIDs) - } - if filter.AccountTypes != nil { - db = db.Where(`"grants"."account_type" IN ?`, filter.AccountTypes) - } - if filter.ResourceIDs != nil { - db = db.Where(`"grants"."resource_id" IN ?`, filter.ResourceIDs) - } - if filter.Statuses != nil { - db = db.Where(`"grants"."status" IN ?`, filter.Statuses) - } - if filter.Roles != nil { - db = db.Where(`"grants"."role" IN ?`, filter.Roles) - } - if filter.Permissions != nil { - db = db.Where(`"grants"."permissions" @> ?`, pq.StringArray(filter.Permissions)) - } - if filter.Owner != "" { - db = db.Where(`"grants"."owner" = ?`, filter.Owner) - } else if filter.CreatedBy != "" { - db = db.Where(`"grants"."owner" = ?`, filter.CreatedBy) - } - if filter.IsPermanent != nil { - db = db.Where(`"grants"."is_permanent" = ?`, *filter.IsPermanent) - } - if filter.OrderBy != nil { - db = addOrderByClause(db, filter.OrderBy, addOrderByClauseOptions{ - statusColumnName: `"grants"."status"`, - statusesOrder: GrantStatusDefaultSort, - }) - } - if !filter.ExpirationDateLessThan.IsZero() { - db = db.Where(`"grants"."expiration_date" < ?`, filter.ExpirationDateLessThan) - } - if !filter.ExpirationDateGreaterThan.IsZero() { - db = db.Where(`"grants"."expiration_date" > ?`, filter.ExpirationDateGreaterThan) - } - if filter.ProviderTypes != nil { - db = db.Where(`"Resource"."provider_type" IN ?`, filter.ProviderTypes) - } - if filter.ProviderURNs != nil { - db = db.Where(`"Resource"."provider_urn" IN ?`, filter.ProviderURNs) - } - if filter.ResourceTypes != nil { - db = db.Where(`"Resource"."type" IN ?`, filter.ResourceTypes) - } - if filter.ResourceURNs != nil { - db = db.Where(`"Resource"."urn" IN ?`, filter.ResourceURNs) - } - var models []model.Grant - if err := db.Joins("Resource").Joins("Appeal").Find(&models).Error; err != nil { + err := r.store.Tx(ctx, func(tx *gorm.DB) error { + if filter.AccountIDs != nil { + tx = tx.Where(`"grants"."account_id" IN ?`, filter.AccountIDs) + } + if filter.AccountTypes != nil { + tx = tx.Where(`"grants"."account_type" IN ?`, filter.AccountTypes) + } + if filter.ResourceIDs != nil { + tx = tx.Where(`"grants"."resource_id" IN ?`, filter.ResourceIDs) + } + if filter.Statuses != nil { + tx = tx.Where(`"grants"."status" IN ?`, filter.Statuses) + } + if filter.Roles != nil { + tx = tx.Where(`"grants"."role" IN ?`, filter.Roles) + } + if filter.Permissions != nil { + tx = tx.Where(`"grants"."permissions" @> ?`, pq.StringArray(filter.Permissions)) + } + if filter.Owner != "" { + tx = tx.Where(`"grants"."owner" = ?`, filter.Owner) + } else if filter.CreatedBy != "" { + tx = tx.Where(`"grants"."owner" = ?`, filter.CreatedBy) + } + if filter.IsPermanent != nil { + tx = tx.Where(`"grants"."is_permanent" = ?`, *filter.IsPermanent) + } + if filter.OrderBy != nil { + tx = addOrderByClause(tx, filter.OrderBy, addOrderByClauseOptions{ + statusColumnName: `"grants"."status"`, + statusesOrder: GrantStatusDefaultSort, + }) + } + if !filter.ExpirationDateLessThan.IsZero() { + tx = tx.Where(`"grants"."expiration_date" < ?`, filter.ExpirationDateLessThan) + } + if !filter.ExpirationDateGreaterThan.IsZero() { + tx = tx.Where(`"grants"."expiration_date" > ?`, filter.ExpirationDateGreaterThan) + } + if filter.ProviderTypes != nil { + tx = tx.Where(`"Resource"."provider_type" IN ?`, filter.ProviderTypes) + } + if filter.ProviderURNs != nil { + tx = tx.Where(`"Resource"."provider_urn" IN ?`, filter.ProviderURNs) + } + if filter.ResourceTypes != nil { + tx = tx.Where(`"Resource"."type" IN ?`, filter.ResourceTypes) + } + if filter.ResourceURNs != nil { + tx = tx.Where(`"Resource"."urn" IN ?`, filter.ResourceURNs) + } + return tx.Joins("Resource").Joins("Appeal").Find(&models).Error + }) + if err != nil { return nil, err } @@ -100,7 +101,9 @@ func (r *GrantRepository) List(ctx context.Context, filter domain.ListGrantsFilt func (r *GrantRepository) GetByID(ctx context.Context, id string) (*domain.Grant, error) { m := new(model.Grant) - if err := r.db.WithContext(ctx).Joins("Resource").Joins("Appeal").First(&m, `"grants"."id" = ?`, id).Error; err != nil { + if err := r.store.Tx(ctx, func(tx *gorm.DB) error { + return tx.Joins("Resource").Joins("Appeal").First(&m, `"grants"."id" = ?`, id).Error + }); err != nil { if errors.Is(err, gorm.ErrRecordNotFound) { return nil, grant.ErrGrantNotFound } @@ -123,8 +126,9 @@ func (r *GrantRepository) Update(ctx context.Context, a *domain.Grant) error { if err := m.FromDomain(*a); err != nil { return fmt.Errorf("parsing grant payload: %w", err) } + m.NamespaceID = namespaceFromContext(ctx) - return r.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + return r.store.Tx(ctx, func(tx *gorm.DB) error { if err := tx.Model(m).Updates(*m).Error; err != nil { return err } @@ -145,12 +149,13 @@ func (r *GrantRepository) BulkInsert(ctx context.Context, grants []*domain.Grant if err := m.FromDomain(*g); err != nil { return fmt.Errorf("serializing grant: %w", err) } + m.NamespaceID = namespaceFromContext(ctx) models = append(models, m) } if len(models) > 0 { - return r.db.Transaction(func(tx *gorm.DB) error { - if err := r.db.Create(models).Error; err != nil { + return r.store.Tx(ctx, func(tx *gorm.DB) error { + if err := tx.Create(models).Error; err != nil { return err } @@ -176,10 +181,12 @@ func (r *GrantRepository) BulkUpsert(ctx context.Context, grants []*domain.Grant if err := m.FromDomain(*g); err != nil { return fmt.Errorf("serializing grant: %w", err) } + m.NamespaceID = namespaceFromContext(ctx) + m.Resource.NamespaceID = m.NamespaceID models = append(models, m) } - return r.db.Transaction(func(tx *gorm.DB) error { + return r.store.Tx(ctx, func(tx *gorm.DB) error { // upsert resources separately to avoid resource upsertion duplicate issue if err := upsertResources(tx, models); err != nil { return fmt.Errorf("upserting resources: %w", err) diff --git a/internal/store/postgres/grant_repository_test.go b/internal/store/postgres/grant_repository_test.go index 79276fed9..d64008489 100644 --- a/internal/store/postgres/grant_repository_test.go +++ b/internal/store/postgres/grant_repository_test.go @@ -45,7 +45,7 @@ func (s *GrantRepositoryTestSuite) SetupSuite() { s.T().Fatal(err) } - s.repository = postgres.NewGrantRepository(s.store.DB()) + s.repository = postgres.NewGrantRepository(s.store) ctx := context.Background() @@ -53,7 +53,7 @@ func (s *GrantRepositoryTestSuite) SetupSuite() { ID: "policy_test", Version: 1, } - policyRepository := postgres.NewPolicyRepository(s.store.DB()) + policyRepository := postgres.NewPolicyRepository(s.store) err = policyRepository.Create(ctx, s.dummyPolicy) s.Require().NoError(err) @@ -72,7 +72,7 @@ func (s *GrantRepositoryTestSuite) SetupSuite() { }, }, } - providerRepository := postgres.NewProviderRepository(s.store.DB()) + providerRepository := postgres.NewProviderRepository(s.store) err = providerRepository.Create(ctx, s.dummyProvider) s.Require().NoError(err) @@ -83,7 +83,7 @@ func (s *GrantRepositoryTestSuite) SetupSuite() { URN: "resource_urn_test", Name: "resource_name_test", } - resourceRepository := postgres.NewResourceRepository(s.store.DB()) + resourceRepository := postgres.NewResourceRepository(s.store) err = resourceRepository.BulkUpsert(ctx, []*domain.Resource{s.dummyResource}) s.Require().NoError(err) @@ -97,7 +97,7 @@ func (s *GrantRepositoryTestSuite) SetupSuite() { Permissions: []string{"permission_test"}, CreatedBy: "user@example.com", } - appealRepository := postgres.NewAppealRepository(s.store.DB()) + appealRepository := postgres.NewAppealRepository(s.store) err = appealRepository.BulkUpsert(ctx, []*domain.Appeal{s.dummyAppeal}) s.Require().NoError(err) } diff --git a/internal/store/postgres/migrations/000016_create_namespace_table_and_add_namespace_in_tables.down.sql b/internal/store/postgres/migrations/000016_create_namespace_table_and_add_namespace_in_tables.down.sql index b3de4e7e6..55403b43e 100644 --- a/internal/store/postgres/migrations/000016_create_namespace_table_and_add_namespace_in_tables.down.sql +++ b/internal/store/postgres/migrations/000016_create_namespace_table_and_add_namespace_in_tables.down.sql @@ -2,15 +2,7 @@ BEGIN; -- drop all index we created ALTER TABLE resources DROP CONSTRAINT fk_resources_provider_type_urn; -ALTER TABLE appeals DROP CONSTRAINT fk_appeals_resource; ALTER TABLE appeals DROP CONSTRAINT fk_appeals_policy_id_version; -ALTER TABLE approvals DROP CONSTRAINT fk_approvals_appeal; -ALTER TABLE approvers DROP CONSTRAINT fk_approvals_approvers; -ALTER TABLE grants DROP CONSTRAINT fk_grants_resource_id; -ALTER TABLE grants DROP CONSTRAINT fk_grants_appeal_id; -ALTER TABLE resources DROP CONSTRAINT fk_resources_parent_id; -ALTER TABLE activities DROP CONSTRAINT fk_activities_provider_id; -ALTER TABLE activities DROP CONSTRAINT fk_activities_resource_id DROP INDEX IF EXISTS activities_provider_activity_provider_idx; DROP INDEX IF EXISTS providers_type_urn; @@ -33,8 +25,11 @@ ALTER TABLE appeals DROP COLUMN IF EXISTS namespace_id; DROP INDEX IF EXISTS idx_approvals_namespace_id; ALTER TABLE approvals DROP COLUMN IF EXISTS namespace_id; -DROP INDEX IF EXISTS idx_audit_logs_namespace_id; -ALTER TABLE audit_logs DROP COLUMN IF EXISTS namespace_id; +DROP INDEX IF EXISTS idx_approvers_namespace_id; +ALTER TABLE approvers DROP COLUMN IF EXISTS namespace_id; + +-- DROP INDEX IF EXISTS idx_audit_logs_namespace_id; +-- ALTER TABLE audit_logs DROP COLUMN IF EXISTS namespace_id; DROP INDEX IF EXISTS idx_grants_namespace_id; ALTER TABLE grants DROP COLUMN IF EXISTS namespace_id; diff --git a/internal/store/postgres/migrations/000016_create_namespace_table_and_add_namespace_in_tables.up.sql b/internal/store/postgres/migrations/000016_create_namespace_table_and_add_namespace_in_tables.up.sql index 659c1613a..20b1ad817 100644 --- a/internal/store/postgres/migrations/000016_create_namespace_table_and_add_namespace_in_tables.up.sql +++ b/internal/store/postgres/migrations/000016_create_namespace_table_and_add_namespace_in_tables.up.sql @@ -1,9 +1,10 @@ BEGIN; +-- add additional columns CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE IF NOT EXISTS namespaces ( id uuid DEFAULT gen_random_uuid() PRIMARY KEY, - name text UNIQUE NOT NULL, + name text, state text, metadata jsonb, created_at timestamp DEFAULT NOW(), @@ -20,8 +21,12 @@ CREATE INDEX IF NOT EXISTS idx_appeals_namespace_id ON appeals(namespace_id); ALTER TABLE approvals ADD COLUMN IF NOT EXISTS namespace_id uuid NOT NULL DEFAULT uuid_nil(); CREATE INDEX IF NOT EXISTS idx_approvals_namespace_id ON approvals(namespace_id); -ALTER TABLE audit_logs ADD COLUMN IF NOT EXISTS namespace_id uuid NOT NULL DEFAULT uuid_nil(); -CREATE INDEX IF NOT EXISTS idx_audit_logs_namespace_id ON audit_logs(namespace_id); +ALTER TABLE approvers ADD COLUMN IF NOT EXISTS namespace_id uuid NOT NULL DEFAULT uuid_nil(); +CREATE INDEX IF NOT EXISTS idx_approvers_namespace_id ON approvers(namespace_id); + +-- not doing it for audit_logs as the table is not owned by us +-- ALTER TABLE audit_logs ADD COLUMN IF NOT EXISTS namespace_id uuid NOT NULL DEFAULT uuid_nil(); +-- CREATE INDEX IF NOT EXISTS idx_audit_logs_namespace_id ON audit_logs(namespace_id); ALTER TABLE grants ADD COLUMN IF NOT EXISTS namespace_id uuid NOT NULL DEFAULT uuid_nil(); CREATE INDEX IF NOT EXISTS idx_grants_namespace_id ON grants(namespace_id); @@ -37,47 +42,20 @@ CREATE INDEX IF NOT EXISTS idx_resources_namespace_id ON resources(namespace_id) -- drop all unique index/foreign constraints in use ALTER TABLE resources DROP CONSTRAINT fk_resources_provider; -ALTER TABLE appeals DROP CONSTRAINT fk_appeals_resource; -ALTER TABLE appeals DROP CONSTRAINT fk_appeals_policy; -ALTER TABLE approvals DROP CONSTRAINT fk_approvals_appeal; ALTER TABLE approvals DROP CONSTRAINT fk_appeals_approvals; -ALTER TABLE approvers DROP CONSTRAINT fk_approvals_approvers; -ALTER TABLE grants DROP CONSTRAINT fk_grants_resource; -ALTER TABLE grants DROP CONSTRAINT fk_grants_appeal; -ALTER TABLE resources DROP CONSTRAINT fk_resources_parent; -ALTER TABLE activities DROP CONSTRAINT fk_activities_provider; -ALTER TABLE activities DROP CONSTRAINT fk_activities_resource; - -DROP INDEX IF EXISTS provider_activity_index + +DROP INDEX IF EXISTS provider_activity_index; DROP INDEX IF EXISTS provider_index; DROP INDEX IF EXISTS resource_index; -- include namespace in unique index/foreign constraints -ALTER TABLE resources - ADD CONSTRAINT fk_resources_provider_type_urn FOREIGN KEY (namespace_id,provider_type,provider_urn) - REFERENCES providers(namespace_id,type,urn); -ALTER TABLE appeals - ADD CONSTRAINT fk_appeals_resource FOREIGN KEY (namespace_id,resource_id) REFERENCES resources(namespace_id,id); -ALTER TABLE appeals - ADD CONSTRAINT fk_appeals_policy_id_version FOREIGN KEY (namespace_id,policy_id,policy_version) REFERENCES policies(namespace_id,id,version); -ALTER TABLE approvals - ADD CONSTRAINT fk_approvals_appeal FOREIGN KEY (namespace_id,appeal_id) REFERENCES appeals(namespace_id,id); -ALTER TABLE approvers - ADD CONSTRAINT fk_approvals_approvers FOREIGN KEY (namespace_id,approval_id) REFERENCES approvals(namespace_id,id); -ALTER TABLE grants - ADD CONSTRAINT fk_grants_resource_id FOREIGN KEY (namespace_id,resource_id) REFERENCES resources(namespace_id,id); -ALTER TABLE grants - ADD CONSTRAINT fk_grants_appeal_id FOREIGN KEY (namespace_id,appeal_id) REFERENCES appeals(namespace_id,id); -ALTER TABLE resources - ADD CONSTRAINT fk_resources_parent_id FOREIGN KEY (namespace_id,parent_id) REFERENCES resources(namespace_id,id); -ALTER TABLE activities - ADD CONSTRAINT fk_activities_provider_id FOREIGN KEY (namespace_id,provider_id) REFERENCES providers(namespace_id,id); -ALTER TABLE activities - ADD CONSTRAINT fk_activities_resource_id FOREIGN KEY (namespace_id,resource_id) REFERENCES resources(namespace_id,id); CREATE UNIQUE INDEX activities_provider_activity_provider_idx ON activities(namespace_id, provider_activity_id, provider_id); CREATE UNIQUE INDEX providers_type_urn ON providers(namespace_id,type,urn); CREATE UNIQUE INDEX resources_provider_type_provider_urn_type_urn ON resources(namespace_id,provider_type,provider_urn,type,urn); +ALTER TABLE resources + ADD CONSTRAINT fk_resources_provider_type_urn FOREIGN KEY (namespace_id,provider_type,provider_urn) + REFERENCES providers(namespace_id,type,urn); COMMIT; \ No newline at end of file diff --git a/internal/store/postgres/migrations/000017_enable_row_level_security_all_tables.down.sql b/internal/store/postgres/migrations/000017_enable_row_level_security_all_tables.down.sql index f6b6b1acb..1ee542b77 100644 --- a/internal/store/postgres/migrations/000017_enable_row_level_security_all_tables.down.sql +++ b/internal/store/postgres/migrations/000017_enable_row_level_security_all_tables.down.sql @@ -3,7 +3,8 @@ BEGIN; DROP POLICY IF EXISTS activities_isolation_policy ON activities; DROP POLICY IF EXISTS appeals_isolation_policy ON appeals; DROP POLICY IF EXISTS approvals_isolation_policy ON approvals; -DROP POLICY IF EXISTS audit_logs_isolation_policy ON audit_logs; +DROP POLICY IF EXISTS approvers_isolation_policy ON approvers; +-- DROP POLICY IF EXISTS audit_logs_isolation_policy ON audit_logs; DROP POLICY IF EXISTS grants_isolation_policy ON grants; DROP POLICY IF EXISTS policies_isolation_policy ON policies; DROP POLICY IF EXISTS providers_isolation_policy ON providers; @@ -12,7 +13,8 @@ DROP POLICY IF EXISTS resources_isolation_policy ON resources; ALTER TABLE activities DISABLE ROW LEVEL SECURITY; ALTER TABLE appeals DISABLE ROW LEVEL SECURITY; ALTER TABLE approvals DISABLE ROW LEVEL SECURITY; -ALTER TABLE audit_logs DISABLE ROW LEVEL SECURITY; +ALTER TABLE approvers DISABLE ROW LEVEL SECURITY; +-- ALTER TABLE audit_logs DISABLE ROW LEVEL SECURITY; ALTER TABLE grants DISABLE ROW LEVEL SECURITY; ALTER TABLE policies DISABLE ROW LEVEL SECURITY; ALTER TABLE providers DISABLE ROW LEVEL SECURITY; diff --git a/internal/store/postgres/migrations/000017_enable_row_level_security_all_tables.up.sql b/internal/store/postgres/migrations/000017_enable_row_level_security_all_tables.up.sql index 2bcac2f05..2e40b8673 100644 --- a/internal/store/postgres/migrations/000017_enable_row_level_security_all_tables.up.sql +++ b/internal/store/postgres/migrations/000017_enable_row_level_security_all_tables.up.sql @@ -3,7 +3,8 @@ BEGIN; ALTER TABLE activities ENABLE ROW LEVEL SECURITY; ALTER TABLE appeals ENABLE ROW LEVEL SECURITY; ALTER TABLE approvals ENABLE ROW LEVEL SECURITY; -ALTER TABLE audit_logs ENABLE ROW LEVEL SECURITY; +ALTER TABLE approvers ENABLE ROW LEVEL SECURITY; +-- ALTER TABLE audit_logs ENABLE ROW LEVEL SECURITY; ALTER TABLE grants ENABLE ROW LEVEL SECURITY; ALTER TABLE policies ENABLE ROW LEVEL SECURITY; ALTER TABLE providers ENABLE ROW LEVEL SECURITY; @@ -19,8 +20,11 @@ CREATE POLICY appeals_isolation_policy on appeals USING (namespace_id = current_ DROP POLICY IF EXISTS approvals_isolation_policy ON approvals; CREATE POLICY approvals_isolation_policy on approvals USING (namespace_id = current_setting('app.current_tenant')::UUID); -DROP POLICY IF EXISTS audit_logs_isolation_policy ON audit_logs; -CREATE POLICY audit_logs_isolation_policy on audit_logs USING (namespace_id = current_setting('app.current_tenant')::UUID); +DROP POLICY IF EXISTS approvers_isolation_policy ON approvals; +CREATE POLICY approvers_isolation_policy on approvers USING (namespace_id = current_setting('app.current_tenant')::UUID); + +-- DROP POLICY IF EXISTS audit_logs_isolation_policy ON audit_logs; +-- CREATE POLICY audit_logs_isolation_policy on audit_logs USING (namespace_id = current_setting('app.current_tenant')::UUID); DROP POLICY IF EXISTS grants_isolation_policy ON grants; CREATE POLICY grants_isolation_policy on grants USING (namespace_id = current_setting('app.current_tenant')::UUID); diff --git a/internal/store/postgres/model/activity.go b/internal/store/postgres/model/activity.go index 580aaf709..51c40aa98 100644 --- a/internal/store/postgres/model/activity.go +++ b/internal/store/postgres/model/activity.go @@ -13,6 +13,7 @@ import ( type Activity struct { ID uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` + NamespaceID uuid.UUID `gorm:"type:uuid"` ProviderID uuid.UUID ResourceID uuid.UUID ProviderActivityID string @@ -83,7 +84,6 @@ func (m *Activity) FromDomain(a *domain.Activity) error { return fmt.Errorf("failed to convert resource: %w", err) } } - return nil } diff --git a/internal/store/postgres/model/appeal.go b/internal/store/postgres/model/appeal.go index 49c1d6c78..dc26def56 100644 --- a/internal/store/postgres/model/appeal.go +++ b/internal/store/postgres/model/appeal.go @@ -15,6 +15,7 @@ import ( // Appeal database model type Appeal struct { ID uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` + NamespaceID uuid.UUID `gorm:"type:uuid"` ResourceID string PolicyID string PolicyVersion uint diff --git a/internal/store/postgres/model/approval.go b/internal/store/postgres/model/approval.go index 53b9d39f1..d359e3b69 100644 --- a/internal/store/postgres/model/approval.go +++ b/internal/store/postgres/model/approval.go @@ -12,6 +12,7 @@ import ( // Approval database model type Approval struct { ID uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` + NamespaceID uuid.UUID `gorm:"type:uuid"` Name string `gorm:"index"` Index int AppealID string diff --git a/internal/store/postgres/model/approver.go b/internal/store/postgres/model/approver.go index 8cd623f48..17184ca47 100644 --- a/internal/store/postgres/model/approver.go +++ b/internal/store/postgres/model/approver.go @@ -11,10 +11,11 @@ import ( // Approver database model type Approver struct { - ID uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` - ApprovalID string - AppealID string `gorm:"index"` - Email string `gorm:"index"` + ID uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` + NamespaceID uuid.UUID `gorm:"type:uuid"` + ApprovalID string + AppealID string `gorm:"index"` + Email string `gorm:"index"` CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` diff --git a/internal/store/postgres/model/grant.go b/internal/store/postgres/model/grant.go index b323910ae..7eac78b51 100644 --- a/internal/store/postgres/model/grant.go +++ b/internal/store/postgres/model/grant.go @@ -13,6 +13,7 @@ import ( type Grant struct { ID uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` + NamespaceID uuid.UUID `gorm:"type:uuid"` Status string StatusInProvider string AccountID string diff --git a/internal/store/postgres/model/namespace.go b/internal/store/postgres/model/namespace.go new file mode 100644 index 000000000..25ae28507 --- /dev/null +++ b/internal/store/postgres/model/namespace.go @@ -0,0 +1,65 @@ +package model + +import ( + "encoding/json" + "fmt" + "time" + + "github.com/google/uuid" + "github.com/raystack/guardian/domain" + "gorm.io/datatypes" +) + +type Namespace struct { + ID uuid.UUID `gorm:"type:uuid;primaryKey"` + Name string + State string + Metadata datatypes.JSON + CreatedAt time.Time `gorm:"autoCreateTime"` + UpdatedAt time.Time `gorm:"autoUpdateTime"` +} + +func (Namespace) TableName() string { + return "namespaces" +} + +func (m *Namespace) FromDomain(a *domain.Namespace) error { + if a.ID != "" { + id, err := uuid.Parse(a.ID) + if err != nil { + return fmt.Errorf("failed to parse id: %w", err) + } + m.ID = id + } + + m.Name = a.Name + m.State = a.State + if a.Metadata != nil { + metadata, err := json.Marshal(a.Metadata) + if err != nil { + return fmt.Errorf("failed to marshal provider namespace metadata: %w", err) + } + m.Metadata = metadata + } + m.CreatedAt = a.CreatedAt + m.UpdatedAt = a.UpdatedAt + return nil +} + +func (m *Namespace) ToDomain(a *domain.Namespace) error { + if a == nil { + return fmt.Errorf("namespace target can't be nil") + } + a.ID = m.ID.String() + a.Name = m.Name + a.State = m.State + a.UpdatedAt = m.UpdatedAt + a.CreatedAt = m.CreatedAt + + if m.Metadata != nil { + if err := json.Unmarshal(m.Metadata, &a.Metadata); err != nil { + return fmt.Errorf("failed to unmarshal provider activity metadata: %w", err) + } + } + return nil +} diff --git a/internal/store/postgres/model/policy.go b/internal/store/postgres/model/policy.go index 841653a7c..21a048f29 100644 --- a/internal/store/postgres/model/policy.go +++ b/internal/store/postgres/model/policy.go @@ -4,6 +4,8 @@ import ( "encoding/json" "time" + "github.com/google/uuid" + "github.com/raystack/guardian/domain" "gorm.io/datatypes" "gorm.io/gorm" @@ -11,8 +13,9 @@ import ( // Policy is the database model for policy type Policy struct { - ID string `gorm:"primaryKey"` - Version uint `gorm:"primaryKey"` + ID string `gorm:"primaryKey"` + NamespaceID uuid.UUID `gorm:"type:uuid"` + Version uint `gorm:"primaryKey"` Description string Steps datatypes.JSON AppealConfig datatypes.JSON diff --git a/internal/store/postgres/model/provider.go b/internal/store/postgres/model/provider.go index f548b0a98..d8bbe6424 100644 --- a/internal/store/postgres/model/provider.go +++ b/internal/store/postgres/model/provider.go @@ -13,13 +13,14 @@ import ( // Provider is the database model for provider type Provider struct { - ID uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` - Type string `gorm:"uniqueIndex:provider_index"` - URN string `gorm:"uniqueIndex:provider_index"` - Config datatypes.JSON - CreatedAt time.Time `gorm:"autoCreateTime"` - UpdatedAt time.Time `gorm:"autoUpdateTime"` - DeletedAt gorm.DeletedAt `gorm:"index"` + ID uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` + NamespaceID uuid.UUID `gorm:"type:uuid"` + Type string `gorm:"uniqueIndex:providers_type_urn"` + URN string `gorm:"uniqueIndex:providers_type_urn"` + Config datatypes.JSON + CreatedAt time.Time `gorm:"autoCreateTime"` + UpdatedAt time.Time `gorm:"autoUpdateTime"` + DeletedAt gorm.DeletedAt `gorm:"index"` } // TableName overrides the table name @@ -45,7 +46,7 @@ func (m *Provider) FromDomain(p *domain.Provider) error { m.ID = id m.Type = p.Type m.URN = p.URN - m.Config = datatypes.JSON(config) + m.Config = config m.CreatedAt = p.CreatedAt m.UpdatedAt = p.UpdatedAt diff --git a/internal/store/postgres/model/resource.go b/internal/store/postgres/model/resource.go index 49200feef..0775df117 100644 --- a/internal/store/postgres/model/resource.go +++ b/internal/store/postgres/model/resource.go @@ -15,11 +15,12 @@ import ( // Resource is the database model for resource type Resource struct { ID uuid.UUID `gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"` + NamespaceID uuid.UUID `gorm:"type:uuid"` ParentID *string `gorm:"type:uuid"` - ProviderType string `gorm:"uniqueIndex:resource_index"` - ProviderURN string `gorm:"uniqueIndex:resource_index"` - Type string `gorm:"uniqueIndex:resource_index"` - URN string `gorm:"uniqueIndex:resource_index"` + ProviderType string `gorm:"uniqueIndex:resources_provider_type_provider_urn_type_urn"` + ProviderURN string `gorm:"uniqueIndex:resources_provider_type_provider_urn_type_urn"` + Type string `gorm:"uniqueIndex:resources_provider_type_provider_urn_type_urn"` + URN string `gorm:"uniqueIndex:resources_provider_type_provider_urn_type_urn"` Name string Details datatypes.JSON Labels datatypes.JSON @@ -41,6 +42,7 @@ func (Resource) TableName() string { func (r *Resource) BeforeCreate(tx *gorm.DB) error { tx.Statement.AddClause(clause.OnConflict{ Columns: []clause.Column{ + {Name: "namespace_id"}, {Name: "provider_type"}, {Name: "provider_urn"}, {Name: "type"}, diff --git a/internal/store/postgres/namespace_repository.go b/internal/store/postgres/namespace_repository.go new file mode 100644 index 000000000..8f575e131 --- /dev/null +++ b/internal/store/postgres/namespace_repository.go @@ -0,0 +1,79 @@ +package postgres + +import ( + "context" + "errors" + "fmt" + + "github.com/raystack/guardian/domain" + "github.com/raystack/guardian/internal/store/postgres/model" + "gorm.io/gorm" +) + +type NamespaceRepository struct { + store *Store +} + +func NewNamespaceRepository(store *Store) *NamespaceRepository { + return &NamespaceRepository{ + store: store, + } +} + +func (r *NamespaceRepository) List(ctx context.Context) ([]*domain.Namespace, error) { + var namespaces []*model.Namespace + + if err := r.store.Tx(ctx, func(tx *gorm.DB) error { + return tx.Find(&namespaces).Error + }); err != nil { + return nil, err + } + + var results []*domain.Namespace + for _, activity := range namespaces { + a := &domain.Namespace{} + if err := activity.ToDomain(a); err != nil { + return nil, fmt.Errorf("failed to convert model %q to domain: %w", activity.ID, err) + } + results = append(results, a) + } + return results, nil +} + +func (r *NamespaceRepository) GetOne(ctx context.Context, id string) (*domain.Namespace, error) { + var m model.Namespace + if err := r.store.Tx(ctx, func(tx *gorm.DB) error { + return tx.Where("id = ?", id).First(&m).Error + }); err != nil { + if errors.Is(err, gorm.ErrRecordNotFound) { + return nil, fmt.Errorf("namespace not found") + } + return nil, err + } + a := &domain.Namespace{} + if err := m.ToDomain(a); err != nil { + return nil, err + } + return a, nil +} + +func (r *NamespaceRepository) BulkUpsert(ctx context.Context, namespaces []*domain.Namespace) error { + if len(namespaces) == 0 { + return nil + } + + namespaceModels := make([]*model.Namespace, len(namespaces)) + for i, a := range namespaces { + namespaceModels[i] = &model.Namespace{} + if err := namespaceModels[i].FromDomain(a); err != nil { + return fmt.Errorf("failed to convert domain to model: %w", err) + } + } + + return r.store.Tx(ctx, func(tx *gorm.DB) error { + if err := tx.Save(namespaceModels).Error; err != nil { + return fmt.Errorf("failed to upsert provider namespaces: %w", err) + } + return nil + }) +} diff --git a/internal/store/postgres/policy_repository.go b/internal/store/postgres/policy_repository.go index 0d16821ed..181b8250b 100644 --- a/internal/store/postgres/policy_repository.go +++ b/internal/store/postgres/policy_repository.go @@ -12,11 +12,11 @@ import ( // PolicyRepository talks to the store to read or insert data type PolicyRepository struct { - db *gorm.DB + store *Store } // NewPolicyRepository returns repository struct -func NewPolicyRepository(db *gorm.DB) *PolicyRepository { +func NewPolicyRepository(db *Store) *PolicyRepository { return &PolicyRepository{db} } @@ -26,8 +26,9 @@ func (r *PolicyRepository) Create(ctx context.Context, p *domain.Policy) error { if err := m.FromDomain(p); err != nil { return fmt.Errorf("serializing policy: %w", err) } + m.NamespaceID = namespaceFromContext(ctx) - return r.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + return r.store.Tx(ctx, func(tx *gorm.DB) error { if result := tx.Create(m); result.Error != nil { return result.Error } @@ -48,7 +49,9 @@ func (r *PolicyRepository) Find(ctx context.Context) ([]*domain.Policy, error) { policies := []*domain.Policy{} var models []*model.Policy - if err := r.db.WithContext(ctx).Find(&models).Error; err != nil { + if err := r.store.Tx(ctx, func(tx *gorm.DB) error { + return tx.Find(&models).Error + }); err != nil { return nil, err } for _, m := range models { @@ -75,7 +78,9 @@ func (r *PolicyRepository) GetOne(ctx context.Context, id string, version uint) } conds := append([]interface{}{condition}, args...) - if err := r.db.WithContext(ctx).Order("version desc").First(m, conds...).Error; err != nil { + if err := r.store.Tx(ctx, func(tx *gorm.DB) error { + return tx.Order("version desc").First(m, conds...).Error + }); err != nil { if err == gorm.ErrRecordNotFound { return nil, policy.ErrPolicyNotFound } diff --git a/internal/store/postgres/policy_repository_test.go b/internal/store/postgres/policy_repository_test.go index 72cbea8e8..ce3703936 100644 --- a/internal/store/postgres/policy_repository_test.go +++ b/internal/store/postgres/policy_repository_test.go @@ -33,7 +33,7 @@ func (s *PolicyRepositoryTestSuite) SetupSuite() { s.T().Fatal(err) } - s.repository = postgres.NewPolicyRepository(s.store.DB()) + s.repository = postgres.NewPolicyRepository(s.store) } func (s *PolicyRepositoryTestSuite) TearDownSuite() { diff --git a/internal/store/postgres/provider_repository.go b/internal/store/postgres/provider_repository.go index b26efc4e8..295814805 100644 --- a/internal/store/postgres/provider_repository.go +++ b/internal/store/postgres/provider_repository.go @@ -12,11 +12,11 @@ import ( // ProviderRepository talks to the store to read or insert data type ProviderRepository struct { - db *gorm.DB + store *Store } // NewProviderRepository returns repository struct -func NewProviderRepository(db *gorm.DB) *ProviderRepository { +func NewProviderRepository(db *Store) *ProviderRepository { return &ProviderRepository{db} } @@ -26,8 +26,9 @@ func (r *ProviderRepository) Create(ctx context.Context, p *domain.Provider) err if err := m.FromDomain(p); err != nil { return err } + m.NamespaceID = namespaceFromContext(ctx) - return r.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + return r.store.Tx(ctx, func(tx *gorm.DB) error { if result := tx.Create(m); result.Error != nil { return result.Error } @@ -48,7 +49,9 @@ func (r *ProviderRepository) Find(ctx context.Context) ([]*domain.Provider, erro providers := []*domain.Provider{} var models []*model.Provider - if err := r.db.WithContext(ctx).Find(&models).Error; err != nil { + if err := r.store.Tx(ctx, func(tx *gorm.DB) error { + return tx.Find(&models).Error + }); err != nil { return nil, err } for _, m := range models { @@ -70,7 +73,9 @@ func (r *ProviderRepository) GetByID(ctx context.Context, id string) (*domain.Pr } var m model.Provider - if err := r.db.WithContext(ctx).First(&m, "id = ?", id).Error; err != nil { + if err := r.store.Tx(ctx, func(tx *gorm.DB) error { + return tx.First(&m, "id = ?", id).Error + }); err != nil { if err == gorm.ErrRecordNotFound { return nil, provider.ErrRecordNotFound } @@ -91,9 +96,9 @@ func (r *ProviderRepository) GetTypes(ctx context.Context) ([]domain.ProviderTyp ResourceType string } - r.db.WithContext(ctx). - Raw("select distinct provider_type, type as resource_type from resources").Scan(&results) - + _ = r.store.Tx(ctx, func(tx *gorm.DB) error { + return tx.Raw("select distinct provider_type, type as resource_type from resources").Scan(&results).Error + }) if len(results) == 0 { return nil, errors.New("no provider types found") } @@ -128,8 +133,10 @@ func (r *ProviderRepository) GetOne(ctx context.Context, pType, urn string) (*do } m := &model.Provider{} - db := r.db.WithContext(ctx).Where("type = ?", pType).Where("urn = ?", urn) - if err := db.Take(m).Error; err != nil { + err := r.store.Tx(ctx, func(tx *gorm.DB) error { + return tx.Where("type = ?", pType).Where("urn = ?", urn).Take(m).Error + }) + if err != nil { if errors.Is(err, gorm.ErrRecordNotFound) { return nil, provider.ErrRecordNotFound } @@ -154,8 +161,9 @@ func (r *ProviderRepository) Update(ctx context.Context, p *domain.Provider) err if err := m.FromDomain(p); err != nil { return err } + m.NamespaceID = namespaceFromContext(ctx) - return r.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + return r.store.Tx(ctx, func(tx *gorm.DB) error { if err := tx.Model(m).Updates(*m).Error; err != nil { return err } @@ -176,8 +184,11 @@ func (r *ProviderRepository) Delete(ctx context.Context, id string) error { if id == "" { return provider.ErrEmptyIDParam } - - result := r.db.WithContext(ctx).Where("id = ?", id).Delete(&model.Provider{}) + var result *gorm.DB + r.store.Tx(ctx, func(tx *gorm.DB) error { + result = tx.Where("id = ?", id).Delete(&model.Provider{}) + return nil + }) if result.Error != nil { return result.Error } diff --git a/internal/store/postgres/provider_repository_test.go b/internal/store/postgres/provider_repository_test.go index 3d424d0d4..2cd53e581 100644 --- a/internal/store/postgres/provider_repository_test.go +++ b/internal/store/postgres/provider_repository_test.go @@ -36,9 +36,9 @@ func (s *ProviderRepositoryTestSuite) SetupSuite() { s.T().Fatal(err) } - s.repository = postgres.NewProviderRepository(s.store.DB()) - s.resourceRepository = postgres.NewResourceRepository(s.store.DB()) - s.providerRepository = postgres.NewProviderRepository(s.store.DB()) + s.repository = postgres.NewProviderRepository(s.store) + s.resourceRepository = postgres.NewResourceRepository(s.store) + s.providerRepository = postgres.NewProviderRepository(s.store) } func (s *ProviderRepositoryTestSuite) TearDownSuite() { diff --git a/internal/store/postgres/resource_repository.go b/internal/store/postgres/resource_repository.go index 5c971db46..7b8284813 100644 --- a/internal/store/postgres/resource_repository.go +++ b/internal/store/postgres/resource_repository.go @@ -13,11 +13,11 @@ import ( // ResourceRepository talks to the store/database to read/insert data type ResourceRepository struct { - db *gorm.DB + store *Store } // NewResourceRepository returns *Repository -func NewResourceRepository(db *gorm.DB) *ResourceRepository { +func NewResourceRepository(db *Store) *ResourceRepository { return &ResourceRepository{db} } @@ -27,41 +27,42 @@ func (r *ResourceRepository) Find(ctx context.Context, filter domain.ListResourc return nil, err } - db := r.db.WithContext(ctx) - if filter.IDs != nil { - db = db.Where(filter.IDs) - } - if !filter.IsDeleted { - db = db.Where(`"is_deleted" = ?`, filter.IsDeleted) - } - if filter.ResourceType != "" { - db = db.Where(`"type" = ?`, filter.ResourceType) - } - if filter.Name != "" { - db = db.Where(`"name" = ?`, filter.Name) - } - if filter.ProviderType != "" { - db = db.Where(`"provider_type" = ?`, filter.ProviderType) - } - if filter.ProviderURN != "" { - db = db.Where(`"provider_urn" = ?`, filter.ProviderURN) - } - if filter.ResourceURN != "" { - db = db.Where(`"urn" = ?`, filter.ResourceURN) - } - if filter.ResourceURNs != nil { - db = db.Where(`"urn" IN ?`, filter.ResourceURNs) - } - if filter.ResourceTypes != nil { - db = db.Where(`"type" IN ?`, filter.ResourceTypes) - } - for path, v := range filter.Details { - pathArr := "{" + strings.Join(strings.Split(path, "."), ",") + "}" - db = db.Where(`"details" #>> ? = ?`, pathArr, v) - } - var models []*model.Resource - if err := db.Find(&models).Error; err != nil { + err := r.store.Tx(ctx, func(tx *gorm.DB) error { + if filter.IDs != nil { + tx = tx.Where(filter.IDs) + } + if !filter.IsDeleted { + tx = tx.Where(`"is_deleted" = ?`, filter.IsDeleted) + } + if filter.ResourceType != "" { + tx = tx.Where(`"type" = ?`, filter.ResourceType) + } + if filter.Name != "" { + tx = tx.Where(`"name" = ?`, filter.Name) + } + if filter.ProviderType != "" { + tx = tx.Where(`"provider_type" = ?`, filter.ProviderType) + } + if filter.ProviderURN != "" { + tx = tx.Where(`"provider_urn" = ?`, filter.ProviderURN) + } + if filter.ResourceURN != "" { + tx = tx.Where(`"urn" = ?`, filter.ResourceURN) + } + if filter.ResourceURNs != nil { + tx = tx.Where(`"urn" IN ?`, filter.ResourceURNs) + } + if filter.ResourceTypes != nil { + tx = tx.Where(`"type" IN ?`, filter.ResourceTypes) + } + for path, v := range filter.Details { + pathArr := "{" + strings.Join(strings.Split(path, "."), ",") + "}" + tx = tx.Where(`"details" #>> ? = ?`, pathArr, v) + } + return tx.Find(&models).Error + }) + if err != nil { return nil, err } @@ -85,7 +86,9 @@ func (r *ResourceRepository) GetOne(ctx context.Context, id string) (*domain.Res } var m model.Resource - if err := r.db.WithContext(ctx).Where("id = ?", id).Take(&m).Error; err != nil { + if err := r.store.Tx(ctx, func(tx *gorm.DB) error { + return tx.Where("id = ?", id).Take(&m).Error + }); err != nil { if err == gorm.ErrRecordNotFound { return nil, resource.ErrRecordNotFound } @@ -108,14 +111,14 @@ func (r *ResourceRepository) BulkUpsert(ctx context.Context, resources []*domain if err := m.FromDomain(r); err != nil { return err } - + m.NamespaceID = namespaceFromContext(ctx) models = append(models, m) } if len(models) > 0 { - return r.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + return r.store.Tx(ctx, func(tx *gorm.DB) error { // upsert clause is moved to model.Resource.BeforeCreate() (gorm's hook) to apply the same for associations (model.Resource.Children) - if err := r.db.Create(models).Error; err != nil { + if err := tx.Create(models).Error; err != nil { return err } @@ -144,8 +147,9 @@ func (r *ResourceRepository) Update(ctx context.Context, res *domain.Resource) e if err := m.FromDomain(res); err != nil { return err } + m.NamespaceID = namespaceFromContext(ctx) - return r.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + return r.store.Tx(ctx, func(tx *gorm.DB) error { if err := tx.Model(m).Where("id = ?", m.ID).Updates(*m).Error; err != nil { return err } @@ -165,8 +169,11 @@ func (r *ResourceRepository) Delete(ctx context.Context, id string) error { if id == "" { return resource.ErrEmptyIDParam } - - result := r.db.WithContext(ctx).Where("id = ?", id).Delete(&model.Resource{}) + var result *gorm.DB + _ = r.store.Tx(ctx, func(tx *gorm.DB) error { + result = tx.Where("id = ?", id).Delete(&model.Resource{}) + return nil + }) if result.Error != nil { return result.Error } @@ -181,8 +188,11 @@ func (r *ResourceRepository) BatchDelete(ctx context.Context, ids []string) erro if ids == nil { return resource.ErrEmptyIDParam } - - result := r.db.WithContext(ctx).Delete(&model.Resource{}, ids) + var result *gorm.DB + _ = r.store.Tx(ctx, func(tx *gorm.DB) error { + result = tx.Delete(&model.Resource{}, ids) + return nil + }) if result.Error != nil { return result.Error } diff --git a/internal/store/postgres/resource_repository_test.go b/internal/store/postgres/resource_repository_test.go index 1c5ef1651..96c3fcd61 100644 --- a/internal/store/postgres/resource_repository_test.go +++ b/internal/store/postgres/resource_repository_test.go @@ -34,13 +34,13 @@ func (s *ResourceRepositoryTestSuite) SetupSuite() { s.T().Fatal(err) } - s.repository = postgres.NewResourceRepository(s.store.DB()) + s.repository = postgres.NewResourceRepository(s.store) s.dummyProvider = &domain.Provider{ Type: "provider_test", URN: "provider_urn_test", } - providerRepository := postgres.NewProviderRepository(s.store.DB()) + providerRepository := postgres.NewProviderRepository(s.store) err = providerRepository.Create(context.Background(), s.dummyProvider) s.Require().NoError(err) } diff --git a/internal/store/postgres/store.go b/internal/store/postgres/store.go index a18e513d6..7627b539f 100644 --- a/internal/store/postgres/store.go +++ b/internal/store/postgres/store.go @@ -1,6 +1,7 @@ package postgres import ( + "context" "embed" "errors" "fmt" @@ -9,6 +10,9 @@ import ( "net/url" "strings" + "github.com/google/uuid" + "github.com/raystack/guardian/pkg/auth" + "github.com/golang-migrate/migrate/v4" _ "github.com/golang-migrate/migrate/v4/database/postgres" "github.com/golang-migrate/migrate/v4/source/iofs" @@ -26,6 +30,15 @@ type Store struct { config *store.Config } +const ( + namespaceRLSSetQuery = "SET app.current_tenant = '%s'" + namespaceRLSResetQuery = "RESET app.current_tenant" +) + +type Connection interface { + Tx(ctx context.Context, fc func(tx *gorm.DB) error) error +} + func NewStore(c *store.Config) (*Store, error) { dsn := fmt.Sprintf( "host=%s user=%s dbname=%s port=%s sslmode=%s password=%s", @@ -52,6 +65,24 @@ func (s *Store) DB() *gorm.DB { return s.db } +func (s *Store) Tx(ctx context.Context, fc func(tx *gorm.DB) error) error { + return s.db.WithContext(ctx).Connection(func(conn *gorm.DB) error { + return conn.Transaction(func(tx *gorm.DB) error { + // set tenant context + if err := tx.Exec(fmt.Sprintf(namespaceRLSSetQuery, namespaceFromContext(ctx))).Error; err != nil { + return err + } + + // execute the requested operation + fcErr := fc(tx) + + // reset tenant context + _ = tx.Exec(namespaceRLSResetQuery).Error + return fcErr + }) + }) +} + func (s *Store) Migrate() error { iofsDriver, err := iofs.New(fs, "migrations") if err != nil { @@ -88,3 +119,7 @@ func toConnectionString(c *store.Config) string { return pgURL.String() } + +func namespaceFromContext(ctx context.Context) uuid.UUID { + return auth.FetchNamespace(ctx) +} diff --git a/pkg/auth/frontier.go b/pkg/auth/frontier.go new file mode 100644 index 000000000..fce934b1d --- /dev/null +++ b/pkg/auth/frontier.go @@ -0,0 +1,53 @@ +package auth + +import ( + "context" + "strings" + + "github.com/google/uuid" + "github.com/lestrrat-go/jwx/v2/jwt" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" +) + +type FrontierConfig struct { + Host string `mapstructure:"host"` + NamespaceClaimsKey string `mapstructure:"namespace_claims_key" default:"project_id"` +} + +type namespaceContextKey struct{} + +// FrontierJWTInterceptor extracts the frontier jwt from the request metadata and +// set the context with the extracted jwt claims +func FrontierJWTInterceptor(conf FrontierConfig) grpc.UnaryServerInterceptor { + return func(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + if md, ok := metadata.FromIncomingContext(ctx); ok { + if v := md.Get("authorization"); len(v) > 0 && len(v[0]) > 0 { + var frontierToken string + if strings.HasPrefix(v[0], "Bearer ") { + frontierToken = strings.TrimPrefix(v[0], "Bearer ") + } + if frontierToken != "" { + // TODO(kushsharma): we should validate the token using frontier public key + insecureToken, err := jwt.ParseInsecure([]byte(frontierToken)) + if err == nil { + if namespace, claimExists := insecureToken.Get(conf.NamespaceClaimsKey); claimExists { + if id, err := uuid.Parse(namespace.(string)); err == nil { + ctx = context.WithValue(ctx, namespaceContextKey{}, id) + } + } + } + } + } + } + + return handler(ctx, req) + } +} + +func FetchNamespace(ctx context.Context) uuid.UUID { + if namespace, ok := ctx.Value(namespaceContextKey{}).(uuid.UUID); ok { + return namespace + } + return uuid.Nil +}