auth

package
v0.0.0-...-3ba1d39 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 13 Imported by: 4

Documentation

Index

Constants

View Source
const (
	Authentication_Authenticate_FullMethodName = "/buildbarn.auth.Authentication/Authenticate"
)
View Source
const (
	Authorizer_Authorize_FullMethodName = "/buildbarn.auth.Authorizer/Authorize"
)

Variables

View Source
var Authentication_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "buildbarn.auth.Authentication",
	HandlerType: (*AuthenticationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Authenticate",
			Handler:    _Authentication_Authenticate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/buildbarn/bb-storage/pkg/proto/auth/auth.proto",
}

Authentication_ServiceDesc is the grpc.ServiceDesc for Authentication service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Authorizer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "buildbarn.auth.Authorizer",
	HandlerType: (*AuthorizerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Authorize",
			Handler:    _Authorizer_Authorize_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/buildbarn/bb-storage/pkg/proto/auth/auth.proto",
}

Authorizer_ServiceDesc is the grpc.ServiceDesc for Authorizer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_github_com_buildbarn_bb_storage_pkg_proto_auth_auth_proto protoreflect.FileDescriptor

Functions

func RegisterAuthenticationServer

func RegisterAuthenticationServer(s grpc.ServiceRegistrar, srv AuthenticationServer)

func RegisterAuthorizerServer

func RegisterAuthorizerServer(s grpc.ServiceRegistrar, srv AuthorizerServer)

Types

type AuthenticateRequest

type AuthenticateRequest struct {
	RequestMetadata map[string]*AuthenticateRequest_ValueList `` /* 180-byte string literal not displayed */
	Scope           *structpb.Value                           `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthenticateRequest) Descriptor deprecated

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

Deprecated: Use AuthenticateRequest.ProtoReflect.Descriptor instead.

func (*AuthenticateRequest) GetRequestMetadata

func (x *AuthenticateRequest) GetRequestMetadata() map[string]*AuthenticateRequest_ValueList

func (*AuthenticateRequest) GetScope

func (x *AuthenticateRequest) GetScope() *structpb.Value

func (*AuthenticateRequest) ProtoMessage

func (*AuthenticateRequest) ProtoMessage()

func (*AuthenticateRequest) ProtoReflect

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

func (*AuthenticateRequest) Reset

func (x *AuthenticateRequest) Reset()

func (*AuthenticateRequest) String

func (x *AuthenticateRequest) String() string

type AuthenticateRequest_ValueList

type AuthenticateRequest_ValueList struct {
	Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthenticateRequest_ValueList) Descriptor deprecated

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

Deprecated: Use AuthenticateRequest_ValueList.ProtoReflect.Descriptor instead.

func (*AuthenticateRequest_ValueList) GetValue

func (x *AuthenticateRequest_ValueList) GetValue() []string

func (*AuthenticateRequest_ValueList) ProtoMessage

func (*AuthenticateRequest_ValueList) ProtoMessage()

func (*AuthenticateRequest_ValueList) ProtoReflect

func (*AuthenticateRequest_ValueList) Reset

func (x *AuthenticateRequest_ValueList) Reset()

func (*AuthenticateRequest_ValueList) String

type AuthenticateResponse

type AuthenticateResponse struct {

	// Types that are valid to be assigned to Verdict:
	//
	//	*AuthenticateResponse_Allow
	//	*AuthenticateResponse_Deny
	Verdict             isAuthenticateResponse_Verdict `protobuf_oneof:"verdict"`
	CacheExpirationTime *timestamppb.Timestamp         `protobuf:"bytes,3,opt,name=cache_expiration_time,json=cacheExpirationTime,proto3" json:"cache_expiration_time,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthenticateResponse) Descriptor deprecated

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

Deprecated: Use AuthenticateResponse.ProtoReflect.Descriptor instead.

func (*AuthenticateResponse) GetAllow

func (*AuthenticateResponse) GetCacheExpirationTime

func (x *AuthenticateResponse) GetCacheExpirationTime() *timestamppb.Timestamp

func (*AuthenticateResponse) GetDeny

func (x *AuthenticateResponse) GetDeny() string

func (*AuthenticateResponse) GetVerdict

func (x *AuthenticateResponse) GetVerdict() isAuthenticateResponse_Verdict

func (*AuthenticateResponse) ProtoMessage

func (*AuthenticateResponse) ProtoMessage()

func (*AuthenticateResponse) ProtoReflect

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

func (*AuthenticateResponse) Reset

func (x *AuthenticateResponse) Reset()

func (*AuthenticateResponse) String

func (x *AuthenticateResponse) String() string

type AuthenticateResponse_Allow

type AuthenticateResponse_Allow struct {
	Allow *AuthenticationMetadata `protobuf:"bytes,1,opt,name=allow,proto3,oneof"`
}

type AuthenticateResponse_Deny

type AuthenticateResponse_Deny struct {
	Deny string `protobuf:"bytes,2,opt,name=deny,proto3,oneof"`
}

type AuthenticationClient

type AuthenticationClient interface {
	Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
}

AuthenticationClient is the client API for Authentication service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type AuthenticationMetadata

type AuthenticationMetadata struct {
	Public            *structpb.Value `protobuf:"bytes,1,opt,name=public,proto3" json:"public,omitempty"`
	TracingAttributes []*v1.KeyValue  `protobuf:"bytes,2,rep,name=tracing_attributes,json=tracingAttributes,proto3" json:"tracing_attributes,omitempty"`
	Private           *structpb.Value `protobuf:"bytes,3,opt,name=private,proto3" json:"private,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthenticationMetadata) Descriptor deprecated

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

Deprecated: Use AuthenticationMetadata.ProtoReflect.Descriptor instead.

func (*AuthenticationMetadata) GetPrivate

func (x *AuthenticationMetadata) GetPrivate() *structpb.Value

func (*AuthenticationMetadata) GetPublic

func (x *AuthenticationMetadata) GetPublic() *structpb.Value

func (*AuthenticationMetadata) GetTracingAttributes

func (x *AuthenticationMetadata) GetTracingAttributes() []*v1.KeyValue

func (*AuthenticationMetadata) ProtoMessage

func (*AuthenticationMetadata) ProtoMessage()

func (*AuthenticationMetadata) ProtoReflect

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

func (*AuthenticationMetadata) Reset

func (x *AuthenticationMetadata) Reset()

func (*AuthenticationMetadata) String

func (x *AuthenticationMetadata) String() string

type AuthenticationServer

type AuthenticationServer interface {
	Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
}

AuthenticationServer is the server API for Authentication service. All implementations should embed UnimplementedAuthenticationServer for forward compatibility.

type AuthorizeRequest

type AuthorizeRequest struct {
	AuthenticationMetadata *AuthenticationMetadata `` /* 127-byte string literal not displayed */
	Scope                  *structpb.Value         `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"`
	InstanceName           string                  `protobuf:"bytes,3,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthorizeRequest) Descriptor deprecated

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

Deprecated: Use AuthorizeRequest.ProtoReflect.Descriptor instead.

func (*AuthorizeRequest) GetAuthenticationMetadata

func (x *AuthorizeRequest) GetAuthenticationMetadata() *AuthenticationMetadata

func (*AuthorizeRequest) GetInstanceName

func (x *AuthorizeRequest) GetInstanceName() string

func (*AuthorizeRequest) GetScope

func (x *AuthorizeRequest) GetScope() *structpb.Value

func (*AuthorizeRequest) ProtoMessage

func (*AuthorizeRequest) ProtoMessage()

func (*AuthorizeRequest) ProtoReflect

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

func (*AuthorizeRequest) Reset

func (x *AuthorizeRequest) Reset()

func (*AuthorizeRequest) String

func (x *AuthorizeRequest) String() string

type AuthorizeResponse

type AuthorizeResponse struct {

	// Types that are valid to be assigned to Verdict:
	//
	//	*AuthorizeResponse_Allow
	//	*AuthorizeResponse_Deny
	Verdict             isAuthorizeResponse_Verdict `protobuf_oneof:"verdict"`
	CacheExpirationTime *timestamppb.Timestamp      `protobuf:"bytes,3,opt,name=cache_expiration_time,json=cacheExpirationTime,proto3" json:"cache_expiration_time,omitempty"`
	// contains filtered or unexported fields
}

func (*AuthorizeResponse) Descriptor deprecated

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

Deprecated: Use AuthorizeResponse.ProtoReflect.Descriptor instead.

func (*AuthorizeResponse) GetAllow

func (x *AuthorizeResponse) GetAllow() *emptypb.Empty

func (*AuthorizeResponse) GetCacheExpirationTime

func (x *AuthorizeResponse) GetCacheExpirationTime() *timestamppb.Timestamp

func (*AuthorizeResponse) GetDeny

func (x *AuthorizeResponse) GetDeny() string

func (*AuthorizeResponse) GetVerdict

func (x *AuthorizeResponse) GetVerdict() isAuthorizeResponse_Verdict

func (*AuthorizeResponse) ProtoMessage

func (*AuthorizeResponse) ProtoMessage()

func (*AuthorizeResponse) ProtoReflect

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

func (*AuthorizeResponse) Reset

func (x *AuthorizeResponse) Reset()

func (*AuthorizeResponse) String

func (x *AuthorizeResponse) String() string

type AuthorizeResponse_Allow

type AuthorizeResponse_Allow struct {
	Allow *emptypb.Empty `protobuf:"bytes,1,opt,name=allow,proto3,oneof"`
}

type AuthorizeResponse_Deny

type AuthorizeResponse_Deny struct {
	Deny string `protobuf:"bytes,2,opt,name=deny,proto3,oneof"`
}

type AuthorizerClient

type AuthorizerClient interface {
	Authorize(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*AuthorizeResponse, error)
}

AuthorizerClient is the client API for Authorizer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewAuthorizerClient

func NewAuthorizerClient(cc grpc.ClientConnInterface) AuthorizerClient

type AuthorizerServer

type AuthorizerServer interface {
	Authorize(context.Context, *AuthorizeRequest) (*AuthorizeResponse, error)
}

AuthorizerServer is the server API for Authorizer service. All implementations should embed UnimplementedAuthorizerServer for forward compatibility.

type UnimplementedAuthenticationServer

type UnimplementedAuthenticationServer struct{}

UnimplementedAuthenticationServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedAuthenticationServer) Authenticate

type UnimplementedAuthorizerServer

type UnimplementedAuthorizerServer struct{}

UnimplementedAuthorizerServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedAuthorizerServer) Authorize

type UnsafeAuthenticationServer

type UnsafeAuthenticationServer interface {
	// contains filtered or unexported methods
}

UnsafeAuthenticationServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthenticationServer will result in compilation errors.

type UnsafeAuthorizerServer

type UnsafeAuthorizerServer interface {
	// contains filtered or unexported methods
}

UnsafeAuthorizerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthorizerServer will result in compilation errors.

Jump to

Keyboard shortcuts

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