Documentation ¶
Index ¶
- Variables
- func PackTokens(gatesData []*GateData) (*AccessBox, *Secrets, error)
- type AccessBox
- func (*AccessBox) Descriptor() ([]byte, []int)deprecated
- func (x *AccessBox) GetBox(owner *keys.PrivateKey) (*Box, error)
- func (x *AccessBox) GetContainerPolicy() []*AccessBox_ContainerPolicy
- func (x *AccessBox) GetGates() []*AccessBox_Gate
- func (x *AccessBox) GetOwnerPublicKey() []byte
- func (x *AccessBox) GetPlacementPolicy() ([]*ContainerPolicy, error)
- func (x *AccessBox) GetTokens(owner *keys.PrivateKey) (*GateData, error)
- func (x *AccessBox) Marshal() ([]byte, error)
- func (*AccessBox) ProtoMessage()
- func (x *AccessBox) ProtoReflect() protoreflect.Message
- func (x *AccessBox) Reset()
- func (x *AccessBox) String() string
- func (x *AccessBox) Unmarshal(data []byte) error
- type AccessBox_ContainerPolicy
- func (*AccessBox_ContainerPolicy) Descriptor() ([]byte, []int)deprecated
- func (x *AccessBox_ContainerPolicy) GetLocationConstraint() string
- func (x *AccessBox_ContainerPolicy) GetPolicy() []byte
- func (*AccessBox_ContainerPolicy) ProtoMessage()
- func (x *AccessBox_ContainerPolicy) ProtoReflect() protoreflect.Message
- func (x *AccessBox_ContainerPolicy) Reset()
- func (x *AccessBox_ContainerPolicy) String() string
- type AccessBox_Gate
- func (*AccessBox_Gate) Descriptor() ([]byte, []int)deprecated
- func (x *AccessBox_Gate) GetGatePublicKey() []byte
- func (x *AccessBox_Gate) GetTokens() []byte
- func (*AccessBox_Gate) ProtoMessage()
- func (x *AccessBox_Gate) ProtoReflect() protoreflect.Message
- func (x *AccessBox_Gate) Reset()
- func (x *AccessBox_Gate) String() string
- type Box
- type ContainerPolicy
- type GateData
- type Secrets
- type Tokens
- func (*Tokens) Descriptor() ([]byte, []int)deprecated
- func (x *Tokens) GetAccessKey() []byte
- func (x *Tokens) GetBearerToken() []byte
- func (x *Tokens) GetSessionTokens() [][]byte
- func (*Tokens) ProtoMessage()
- func (x *Tokens) ProtoReflect() protoreflect.Message
- func (x *Tokens) Reset()
- func (x *Tokens) String() string
Constants ¶
This section is empty.
Variables ¶
var File_creds_accessbox_accessbox_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type AccessBox ¶ added in v0.16.0
type AccessBox struct { OwnerPublicKey []byte `protobuf:"bytes,1,opt,name=ownerPublicKey,proto3" json:"ownerPublicKey,omitempty"` Gates []*AccessBox_Gate `protobuf:"bytes,2,rep,name=gates,proto3" json:"gates,omitempty"` ContainerPolicy []*AccessBox_ContainerPolicy `protobuf:"bytes,3,rep,name=containerPolicy,proto3" json:"containerPolicy,omitempty"` // contains filtered or unexported fields }
func (*AccessBox) Descriptor
deprecated
added in
v0.16.0
func (*AccessBox) GetBox ¶ added in v0.17.0
func (x *AccessBox) GetBox(owner *keys.PrivateKey) (*Box, error)
GetBox parses AccessBox to Box.
func (*AccessBox) GetContainerPolicy ¶ added in v0.17.0
func (x *AccessBox) GetContainerPolicy() []*AccessBox_ContainerPolicy
func (*AccessBox) GetGates ¶ added in v0.16.0
func (x *AccessBox) GetGates() []*AccessBox_Gate
func (*AccessBox) GetOwnerPublicKey ¶ added in v0.16.0
func (*AccessBox) GetPlacementPolicy ¶ added in v0.17.0
func (x *AccessBox) GetPlacementPolicy() ([]*ContainerPolicy, error)
GetPlacementPolicy returns ContainerPolicy from AccessBox.
func (*AccessBox) GetTokens ¶ added in v0.16.0
func (x *AccessBox) GetTokens(owner *keys.PrivateKey) (*GateData, error)
GetTokens returns gate tokens from AccessBox.
func (*AccessBox) ProtoMessage ¶ added in v0.16.0
func (*AccessBox) ProtoMessage()
func (*AccessBox) ProtoReflect ¶ added in v0.16.0
func (x *AccessBox) ProtoReflect() protoreflect.Message
type AccessBox_ContainerPolicy ¶ added in v0.17.0
type AccessBox_ContainerPolicy struct { LocationConstraint string `protobuf:"bytes,1,opt,name=locationConstraint,proto3" json:"locationConstraint,omitempty"` Policy []byte `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"` // contains filtered or unexported fields }
func (*AccessBox_ContainerPolicy) Descriptor
deprecated
added in
v0.17.0
func (*AccessBox_ContainerPolicy) Descriptor() ([]byte, []int)
Deprecated: Use AccessBox_ContainerPolicy.ProtoReflect.Descriptor instead.
func (*AccessBox_ContainerPolicy) GetLocationConstraint ¶ added in v0.17.0
func (x *AccessBox_ContainerPolicy) GetLocationConstraint() string
func (*AccessBox_ContainerPolicy) GetPolicy ¶ added in v0.17.0
func (x *AccessBox_ContainerPolicy) GetPolicy() []byte
func (*AccessBox_ContainerPolicy) ProtoMessage ¶ added in v0.17.0
func (*AccessBox_ContainerPolicy) ProtoMessage()
func (*AccessBox_ContainerPolicy) ProtoReflect ¶ added in v0.17.0
func (x *AccessBox_ContainerPolicy) ProtoReflect() protoreflect.Message
func (*AccessBox_ContainerPolicy) Reset ¶ added in v0.17.0
func (x *AccessBox_ContainerPolicy) Reset()
func (*AccessBox_ContainerPolicy) String ¶ added in v0.17.0
func (x *AccessBox_ContainerPolicy) String() string
type AccessBox_Gate ¶ added in v0.16.0
type AccessBox_Gate struct { Tokens []byte `protobuf:"bytes,1,opt,name=tokens,proto3" json:"tokens,omitempty"` GatePublicKey []byte `protobuf:"bytes,2,opt,name=gatePublicKey,proto3" json:"gatePublicKey,omitempty"` // contains filtered or unexported fields }
func (*AccessBox_Gate) Descriptor
deprecated
added in
v0.16.0
func (*AccessBox_Gate) Descriptor() ([]byte, []int)
Deprecated: Use AccessBox_Gate.ProtoReflect.Descriptor instead.
func (*AccessBox_Gate) GetGatePublicKey ¶ added in v0.16.0
func (x *AccessBox_Gate) GetGatePublicKey() []byte
func (*AccessBox_Gate) GetTokens ¶ added in v0.16.0
func (x *AccessBox_Gate) GetTokens() []byte
func (*AccessBox_Gate) ProtoMessage ¶ added in v0.16.0
func (*AccessBox_Gate) ProtoMessage()
func (*AccessBox_Gate) ProtoReflect ¶ added in v0.16.0
func (x *AccessBox_Gate) ProtoReflect() protoreflect.Message
func (*AccessBox_Gate) Reset ¶ added in v0.16.0
func (x *AccessBox_Gate) Reset()
func (*AccessBox_Gate) String ¶ added in v0.16.0
func (x *AccessBox_Gate) String() string
type Box ¶
type Box struct { Gate *GateData Policies []*ContainerPolicy }
Box represents friendly AccessBox.
type ContainerPolicy ¶ added in v0.17.0
type ContainerPolicy struct { LocationConstraint string Policy netmap.PlacementPolicy }
ContainerPolicy represents friendly AccessBox_ContainerPolicy.
type GateData ¶ added in v0.16.0
type GateData struct { AccessKey string BearerToken *bearer.Token SessionTokens []*session.Container GateKey *keys.PublicKey }
GateData represents gate tokens in AccessBox.
func NewGateData ¶ added in v0.16.0
NewGateData returns GateData from the provided bearer token and the public gate key.
func (*GateData) SessionTokenForDelete ¶ added in v0.19.0
SessionTokenForDelete returns the first suitable container session context for DELETE operation.
func (*GateData) SessionTokenForPut ¶ added in v0.19.0
SessionTokenForPut returns the first suitable container session context for PUT operation.
func (*GateData) SessionTokenForSetEACL ¶ added in v0.19.0
SessionTokenForSetEACL returns the first suitable container session context for SetEACL operation.
type Secrets ¶ added in v0.16.0
type Secrets struct { AccessKey string EphemeralKey *keys.PrivateKey }
Secrets represents AccessKey and the key to encrypt gate tokens.
type Tokens ¶ added in v0.16.0
type Tokens struct { AccessKey []byte `protobuf:"bytes,1,opt,name=accessKey,proto3" json:"accessKey,omitempty"` BearerToken []byte `protobuf:"bytes,2,opt,name=bearerToken,proto3" json:"bearerToken,omitempty"` SessionTokens [][]byte `protobuf:"bytes,3,rep,name=sessionTokens,proto3" json:"sessionTokens,omitempty"` // contains filtered or unexported fields }
func (*Tokens) Descriptor
deprecated
added in
v0.16.0
func (*Tokens) GetAccessKey ¶ added in v0.16.0
func (*Tokens) GetBearerToken ¶ added in v0.16.0
func (*Tokens) GetSessionTokens ¶ added in v0.19.0
func (*Tokens) ProtoMessage ¶ added in v0.16.0
func (*Tokens) ProtoMessage()
func (*Tokens) ProtoReflect ¶ added in v0.16.0
func (x *Tokens) ProtoReflect() protoreflect.Message