Help us shape the future of Go! Take the 2026 Go Developer Survey

authzv1

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// optional string permission = 50001;
	E_Permission = &file_corelib_authz_v1_authz_options_proto_extTypes[0]
	// optional string required_relation = 50002;
	E_RequiredRelation = &file_corelib_authz_v1_authz_options_proto_extTypes[1]
	// optional corelib.authz.v1.ScopeExtractor scope_extractor = 50003;
	E_ScopeExtractor = &file_corelib_authz_v1_authz_options_proto_extTypes[2]
	// optional string required_acr_min = 50004;
	E_RequiredAcrMin = &file_corelib_authz_v1_authz_options_proto_extTypes[3]
	// optional bool hide_existence = 50005;
	E_HideExistence = &file_corelib_authz_v1_authz_options_proto_extTypes[4]
	// optional bool scope_filtered = 50006;
	E_ScopeFiltered = &file_corelib_authz_v1_authz_options_proto_extTypes[5]
	// optional string exempt_reason = 50007;
	E_ExemptReason = &file_corelib_authz_v1_authz_options_proto_extTypes[6]
)

Extension fields to descriptorpb.MethodOptions.

View Source
var File_corelib_authz_v1_authz_options_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ScopeExtractor

type ScopeExtractor struct {

	// Object type of the authorization model the scope id resolves to. Either a hierarchy scope
	// (`cluster` / `account` / `project`) or a per-resource
	// object type registered in the authorization model (`vpc_network`,
	// `storage_volume`, `iam_group`, `iam_role`, ...). The api-gateway authz
	// middleware builds the FGA Check object as `<object_type>:<id>` where the
	// id is taken from `from_request_field`. Must be non-empty.
	ObjectType string `protobuf:"bytes,1,opt,name=object_type,json=objectType,proto3" json:"object_type,omitempty"`
	// Name of the proto request field from which the scope id is taken. Must be
	// a top-level field on the request message and a non-empty string.
	FromRequestField string `protobuf:"bytes,2,opt,name=from_request_field,json=fromRequestField,proto3" json:"from_request_field,omitempty"`
	// Name of the proto request field from which the *object type* is
	// derived at request time (scope-polymorphic RPCs). When set + non-empty,
	// the api-gateway authz middleware reads this top-level string field off the
	// request and uses its value as the FGA Check object type instead of the
	// static `object_type` above. The static `object_type` then serves only as
	// the fallback when the field is absent/empty.
	//
	// Used by AccessBindingService.ListByScope, where the bound resource scope
	// (project|account|cluster) is carried by the request `resource_type` field —
	// a single fixed `object_type` cannot express it (a hardcoded `project` made
	// account/cluster-scoped reads check `project:<id>` → 403). Empty for the
	// overwhelming majority of RPCs, which have a fixed scope type.
	ObjectTypeFromRequestField string `` /* 145-byte string literal not displayed */
	// contains filtered or unexported fields
}

ScopeExtractor describes how the iam authz middleware extracts an scope object from an incoming RPC request.

func (*ScopeExtractor) Descriptor deprecated

func (*ScopeExtractor) Descriptor() ([]byte, []int)

Deprecated: Use ScopeExtractor.ProtoReflect.Descriptor instead.

func (*ScopeExtractor) GetFromRequestField

func (x *ScopeExtractor) GetFromRequestField() string

func (*ScopeExtractor) GetObjectType

func (x *ScopeExtractor) GetObjectType() string

func (*ScopeExtractor) GetObjectTypeFromRequestField

func (x *ScopeExtractor) GetObjectTypeFromRequestField() string

func (*ScopeExtractor) ProtoMessage

func (*ScopeExtractor) ProtoMessage()

func (*ScopeExtractor) ProtoReflect

func (x *ScopeExtractor) ProtoReflect() protoreflect.Message

func (*ScopeExtractor) Reset

func (x *ScopeExtractor) Reset()

func (*ScopeExtractor) String

func (x *ScopeExtractor) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL