Documentation ¶
Overview ¶
Package v1 contains the v1 GRPC client and server definitions for implementing OIDC interactions for the Platform.
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterSecurityTokenServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSecurityTokenServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecurityTokenServiceClient) error
- func RegisterSecurityTokenServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSecurityTokenServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SecurityTokenServiceServer) error
- func RegisterSecurityTokenServiceServer(s grpc.ServiceRegistrar, srv SecurityTokenServiceServer)
- type ClientOption
- type Clients
- type ExchangeRequest
- func (*ExchangeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExchangeRequest) GetAud() []string
- func (x *ExchangeRequest) GetCap() []string
- func (x *ExchangeRequest) GetCluster() string
- func (x *ExchangeRequest) GetIdentity() string
- func (x *ExchangeRequest) GetIncludeUpstreamToken() bool
- func (x *ExchangeRequest) GetScope() string
- func (*ExchangeRequest) ProtoMessage()
- func (x *ExchangeRequest) ProtoReflect() protoreflect.Message
- func (x *ExchangeRequest) Reset()
- func (x *ExchangeRequest) String() string
- type RawToken
- type SecurityTokenServiceClient
- type SecurityTokenServiceServer
- type UnimplementedSecurityTokenServiceServer
- type UnsafeSecurityTokenServiceServer
Constants ¶
const (
SecurityTokenService_Exchange_FullMethodName = "/chainguard.platform.oidc.SecurityTokenService/Exchange"
)
Variables ¶
var File_oidc_platform_proto protoreflect.FileDescriptor
var SecurityTokenService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "chainguard.platform.oidc.SecurityTokenService", HandlerType: (*SecurityTokenServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Exchange", Handler: _SecurityTokenService_Exchange_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "oidc.platform.proto", }
SecurityTokenService_ServiceDesc is the grpc.ServiceDesc for SecurityTokenService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSecurityTokenServiceHandler ¶
func RegisterSecurityTokenServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSecurityTokenServiceHandler registers the http handlers for service SecurityTokenService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSecurityTokenServiceHandlerClient ¶
func RegisterSecurityTokenServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecurityTokenServiceClient) error
RegisterSecurityTokenServiceHandlerClient registers the http handlers for service SecurityTokenService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SecurityTokenServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SecurityTokenServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SecurityTokenServiceClient" to call the correct interceptors.
func RegisterSecurityTokenServiceHandlerFromEndpoint ¶
func RegisterSecurityTokenServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSecurityTokenServiceHandlerFromEndpoint is same as RegisterSecurityTokenServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSecurityTokenServiceHandlerServer ¶
func RegisterSecurityTokenServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SecurityTokenServiceServer) error
RegisterSecurityTokenServiceHandlerServer registers the http handlers for service SecurityTokenService to "mux". UnaryRPC :call SecurityTokenServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSecurityTokenServiceHandlerFromEndpoint instead.
func RegisterSecurityTokenServiceServer ¶
func RegisterSecurityTokenServiceServer(s grpc.ServiceRegistrar, srv SecurityTokenServiceServer)
Types ¶
type ClientOption ¶
type ClientOption func(*options)
func WithUserAgent ¶
func WithUserAgent(agent string) ClientOption
type Clients ¶
type Clients interface { STS() SecurityTokenServiceClient Close() error }
func NewClients ¶
func NewClientsFromConnection ¶
func NewClientsFromConnection(conn *grpc.ClientConn) Clients
type ExchangeRequest ¶
type ExchangeRequest struct { Aud []string `protobuf:"bytes,1,rep,name=aud,proto3" json:"aud,omitempty"` Scope string `protobuf:"bytes,2,opt,name=scope,proto3" json:"scope,omitempty"` Cluster string `protobuf:"bytes,3,opt,name=cluster,proto3" json:"cluster,omitempty"` Identity string `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"` // List of capabilities to request for the token. Cap []string `protobuf:"bytes,5,rep,name=cap,proto3" json:"cap,omitempty"` // Whether or not to include the upstream token in the response IncludeUpstreamToken bool `protobuf:"varint,6,opt,name=include_upstream_token,json=includeUpstreamToken,proto3" json:"include_upstream_token,omitempty"` // contains filtered or unexported fields }
func (*ExchangeRequest) Descriptor
deprecated
func (*ExchangeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExchangeRequest.ProtoReflect.Descriptor instead.
func (*ExchangeRequest) GetAud ¶
func (x *ExchangeRequest) GetAud() []string
func (*ExchangeRequest) GetCap ¶
func (x *ExchangeRequest) GetCap() []string
func (*ExchangeRequest) GetCluster ¶
func (x *ExchangeRequest) GetCluster() string
func (*ExchangeRequest) GetIdentity ¶
func (x *ExchangeRequest) GetIdentity() string
func (*ExchangeRequest) GetIncludeUpstreamToken ¶
func (x *ExchangeRequest) GetIncludeUpstreamToken() bool
func (*ExchangeRequest) GetScope ¶
func (x *ExchangeRequest) GetScope() string
func (*ExchangeRequest) ProtoMessage ¶
func (*ExchangeRequest) ProtoMessage()
func (*ExchangeRequest) ProtoReflect ¶
func (x *ExchangeRequest) ProtoReflect() protoreflect.Message
func (*ExchangeRequest) Reset ¶
func (x *ExchangeRequest) Reset()
func (*ExchangeRequest) String ¶
func (x *ExchangeRequest) String() string
type RawToken ¶
type RawToken struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*RawToken) Descriptor
deprecated
func (*RawToken) ProtoMessage ¶
func (*RawToken) ProtoMessage()
func (*RawToken) ProtoReflect ¶
func (x *RawToken) ProtoReflect() protoreflect.Message
type SecurityTokenServiceClient ¶
type SecurityTokenServiceClient interface {
Exchange(ctx context.Context, in *ExchangeRequest, opts ...grpc.CallOption) (*RawToken, error)
}
SecurityTokenServiceClient is the client API for SecurityTokenService 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 NewSecurityTokenServiceClient ¶
func NewSecurityTokenServiceClient(cc grpc.ClientConnInterface) SecurityTokenServiceClient
type SecurityTokenServiceServer ¶
type SecurityTokenServiceServer interface { Exchange(context.Context, *ExchangeRequest) (*RawToken, error) // contains filtered or unexported methods }
SecurityTokenServiceServer is the server API for SecurityTokenService service. All implementations must embed UnimplementedSecurityTokenServiceServer for forward compatibility
type UnimplementedSecurityTokenServiceServer ¶
type UnimplementedSecurityTokenServiceServer struct { }
UnimplementedSecurityTokenServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSecurityTokenServiceServer) Exchange ¶
func (UnimplementedSecurityTokenServiceServer) Exchange(context.Context, *ExchangeRequest) (*RawToken, error)
type UnsafeSecurityTokenServiceServer ¶
type UnsafeSecurityTokenServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSecurityTokenServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SecurityTokenServiceServer will result in compilation errors.